Application Development and Automation 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: 
Read only

want coding for this

Former Member
0 Likes
480

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

3 REPLIES 3
Read only

Former Member
0 Likes
442

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

Read only

Former Member
0 Likes
442

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>

Read only

Former Member
0 Likes
442

This message was moderated.