‎2007 Sep 17 8:51 AM
In VA01.i found the user exit but unable to write the code.
My requriment is sales employee can give the 1 to 10% discount and sales manager can give 11 to 20% discout and GM can give 21 to 30% discount.
Its very urgent requirement pls help me.
USEREXIT_SAVE_DOCUMENT_PREPARE.
tables: konv.
if sy-uname = 'ABAPDEV'.
if konv-kschl = 'K007'.
konv-KBETR < = 10 .
endif.
endif.
but it is not working. it is not going on if konv-kschl = 'K007' condition.
its checking only sy-uname and its coming out and please also check this konv table is correct or not.
Points will be awarded.
Regards
Maqsood
‎2007 Sep 17 11:52 AM
Hi,
Try following code.
If sy-uname = 'ABAPDEV'.
loop at xkomv into wa_komv where KSCHL = 'K007'.
write ur logic for discount....
modify xkomv from wa_komv transporting KBETR.
endloop.
endif.
Shilpa K
‎2007 Sep 17 8:58 AM
Hi!
You might use a LOOP on the tables as well within this user exit.
Mostly the internal tables are beginning with an x.
LOOP AT xkonv.
your coding
ENDLOOP.
You migh check out table xkonp also.
Regards
Tamá
‎2007 Sep 17 11:52 AM
Hi,
Try following code.
If sy-uname = 'ABAPDEV'.
loop at xkomv into wa_komv where KSCHL = 'K007'.
write ur logic for discount....
modify xkomv from wa_komv transporting KBETR.
endloop.
endif.
Shilpa K