<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Return order with ORDERS05 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-order-with-orders05/m-p/8512318#M1654994</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, if you look at the coding in IDOC_INPUT_ORDERS -&amp;gt; PERFORM call_va01_new_orders_return that deals with returns, it doesn't at all deal with linking the return items to related reference document items (order / billing against which you want to create the return)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;WHEN 'R'.
* Aufruf Transaktion Auftragerfassung für Auftragsarten mit Vertiebs-
* belegtypen H (z.B. Konsigantionsretoure)
* call transaction Order Entry VA01 for order types with
* SD document category H (for example consingment return)
            PERFORM call_va01_new_orders_return USING ok.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you CANNOT create a return order from a reference doc using ORDERS05 / IDOC_INPUT_ORDERS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We had same situation in a previous project, there we have copied the IDOC_INPUT_ORDERS to our own Z function, retained the logic that parse the IDoc segments to XVBAK, XVBAP, XVBPA etc tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Later, to create the return order we call SD_SALESDOCUMENT_CREATE with BUSINESS_OBJECT = 'BUS2102' (for return order).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have BAPI_CUSTOMERRETURN_CREATE in your system you can use that as well, you can see that this BAPI is calling SD_SALESDOCUMENT_CREATE internally with 'BUS2102'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI_CUSTOMERRETURN_CREATE has RETURN_ITEMS_IN-REF_DOC and RETURN_ITEMS_IN-REF_DOC_IT that allow you to pass referenc doc and item number to relate the return item to its parent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Vishnu Tallapragada&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jan 2012 17:35:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-01-18T17:35:02Z</dc:date>
    <item>
      <title>Return order with ORDERS05</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-order-with-orders05/m-p/8512317#M1654993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an inbound IDOC to create Return order, I am expecting the system to copy the line item from the reference doc and create the return order.&lt;/P&gt;&lt;P&gt;Whle processing it from WE19, it is expecting Sales Area data, Doc type , Material and Sold To party. Now I am passing these values as well. With all these it is creating the return order but it NOT REFERENCING to the original order, which is not expected. VBAP-VGBEL is blank for the order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are the data I am passing in WE19.&lt;/P&gt;&lt;P&gt;&lt;U&gt;Segment&lt;/U&gt;             &lt;U&gt;Qualf&lt;/U&gt;   &lt;U&gt;value&lt;/U&gt;         &lt;/P&gt;&lt;P&gt;E1EDK14                     012     ZNRC   (return order doc type)&lt;/P&gt;&lt;P&gt;E1EDK14                     008     NP01   (Sales Org)&lt;/P&gt;&lt;P&gt;E1EDK14                     007      01       (Distr. Channel)&lt;/P&gt;&lt;P&gt;E1EDK14                     006      01       (Division)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E1EDKA1                     AG        2000001050    (Sold to Party)&lt;/P&gt;&lt;P&gt;E1EDK02                     018        6170000012    (Reference order - Normal SO)&lt;/P&gt;&lt;P&gt;For E1EDK02 I have tried for both  011/018 qualifier.      &lt;/P&gt;&lt;P&gt;I am just passing the ref doc number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E1EDP01   -  I am passing quantity&lt;/P&gt;&lt;P&gt;E1EDP02                     018        6170000012                         000010   &lt;/P&gt;&lt;P&gt;For E1EDP02  I am passing both the ref doc number and line item. Qualf  018/011.&lt;/P&gt;&lt;P&gt;E1EDP19  -                   003         MATERIAL1         &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can You please let me know, what could be the issue?&lt;/P&gt;&lt;P&gt;Am I missing any required data to be provided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Hari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 16:31:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-order-with-orders05/m-p/8512317#M1654993</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-18T16:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: Return order with ORDERS05</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-order-with-orders05/m-p/8512318#M1654994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, if you look at the coding in IDOC_INPUT_ORDERS -&amp;gt; PERFORM call_va01_new_orders_return that deals with returns, it doesn't at all deal with linking the return items to related reference document items (order / billing against which you want to create the return)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;WHEN 'R'.
