Create Return Order via Fucntional module

Hi all,
I am trying to create a return order with refernce to invoice via fucntional module SD_SALESDOCUMENT_CREATE
In SALES_HEADER_IN, I am giving REF_DOC - Invoice number, REFDOC_CAT - M
In SALES_HEADER_INX , I am putting X mark for the above fields
I am Passing necessary details with material.I see the return order is created succesfully, but the invoice number is not updated in Accounting tab - Reference fields - Header.
Please anyone help me if the values what I have passed is correct or not to create the return order via Functional module
regard
Mano

Hi Mano,
Could you please upload screenshot of the field you are referring to
thanks
santosh

Similar Messages

  • Create transfer order via Function Module

    Dear SAP guru,
    I have the following requirement that the transfer requirements will be created for replenishment into dedicated storage bins from another storage types.
    To do this, I use a user exit to calculate what is my replenishment quantity required for all the dedicated bins of this particular material.
    Once, the TR is created.  TO should be generated next. And, that is the problem that I faced here.  The quantity to replenish to each of the dedicated storage bin could be different, depends on the quantity in the storage bin at that time.
    For example, I have 3 dedicated bins for one material as follows:
    A-01             100 pc
    A-02               50 pc
    A-03               50 pc
    Assume that the maximum quantity per bin is 300pc, and once I run the replenishment program earlier, I will have a TR created with 700 pc.
    Now, what I want during the TO creation, is to search the dedicated bin and also determine the required quantity for each of the bin.  In this case, my TO will have 3 items, i.e.
    A-01             200pc
    A-02             250pc
    A-03             250pc
    Is there any way to do it?
    Please advise.
    Thanks.
    Tom

    Hi Tom,
    You can use the Transation SMOD find the possible SAP enhancements. All extensions in the the WM-Umfled can select you, if you enter MWMTO* and die F4-help press. You then get a list of extensions which are possible. Hope this helps.

  • Any function module available to create return order?

    Hi Experts,
    Is there any Fucntion Module to create a return order? In my scenario, I want to make an RFC call to this FM from CRM system and create a return order.
    Is this scenario possbile?
    Waiting for your inputs!
    Thanks and Regards,
    Rohit

    Hi Rohit,
    As we all know that we can create standard orders by using this function module: IDOC_INPUT_ORDERS
    We can as well create returns order. We can copy the above FM into "Z" customize it as per requirements and use the same in RFC call.
    With this i think you can create returns order in the background.
    Hope this helps
    Regards,
    Syed Nasir

  • Open return orders in sd module

    hi all,
    can any one explain me wht are open return orders in sd module and also credit memo issued for opem return order and goods receipt processed against the delivery.
    if possible can u explain me with example.
                                         thanks

    Hi Dilip,
    1. Return orders are created with reference to sales orders which have been rejected due to some reasons. There are many reasons as to why a sales order is rejected like incorrect deliveries, Damages during transits, Delayed deliveries,etc. Before the finance department processes them these return orders are blocked by applying a billing block. Such documents which havent been cleared by the finance department are called Open Return Orders.
    A credit memo is released by the vendor based upon pre sales agreements since the customer has to be paid for the return orders.
    Ex:
    Lets assume there is a textile company. They have three Plants producing Textiles at three different locations (A, B and C). They get raw material like dyes, buttons and zips from third party supplier. An agreement was made with the supplier to send a consignment of 100 Litres of Dye and 10 Cartons of buttons to Plant B. A sales order (SD01) was created based on this consignment. But the Dye reaches plant C instead of Plant B. So a return order is created for the sales order (SD01) and a billing block is applied to it. Then the return order is considered to be open for review. Once the finance guys validate the document and approve it the order is closed and released.
    Once that is received by the Vendor he issues a credit memo to the Textiles company since he has to cover for the wrong deliveries and loss of production hours.
    I hope your doubt is cleared, Reward if helpful.

  • Problem with Creation of CRM Order via Function Module Test

    I am trying to check the order creation process from external systems by using the test function in Tcode SE37 with Function Module BAPI_BUSPROCESSND_CREATEMULTI.
    I have created a Test Sequence of the following FMs:
    BAPI_BUSPROCESSND_PROCSETTINGS
    BAPI_BUSPROCESSND_CREATEMULTI
    BAPI_PROCESS_SAVE
    BAPI_TRANSACTION_COMMIT
    All that I have been able to create so far is an order header without a Sold-to or Ship-to and no items. I am able to populate the Organization data, Header text and Appointments. The only partner function that is being populated is the one that is being automatically picked up from my user master.
    For the BAPI_BUSPROCESSND_CREATEMULTI I am populating the following tables:
    HEADER          1 entry
    ITEM               2 entries
    PARTNER          2 entries
    ORGANISATION     1 entry
    APPOINTMENT          2 entries
    INPUT_FIELDS          41 entries     
    SCHEDULELINE     2 entries
    I have created the entries based upon information gained through debugging function module CRM_ORDER_MAINTAIN during the creation of a service order.
    It would be interesting to know if anybody has successfully created an order via the SE37 test function and if so, it would be useful to see the data in the relevant tables.

    HEllo ,
    Write a wrapper to the function module CRM_ORDER_MAINTAIN.
    To populate the Text use below code
      ls_input_field_names-fieldname  = 'REF_GUID'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'REF_KIND'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'TDID'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'TDSPRAS'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'TDSTYLE'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'TDFORM'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'LINES'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'MODE'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      CLEAR ls_input_fields.
      ls_input_fields-ref_guid    = attr_guid.
      ls_input_fields-ref_kind    = 'A'.
      ls_input_fields-objectname  = 'TEXTS'.
      CONCATENATE 'CRM_ORDERH' order_guid INTO ls_input_fields-logical_key.
      ls_input_fields-field_names = lt_input_field_names.
      INSERT ls_input_fields INTO TABLE attr_t_inputfields.
    Call Order maintain FM to create any order
      CALL FUNCTION 'CRM_ORDER_MAINTAIN'
        EXPORTING
          it_text               = lp_order->attr_t_text
          it_partner          = lp_order->attr_t_partner
        IMPORTING
          et_exception     = et_exception
        CHANGING
          ct_orderadm_h     = lp_order->attr_t_orderadm_h
          ct_input_fields      = lp_order->attr_t_inputfields
        EXCEPTIONS
          error_occurred    = 1
          document_locked   = 2
          no_change_allowed = 3
          no_authority      = 4
          OTHERS            = 5.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Regards
    Satish

  • Create Purchase Order via Upload.

    Hi,
    Our company have lost 4 months data due to some hardware problem. After hardware issue resolved we have to post all lost data. Therefore in MM module can it is possible that I can create PO order via BAPI program? We have four type of PO (Inventory, Assets, Changed off and IO). I got a BAPI function "BAPI_PO_CREATE1" can any body tell me how can I you this BAPI to create PO or Upload it?
    Thanks
    Syed Tayab Shah

    Hi
    [Sample Code|Re: BAPI-PO;
    [Explanation About BAPI|http://abap.wikiprog.com/wiki/BAPI_PO_CREATE1]
    Re: BAPI_PO_CREATE1-Runtime error
    BAPI_PO_CREATE1
    Regards
    Pavan

  • Cancelled invoices are also allowing to create Return order

    Cancelled invoices are also allowing to create Return order   with invoice references, how to restrict that so Cancelled invoice should not allow to create
    Return order with reference.
    Please help.
    If it is possible in standard how?

    Dear Gautam,
    I am also facing the similar problem and looking for a suitable solution. In case you if you could implement some solution to prevent creating return sales order with reference to cancelled invoice , then please update me too.
    Thanks & Regards,
    Pawan Patel

  • Error while creating return order(Complaint) in IC web client

    Hi SAP Experts,
    I am getting following Error while creating return order(Complaint) in IC web client.
    Error when processing your request
    What has happened?
    The URL http://sapcrd.comfort.com:8000/sap/bc/bsp/sap/crm_ic/default_delta.do was not called due to an error.
    Note
    The following error text was processed in the system CRD : Exception condition "NON_EXISTING_HANDLE" raised.
    The error occurred on the application server sapcrd_CRD_00 and in the work process 2 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Function: PRC_PD_HEAD_ADD_COND of program SAPLPRC_PRICING_API
    Function: CRM_PRIDOC_UPDATE_EC of program SAPLCRM_PRIDOC_COM_EC
    Form: EXECUTE_CALLBACKS_PLANNED of program SAPLCRM_EVENT_OW
    Function: CRM_EVENT_SET_EXETIME_OW of program SAPLCRM_EVENT_OW
    Function: CRM_ORDER_COMPLETE_SINGLE_OW of program SAPLCRM_ORDER_OW
    Function: CRM_ORDER_MAINTAIN_SINGLE_OW of program SAPLCRM_ORDER_OW
    Function: CRM_ORDER_MAINTAIN_MULTI_OW of program SAPLCRM_ORDER_OW
    Function: CRM_ORDER_MAINTAIN of program SAPLCRM_ORDER_API
    Method: IF_EX_ORDER_SAVE~PREPARE of program ZCL_IM_PRICE_ADJUSTMENT=======CP
    Method: IF_EX_ORDER_SAVE~PREPARE of program CL_EX_ORDER_SAVE==============CP
    What can I do?
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system CRD in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server sapcrd_CRD_00 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 2 in transaction ST11 on the application server sapcrd_CRD_00 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    Error code: ICF-IE-http -c: 330 -u: VORUSX -l: E -s: CRD -i: sapcrd_CRD_00 -w: 2 -d: 20080324 -t: 021723 -v: RABAX_STATE -e: RAISE_EXCEPTION
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team
    Maximum points will be awarded for useful information.
    Thanks,
    Rony

    Hi,
    I notice there is a Z class being called.
    Method: IF_EX_ORDER_SAVE~PREPARE of program ZCL_IM_PRICE_ADJUSTMENT=======CP
    You should check this customized class.
    Cheers,
    cady.

  • Error while creating Return order with reference to Complaint

    Hi,
         We are using Complaint Management in CRM Service. After creation of Complaint, we want to create Return Order that is going to replicate in R/3 .
    We are able to create Return request in CRM as a follow up document. However we are not able to replicate the return order in R/3.
          We have created Return Document type CRMR in R/3  with related Item Category REN assignment & corresponding number ranges assignment.
    We facing problem, as this document is not getting replicated in R/3 & in Complaint, it shows message as "The document is being distributed at the moment, and therefore cannot be changed. The document will be ready for input once it has been distributed successfully.”
    In SMW01, it is showing as fully processed document. However in error segment it shows as error” No upload into R/3" &"R/3 Adapter is called".
    Could please suggest any configuration we have missed or additional configuration to be done?
    Regards,
    Arun

    Hi Arun,
    Have you check & maintained middleware setting for  document transfer
    (tcode R3AC1). Check object SALESDOCUMENT and try maintain transaction
    type there. Don't forget to activate use tcode R3AS.
    hope this helps.
    Gun

  • Serial number copy functionality when creating return orders from standards

    Hi all,
    Serial number is not copying when i create return order from the standard orders in below scenario.
    I implemented one BADI for copying Serial number to Sales order when doing Post goods receipt.
    So after doing inbound delivery and PGR, serial number is copied to the sales order but when i create return order with reference to the Standard order Serial number is not copying.
    When i go VA02 for standard order and selecting the technical objects then if i create the return order serial number is copying.
    Please help me in the above issue.
    I used the following logic to copy serial number from inbound delivery PGR.
    UPDATING THE SERIAL NUMBER TO THE RESPECTINVE SALES ORDER LINE ITEMS
                CALL FUNCTION 'SERNR_ADD_TO_AU'
                  EXPORTING
                    sernr                 = lwa_sernr-sernr
                    profile               = 'NEOP'
                    material              = lwa_mseg-matnr
                    quantity              = 1
                    document              = lwa_mseg-kdauf
                    item                  = lwa_mseg-kdpos
                    debitor               = lwa_mseg-kunnr
                    vbtyp                 = 'C'
                    sd_auart              = lv_auart
                    sd_postyp             = lv_pstyv
                  EXCEPTIONS
                    konfigurations_error  = 1
                    serialnumber_errors   = 2
                    serialnumber_warnings = 3
                    OTHERS                = 4.
                IF sy-subrc = 0.
                  CALL FUNCTION 'SERIAL_LISTE_POST_AU'.
                IF sy-subrc EQ 0.
                  COMMIT WORK.
                  WAIT UP TO 2 SECONDS.
                ENDIF.
    Edited by: Rajesh Sanapala on Feb 16, 2009 12:48 PM

    hi.
    I have the same problem.
    Can you please share how you solved it?
    thank you
    Bill

  • Net value issue while creating return order with reference to billing

    Dear All,
    I created SO / DEL/ BILLING for qty 100 say net value-20000.When i created Return order with  refrence to billing document,
    net value appearing same ( 20000) for 50 quantity.Pl do advise asap as its required urgently.
    Thanks in advance.
    Regards
    raj
    Edited by: raj_sapsd on Aug 20, 2010 9:18 AM

    surelly problem in VTAF
    F2 to RE
    DATAT: 103
    DATAT: 103
    DATAT: 003
    Coping requirement 021
    item level TAN  and ietm cat proposal G2N
    DataT: 153
    Datat: 104
    datat: 004
    Coping requirement 303
    Update doc Flow X
    only possibilites Removed my Moderator
    Edited by: Lakshmipathi on Aug 21, 2010 9:31 AM
    Please avoid asking for points

  • Create Return Order copy from Billing created from DBM Order Processing

    Hi SAP Gurus
    I have scenario where the user requested to create return order based on Billing created from DBM Order Processing.
    I know that, we can create return order from DBM. but the function copy based on order. the user is requested to do return
    by billing document ( function as SD )
    is this requirement can be done in SD VA01 where the user can copy the billing created from DBM and create return order using SD function

    Hi,
    in DBM you regulary have mulitiple invoices per order (due to split).
    You either can cancel an certain invoice and adapt the order or create a returns order based on an given order where you can select certain (e.g. invoiced) items.
    BR

  • Create Return order

    Hi all,
      I'd like to create return order at the same time of the creation of one standar order. Both linked.
    Firstly, I go to CRMD_ORDER to create standar order and I've customized the following event:
    Execution Time 1 Immediately
    Priority 1
    Object Name ORDER
    Event SAVE
    Attribute <*>
    Function ZCREATE_RETURN_ORD
    But this event is not executed. Others are executed and create both document correctly.
    The problem is that they are not linked despite of I developed the code code for.
    As the return order is created firstly, the standard order guid is not in BBDD, so when I add DOC_FLOW to the standard FM, the creation of ther Return order fails.
    Do you know any point of the program or event that I could use to create a return order using an standar one at the same time?
    Thanks in advance!

    Hello Carlos,
    I think you may consider using action.
    For example, create an action with method COPY_DOCUMENT.
    Hoep this could be helpful.
    Best regardsm
    Maggie

  • Problem when using BAPI to create return order

    Hi All,
    I need urgent Information.
    I am using BAPI_CUSTOMERRETURN_CREATE and BAPI_CUSTOMERRETURN_CHANGE to create and change quantity of return order. In both cases I am getting the result that quantity value is not getting updated.
    are these BAPIs are correct to fulfil my requirement, if yes could you please clarify?
    other wise, can I use BAPI_SALESORDER_CREATEFROMDAT2 and BAPI_SALESORDER_CHANGE?
    and could you please some details about quantity change in Outbound delivery?
    I am using BAPI_OUTB_DELIVERY_CHANGE for this

    Hi
    <u>You need to do exeute a BAPI_TRANSACTION_COMMIT after the succesful execution of both the function modules BAPI_CUSTOMERRETURN_CREATE and BAPI_CUSTOMERRETURN_CHANGE.</u>
    <b>I mean, please insert CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'  function module in the program, after each function module call</b>. 
    Hope this will help.
    Please reward suitable points.
    Regards
    - Atul

  • Free Goods not flowing when creating return order through invocie reference

    Hi ,
    we have configured free goods scenario for our client.
    Free goods are determined in sales order based on condition maintained
    In sales order Tan ,and Tann item category are determined and based on SO , delivery and billing type (F2 ) happens.
    Now we are creating the RE  return order , with reference to Billing document F2 , on copying the items , system is only copying the main goods article and free goods item cannot be determined .
    we have done the following configutration ,
    Item category assignment as RE  NORM  REN RENN  (free goods )
    Below detail of  Copy controls
    1)  F2 to ZRET
    Header level
    data type 051                  copy requiremetn 001
    data type 301
    data type 003
    Item level
    TANN  to RENN
    Data type151           copy reui 303 
    data type 102
    data type 002
    condition 251
    can you please check and confirm , how this can be handled or pls give me the config steps
    Thanks

    Hi
    If you want to happen this, you should assign the free goods procedure to the combination of Sales orgDistChDivDoc Pr ProcCust Pri Proc
    Thanks,
    Ravi

Maybe you are looking for