cancel
Showing results for 
Search instead for 
Did you mean: 

customer n consignees address

Former Member
0 Kudos

hi all

i want to pint customer n consignee's address for tht in driver program i hav written the below code but its not working if smbdy can help me....

select single ADRNR

from vbpa

into v_adrnr

where vbeln = s_vbeln

and parvw = 'AG'.

if sy-subrc eq 0 and v_adrnr is not initial .

Select name1 city1

from adrc

into table it_cust

where addrnumber = v_adrnr.

endif.

select single ADRNR

from vbpa

into c_adrnr

where vbeln = s_vbeln

and parvw = 'RJ'.

if sy-subrc eq 0 and c_adrnr is not initial .

Select name1 city1

from adrc

into table it_cons

where addrnumber = c_adrnr.

endif.

if sy-subrc eq 0 and v_adrnr is not initial .

Select name1 city1

from adrc

into table it_cust

where addrnumber = v_adrnr.

endif.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

HI,,

use below code

select single ADRNR

from vbpa

into v_adrnr

where vbeln = s_vbeln

and parvw = 'AG'.

if sy-subrc eq 0 and v_adrnr is not initial .

Select name1 city1

from adrc

into table it_cust

where addrnumber = v_adrnr.

endif.

select single ADRNR

from vbpa

into c_adrnr

where vbeln = s_vbeln

and parvw = 'RJ'.

if sy-subrc eq 0 and c_adrnr is not initial .

Select name1 city1

from adrc

into table it_cons

where addrnumber = c_adrnr.

endif.

Why you use same below select statement another time

if sy-subrc eq 0 and v_adrnr is not initial .

Select name1 city1

from adrc

into table it_cust

where addrnumber = v_adrnr.

endif.

Regards

Jana

Former Member
0 Kudos

Hi

There is a functionality called "DEBUGGING", please use it and find if the data is retreived into the internal tables...and check ur conditions are working fine.

Regards,

Vishwa.

Former Member
0 Kudos

hey nikita,

Put break-points and check

Regards,

Midhun Abraham