Skip to Content
Former Member
May 28, 2010 at 09:51 AM

Price calculation for variant configurable material


Dear experts,

For a customer I'm trying to calculate the printing costs of a variant configurable material. For this purpose I tried several BAPIu2019s like BAPI_SALESORDER_SIMULATE and BAPI_SALESORDER_CREATEFROMDAT2. I read a lot of threads on SDN about this subject but still cannot succeed in this challenge. Below I will mention the steps I followed:

I started off by using BAPI_SALESORDER_SIMULATE. Unfortunately according to this thread (bapisalesordersimulate-price-of-a-variant-configur) it seemed not possible to use BAPI_SALESORDER_SIMULATE for pricing of a variant configurable material.

Next I tried BAPI_SALESORDER_CREATEFROMDAT2. The problem with this BAPI is that it doesnu2019t contain a CONDITIONS_EX table to return the conditions with print price information.

BAPI_SALESORDER_CREATEFROMDAT2 calls the FM SD_SALESDOCUMENT_CREATE so I tried this function module. Iu2019m passing the configuration in the tables sales_cfgs_ref, sales_cfgs_inst, sales_cfgs_inst, sales_cfgs_value and sales_cfgs_vk. After completion of the FM the return table contains the following information:

S   |V4                  |233   |SALES_HEADER_IN has been processed successfully
S   |V4                  |233   |SALES_ITEM_IN has been processed successfully
W   |V1                  |555   |The sales document is not yet complete: Edit data
S   |V1                  |311   |POP Back Office 765962 has been saved

The table incomplete_log contains one line:

FIELD_TEXT	C	40 	Configuration

Table conditions_ex is empty.

When I open the created sales order with transaction VA02 and open the Incompletion log (CTRL + F8) the

following information is displayed:

Following data still needs to be completed
Item    Missing data
10      Configuration

When I open the configuration for this order (CTRL + F1) I notice that the characteristics which I passed in the configuration table u201Csales_cfgs_valueu201D are not filled. It seems that the FM SD_SALESDOCUMENT_CREATE doesnu2019t pass this information to the salesorder.

Does anyone have experience with this issue, know how to use this FM or maybe know another BAPI or FM which can help me in completing this task?

Thanks in advance.


Ivo van Ee

Edited by: Ivo van Ee on May 28, 2010 12:02 PM