<?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 how to read Macro? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-macro/m-p/6973243#M1491591</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can anyone explain me how to know which table the below code is reading data from Database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    DEFINE sel.
    when &amp;amp;1.
      sort s_t_select by fieldnm.                  
      do.
        fetch next cursor g_cursor into id.
        if sy-subrc eq 0.
          import &amp;amp;2 from database &amp;amp;3(bw) id id. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to know how these macro will fetch data from database.&lt;/P&gt;&lt;P&gt;In the below code i have shown how these &amp;amp;2 and &amp;amp;3 have been built.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; CASE s_estruc.
        sel 'MC03BF0'      mc03bf0_tab       mc03bf0setup.
        ENDCASE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mayank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Jun 2010 19:52:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-06-03T19:52:33Z</dc:date>
    <item>
      <title>how to read Macro?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-macro/m-p/6973243#M1491591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can anyone explain me how to know which table the below code is reading data from Database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    DEFINE sel.
    when &amp;amp;1.
      sort s_t_select by fieldnm.                  
      do.
        fetch next cursor g_cursor into id.
        if sy-subrc eq 0.
          import &amp;amp;2 from database &amp;amp;3(bw) id id. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to know how these macro will fetch data from database.&lt;/P&gt;&lt;P&gt;In the below code i have shown how these &amp;amp;2 and &amp;amp;3 have been built.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; CASE s_estruc.
        sel 'MC03BF0'      mc03bf0_tab       mc03bf0setup.
        ENDCASE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mayank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jun 2010 19:52:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-macro/m-p/6973243#M1491591</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-03T19:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to read Macro?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-macro/m-p/6973244#M1491592</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;This the result of your program with macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CASE s_estruc.
    when  'MC03BF0'.
      sort s_t_select by fieldnm.                  
      do.
        fetch next cursor g_cursor into id.
        if sy-subrc eq 0.
          import mc03bf0_tab from database mc03bf0setup(bw) id id. 
        ENDCASE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The macro "copy" your code to the indicated position, replacing only &amp;amp;xx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case, if s_estruc = 'MC03BF0' the program will do the fetch and the import. The selection from fetch is outside this code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leandro Mengue&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jun 2010 20:49:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-macro/m-p/6973244#M1491592</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-03T20:49:42Z</dc:date>
    </item>
  </channel>
</rss>

