Skip to Content
author's profile photo Former Member
Former Member

Relate between two tables in ALV REPORT(SAP-ABAP)

Hi Friends,

I want to retrieve name1 and city1 from <b>kna1</b> , and kunrg from <b>vbrk</b>.

Could u pls tell me on what basis i should pick these value ?

Thx and Regds,

Bapi

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 11, 2007 at 01:26 PM

    Hi

    tables: kna1

    select single KUNNR name1 ort01 from kna1 where kunnr = vbrk-kunrg.

    or

    select single KUNNR name1 ort01 from kna1 where kunnr = vbrk-kunag.

    write: / kna1-kunnr, kna1-name1, kna1-ort01.

    <b>

    link between tables is

    VBRK-KUNAG = KNA1-KUNNR (customer/Sold to party)

    Reward points for useful Answers</b>

    Regards

    Anji

    Message was edited by:

    Anji Reddy Vangala

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 11, 2007 at 01:30 PM

    if condition.

    select single * from kna1 into kna1 where

    where kunnr = kna1-kunnr.

    else.

    select single * from kna1 into kna1

    where kunnr = vbrk-kunag.

    endif.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 11, 2007 at 01:35 PM

    hi bapi,

    u can relate the 2 tables by relating the fields kna1-kunnr = vbrk-kunag....

    hope this will help u out..

    please reward points in case usefull...

    regards,

    prashant

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.