‎2007 Jun 01 6:51 AM
hi , iam new to abap could u plz give code for this,
loop at the internal table xkomv and get all the records for the condition where the condition item number of xkomv(kposn) is equal to the sales document item of VBAP(posnr).
then check for the condition types other than 'zvpr' type. if it is of this type then this code should not get triggered.
ie if komv-kschl='zvpr'...
thank in advance
‎2007 Jun 02 1:22 PM
Hi Sasi
The code would be as follows:
Clear:tbl_xkomv.
loop at xkomv into wa_xkomv where kposn = g_posnr.
if wa_xkomv-kschl EQ 'ZVPR'.
continue.
else.
append wa_xkomv to tbl_xkomv.
endif.
endloop.
Note: 1. In the code above , i assume that g_posnr has the item number from
VBAP
2. wa_xkomv is an explicit work area for your internal table xkomv.
3. tbl_xkomv is another internal table into which i am getting the records for
the sales document item number you have and for the condition type NE
zvpr.This table is of the same type as xkomv.
If you need to process a series of sales document numbers from VBAP then you will have to loop at all of them and then do the code above.
I hope this helps
Cheers
shivika
‎2007 Jun 04 11:06 AM
hi,,,
check if the following helps...
loop at xkomv where xkomv-kposn =VBAP-posnr.
if komv-kschl='zvpr'.
continue.
end if.
else
<ur logic>
Also you can check help of all the keywords using F1 help, you may develop your logic.
Regards
Dinesh Dhiman
<b>please reward if useful.</b>
‎2011 Aug 26 10:15 AM