Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_SALESORDER_CREATEFROMDAT2

Former Member
0 Kudos

hi

i use BAPI_SALESORDER_CREATEFROMDAT2 to create sales order!

this sales document type = 'CR' or 'DR' but

i will get return :Unpermitted combination of business object BUS2032and sales doc. category K and error number is 761

why BAPI_SALESORDER_CREATEFROMDAT2 can't create CR of SO.

and how to resolve!

urgent !

thank you your help!

3 REPLIES 3

Former Member
0 Kudos

i have resolve it!

0 Kudos

Weel, if xiaobing does not explain, I could do:

BAPI_SALESORDER_CREATEFROMDAT2 calls 'SD_SALESDOCUMENT_CREATE' with parameter

business_object = 'BUS2032'.

We had the same problem and used a wrapper function where we passed the business object.

Then we proceed without change and it works perfectly.

Here is the business type assignment:


  case lv_vbtyp.
    when gc_vbtyp_order.
      lv_oj_name = 'BUS2032'.
    when gc_vbtyp_return.
      lv_oj_name = 'BUS2102'.
    when gc_vbtyp_credit_req.
      lv_oj_name = 'BUS2094'.
    when gc_vbtyp_debit_req.
      lv_oj_name = 'BUS2096'.
    when others.
* no good
  endcase." lv_vbtyp.

Regards,

Clemens

Former Member
0 Kudos

hi

please could you explain the resolution.

Many tanks