‎2009 May 28 9:38 AM
Hello ,
there is one problem while using this select query :
SELECT a~vbeln vkorg audat auart a~netwr werks mwsbp INTO
TABLE int_vbak
FROM vbak AS a JOIN vbap AS b
ON a~vbeln = b~vbeln
FOR ALL ENTRIES IN int_auart
WHERE auart EQ int_auart-low
AND vkorg IN s_vkorg
AND audat IN s_audat
AND werks IN s_werks
AND abgru EQ ' '.In VBAP table i have 10 records for particular vbeln but i am getting 9 only what could be the problem
i have come across a scenerio when my vbeln and netwr are same at tht time it misses one record .
Please help me to solve this issue so that i could get all the 10 records .
Thanks Aryan
‎2009 May 28 9:46 AM
‎2009 May 28 9:47 AM
Dear Aryan,
SELECT avbeln vkorg audat auart anetwr werks mwsbp INTO
TABLE int_vbak
FROM vbak AS a JOIN vbap AS b
ON avbeln = bvbeln
FOR ALL ENTRIES IN int_auart
WHERE auart EQ int_auart-low
AND vkorg IN s_vkorg
AND audat IN s_audat
AND werks IN s_werks
AND abgru EQ ' '.
In your code jsut check entries in for all entries table and values in the fields which you have used in your where condition.
Hope this will help you to resolve your problem.
Regards,
Vijay
‎2009 May 28 9:50 AM
I am not getting all the line items for the vbeln in VBAP.
and tht line item i am not getting where netwr are same .
‎2009 May 28 9:57 AM
Hi,
better you use outer join , it will fetch all records in both tables...
Reg,
Siva
‎2009 May 28 10:05 AM
Hi ,
Check the below code..
select
VBELN
POSNR
MATNR
MATWA
KMPMG
WAVWR
NETPR
into corresponding fields of VBAP from VBAP where
(VBELN = VBAK-VBELN).
ALTMP2 = VBAP-POSNR.
ALTMP9 = VBAP-MATNR.
ALTMP10 = VBAP-MATWA.
ALTMP11 = VBAP-KMPMG.
ALTMP12 = VBAP-WAVWR.
ALTMP13 = VBAP-NETPR.