â2014 Apr 21 8:49 AM
Hi ,
Can anyone could tell me on how to insert amount for a particular material inorder to create sales order through BAPI_SALESORDER_CREATEFROMDAT2.
Could you please tell me which field should i pass the value.
Regards,
Sivaganesh
â2014 Apr 21 10:59 AM
Hi,
Try this code for conditions update,its worked for me
WA_ORDER_COND-ITM_NUMBER = WA_INP_ITEM-POSNR.
WA_ORDER_COND-COND_TYPE = 'PR00'.
WA_ORDER_COND-COND_VALUE = WA_INP_ITEM-KBETR.
WA_ORDER_COND-CURRENCY = 'USD'.
WA_ORDER_COND_INX-ITM_NUMBER = WA_INP_ITEM-POSNR.
WA_ORDER_COND_INX-COND_TYPE = 'PR00'.
WA_ORDER_COND_INX-COND_VALUE = 'X'.
WA_ORDER_COND_INX-CURRENCY = 'X'.
WA_ORDER_COND_INX-UPDATEFLAG = 'X'.
APPEND WA_ORDER_COND TO IT_ORDER_COND.
APPEND WA_ORDER_COND_INX TO IT_ORDER_COND_INX.
â2014 Apr 21 9:14 AM
Hi Sivaganesh
You need to pass this in the ORDER_CONDITIONS_IN parameter.
From the screenshot, looks like the order is using condition type PR00, so your entries should be
ORDER_CONDITIONS_IN-ITM_NUMBER = '000010'
ORDER_CONDITIONS_IN-COND_TYPE = 'PR00'
ORDER_CONDITIONS_IN-COND_VALUE = <amount_value>
Rgds
Eng Swee
â2014 Apr 21 9:23 AM
hi ,
Thanks for your reply.
I am already passing those values but still the same issue prevails .
â2014 Apr 21 10:26 AM
Hi Sivaganesh
The BAPI works for me fine when I pass in those parameters. The issue might be dependent on the customizing/configuration on your system. Have you tried entering the amount directly from VA01? Are there any errors in the return table when you execute the BAPI?
One more thing I can think of is to pass in the currency ORDER_CONDITIONS_IN-CURRENCY.
Otherwise, you will just have to debug the BAPI to figure out why it's not working.
Rgds
Eng Swee
â2014 Apr 21 10:21 AM
â2014 Apr 21 10:59 AM
Hi,
Try this code for conditions update,its worked for me
WA_ORDER_COND-ITM_NUMBER = WA_INP_ITEM-POSNR.
WA_ORDER_COND-COND_TYPE = 'PR00'.
WA_ORDER_COND-COND_VALUE = WA_INP_ITEM-KBETR.
WA_ORDER_COND-CURRENCY = 'USD'.
WA_ORDER_COND_INX-ITM_NUMBER = WA_INP_ITEM-POSNR.
WA_ORDER_COND_INX-COND_TYPE = 'PR00'.
WA_ORDER_COND_INX-COND_VALUE = 'X'.
WA_ORDER_COND_INX-CURRENCY = 'X'.
WA_ORDER_COND_INX-UPDATEFLAG = 'X'.
APPEND WA_ORDER_COND TO IT_ORDER_COND.
APPEND WA_ORDER_COND_INX TO IT_ORDER_COND_INX.
â2014 Apr 21 11:41 AM
hi guys,
Thanks for your support. Both the answers where most helpfull . But the problem that i made is that i passed the condition switch . By removing those import parameter i was able to get the desired output.
Regards,
Sivaganesh
â2014 Apr 22 6:14 AM
Hi Sivaganesh
Glad to hear that your issue has been resolved.
For clarity's sake, can you explain what you mean by "i passed the condition switch"? Do you mean you initially populated X parameter for the condition (ORDER_CONDITIONS_INX) ?
Please also remember to close the thread.
Rgds
Eng Swee
â2014 Apr 22 6:40 AM
sorry Eng Swee Yeoh . I just misspelled the words, I was passing the Logic Switch value as import parameter into the bapi. After removing this it worked.
Regards,
Sivaganesh