on 10-08-2008 6:14 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hey nikita,
Put break-points and check
Regards,
Midhun Abraham
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.