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: 

link between LTAK & VBAP

Former Member
0 Kudos

hi all,

i am handling a picking list report .The requirement finally retrieves data from VBAK table based on warehouse number(LGNUM) from LTAK table. I want to link the both the tables through key fields but there r no linking key fields , searched for linking tablebetween the two,but i could find none.

can anyone help me out.

regards

jyoti

4 REPLIES 4

former_member196299
Active Contributor
0 Kudos

hi Jyoti ,

Why d't you try like this , search for any common field in both the tables and then may be you can make a link between the tables .

Regards,

Ranjita

Former Member
0 Kudos

If you have to pickup the data based on LGNUM;

First read the data from LTAK For all the required LGNUMs and then for all these records from LTAK, you can read VBAK. I think the common key is VBELN.

VBAK-VBELN and LTAK-VBELN can be useful for you.

Hope it will help.

Regards,

Vishal

Former Member
0 Kudos

Hi,

<u>First method</u>

Fetch VEBLN from LTAK table & select the reccords from the VBFA table based on the selected VBELN like

 SELECT SINGLE * FROM vbfa CLIENT SPECIFIED
                  WHERE     mandt   =    sy-mandt
                  AND       vbeln   =    lt_pallet-vbeln. 

then



 IF sy-subrc IS INITIAL.
      MOVE:
            vbfa-vbelv   TO   lt_pallet-vbelv,
            vbfa-posnv   TO   lt_pallet-posnv,
            vbfa-posnn   TO   lt_pallet-posnr.
      MODIFY lt_pallet TRANSPORTING vbelv posnv posnr.
    ENDIF.

<u>second method</u>

with the help of the material number & plant .


IF NOT lt_batch[] IS INITIAL.
    SELECT   vbeln   posnr  matnr  charg  kwmeng vrkme
             werks   lgort
             FROM vbap
             INTO TABLE lt_vbap
             FOR ALL ENTRIES IN lt_batch
             WHERE   matnr   =   lt_batch-matnr
             AND     werks   =   lt_batch-werks.
    SORT lt_vbap BY vbeln.
  ENDIF

Reward Points if it is Useful.

Thanks,

Manjunath MS

Former Member
0 Kudos

Hi Jothi,

Try checking the table below:

VBAK-vbeln->

VBAP-vbeln

VBAP-posnr

VBAP-matnr

VBAP-werks->

LTAP-matnr

LTAP-werks->

LTAK-lgnum

LTAK-tanum

I believe this helps you more and reward points if so.

Thanks!.

Ram