cancel
Showing results for 
Search instead for 
Did you mean: 

Changing pricing routine - RV61A901

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Answers (2)

Answers (2)

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi,

I don't want to add a line item.

What I want is, when VA03 is triggered, it should add an item's condition type to another test item and also it's value.

Could you tell me which routine to use from VOFM? Pricing routine or anything else?

Thanks!

Regards,

Ashutosh.

Former Member
0 Kudos

You need to add a line for Condition Type isn't it ?

archanapawar
Contributor
0 Kudos

I think you should create formula.

VOFM -> Formula -> Condition value

VOFM routines should be created after consulting with your SAP SD consultant. So, talk to SD consultant whether this is where you need to create routine.

Former Member
0 Kudos

I want to add a condition for a line item.

Former Member
0 Kudos

Hi,

Yes, I would do that. But, I am still confused about adding the condition type (ZAGV) to the line item with item category ZVAT.

Thanks,

Ashutosh.

archanapawar
Contributor
0 Kudos

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.

Former Member
0 Kudos

Hi,

Can you simply tell me what to do if I want to copy one item's condition to another item?

That's what the requirement actually is. Just that it should be automated.

Thanks.

Regards,

Ashutosh.

archanapawar
Contributor
0 Kudos

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.

Former Member
0 Kudos

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.

archanapawar
Contributor
0 Kudos

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.