Application Development 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: 

data convertion when using 'BAPI_SALESORDER_CREATEFROMDAT2'

Former Member
0 Kudos
188

Hi.

1. when i call bapi to create sales order, i fill the price condition value

' i_ORDERCONDITIONSIN-COND_TYPE = 'PR01'.

i_ORDERCONDITIONSIN-COND_VALUE = it_sdmaster-NETWR.'

and i_ORDERCONDITIONSIN is the type of BAPICOND in this BAPI.

the value is 50,000,000.000000000 which i assign, but in the order BAPI created is '500,000,000.00'

2. when i upload data from excel to sap, it converts data '0.914' into '914.000 '. The data type is DEC length 23 and decimal 4.

tks for ur help.

3 REPLIES 3

naimesh_patel
Active Contributor
0 Kudos
74

Hello,

Try by passing the values in the

ORDER_ITEMS_CONDS-CONDVALUE.

And where-ever your values comes like '914.000' instead of '0.914', then devide that value by 1000 (specific to this case).

regards,

Naimesh

Former Member
0 Kudos
74

Hi,

Regarding the formatting issue, you could use the cell formatting in XL by using rightclick on the cell and then choose custom. In here you can specify the format as needed. So here try to keep the source and targer(SAP Format) the same.

Regards,

HR

Former Member
0 Kudos
74

Dear Gang Li

Ignore the length and decimals of the field in the BAPI Structure BAPICOND-COND_VALUE.

Supposing you need the value to be '1234.56'. Pass the value directly i.e IBAPICOND-COND_VALUE = '1234.56'.

After creating the order you can find the value for the condition to be the same, no conversion is done internally.

Do appreciate if you find the info useful.

Thanks

Eswar