Skip to Content
author's profile photo Former Member
Former Member

BAPI_SALESORDER_CREATEFROMDAT2 and Returns, RMA

Hello all. I'm glad to see this forum doing so well.

Have any of you used the BAPI_SALESORDER_CREATEFROMDAT2 to create an RMA (returned goods) doc type RE? This is my current task and I'm hitting a wall in my initial tests. I've done plently of work with this bapi for creating orders (doc type TA) but never a return.

Returns are created with reference to the original order. This is the main difference at the document entry level. When I try to create an RE type document, I get an error: [E V1 761 Unpermitted combination of business object BUS2032 and sales doc. category H]

First of all, is doc_type RE correct or is there some converted value I should be using?

I have not filled in the REFOBJTYPE, REFOBJKEY, or REFDOCTYPE yet. So the first test is to create a return without reference. Later, I will create one with reference. Are these fields used for setting the reference or do I leave those blank and just fill in the REF_DOC field?

Thank you for tips. If anyone needs help with VB or ASP calling this BAPI, I can help you there.

Thanks.

Crew Reynolds

Software Development Manager

Daydots

Add comment
10|10000 characters needed characters exceeded

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 13, 2004 at 12:19 PM

    Hi,

    I don't believe you can use this BAPI to create return orders. You could look at business object BUS2102 which has a BAPI called BAPI_CUSTOMERRETURN_CREATE which may be of use.

    HTH.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Seems reasonable! I'll check that out. I assumed that the salesorder BAPI would be the place to go since we use VA01 to create returns.

      Thanks.

  • author's profile photo Former Member
    Former Member
    Posted on Jul 13, 2004 at 03:13 PM

    One question. I'm trying to pull together a working test and I keep getting an error I'm not sure how to get past. Returns require a usage indicator. In VA01, there is one at the header level and there is also one at the item level. I can find the one for the item level but have not located the header level usage indicator yet. I'm getting this error that indicates I need it.

    E V1 901 Update usage indicator on sales view with return reason for credit

    Do you know where I might find this field?

    Thank you.

    Crew Reynolds

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I was hoping I could crack this with documentation but that proved to be a dead end. Based on your suggestion Colin, I broke down and debugged the code to get my answer. DLVSCHDUSE is the proper header field for the usage code. Adding a usage code of QA1 into my test produced a return.

      Thanks to all who took time to help me past this little hump.

  • author's profile photo Former Member
    Former Member
    Posted on Aug 05, 2004 at 06:21 AM

    Hi,

    I have to create a sales order for document type Returns as well as a debit memo request.The BAPI 'BAPI_SALESORDER_CREATEFROMDAT2' is giving the following error message for Debit Memo Request document creation as well as for Returns.

    761 Unpermitted combination of business object BUS2032 and sales doc. category L

    I found BAPIs:

    ‘BAPI_CUSTOMERRETURN_CREATE’ for creating sales document of type ZDRE and SD document category ‘H’.

    ‘BAPI_DEBITREQUEST_PROXY_CREATE’ for creating sales document of type ZDDR and SD document category ‘L’.

    please let me know if anybody have used them. If so what values need to be passed to I_UPLOAD_ID,I_DESTIN,I_SFA_REL parameters of BAPI_DEBITREQUEST_PROXY_CREATE. Are there any alternative solutions using the Salesorder bapi.

    I have to create documents based on the flat file data no reference sales document numbers are available.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Crew,

      Thanks a lot for the timely help. I am calling SD_SALESDOCUMENT_CREATE directly by passing the business object types depending on the document type.

      The other BAPIs have dependencies e.g. certain import parameters are mandatory which are irrelevant for my object.And I am able to create both returns and Debit memo request using the above FM.

      Thanks once again

      Good Day

      Regards

      Bhargavi