<?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: Need Help with the code...? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-the-code/m-p/2400157#M534562</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thnx Ruchi....I am just trying it...&lt;/P&gt;&lt;P&gt;Thnx to all of you also...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Jun 2007 05:59:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-08T05:59:57Z</dc:date>
    <item>
      <title>Need Help with the code...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-the-code/m-p/2400151#M534556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;I have to design a selection screen that ask for the user to enter the purchase order number as EBELN field from EKBE table..Once the user enters the data, then I have to display a header data as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vendor Number: RBKP-LIFNR  &lt;/P&gt;&lt;P&gt;Vendor Name: LFA1-NAME1 (Link via LIFNR)&lt;/P&gt;&lt;P&gt;Purchase Order: EKBE-EBELN    &lt;/P&gt;&lt;P&gt;SAP Inv: RBKP-BELNR   &lt;/P&gt;&lt;P&gt;Vendor Invoice No: RBKP-XBLNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this Header I have to display the Item details as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;POLine    Amount  Quantity   UoM  PO Text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not able to figure out what will be the select statements like...Please help me in this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers:Jim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        jimmy wiliams&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        jimmy wiliams&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2007 19:44:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-the-code/m-p/2400151#M534556</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-07T19:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with the code...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-the-code/m-p/2400152#M534557</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;*Declaration&lt;/P&gt;&lt;P&gt;select-options : s_ebeln for ekko-ebeln obligatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get Purchase Order data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  select ebeln lifnr&lt;/P&gt;&lt;P&gt;     into table i_ekko&lt;/P&gt;&lt;P&gt;     from ekko&lt;/P&gt;&lt;P&gt;     where ebeln in s_ebeln.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;     commit work.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get Vendor Name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  if not i_ekko[] is initial.&lt;/P&gt;&lt;P&gt;    select lifnr name1&lt;/P&gt;&lt;P&gt;       into table i_lfa1&lt;/P&gt;&lt;P&gt;       from lfa1&lt;/P&gt;&lt;P&gt;       for all entries in i_ekko&lt;/P&gt;&lt;P&gt;       where lifnr = i_ekko-lifnr.&lt;/P&gt;&lt;P&gt;     if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        commit work.&lt;/P&gt;&lt;P&gt;     endif.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get Purchase Order item details&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  if not i_ekko[] is initial.&lt;/P&gt;&lt;P&gt;     select ebeln ebelp .......&lt;/P&gt;&lt;P&gt;        into table i_ekpo&lt;/P&gt;&lt;P&gt;        from ekpo&lt;/P&gt;&lt;P&gt;        for all entries in i_ekko&lt;/P&gt;&lt;P&gt;        where ebeln = i_ekko-ebeln.&lt;/P&gt;&lt;P&gt;     if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        commit work.&lt;/P&gt;&lt;P&gt;     endif.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Now loop thru i_ekko and write the required data for your report output.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;sksingh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2007 19:55:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-the-code/m-p/2400152#M534557</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-07T19:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with the code...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-the-code/m-p/2400153#M534558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;Please help me with this code...I am not able to figure out how to go about with this..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 05:01:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-the-code/m-p/2400153#M534558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T05:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with the code...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-the-code/m-p/2400154#M534559</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;select &lt;/P&gt;&lt;P&gt;RBKP~LIFNR &lt;/P&gt;&lt;P&gt;LFA1~NAME1 (Link via LIFNR)&lt;/P&gt;&lt;P&gt;EKBE~EBELN &lt;/P&gt;&lt;P&gt;RBKP~BELNR &lt;/P&gt;&lt;P&gt;RBKP~XBLNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from RBKP LFA1 EKBE  into itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where ebeln = &amp;lt;field name&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select &lt;/P&gt;&lt;P&gt;&amp;lt;item details/ POLine Amount Quantity UoM PO Text&amp;gt; &lt;/P&gt;&lt;P&gt;from &amp;lt;database table&amp;gt; into itab2&lt;/P&gt;&lt;P&gt;where ebeln = &amp;lt;field name&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;'ravish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;plz dont forget to reward points if helpful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 05:09:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-the-code/m-p/2400154#M534559</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T05:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with the code...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-the-code/m-p/2400155#M534560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi jimmy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As told by me yesterday. select data in header table by reading three internal tables.&lt;/P&gt;&lt;P&gt;TYPES: begin of itype,&lt;/P&gt;&lt;P&gt;lifnr TYPE rbkp-lifnr,&lt;/P&gt;&lt;P&gt;belnr TYPE rbkp-belnr,&lt;/P&gt;&lt;P&gt;xblnr TYPE rbkp-xblnr,&lt;/P&gt;&lt;P&gt;END OF itype.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES:BEGIN OF itype1,&lt;/P&gt;&lt;P&gt;name1 TYPE lfa1-name1,&lt;/P&gt;&lt;P&gt;END OF itype1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF itype2,&lt;/P&gt;&lt;P&gt;ebeln TYPE ekbe-ebeln,&lt;/P&gt;&lt;P&gt;belnr type ekbe-belnr,&lt;/P&gt;&lt;P&gt;END OF itype2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: itab TYPE TABLE OF itype, "internal table&lt;/P&gt;&lt;P&gt;wtab TYPE itype. "work area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: itab1 TYPE TABLE OF itype1, "internal table&lt;/P&gt;&lt;P&gt;wtab1 TYPE itype1. "work area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: itab2 TYPE TABLE OF itype2, "internal table&lt;/P&gt;&lt;P&gt;wtab2 TYPE itype2. "work area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ebeln belnr from ekbe into table itab2  where ebeln in s_ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT lifnr belnr xblnr FROM rbkp INTO TABLE itab FOR ALL ENTRIES IN&lt;/P&gt;&lt;P&gt;itab2 WHERE&lt;/P&gt;&lt;P&gt;belnr = itab2-belnr.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT name1 FROM lfa1 INTO TABLE itab1 FOR ALL ENTRIES IN itab WHERE&lt;/P&gt;&lt;P&gt;lifnr = itab-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab2 into wtab2.&lt;/P&gt;&lt;P&gt;iheader-ebeln = wtab2-ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table itab into wtab &lt;/P&gt;&lt;P&gt;               with key belnr = wtab2-belnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;iheader-lifnr = wtab-lifnr.&lt;/P&gt;&lt;P&gt;iheader-belnr = wtab-belnr.&lt;/P&gt;&lt;P&gt;iheader-xblnr = wtab-xblnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table itab1 into wtab1&lt;/P&gt;&lt;P&gt;       with key lifnr = iheader-lifnr.&lt;/P&gt;&lt;P&gt;iheader-name1 = wtab1-name1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this way extract item data also.&lt;/P&gt;&lt;P&gt;and put it in a table i_item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then use&lt;/P&gt;&lt;P&gt;REUSE_ALV_HIERSEQ_LIST_DISPLAY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ruchika&lt;/P&gt;&lt;P&gt;Reward if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 05:17:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-the-code/m-p/2400155#M534560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T05:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with the code...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-the-code/m-p/2400156#M534561</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;Refer to the code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*declaration&lt;/P&gt;&lt;P&gt;Select-options: s_ebeln for ekko-ebeln obligatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Get purchase order&lt;/P&gt;&lt;P&gt;Select ebeln &lt;/P&gt;&lt;P&gt;lifnr &lt;/P&gt;&lt;P&gt;from ekko &lt;/P&gt;&lt;P&gt;into table i_ekko&lt;/P&gt;&lt;P&gt;where ebeln in s_ebeln.&lt;/P&gt;&lt;P&gt;If sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;Message &amp;#133;..&lt;/P&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Get Vendor name&lt;/P&gt;&lt;P&gt;If not i_ekko[] is initial.&lt;/P&gt;&lt;P&gt;select  lifnr &lt;/P&gt;&lt;P&gt;name1&lt;/P&gt;&lt;P&gt;into table i_lfa1&lt;/P&gt;&lt;P&gt;from lfa1&lt;/P&gt;&lt;P&gt;for all entries in i_ekko&lt;/P&gt;&lt;P&gt;where lifnr = i_ekko-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Get Invoice&lt;/P&gt;&lt;P&gt;If not i_lfa1[] is initial.&lt;/P&gt;&lt;P&gt;Select belnr &lt;/P&gt;&lt;P&gt;Xblnr&lt;/P&gt;&lt;P&gt;Into table i_rbkp&lt;/P&gt;&lt;P&gt;From rbkp&lt;/P&gt;&lt;P&gt;For all entries in i_lfa1&lt;/P&gt;&lt;P&gt;Where lifnr = i_lfa1-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Get item info &lt;/P&gt;&lt;P&gt;Select ebelp &lt;/P&gt;&lt;P&gt;	Menge &lt;/P&gt;&lt;P&gt;Lmein&lt;/P&gt;&lt;P&gt;Txz01&lt;/P&gt;&lt;P&gt;From ekpo&lt;/P&gt;&lt;P&gt;Into table i_ekpo &lt;/P&gt;&lt;P&gt;For all entries in i_ekko&lt;/P&gt;&lt;P&gt;Where ebeln = i_ekko-ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now loop through each of the internal and write the report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if it was useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hema.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 05:26:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-the-code/m-p/2400156#M534561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T05:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with the code...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-the-code/m-p/2400157#M534562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thnx Ruchi....I am just trying it...&lt;/P&gt;&lt;P&gt;Thnx to all of you also...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 05:59:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-the-code/m-p/2400157#M534562</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T05:59:57Z</dc:date>
    </item>
  </channel>
</rss>

