Skip to Content

Reg: manual condition type value updation using bapi

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on May 28, 2013 at 08:24 AM

    Dear All,

    Resolved myself.

    Passing currency will resolve the issue.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.