09-06-2008 9:07 AM
I am using BAPI_SALESORDER_CREATEFROMDAT2 bapi to create sales order , upon executing i am getting below error , i m nt able to understand its meaning do help out
Error Report
The following records failed during update:
ERROR.
1 Unpermitted combination of business object
BUS2032 and sales doc. category G
Ankesh
Edited by: Ankesh Jindal on Sep 6, 2008 10:08 AM
Edited by: Ankesh Jindal on Sep 6, 2008 10:10 AM
09-06-2008 9:18 AM
i got u now but i dont know what i hve to put in buisness object ??
and is it the right bapi to create sales order if not which i wil use for creating bapi , my requirement is to creare sales order for transaction va41..
Edited by: Ankesh Jindal on Sep 6, 2008 10:19 AM
09-06-2008 9:14 AM
This error comes when you are trying to create a Order (other than Standard order) using the Bapi sales order create. check the code inside the BAPI_SALESORDER_CREATEFROMDAT2
just see the code of the above bapi.
call function 'SD_SALESDOCUMENT_CREATE'
exporting
salesdocument = salesdocumentin
sales_header_in = order_header_in
sales_header_inx = order_header_inx
sender = sender
binary_relationshiptype = binary_relationshiptype
int_number_assignment = int_number_assignment
behave_when_error = behave_when_error
logic_switch = logic_switch
business_object = 'BUS2032' "<-----This is For Sales Order
if you are trying to create credit memo or any other orders then this will give error. so if you still want to create then copy this bapi and change the Business object according to your requirement.
09-06-2008 9:18 AM
i got u now but i dont know what i hve to put in buisness object ??
and is it the right bapi to create sales order if not which i wil use for creating bapi , my requirement is to creare sales order for transaction va41..
Edited by: Ankesh Jindal on Sep 6, 2008 10:19 AM
09-06-2008 9:28 AM
the BAPI is correct , but you need to copy the Function to ZBAPI . change the code like this
For contracts BUS2034
so after copy the function replace the BUS2032 with BUS2034
call function 'SD_SALESDOCUMENT_CREATE'
exporting
salesdocument = salesdocumentin
sales_header_in = order_header_in
sales_header_inx = order_header_inx
sender = sender
binary_relationshiptype = binary_relationshiptype
int_number_assignment = int_number_assignment
behave_when_error = behave_when_error
logic_switch = logic_switch
business_object = 'BUS2034' "<-----For Contract order
09-06-2008 9:35 AM
i m not able to copy function module
BAPI_SALESORDER_CREATEFROMDAT2
into my z , it is showing msg ' this is reserved for sap'
and how we came to know which buisness object is used for which purpose..
09-06-2008 9:40 AM
> i m not able to copy function module
> BAPI_SALESORDER_CREATEFROMDAT2
>
> into my z , it is showing msg ' this is reserved for sap'
>
> and how we came to know which buisness object is used for which purpose..
Just create another function module(with your Function group) create all importing,exporting, table parameters exactly.
and Just CTRLA ,CTRLC, and then CTRL+V in your function.
and change the code as mentioned
Table is TOJTB, with Language EN, and Super Type is VBAK
Here you can find all Business objects related to Orders(different order types).