BAPI for Creation of return sales order

Folks:
I have to create return sales order through BAPI from Billing document. I am using BAPI "'BAPI_SALESORDER_CREATEFROMDAT2" and giving billing document as reference document and sales order is created and billing document data is but the document flow is not updated. I mean to say that billing document and in original sales order  the return order is not reflected in document flow. Can somebody tell me which BAPI i can use to create  return sales order and it updates document flow as well.
Thanks!!!!

Hi,
CALL FUNCTION 'BAPI_CUSTOMERRETURN_CREATE'
          EXPORTING
            return_header_in     = wa_return_header_in
            return_header_inx    = wa_return_header_inx
            testrun              = p_testrun
          IMPORTING
            salesdocument        = wf_salesdocument
          TABLES
            return               = it_return
            return_items_in      = it_return_items_in
            return_items_inx     = it_return_items_inx
            return_partners      = it_return_partners
            return_schedules_in  = it_return_schedules_in
            return_schedules_inx = it_return_schedules_inx
            return_text          = it_return_text.
        wf_exp_vbeln = wf_salesdocument.
Hope this helps you,
Regards,
Abhijit G. Borkar

Similar Messages

  • BAPI for Create PO from Sales Order Data and POST GR from PO created

    Dear,
             Can u help me how to create BAPI for Purchase Order creation from sales order Data
              what the bapi to Post GR from the PO created.
    Regards,
    Manoj

    Hello Manoj what you have to do to create PO from PR is that
    1) Use   BAPISDORDER_GETDETAILEDLIST (pass sales order number in sales_document table) and then get PR (Purchase requisition number from this BAPI.
    2) Use  BAPI_REQUISITION_GETDETAIL to get PR items
    3) Use BAPI_PO_CREATE1 to craete PO from PR then.
    to create goods movement you can use
    BAPI_GOODSMVT_CREATE
    REWARDS IF USEFUL.

  • BAPI for Packing proposal in Sale order

    Hi,
    I am currently using BAPI_HU_CREATE, BAPI_HU_PACK and WS_DELIVERY_UPDATE_2 to update packing in delivery.
    Is there any BAPI to do packing proposal in sale order ? BAPI_SALESORDER_CHANGE does not have any tables for packing
    Thanks

    Hi,
    I have already used the same BAPIs for packing and i am able to update packing in delivery using WS_DELIVERY_UPDATE.
    But in case of sale orders, i can use BAPI_HU_CREATE and BAPI_HU_PACK....to pack
    But what BAPI i should use to update the sale order ??? BAPI_SALESORDER_CHANGE does not have any tables to pass packing proposal data !!
    Thanks

  • Do we need IPC in CRM B2B Webshop for creation of ERP Sales order

    Hi Experts,
    can you pls guide in following scenario in CRM 7.0
    We  are using CRM B2B WEBSHOP, We are creating ERP SALES ORDER .
    We have requirement to display price break up like base price, different discounts, taxes, freights while creation of Sales order on the webshop.
    I would like to understand,
    1) whether we need IPC to show price breakup in SALES ORDER in CRM WEBSHOP.
    2) if yes, do we need enhancement at IPC to display complex discount types on webshop ?
    3) do we need to download entire pricing ( customizing +condition records ) from backend ECC to CRM.
    If anybody has worked on similer scenario ,requesting to help.
    Any points , documents ,step by step guide will be highly appreciated.
    thanks in advance,
    regards,
    PD

    Hi,
    ipc is inbuilt in Kernel to CRM 7.0
    BR,
    Darshan

  • Bapi for Creation of PO(Purchase Order) with Factor & Length

    Dear Experts,
    we wnat to create Po automatically by using Bapi.
    I come to know, there are some bapis like BAPI_PO_CREATE1,BAPI_PO_CREATE.
    Normal PO, we are able to create with these bapis.
    But we want to give factor & Length in PO Creation.
    Because we are using the Mill Products(cable Industry).
    so how to create the PO with Factor & Length.
    Plese help me to sort this issue.
    Thanks in advance,
    Regards,
    Rahul
    Edited by: M.Rahul Reddy on Oct 15, 2009 1:07 PM
    Dear Experts,
    I am looking for  your valuable sujjection to sort the issue.

    This is version problem in the Sap system.
    we are communicating with SAP people.

  • Urgent: How to copy multiple sales order items into a return sales order?

    Dear developers,
    I have a requirement to copy multiple sales order items into a single return sales order. For example, generated return sales order have 2 items, item 10 is created with reference to sales item 2610/10 and item 20 is created with reference to sales item 2611/20. What's more, when it happens, copy control should be taken care of. I know it is possible to create this kind of order by transaction. But how to do it in coding?
    In current SAP release, there is only BAPI for creating with reference on 1:1 relationship which means copy one document to another but what I need is N:1 copy.
    Any suggestion is high appreciated!!
    BR,
    Tony.

    Hi ,
    If you are creating sales order by using bapi then after calling bapi you can check import parameter <i><b>SALESDOCUMENT</b></i> in the bapi function module .If this parameter is not initial then sales order is created in this case you can create return order. If this import parameter is initial then sales order is not created and you cannot use return bapi function module.
    Bapi is simple method than BDC.
    In above case it is required to call BAPI_TRANSACTION_COMMIT after every successful sales order creation.
    One more important point is you have to clear import parameter <i><b>SALESDOCUMENT</b></i>  before calling sales order creation function module.
    Thanks,
    shyla

  • BAPI for creation of subcontract PO

    Hi all,
       Currently iam doing a BAPI for creation of subcontract Purchase Order using the BAPI_PO_CREATE1. But in this BAPI iam unable to find the table for entering Components.
    Regards,
    Sun.

    Hi,
    I wil give you how to fill the components of PO items, it is a sample code;
    *zPoHeader
      if kna1-kunnr eq 'BOR020'.
        zpoheader-comp_code   = '0040'.
      endif.
      if  kna1-kunnr eq 'BOR040'.
        zpoheader-comp_code   = '0048'.
      endif.
      zpoheader-doc_type    = 'ZSA'.
      zpoheader-doc_date    = mkpf-budat.
      zpoheader-vendor      = 'BOR050'. "&#351;imdilik
      zpoheader-pmnttrms    = 'Z030'.
      zpoheader-purch_org   = '1100'.
      zpoheader-pur_group   = '101'. "malzeme ÜZERINDEKI marc-ekgrp
      zpoheader-currency    = zsaleshead-waers.
      zpoheader-item_intvl  = 10.
      zpoheaderx-comp_code  = 'X'.
      zpoheaderx-doc_type   = 'X'.
      zpoheaderx-vendor     = 'X'.
      zpoheaderx-purch_org  = 'X'.
      zpoheaderx-pur_group  = 'X'.
      zpoheaderx-currency   = 'X'.
      zpoheaderx-doc_date   = 'X'.
      zpoheaderx-pmnttrms   = 'X'.
      zpoheaderx-item_intvl = 'X'.
    *zPoitem
      loop at i_posnr.
        lv_ebelp = lv_ebelp + 10.
        zpoitem-po_item    =  lv_ebelp.
        zpoitem-material   = i_posnr-matnr.
        if kna1-kunnr eq 'BOR020'.
          zpoitem-plant      = '0040'.
          zpoitem-stge_loc   = '4001'.
        endif.
        if kna1-kunnr eq 'BOR040'.
          zpoitem-plant      = '0048'.
          zpoitem-stge_loc   = '4801'.
        endif.
        zpoitem-quantity   = i_posnr-menge.
        zpoitem-po_unit    = i_posnr-meins.
        zpoitem-net_price  = i_posnr-bfiyat.
        zpoitem-price_unit = 1.
        zpoitem-tax_code   = 'V0'.
        zpoitemx-po_item    = lv_ebelp.
        zpoitemx-po_itemx   = 'X'.
        zpoitemx-material   = 'X'.
        zpoitemx-plant      = 'X'.
        zpoitemx-stge_loc   = 'X'.
        zpoitemx-quantity   = 'X'.
        zpoitemx-po_unit    = 'X'.
        zpoitemx-net_price  = 'X'.
        zpoitemx-price_unit = 'X'.
        zpoitemx-tax_code   = 'X'.
        append: zpoitem, zpoitemx.
        clear : zpoitem, zpoitemx.
      endloop.
      call function 'BAPI_PO_CREATE1'
        exporting
        poheader                     = zpoheader
        poheaderx                    = zpoheaderx
    tables
       return                       = zreturn3
       poitem                       = zpoitem
       poitemx                      = zpoitemx.
    Send me your results,
    Kenan.

  • Error while inbound creation for return sales order

    Hi all,
             We are in the process of creating return sales order for invoice cancelation.
             We have created return sales order.
             we have made settings for automatic inbound creation.
             While creating inbound delivery system giving following error,
    <b>Material cannot be used for inbound delivery because QM is active.</b>
    Please help in solving error.
    regards,
    Mona

    dear  kiran,
                        Tcode is for job planning,where can i make the required setting.
                        Can you explain in detail?
    regards,
    Mona

  • BAPI for return sales order

    Hi,
    what BAPI that can be used for Return Sales Order? BAPI SALES_ORDER_CREATEFROMDAT2 cant work, I get return message as error : 'Unpermitted combination of business object BUS2032 and sales document type category H'.
    thanks alots.
    Alia

    Hi Alia,
    Go to transaction BAPI, and in the tree go to :
    Sales and Distribution -> Sales -> SalesOrder
    You will have a list of all the BAPI for the Sales Order. If you want a list of Sales Order, maybe you need the GetList BAPI : BAPI_SALESORDER_GETLIST
    Rgd
    Frédéric

  • Return SALES Order BAPI

    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 ?

    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

  • AFS Return sales orders BAPI

    Hi ,
          Please help me in the issue . I want a bapi for return sales orders specific to AFS as i am not able to use the normal returns orders bapi BAPI_CUSTOMERRETURN_CREATE.  Can anyone please let me know how to proceed for the same.
    Thanks in advance,

    Hi...
    try by using FM " BAPI_SALESDOCUMENT_CREATE".
    Regards,
    Lokeswari.

  • ATP Check against customer stock for return Sale order

    Hi Friends,
    Pl.help in this.
    1. Is it possible to configure ATP check against Customer stock in a Sale order/Return order/any other way? ( Actuallly, client wants to take back empty cylinders through return sale order by ATP check against the customer stock)
    Regards,
    Mani

    Hi Mani ,
    Are you  taking cylinder as returable packing item or not?
    ex- For soft  drinks or beverages industry  it pretty common , they  use thel returnable package material type and more over why you want  use return sales order for this?
    Note- Just plz explain  scenario to MM and PP People also as availability check with all combination
    Hope it is helpful to you,
    Regards
    Venkat

  • TANN item category item not picking for return sales order

    Hi all,
    I have a question regarding TANN item category. This TANN item category item is not picking for return sales order type. As far as i know RENN is the free goods for return sales order. Can you please clarify the above question further

    Hi
    If you are making return order by copying sales order then please see this procedure also.
    Try to check in the copy control also.
    Go to the following path IMG u2013 Sales and Distribution u2013 Sales u2013 Maintain Copy control for sales documents. (Tcode VTAA)
    Select copying control : sales document to sales document.
    Search your return delivery order from the reference sales document type.
    Then select the item from the left side Colum.
    Go and find out TANN item category and click on detail.
    Check out Item Cat proposal. If it is empty then type your RENN condition type over here.
    Now try to create the return sales order it might work.
    Raj.

  • How to create delivery for return sales order?

    Hello
    I'd like to create a delivery for a return sales order, I used transaction VL01N to do that, but error message said no delivery-relevant item in this order. Can transaction VL01N be used for this step?
    Nicole

    Hi,
    We can create the delivery in Return process with the transaction code VL01N as in the normal process. The following are some imp points we need to remember before performing returns order process.
    1. We must make sure that a RE document type must be created and assigned .
    2. Subsequent delivery document LR must be created and assigned to order type RE.
    3. We must make sure whether the item for which we are creating a return delivery is it relevant for return process.Means that in the control data of item category  REN 'Return item' indicator need to be activated.
    Once all these settings are fulfilled then only we can perform the return delivery successfully.
    If you are using any other documents rather than standard documents please check for those configuration settings that are applicable for return process.
    Regards,
    Revan

  • Return to Consignement stock for Return sales order

    Hi,
    For Home delivery Sales order- Sale is being performed from Vendor consignment stock & it works good with 601K movement .For Return in this case, Return sales order is created & PGR is performed against delivery.While doing this - the returned consignment material goes to unrestricted blocked stock. But we need this to go back to Consignment stock.
    Can any one suggest a solution on this ?
    Thanks in advance for quick solution, sharing your inputs
    Krish

    Standard movement types for processing returns in SD (651 to return stock, 653 to unrestricted, ...) are not capable to post to special stock K (consignment).
    It would be probably best to use the reverse to normal issue - movement type 602 K, though I have never tried this scenario. This should work fine, so make sure the movement type in your returns order (entered in the schedule line category) is 602 (or a copy of 602).
    If you still have problems (it is not 100% certain that the system will correctly determine the vendor for the consignment, and stock determination might not help either), then you can always alter the copy control order --> return order (if you are creating by reference), or try implementing BAdI - either LE_SHP_DELIVERY_PROC to enter the special stock indicator and vendor in the returns delivery item, or LE_SHP_GOODSMOVEMENT to modify the generated article document). But these are all non-standard solutions...
    regards
    Krzysztof

Maybe you are looking for

  • Full Screen display of iSight or other video camera input

    Ok - I've looked at iMovie and iChat and PhotoBooth - all the built in software to solve this fairly basic but maybe slightly odd need. I want to dedicate my display to show the camera video input. How can I do that full screen - not just in a window

  • DVD shows no files but Finder info says DVD is full to the brim

    Hello, I have a DVD which a friend of mine burned for me; he used a HD-Recorder to record a tv show for me which I missed, but I do not know which model he owns. When I insert it into my MacBooPro3,1 model with 10.6.1, which does run in 32-bit-mode (

  • Relative Values in the Appearance Palette

    The values in the Appearance palette should have an option to be relative. For example, in the Transform Effect, you should be able to specify a Horizontal or Vertical movement based on  a percentage of the height or width of the Object instead of an

  • IPhone freezes on sync during back up

    My iPhone freezes when I sync. Before updating to 3.0 it would freeze when transferring purchases. Specifically the dictionary.com app. I removed that app and it seemed to work. But after updating, I don't even get to the transferring purchases. It s

  • .rec file with performance manager how read ?

    Hi! I recorded performance data via performance manager I dont know how re-read the .rec file generated by this tools could you help me ?