cancel
Showing results for 
Search instead for 
Did you mean: 

How to fill in the KOMK and KOMP pricing Communication Structure

shariar_jahromi2
Explorer
0 Kudos

Hello,

I wonder whether you can help me with question below:

We are in the process of modifying an outbound interface from the Billing Document (SAP -SD) to an external System.

In this outbound interface, we wish to invoke the Pricing Function Module (i.e. Function Module: Pricing) to calculate the pricing in the billing document and then include Pricing Condition Types in the outbound XML Message.

Note that the Pricing in the billing document is NOT re-determined, only in the ‘Interface’ to the External System.

The Pricing Function Module is a standard FM that Standard SAP invokes to calculate the Pricing, when creating or modifying a Sales Document.

To test, I run SE37 for the 'Pricing' FM, and 'Manually' provide all the input Parameters in the KOMK and KOMP Pricing Communication Structure such as invoice number, Billing Type, Billing Date, Material Number, Material Type, quantity, etc.. The Pricing Function Module then returns all the appropriate Pricing Condition Types in the TKOMV Structure.

I am aware that, when determining the prices (e.g. during a Sales Order creation), SAP “automatically” populates the KOMK and KOMP pricing structure which it subsequently uses to determine the Pricing Condition records.

My question is whether there is a standard Function Module that I can use to populate the above pricing structures before I call the ‘Pricing’ Function Module.

Writing program codes to populated the pricing Structures is a tedious task and, taking into account the number of fields involved in the structures, there would be a good chance that I may miss a few values, subsequently impacting the number of Pricing Condition Types returned by the FM.

I know, for example, that the Standard Function Module KOMKBV3_FILL can be used to fill the Output Communication Structure KOMKBV3 during the Output Determination.

My questions is whether there is a similar Standard Function Module that I can use to fill in the Pricing Communication Structures automatically using, for example, the Invoice Number or the invoice line item number, so that I can then pass these structures as Input Parameters to the ‘Pricing’ Function Module to calculate the Pricing Condition Types…

Appreciate your help!

SJ

Accepted Solutions (0)

Answers (0)