<?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. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2402719#M535371</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi AbhaySingh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The parameter is used for entering "ONE" value. So based on the value you can &lt;/P&gt;&lt;P&gt;get the data from the database by using the "WHERE" clause to restrict.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example :&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt; To get the description of a Company Code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;And Now Say Declaration of a Parameter&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETER : P_BUKRS LIKE T001-BUKRS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Selecting the record from the database for th Bukrs (Company Code) which user has entered (p_bukrs)&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;select * from t001 where bukrs = p_bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Displaying the Bukrs (company code) and the text of it...&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;write : t001-bukrs, t001-butxt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note :&lt;/P&gt;&lt;P&gt;1. In the above example there will be only one record in the table T001 for a Company code (as BUKRS is a Key field)&lt;/P&gt;&lt;P&gt;2. In case if u know that for that parameter if more than one record resides in the&lt;/P&gt;&lt;P&gt;table, u can use the select as follows ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : ITAB TYPE TABLE OF T001.&lt;/P&gt;&lt;P&gt;DATA : ISTRU TYPE T001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM T001 &lt;/P&gt;&lt;P&gt;INTO TABLE ITAB&lt;/P&gt;&lt;P&gt;WHERE BUKRS = P_BUKRS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB INTO ISTRU.&lt;/P&gt;&lt;P&gt;WRITE : / ISTRU-BUKRS.&lt;/P&gt;&lt;P&gt;WRITE :   ISTRU-BUTXT.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps ! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please revert if it is not clear !!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Kripa Rangachari.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 02 Jun 2007 09:40:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-02T09:40:44Z</dc:date>
    <item>
      <title>need help.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2402715#M535367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on report. Whare I have few input parameters and based on that input parameters I need to display some field from different-different tables. Now I have cretaed one structure of the fields which i need to display based on input parameters........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what would be the next step:- I mean to say...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the select stamenet...&lt;/P&gt;&lt;P&gt;the loop statment and all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How I will proceed further.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jun 2007 07:35:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2402715#M535367</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-02T07:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: need help.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2402716#M535368</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 didnt understand what do you mean one structure of fields?you mean internal table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You declare the parameters or select options&lt;/P&gt;&lt;P&gt;parameters : p_matnr like mara-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr mtart &lt;/P&gt;&lt;P&gt; from mara into table it_mara &lt;/P&gt;&lt;P&gt;where matnr = p_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will fetch all data based on your input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_mara.&lt;/P&gt;&lt;P&gt;write : / itab-matnr, 30 itab-mtart.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will display the output.&lt;/P&gt;&lt;P&gt;This is just an example.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jun 2007 08:05:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2402716#M535368</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-02T08:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: need help.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2402717#M535369</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 i am able to understand from your requirement is you are having some parameters where you are going to enter some values.&lt;/P&gt;&lt;P&gt;Based on the values you have entered you want to retreive the data form different tables and finally you want to display the data retrieved from diifferent tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this scenario &lt;/P&gt;&lt;P&gt;you have a salesorganisation and based on that you want to retreive the sales documents and than the item details for all the sales order than you want to display a combination of fields from vbak and vbap in the final output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt; declarations for t_vbak,t_vbap,t_final.....&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;..........&lt;/P&gt;&lt;P&gt;............. &lt;/P&gt;&lt;P&gt;parameters p_vkorg type vbak-vkorg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select  vbeln into table t_vbak from vbak where vkorg = p_vkorg.&lt;/P&gt;&lt;P&gt;select  vbeln posnr matnr from vbap into t_vbap for all enteries in table t_vbak &lt;/P&gt;&lt;P&gt;                                                                     where vbeln = t_vbak-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_vbap.&lt;/P&gt;&lt;P&gt;t_final-vkorg = p_vkorg.&lt;/P&gt;&lt;P&gt;t_final-vbeln = t_vbap-vbeln.&lt;/P&gt;&lt;P&gt;t_final-posnr = t_vbap-posnr.&lt;/P&gt;&lt;P&gt;t_final-matnr = t_vbap-matnr.&lt;/P&gt;&lt;P&gt;append t_final.&lt;/P&gt;&lt;P&gt;clear t_final.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jun 2007 09:08:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2402717#M535369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-02T09:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: need help.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2402718#M535370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    use join statement like,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:BEGIN OF IT_FINAL,&lt;/P&gt;&lt;P&gt;         INCLUDE STRUCTURE,&lt;/P&gt;&lt;P&gt; DATA:END OF IT_FINAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT ZMM002~MATNR  MATKL PRDHA MAKTX&lt;/P&gt;&lt;P&gt;         MEINS MSTAE MSTAV VMSTA&lt;/P&gt;&lt;P&gt;         INTO CORRESPONDING FIELDS OF TABLE IT_FINAL&lt;/P&gt;&lt;P&gt;         FROM ZMM002&lt;/P&gt;&lt;P&gt;         INNER JOIN MARA ON ZMM002&lt;SUB&gt;MATNR = MARA&lt;/SUB&gt;MATNR&lt;/P&gt;&lt;P&gt;         INNER JOIN MARC ON ZMM002&lt;SUB&gt;MATNR = MARC&lt;/SUB&gt;MATNR&lt;/P&gt;&lt;P&gt;         INNER JOIN MVKE ON ZMM002&lt;SUB&gt;MATNR = MVKE&lt;/SUB&gt;MATNR&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        INNER JOIN MLGN ON ZMM002&lt;SUB&gt;MATNR = MLGN&lt;/SUB&gt;MATNR&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         WHERE WERKS = 'D002' AND&lt;/P&gt;&lt;P&gt;               VKORG = '1000' AND&lt;/P&gt;&lt;P&gt;               VTWEG = '10'."   AND&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;              LGNUM = 'W01'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if helpful,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Imran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jun 2007 09:36:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2402718#M535370</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-02T09:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: need help.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2402719#M535371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi AbhaySingh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The parameter is used for entering "ONE" value. So based on the value you can &lt;/P&gt;&lt;P&gt;get the data from the database by using the "WHERE" clause to restrict.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Example :&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt; To get the description of a Company Code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;And Now Say Declaration of a Parameter&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETER : P_BUKRS LIKE T001-BUKRS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Selecting the record from the database for th Bukrs (Company Code) which user has entered (p_bukrs)&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;select * from t001 where bukrs = p_bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Displaying the Bukrs (company code) and the text of it...&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;write : t001-bukrs, t001-butxt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note :&lt;/P&gt;&lt;P&gt;1. In the above example there will be only one record in the table T001 for a Company code (as BUKRS is a Key field)&lt;/P&gt;&lt;P&gt;2. In case if u know that for that parameter if more than one record resides in the&lt;/P&gt;&lt;P&gt;table, u can use the select as follows ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : ITAB TYPE TABLE OF T001.&lt;/P&gt;&lt;P&gt;DATA : ISTRU TYPE T001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM T001 &lt;/P&gt;&lt;P&gt;INTO TABLE ITAB&lt;/P&gt;&lt;P&gt;WHERE BUKRS = P_BUKRS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB INTO ISTRU.&lt;/P&gt;&lt;P&gt;WRITE : / ISTRU-BUKRS.&lt;/P&gt;&lt;P&gt;WRITE :   ISTRU-BUTXT.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps ! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please revert if it is not clear !!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Kripa Rangachari.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jun 2007 09:40:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2402719#M535371</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-02T09:40:44Z</dc:date>
    </item>
  </channel>
</rss>

