cancel
Showing results for 
Search instead for 
Did you mean: 

PROBLEM BAPI_SALESORDER_CREATEFROMDAT2 condvalue

Former Member
0 Kudos

Experts,

We have an issue with BAPI BAPI_SALESORDER_CREATEFROMDAT2. We try change the value for the field condition KONV-KWERT with the following field from the bapi CONDITIONS_IN-CONDVALUE. The condition to modify is a percentage condition. We can modify the percentage condition (KONV-KBETR) with CONDITIONS_IN-COND_VALUE , but canu2019t modify KONV-KWERT without modify percentage. If not we assigned value for field COND_VALUE, the condition is 0. Always calculate the field KWERT based on percentage (cond_value).

This also happens if we try to modify the document with BAPI_SALESORDER_CHANGE

We can modify this field from VA01/VA02 without change the percentage.

We copied the source code where filled the condition structure.

CLEAR u_cond.

u_cond-itm_number = '000010'.

u_cond-cond_type = u2018ZPMAu2019.

u_cond-COND_COUNT = u201801u2019.

u_cond-cond_updat = 'X'.

u_cond-COND_ST_NO = u2018010u2019.

u_cond-CONDVALUE = u20182000u2019.

u_cond-currency = 'BRL'.

APPEND u_cond.

u_condx-itm_number = u2018000010u2019.

u_condx-COND_ST_NO = u2018010u2019.

u_condx-COND_COUNT = u201801u2019.

u_condx-cond_type = u2018ZPMAu2019.

u_condx-updateflag = 'U'.

u_condx-cond_value = 'X'.

u_condx-currency = 'X'.

APPEND u_condx.

Regards,

Ashok Chauhan

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

HI Ashok,

I didn't completely understood your meaning on below statement.

We can modify the percentage condition (KONV-KBETR) with CONDITIONS_IN-COND_VALUE , but canu2019t modify KONV-KWERT without modify percentage.

I thought we can use structure ORDER_CONDITIONS_INX to modify the condition value.

Thank you

Kris

Former Member
0 Kudos

Hello Ashok

I think this is a condition type config issue.

Using V/06, check what type of changes are allowed for condition type ZPMA:

In the Window 'Changes which can be made', see if the fields 'Value' and "Amount/Percent" are checked and if not check them and test.

Hope this helps. Let me know.

Former Member
0 Kudos

hi please go thru this thread is same question is asked - [BAPI_SALESORDER_CREATEFROMDAT2 condvalue|]

Regards,

Rajeev