03-05-2009 9:26 PM
HI
can some one help me to extract the data from:
NATION field from ADRC table + Company code (BURKS) field from LFA1.
I am using SQVI (query), but not succeeded. Please help me.....
Thanks
NIlesh
03-05-2009 11:13 PM
Hi,
select the record from lfa1 into wa with resect to BUKRS
select BUKRS
ADRNR
from lfa1
into wa
where BUKRS = 'XYZ'.
endselect.
"based on the ADRNR you got in wa. use that in ADRC table with SQVI query
03-05-2009 9:53 PM
I am not sure what is your exact requirement is, but in LFA1 there is one field ADRNR, fetch this field from LFA1 depending on the LIFNR, then go to ADRC and Put that ADRNR and fetch NATION.
Kuntal
03-05-2009 11:13 PM
Hi,
select the record from lfa1 into wa with resect to BUKRS
select BUKRS
ADRNR
from lfa1
into wa
where BUKRS = 'XYZ'.
endselect.
"based on the ADRNR you got in wa. use that in ADRC table with SQVI query
03-06-2009 5:55 PM
03-06-2009 2:32 AM
Hi Dude,
First fetch the data from the tables LFA1 and TZONE using the below condition..
LFA1-LIFNR = TZONE-LAND1
LFA1-LZONE = TZONE-ZONE1
and then TZONE table and ADRC table link..
TZONE-LAND1 = COUNTRY
TZONE-ZONE1 = TRANSPZONE..
Check with this link..
03-06-2009 3:33 AM
Hi,
see this sample code based on the name u have to get i think..
SELECT SINGLE * FROM lfa1 INTO i_lfa1 WHERE lifnr = i_ekko-lifnr.
IF sy-subrc = 0.
*SELECT SINGLE * FROM adrc INTO i_adrc WHERE name1 = i_lfa1-name1.*
IF sy-subrc = 0.
i_zzep_pohdr_s-ven_name = i_lfa1-name1. "5
i_zzep_pohdr_s-ven_addy1 = i_adrc-street. "6
i_zzep_pohdr_s-ven_strt2 = i_adrc-str_suppl1. "7
i_zzep_pohdr_s-ven_strt3 = i_adrc-str_suppl2. "8
i_zzep_pohdr_s-ven_strt4 = i_adrc-str_suppl3. "9
i_zzep_pohdr_s-ven_strt5 = i_adrc-location. "10
i_zzep_pohdr_s-ven_tel_no = i_adrc-tel_number. "11
i_zzep_pohdr_s-ven_tel_ext = i_adrc-tel_extens. "12
i_zzep_pohdr_s-ven_fax_no = i_adrc-fax_number. "13
i_zzep_pohdr_s-nation = i_adrc-nation. "14
ENDIF.
ENDIF.
Regards,
Kiran