on 12-04-2014 5:02 AM
Hi Gurus,
I am changing the pricing routine (RV61A901) via VOFM for the following requirement:
There's a condition ZAGV for one item, and it should be automatically added for item category ZVAT.
Could you please tell me how can I do that?
Kind of an urgent request.
Please help.
Thanks in Advance!
Regards,
Ashutosh.
Hi Archana,
Thanks a lot for helping me out.
I've finally solved the issue with following code:
IF W_VBAP-PSTYV = 'ZVAT'.
READ TABLE W_KOMV INTO WA_KOMV WITH KEY KSCHL = 'ZAGV' KPOSN = '000001'.
WA_KOMV-KPOSN = '000002'.
APPEND WA_KOMV TO W_KOMV.
CLEAR: WA_KOMV.
ENDIF.
Closing this thread.
Best Regards,
Ashutosh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is not Recommended to add a line item or line programmatically ,
https://service.sap.com/sap/support/notes/178328
I would recommend to code a check for Item Catergory 'ZVAT' and ZAGV Condition Type , in Sale Order User Exit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashutosh,
You put a breakpoint in the Include RV61A901 and sit with your functional to check what values are available in that include. Accordingly, you can code in the routine. Your functional contact can give you formula to achieve the desired functionality. You need to check KOMV-KSCHL for condition type and KWERT is the value field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should check KOMV-KSCHL = 'ZAGV' and copy the KOMV-KWERT value for the same and put it in KOMV-KWERT of KOMV-KSCHL = 'ZVAT'.
You need to do trial and error. I am not sure whether you have complete KOMV table available in that include. This you will have to check in debug mode.
Note: You need to get access key to edit this include.
Hi Archana,
I am having the whole KOMV table in this include. I checked in debug mode.
Now, if I use field symbols to get the table, could you tell me how can I read the value of KWERT when KOMV-KSCHL for one item category is 'ZAGV' and pass it to the same structure when for same KSCHL with different item category?
There are two item categories (VBAP-PSTYV) namely ZTAO & ZVAT. I need to copy the amount from ZTAO to ZVAT.
Apologies if you couldn't get my point, I am confused myself as I'm new to this kind of development.
Thanks in Advance.
Regards,
Ashutosh.
Hi Ashutosh,
You need to loop at komv table (either in field symbol or in work area). In the loop you can check value of KSCHL for each entry. When it is 'ZAGV' copy KWERT vaklue into local variable. After that you need to check when KSCHL is 'ZVAT', put variable value into KWERT for this condition type.
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.