Skip to Content
avatar image
Former Member

Stractures in pricing KOMK and KOMP

Hello all,

Can any one please explain me in detail why we use the structures in routines and where we can see them i mean when i filed is assign to KOMK, please explain me brief view of them.

Thanks

Rani

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jul 04, 2007 at 10:09 AM

    Hi Rani - Routines are executed/called during condition type processing from a document. Since, condition type processing happens either during the creation of a particular document (like pricing) or after the document has been saved (like output conditions), data required for processing these condition types are sent through communication structures instead of allowing condition types to access table data directly. Think of this situation, a sales order is in the process of being created and pricing happens before even saving the document. Now if the processing of conditions were to be done using direct table read, how would it fetch data for an order that is still in process of being created... I hope you'r getting the point. Hence, (I believe thats what forced) SAP to design condition type processing using communication structures that would be filled with data before the conditions would be processed.

    Like for instance, pricing. The communication structures, as you know it, KOMK and KOMP would be supplied before a condition type is processed. Similarly, for output condition type processing, communication routines are KOMxByy, where x can be K- Header, P-item level and yy is the application (v1, v2 ). So a sales order output condition type will have these two communication structures for processing, KOMKBV1 and KOMPBV1.....

    You can view the structures and see for yourself the desired field before setting up a condition type. On occasions where you don't find a particular information field in the structure and you think thats required for your condition processing, you would have to enhance these structures. Before that, make sure that the information you are seeking from this new field in the structure can be sourced from the underlying document. For instance, sales order, you need a information out from the order but you don't have a corresponding field in the structure. You would first define the field in the structure (use the standard includes). Then go and have an ABAPer code in the user exit MV45AFZZ (userexit_pricing_prepare) to move the required data to this new field.

    Hope you would have got the basic processing style used in SAP for processing condition types, both at pricing and output condition types.

    Thanks

    Nikhil

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Nikhil,

      That was a great explanation.

      If I could, I would have given you 10 points.:)

      Thanks a lot