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

Communication Structures

Former Member
3,682

Hey folks,

I do have some basic doubts on Pricing & Pricing communication structure. These may sound really stupid to some.. But, please ..Please reply if you know the answer..it will help me a lot...

1. What is a Communication Structure??

Lets say - Pricing Communication Structure - KOMP / KOMK.. - I know KOMK is a header Pricing Communication Structure & KOMP for item...

But, precisely what it is the communication structure doing ??

2. If KOMP is for Item; KOMK - for header. Then what is KOMG. What role does structure KOMG play?

3. If we KOMP / KOMK for item & header respectively - then what for are communication structures - KOMPAZ & KOMKAZ

4. What is the difference between KOMK & XKOMK or KOMP & XKOMP..

I mean I really don't know why I see xKOMP in some condition routines..

5. What is XKWERT & KWERT ??

Any documentation on this will be really helpful to me.

Thanks,

Lavanya

1 ACCEPTED SOLUTION
Read only

Former Member
1,488

Hi Lavanya - 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.

Rgds,

Naren

3 REPLIES 3
Read only

Former Member
0 Likes
1,488

Lavanya,

X-fields and X-structures are "change" objects in many SAP programs.

When you first enter a program fields like KOMK are set with the original value and that value remains unchanged during the program's execution.

Any changes made during program execution are applied to the X-equivalent XKOMK, for example. Then when final processing to end the program is performed, the original and changed values are compared to see if the user's actions changed the value. If so, the a database table might need updating, for example.

Good example in Include MV45AFZZ is XVBAK and YVBAK. It is a before- and after- picture of the VBAK table fields. So when a user tries to exit VA02 (for example), SAP compares to see if any VBAK values were changed. If they were (meaning that XVBAK <> YVBAK), then SAP promplts with a pop-up window askign if you would like to save your changes.

Just MS Word, Excel, etc...

Read only

Former Member
1,489

Hi Lavanya - 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.

Rgds,

Naren

Read only

0 Likes
1,488

Thanks for the replies.