Skip to Content
0
Former Member
Nov 08, 2007 at 04:17 AM

BAPI Condition value multiplying by 10?

1378 Views

Hi Experts,

I am using BAPI “BAPI_SALESDOCU_CREATEFROMDATA” to create sales order. Every thing fine except issues with condition value (COND_VALUE).

If I pass $5.10 to BAPIITEMIN-COND_VALUE in sales order value saved as 51.00. To fix this issue I divided by 10 to fix, so I am use to pass 0.51. But when condition value $5.12 I divide by 10, so value will be 0.51. So I am loosing the 2nd decimal place.

Can anyone tell me what’s the work around or am I doing right?

Thanks in advance, any help definitely rewarded.

Regards,

Trim

Code Sample

DATA: GL_MATNR_O(18) TYPE C,

GL_AMOUNT TYPE KWERT,

  • GL_AMOUNT TYPE MINLF,

  • GL_AMOUNT TYPE LABST,

GL_AMOUNT_C(13) TYPE C,

GL_KSCHL TYPE KSCHL.

  • Condition and condition value

IF P_GS_P01-AMOUNT NE 0.

GL_AMOUNT = P_GS_P01-AMOUNT.

GL_AMOUNT = GL_AMOUNT / 10.

GL_AMOUNT_C = GL_AMOUNT.

GT_ITEMS_P01-COND_TYPE = GL_KSCHL.

  • GT_ITEMS_P01-COND_VALUE = P_GS_P01-AMOUNT.

GT_ITEMS_P01-COND_VALUE = GL_AMOUNT_C.

  • GT_ITEMS_P01-COND_VALUE = P_GS_P01-AMOUNT.

ENDIF.