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: 

BAPI_QUOTATION_CREATEFROMDATA2 problem

Former Member
0 Kudos

I am getting a strange problem. I am using SAP JCO for creating customer quotation in SAP with above BAPI. Everything is working fine except the parameter passed as price get multiplied by 10 when stored in SAP. code snap is as follows

//Setting Partners

PARTNERS.appendRow();

PARTNERS.setValue("WE","PARTN_ROLE");

PARTNERS.setValue("10000101","PARTN_NUMB");

PARTNERS.appendRow();

PARTNERS.setValue("AG","PARTN_ROLE");

PARTNERS.setValue("10000116","PARTN_NUMB");

//Quotation headers

QuotHeader.setValue("1234","SALES_ORG");

QuotHeader.setValue("Zxxx","DOC_TYPE");

QuotHeader.setValue("10","DISTR_CHAN");

QuotHeader.setValue("15","DIVISION");

QuotHeader.setValue("4000000001","PURCH_NO_C");

QuotHeader.setValue("ZM01","PMNTTRMS");      

//Setting header Update flags

QuotHeaderINX.setValue("I","UPDATEFLAG");

QuotHeaderINX.setValue("X","DOC_TYPE");

QuotHeaderINX.setValue("X","SALES_ORG");

QuotHeaderINX.setValue("X","DISTR_CHAN");

QuotHeaderINX.setValue("X","DIVISION");

QuotHeaderINX.setValue("X","PURCH_NO_C");

QuotHeaderINX.setValue("X","PMNTTRMS");

//Item and its update flags

ITEMS_INX.appendRow();

ITEMS_IN.appendRow();

ITEMS_INX.setValue("000010","ITM_NUMBER");

ITEMS_IN.setValue("000010","ITM_NUMBER");

ITEMS_INX.setValue("X","MATERIAL");

ITEMS_IN.setValue("PABCD","MATERIAL");

ITEMS_INX.setValue("X","PLANT");

ITEMS_IN.setValue("2345","PLANT");

ITEMS_INX.setValue("X","SALES_UNIT");

ITEMS_IN.setValue("KWH","SALES_UNIT");          

ITEMS_INX.setValue("X","SALES_UNIT");

ITEMS_IN.setValue("KWH","SALES_UNIT");

ITEMS_INX.setValue("I","UPDATEFLAG");

//codition and its flags

ORDER_COND_INX.appendRow();

ORDER_COND_IN.appendRow();

ORDER_COND_INX.setValue("000010","ITM_NUMBER");

ORDER_COND_IN.setValue("000010","ITM_NUMBER");

ORDER_COND_INX.setValue("X","COND_TYPE");

ORDER_COND_IN.setValue("ZCND","COND_TYPE");

ORDER_COND_INX.setValue("X","COND_VALUE");

ORDER_COND_IN.setValue("2.37","COND_VALUE");

This value of 2.37 stored as 23.7. Any help?

3 REPLIES 3

former_member205060
Active Participant
0 Kudos

Hi,

I think this can be due to DECIMAL(.) or COMMA(,) notation specified for the currency, Try and check using this value

ORDER_COND_IN.setValue("2,37","COND_VALUE"); instead of below mention

ORDER_COND_IN.setValue("2.37","COND_VALUE");

Regards,

Rahul SIngh

madhu_vadlamani
Active Contributor
0 Kudos

Hi,

Please check the user parameters and that condition type.

Regards,

Madhu.

0 Kudos

Thanks all for helping, but my problem is solved, Problem was with currency, which needs to be specified explicitly. I add two lines of code as below and problem resolved

ORDER_COND_INX.setValue("X","CURRENCY");

ORDER_COND_IN.setValue("INR","CURRENCY");

Regards

Brijesh Singh