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

BAPI_SALESDATA_CREATEFROMDAT2 Changing Condition Value

Former Member
0 Likes
582

Hi,

when I use BAPI_SALESDATA_CREATEFROMDAT2 to changeing condition value

wa_order_conditions_in-itm_number = '000010'.

wa_order_conditions_in-COND_ST_NO = '010'.

wa_order_conditions_in-COND_COUNT = '01'.

wa_order_conditions_in-cond_type = 'PR01'.

wa_order_conditions_in-applicatio = 'V'.

wa_order_conditions_in-cond_value = '1900'.

wa_order_conditions_in-currency = 'RMB'.

wa_order_conditions_in-cond_p_unt = '1'.

wa_order_conditions_in-cond_unit = 'PC'.

wa_order_conditions_inx-itm_number = '000010'.

wa_order_conditions_inx-COND_ST_NO = '010'.

wa_order_conditions_inx-COND_COUNT = '01'.

wa_order_conditions_inx-cond_type = 'PR01'.

wa_order_conditions_inx-updateflag = 'U'.

wa_order_conditions_inx-cond_value = 'X'.

wa_order_conditions_inx-currency = 'X'.

wa_order_conditions_inx-cond_p_unt = 'X'.

wa_order_conditions_inx-cond_unit = 'x'.

APPEND wa_order_conditions_inx TO

i_order_conditions_inx.

APPEND wa_order_conditions_in TO

i_order_conditions_in.

CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'

EXPORTING

order_header_in = wa_order_header_in

order_header_inx = wa_order_header_inx

IMPORTING

salesdocument = salesdocument

TABLES

........

........

order_conditions_in = i_order_conditions_in

order_conditions_inx = i_order_conditions_inx.

run it i get a Sales order when i look the item conditions

i found it add a new condition line like :

PR01 1800.00 RMB ... (automatic price which can

be deleted and modifide manual

in 'VA02')

PR01 1900.00 RMB ... (I expected)

.......

.......

but I only want to get one line

PR01 1900.00 RMB ...

now i don't know the reason,

my version is R/3 3.6C

"

wa_order_conditions_in-itm_number = '000010'.

wa_order_conditions_in-COND_ST_NO = '010'.

wa_order_conditions_in-COND_COUNT = '01'.

'000010','010', '01'

"

is found in BAPISDORDER_GETDETAILEDLIST by creat in va01 and look it in BAPISDORDER_GETDETAILEDLIST.

4 REPLIES 4
Read only

Former Member
0 Likes
540

Hello,

It is quite possible that the second line item with value 1800 is maintained in configuration .So although you are passing one condition item, two records are created.

Regards

Amruta

Read only

0 Likes
540

hi,

Yes, 1800 is linked with PR01 and 1800 can be modified in 'va02', but when i use bapi,it can not be replaced with 1900,

so i am worry about this. i want to know the way to replay this item ,not the now thing, only add an item.

Read only

christian_wohlfahrt
Active Contributor
0 Likes
540

Hi Pan!

The handling of the conditions is quite tricky. Have a look at OSS 593246 for some hints.

Have also a look in some other linked topics:

Regards,

Christian

Read only

0 Likes
540

Thanks It seems to me it's very hard for me to resolve it , I can only to change the price use BDC for VA02.

Because my vesion is 4.6c.