cancel
Showing results for 
Search instead for 
Did you mean: 

field selection from adrc table

former_member636068
Participant
0 Kudos

HI all,

Actually selecting some fields into say table t_likp based value entered for vbeln.

by takin t_likp-vbeln i can go to vbpa and select adrnr from vbpa for parvw eq 'sh'. my question is can i take this vbpa-adrnr

and go to adrc directly for detailed address or

is it necessary for me to go to kna1 from vbpa-kunnr and get the adrnr number form kna1 to go to adrc?

plz help.

thnks n regards,

Ahmita

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can directly hit ADRC table with VBPA-ADRNR.

regards

padma

Answers (5)

Answers (5)

former_member636068
Participant
0 Kudos

thnks to all of u

Former Member
0 Kudos

Hi

It is always better to use KNA1 table using KUNNR and get the ADRNR field rather than using VBPA adrnr. both will be same but, when ever Customers are created they are stored in KNA1 table with correct details and ADRNR will have correct Address #. which can b used in ADRC table to fetch Correct Address details.

surya

venkat_o
Active Contributor
0 Kudos

Hi Ashmita, <li>You can use VBPA table ADRNR directly to get the address details from ADRC table. Thanks Venkat.O

Former Member
0 Kudos

Hi,

try this way..



*        Fetching Sales order number
          SELECT SINGLE * FROM ekkn INTO w_ekkn
          WHERE ebeln = xekko-ebeln
          AND   ebelp = xekpo-ebelp.
*         If sales order number exist for PO and PO item then looking
*         for Address number to get the details and modifying
*         (Overwriting)the Existing Address Details in segment 'E1EDKA1'
          IF sy-subrc = 0 AND w_ekkn-vbeln IS NOT INITIAL.
            SELECT SINGLE *
              FROM vbpa
              WHERE vbeln = w_ekkn-vbeln
                AND posnr = '000000'
                AND parvw = 'WE'.
            IF sy-subrc = 0.
              SELECT SINGLE * FROM adrc WHERE addrnumber = vbpa-adrnr.
           ENDIF.
       ENDIF.

Prabhudas

Former Member
0 Kudos

Hi ,

I think vbpa-kunnr is not useful. You can use directly vbpa-adrnr.

I found some test data where vbpa-adrnr is populated but vbpa-kunnr is not there.

Thanks,

suma.