Application Development and Automation 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: 
Read only

Return SALES Order BAPI

Former Member
0 Likes
1,406

Hi,

I'm passing following values in BAPI_SALESORDER_CREATEFROMDAT2 bapi for Return sales Order

it_header-ref_doc = '0090000047'. " Invice Billing Number

it_header-REFDOC_CAT = 'M'. " M for Invoice

it_header-ORD_REASON = '101'. " 101 stand for Poor Quility

headerx-ref_doc = 'X'.

headerx-REFDOC_CAT = 'X'.

headerx-ORD_REASON = 'X'.

But it showing below msg why.

Error V1 Message No = 761

'Unpermitted combination of business object BUS2032 and sales doc. category H'

anything missing or Wrong ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
733

Thanks Vijay,

is any option becouse i have to use same BAPI as in fist phase i created successfull Sales order Using same bapi..

bussiness also need same bapi for 3rd party.. connection with this BAPI.. so I can't take any other bapi even 'Z'.

any Soln ?

3 REPLIES 3
Read only

Former Member
0 Likes
733

the error is coming because the BAPI BAPI_SALESORDER_CREATEFROMDAT2 is meant for only Sales orders(i.e for BUS2032) since in the code it is hardcoded .

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'  "<----hardcoded
            testrun                 = testrun

if you want to avoid the error. copy the BAPI to ZBAPI and change the Business object to Return order's business object.

For Return order BUS2102 . so replace that with BUS2102.

Edited by: Vijay Babu Dudla on Oct 15, 2008 10:22 AM

Read only

Former Member
0 Likes
734

Thanks Vijay,

is any option becouse i have to use same BAPI as in fist phase i created successfull Sales order Using same bapi..

bussiness also need same bapi for 3rd party.. connection with this BAPI.. so I can't take any other bapi even 'Z'.

any Soln ?

Read only

0 Likes
733

Then try with the Function SD_SALESDOCUMENT_CREATE

this is also Remote enable function.