08-01-2013 3:48 PM
Dear Gurus,
My requirement is very silly.I have created a sales order via 'BAPI_SALESORDER_CREATEFROMDAT2', now i have to insert some condition type into it. With respect to some validations in it,after commit work of BAPI_SALESORDER_CREATEFROMDAT2 i have called BAPI_SALESORDER_CHANGE and passed ITM_NUMBER, COND_TYPE, COND_VALUE,CURRENCY,CONDORIGIN, UPDATEFLAG in it.But still no condition types are getting inserted into the sales order.
Have searched extensively SCN and used all the given solutions, but could not get desired output.
Can anyone let me know what all i should pass other that this in CONDITIONS_IN and IT_CONDITIONS_INX in BAPI_SALESORDER_CHANGE for condition type insertion.
Should i have to use some other BAPI for this?
Waiting for your replies.
With Regards,
Jagan
08-01-2013 4:03 PM
Are you sure that there is no other change BAPI to use? That one doesn't even return success or failure.
Neal
08-01-2013 4:03 PM
Are you sure that there is no other change BAPI to use? That one doesn't even return success or failure.
Neal
08-01-2013 6:16 PM
08-01-2013 7:32 PM
Hi,
Read the function documentation carefully and see if you are not missing the necessary details, such as:
Regards,
Bruno
08-02-2013 6:28 AM
Dear Bruno,
I have tried all the possible things what you have said.But data is not getting inserted into the sales order.Am i missing some thing??
ie,
header: COND_HANDL flag = 'X' and UPDATEFLAG = 'U'.
WA_COND-ITM_NUMBER = KPOSN.
WA_COND-COND_ST_NO = WA_KONV-STUNR.
WA_COND-COND_COUNT = ZAEHK.
WA_COND-COND_TYPE = 'ZMRE'.
WA_COND-COND_VALUE = AMOUNT.
WA_COND-CURRENCY = 'INR'.
WA_COND_INX-ITM_NUMBER = KPOSN.
WA_COND_INX-COND_ST_NO = '160'.
WA_COND_INX-COND_COUNT = ZAEHK.
WA_COND_INX-COND_TYPE = 'ZMRE'.
WA_COND_INX-UPDATEFLAG = 'I'.
WA_COND_INX-COND_VALUE = 'X'.
WA_COND_INX-CURRENCY = 'X'.
With Regards,
Jagan
08-02-2013 9:32 AM
Jagannathan,
I think you also have to fill ORDER_ITEM_IN and ORDER_ITEM_INX in order to give the item key and check it . Try doing that. And of course the SALESDOCUMENT field.
Also make sure you do the commit, using BAPI_TRANSACTION_COMMIT.
And try to give the value R in field BEHAVE_WHEN_ERROR.
Bruno
02-13-2015 7:12 AM
Hello Dear
I have completed creation on Sales order using BAPI now I need to pass its condition type (item level ) so kindly guide me what are the key field for condition fields type.
________________________
I wrote following code
________________________
data : order_condition_type_item like BAPICONDX occurs 0 with
header line.
order_condition_type_item-ITM_NUMBER = order_items_in-itm_number.
order_condition_type_item-COND_ST_NO = '130'.
order_condition_type_item-COND_type = 'ZDI0'."tab-COND_type'.
order_condition_type_item-UPDATEFLAG = 'I'.
order_condition_type_item-COND_VALUE = tab-COND_VALUE.
append order_condition_type_item.
_________________________________________________
what else I need to pass in Internal table