* Aufruf Transaktion Auftragerfassung für Auftragsarten mit Vertiebs-
* belegtypen H (z.B. Konsigantionsretoure)
* call transaction Order Entry VA01 for order types with
* SD document category H (for example consingment return)
            PERFORM call_va01_new_orders_return USING ok.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you CANNOT create a return order from a reference doc using ORDERS05 / IDOC_INPUT_ORDERS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We had same situation in a previous project, there we have copied the IDOC_INPUT_ORDERS to our own Z function, retained the logic that parse the IDoc segments to XVBAK, XVBAP, XVBPA etc tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Later, to create the return order we call SD_SALESDOCUMENT_CREATE with BUSINESS_OBJECT = 'BUS2102' (for return order).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have BAPI_CUSTOMERRETURN_CREATE in your system you can use that as well, you can see that this BAPI is calling SD_SALESDOCUMENT_CREATE internally with 'BUS2102'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI_CUSTOMERRETURN_CREATE has RETURN_ITEMS_IN-REF_DOC and RETURN_ITEMS_IN-REF_DOC_IT that allow you to pass referenc doc and item number to relate the return item to its parent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Vishnu Tallapragada&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 17:35:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-order-with-orders05/m-p/8512318#M1654994</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-18T17:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Return order with ORDERS05</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-order-with-orders05/m-p/8512319#M1654995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vishnu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;I was gone with another issue so could not reply on this. &lt;/P&gt;&lt;P&gt;I am using now SD_SALESDOCUMENT_CREATE and able to create the credit request with reference to the sales document.&lt;/P&gt;&lt;P&gt;I can see the linkage in document flow but it is not copying the Pricing detaiils from the reference document.&lt;/P&gt;&lt;P&gt;here is what I am passing to the FM:&lt;/P&gt;&lt;P&gt;************************************************&lt;/P&gt;&lt;P&gt;wa_header-doc_type   = c_znrc.               "ZNRC&lt;/P&gt;&lt;P&gt;wa_header-sales_org  = wa_xvbak-vkorg.&lt;/P&gt;&lt;P&gt;wa_header-distr_chan = wa_xvbak-vtweg.&lt;/P&gt;&lt;P&gt;wa_header-division   = wa_xvbak-spart.&lt;/P&gt;&lt;P&gt;wa_header-refdoc_cat  = c_c.&lt;/P&gt;&lt;P&gt;wa_header-ref_doc    = wa_xvbak-vgbel.&lt;/P&gt;&lt;P&gt;wa_header-bill_block = wa_xvbak-faksk.&lt;/P&gt;&lt;P&gt;wa_header-ord_reason = wa_xvbak-augru.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE it_xvbap INTO wa_xvbap index 1. "WITH KEY posnr = '000010'.&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Populate Item&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  wa_item-itm_number = '000010'.                            "000010&lt;/P&gt;&lt;P&gt;  wa_item-material   = wa_xvbap-matnr.&lt;/P&gt;&lt;P&gt;  wa_item-target_qty = wa_xvbap-wmeng.&lt;/P&gt;&lt;P&gt;  wa_item-reason_rej = wa_xvbap-abgru.&lt;/P&gt;&lt;P&gt;  wa_item-bill_block = wa_xvbap-faksp.&lt;/P&gt;&lt;P&gt;  wa_item-ref_doc    = wa_xvbak-vgbel.&lt;/P&gt;&lt;P&gt;  APPEND wa_item TO it_item&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and partner details.&lt;/P&gt;&lt;P&gt;**************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anyway we can get pricing values automatically or we need to copy them into the CONDITION table by fetching it from the reference order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;Hari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jan 2012 14:26:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-order-with-orders05/m-p/8512319#M1654995</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-20T14:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Return order with ORDERS05</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-order-with-orders05/m-p/8512320#M1654996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue resolved. I have my screen sequence for return order in the customer exit, which is over writing the standard screen sequence for that doc type and creating the doc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Closing the thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Hari&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Harrnaadh on Jan 25, 2012 11:42 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2012 22:39:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-order-with-orders05/m-p/8512320#M1654996</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-25T22:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Return order with ORDERS05</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-order-with-orders05/m-p/8512321#M1654997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;resolved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2012 22:44:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-order-with-orders05/m-p/8512321#M1654997</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-25T22:44:54Z</dc:date>
    </item>
  </channel>
</rss>

