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

Reg: manual condition type value updation using bapi

Former Member
0 Likes
576

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
498

Dear All,

Resolved myself.

Passing currency will resolve the issue.

1 REPLY 1
Read only

Former Member
0 Likes
499

Dear All,

Resolved myself.

Passing currency will resolve the issue.