Skip to Content
0
May 28, 2013 at 07:32 AM

Reg: manual condition type value updation using bapi

42 Views

Dear All,

In my requirement i need to create POs from a flat file using BAPI_PO_CREATE1.


My problem is i need to insert some conditon types and condition values manually for frieght etc...(In case of manual condition types) and some cases i need to insert two condtion types simultaneously.

my code as follows.

IF ( w_item-COND_TYPE is not initial and w_item-COND_TYPE1 is not initial ).
itmcond-ITM_NUMBER = itempos.
itmcond-COND_ST_NO = '051'.
itmcond-COND_TYPE = w_item-COND_TYPE.
itmcondx-ITM_NUMBER = itempos.
itmcondx-COND_ST_NO = '051'.
itmcondx-COND_ST_NOX = 'X'.
itmcondx-ITM_NUMBERx = 'X'.
itmcondx-COND_TYPE = 'X'.

itmcond-COND_VALUE = w_item-COND_VALUE.
itmcondx-COND_VALUE = 'X'.

itmcond-CHANGE_ID = 'I'.
itmcondx-CHANGE_ID = 'X'.

append itmcond.
append itmcondx.

CLEAR : itmcond , itmcondx.
itmcond-ITM_NUMBER = itempos.
itmcond-COND_ST_NO = '050'.
itmcond-COND_TYPE = w_item-COND_TYPE1.
itmcondx-ITM_NUMBER = itempos.
itmcondx-COND_ST_NO = '050'.
itmcondx-COND_ST_NOX = 'X'.
itmcondx-ITM_NUMBERx = 'X'.
itmcondx-COND_TYPE = 'X'.

itmcond-COND_VALUE = w_item-COND_VALUE1.
itmcondx-COND_VALUE = 'X'.

itmcond-CHANGE_ID = 'I'.
itmcondx-CHANGE_ID = 'X'.

append itmcond.
append itmcondx.
CLEAR : itmcond , itmcondx.


ELSEIF w_item-COND_TYPE is not INITIAL.

itmcond-ITM_NUMBER = itempos.
itmcond-COND_ST_NO = '051'.
itmcond-COND_TYPE = w_item-COND_TYPE.
itmcondx-ITM_NUMBER = itempos.
itmcondx-COND_ST_NO = '051'.
itmcondx-COND_ST_NOX = 'X'.
itmcondx-ITM_NUMBERx = 'X'.
itmcondx-COND_TYPE = 'X'.

itmcond-COND_VALUE = w_item-COND_VALUE.
itmcondx-COND_VALUE = 'X'.
itmcond-CHANGE_ID = 'I'.
itmcondx-CHANGE_ID = 'X'.

append itmcond.
append itmcondx.
CLEAR : itmcond , itmcondx.

elseif w_item-COND_TYPE1 is not INITIAL.
itmcond-ITM_NUMBER = itempos.
itmcond-COND_ST_NO = '050'.
itmcond-COND_TYPE = w_item-COND_TYPE1.
itmcondx-ITM_NUMBER = itempos.
itmcondx-COND_ST_NO = '050'.
itmcondx-COND_ST_NOX = 'X'.
itmcondx-ITM_NUMBERx = 'X'.
itmcondx-COND_TYPE = 'X'.

itmcond-COND_VALUE = w_item-COND_VALUE1.
itmcondx-COND_VALUE = 'X'.
itmcond-CHANGE_ID = 'I'.
itmcondx-CHANGE_ID = 'X'.

append itmcond.
append itmcondx.
CLEAR : itmcond , itmcondx.
endif.

My flat file upload as follows.

But after creating PO in ME23N,If i observe,the value is getting multiplied by 10.


Can anybody please suggest me how can i solve this issue.

Regards

Mahesh.P

Attachments