Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

extracting data from different tables

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

5 REPLIES 5

former_member376453
Contributor
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

Yes,

I got it..............

Thanks alot.............

former_member632729
Contributor
0 Kudos

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..

Former Member
0 Kudos

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