‎2007 Jun 11 5:37 AM
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
‎2007 Jun 11 5:49 AM
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
‎2007 Jun 11 5:52 AM
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
‎2007 Jun 11 6:05 AM
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
‎2007 Jun 11 8:14 AM
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