on 05-20-2014 8:14 AM
Hi People,
I am wonderning how to create Sales order using external number range by BAPI (SALESORDER_CREATEFROMDAT202).
I tried search but could not succeed in finding the solution.
Please share if anyone has some info.
Thanks in advance.
Regards,
Praveen
Hi Praveen,
I am able to find the solution, by passing the External number to BAPI_SALESORDER_CREATEFROMDAT2.
You have to pass external sales order number in the field - salesdocumentin
call function 'BAPI_SALESORDER_CREATEFROMDAT2'
exporting
salesdocumentin = iv_vbeln
and in the extensionin table you have to pass
wa_bape_vbak-vbeln = iv_vbeln.
wa_bape_vbakx-vbeln = iv_vbeln.
tables
extensionin = lt_extentionin
By Passing those parameter i am able to generate sales order using external number.
if you need any more help please let me know.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Praveen,
I am able to find the solution, by passing the External number to BAPI_SALESORDER_CREATEFROMDAT2.
You have to pass external sales order number in the field - salesdocumentin
call function 'BAPI_SALESORDER_CREATEFROMDAT2'
exporting
salesdocumentin = iv_vbeln
and in the extensionin table you have to pass
wa_bape_vbak-vbeln = iv_vbeln.
wa_bape_vbakx-vbeln = iv_vbeln.
tables
extensionin = lt_extentionin
By Passing those parameter i am able to generate sales order using external number.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you briefly tell us? What all steps you are following to achieve your result?
Thanks, JP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prakash,
The requirement is simple.
BAPI has to create a sales order using external number. Inwhich scenario external number should be passed through BAPI for processing. However, I am not aware of the place holder for the Sales order number during the creation.
If you take the scenario of using internal number range, BAPI will process the data and creates a sales order which assigns the next available number from the internal number range. In this case, we don't require to mention the sales order number.
However, using external number, sales order number should be explicitly provided
Hope this helps to understand.
Regards,
Praveen
As per my understanding, the BAPI
SALESORDER_CREATEFROMDAT202
mentioned by you, is not BAPI. In fact, that is basic IDoc Type. For processing an Inbound IDoc, we use FM IDOC_INPUT_ORDERS.
If you want to create sales order other than IDoc, refer FM BAPI_SALESORDER_CREATEFROMDAT2. There you can provide external sales order no in SALESDOCUMENTIN. In addition to that check whether your sales doc type is relevant for external number range or not. If yes. then make sure you are providing external number according to the number range maintained.
If you still have any concerns, please revert back.
Thanks, JP
Hi JP,
Sorry for confusing you with BAPI and basic type. Yes we are using BAPI_SALESORDER_CREATEFROMDAT2.
Sales order number was provided in SALESDOCUMENTIN.
The sales order type is customized to use the external number range.
When the data is processed through BAPI, below error was populated
As using to BAPI in creation mode, not sure why it is checking for 'Updateflag' whic is generally used to flag for changes.
Please suggest.
Regards,
Praveen
I'm not a technical consultant, therefore, I may not be able to guide,
why/what is the use of header_inx-updateflag in "Create" BAPI.
You can also try with FM BAPI_SALESDOCU_CREATEWITHDIA.
Alternatively, close this discussion and open a new discussion in ABAP Development space and you can provided reference of this thread there.
Thanks, JP
HI JP,
I shared the error message just for your information to convey the message if I give the sales order number in 'SALESDOCUMENTIN' filed probably system is treating it as change. I would like to understand the field mapping in this case. Apart from gving the sales order number (External number range) do I need to pass any flag or indicator to indicate it as external.
Please help with the field mappings while using external number range.
Regards,
Praveen
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.