<?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: Sorting Problem in a BADI in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-problem-in-a-badi/m-p/4989994#M1162397</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;method IF_EX_LE_SHP_DELIVERY_PROC~SAVE_DOCUMENT_PREPARE.

  data : lt_lips TYPE TABLE OF LIPSVB.
  DATA : wa_lips TYPE LIPSVB.
  DATA : l_lgpbe TYPE lgpbe.

  
  loop at ct_xlips into wa_lips.

    select single lgpla from mlgt into  l_lgpbe
                       where matnr = wa_lips-matnr
                          and lgnum = wa_lips-lgnum.
      wa_lips-lgpbe = l_lgpbe.

APPEND wa_lips to lt_lips.

  ENDLOOP.

  sort lt_lips by lgpbe.

  clear ct_xlips.
  CLEAR wa_lips.
  loop at lt_lips INTO wa_lips.
    APPEND wa_lips to ct_xlips.
    ENDLOOP.

endmethod.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Jan 2009 20:34:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-14T20:34:46Z</dc:date>
    <item>
      <title>Sorting Problem in a BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-problem-in-a-badi/m-p/4989992#M1162395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use VL10D to issue purchase items due for delivery and while doing so I want to sort them based on the storage bin(LGPBE).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to achieve this by using BADI : LE_SHP_DELIVERY_PROC and method : SAVE_DOCUMENT_PREPARE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The coding part is simple as I am just using a sort statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;sort ct_xlips by lgpbe.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am debugging it shows me that ct_xlips has been sorted but I dont see any changes in my final result. Can anyone help me in this regard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2009 17:28:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-problem-in-a-badi/m-p/4989992#M1162395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-14T17:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Problem in a BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-problem-in-a-badi/m-p/4989993#M1162396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please post the entire source code for review.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2009 20:32:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-problem-in-a-badi/m-p/4989993#M1162396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-14T20:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Problem in a BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-problem-in-a-badi/m-p/4989994#M1162397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;method IF_EX_LE_SHP_DELIVERY_PROC~SAVE_DOCUMENT_PREPARE.

  data : lt_lips TYPE TABLE OF LIPSVB.
  DATA : wa_lips TYPE LIPSVB.
  DATA : l_lgpbe TYPE lgpbe.

  
  loop at ct_xlips into wa_lips.

    select single lgpla from mlgt into  l_lgpbe
                       where matnr = wa_lips-matnr
                          and lgnum = wa_lips-lgnum.
      wa_lips-lgpbe = l_lgpbe.

APPEND wa_lips to lt_lips.

  ENDLOOP.

  sort lt_lips by lgpbe.

  clear ct_xlips.
  CLEAR wa_lips.
  loop at lt_lips INTO wa_lips.
    APPEND wa_lips to ct_xlips.
    ENDLOOP.

endmethod.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2009 20:34:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-problem-in-a-badi/m-p/4989994#M1162397</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-14T20:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Problem in a BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-problem-in-a-badi/m-p/4989995#M1162398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you try to debug and check whether there is another sort statement in SAP standard program after your BADI is called? Maybe SAP already has its own sorting for the table that is executed after the BADI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abraham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2009 07:46:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-problem-in-a-badi/m-p/4989995#M1162398</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-15T07:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Problem in a BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-problem-in-a-badi/m-p/4989996#M1162399</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;What do you actually mean by "Final Result"?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you mean to say that in the output of VL10D trasaction, LIPS data is not sorted according to your sorting criteria then it is because standard SAP always sorts Line Item data based on the Primary keys and/or Item Number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This might be the probable reason why in the final result you are not getting the output in the desired order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abhisek.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2009 09:42:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-problem-in-a-badi/m-p/4989996#M1162399</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-15T09:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Problem in a BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-problem-in-a-badi/m-p/4989997#M1162400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Abraham and Abhishek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main problem is the output gets printed in a smartform and I want the items on the smartform to get sorted based on the storage bin. The structure on the smartform doesnt allow me to do that and it gives me an error saying that IS_DLV_DELNOTE is of type Sorted and I cannot sort it. So I was trying to sort it before it even goes there. Maybe my approach itself is wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2009 14:49:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-problem-in-a-badi/m-p/4989997#M1162400</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-15T14:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Problem in a BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-problem-in-a-badi/m-p/4989998#M1162401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not solved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2009 16:19:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-problem-in-a-badi/m-p/4989998#M1162401</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-21T16:19:19Z</dc:date>
    </item>
  </channel>
</rss>

