<?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 Is there a way to remove static code reference (for declarations)? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-a-way-to-remove-static-code-reference-for-declarations/m-p/6636082#M1442682</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear forumers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been asked to make a report's program codes to be more dynamic - so, static references to a specific table (i.e. ZZGLV) should be eliminated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to remove static code references for &lt;STRONG&gt;declaration statements&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;parameters: p_dat type zzglv-budat.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will need to remove the static code reference to the table ZZGLV here. Is there a way for me to use dynamic programming techniques to achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Feb 2010 07:02:47 GMT</pubDate>
    <dc:creator>former_member367551</dc:creator>
    <dc:date>2010-02-22T07:02:47Z</dc:date>
    <item>
      <title>Is there a way to remove static code reference (for declarations)?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-a-way-to-remove-static-code-reference-for-declarations/m-p/6636082#M1442682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear forumers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been asked to make a report's program codes to be more dynamic - so, static references to a specific table (i.e. ZZGLV) should be eliminated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to remove static code references for &lt;STRONG&gt;declaration statements&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;parameters: p_dat type zzglv-budat.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will need to remove the static code reference to the table ZZGLV here. Is there a way for me to use dynamic programming techniques to achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2010 07:02:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-a-way-to-remove-static-code-reference-for-declarations/m-p/6636082#M1442682</guid>
      <dc:creator>former_member367551</dc:creator>
      <dc:date>2010-02-22T07:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to remove static code reference (for declarations)?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-a-way-to-remove-static-code-reference-for-declarations/m-p/6636083#M1442683</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;You can simply use data elements in declarations. In your example zzglv-budat, check the data element related to BUDAT in ZZGLV DB table and declare it as the data element type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ganga&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2010 07:14:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-a-way-to-remove-static-code-reference-for-declarations/m-p/6636083#M1442683</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-22T07:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to remove static code reference (for declarations)?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-a-way-to-remove-static-code-reference-for-declarations/m-p/6636084#M1442684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oooops, sorry.. Was just too silly. Got what you mean now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this obviously will not work for SELECT-OPTIONS. What can I do for this, then?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SELECT-OPTIONS s_carrid FOR zzglv-carrid.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried the following, but I still have "Generic Selection Option" shown on the selection screen:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TABLES spfli.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATA n_carrid TYPE spfli-carrid.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SELECT-OPTIONS s_carrid FOR (n_carrid).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How may I correct this further?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Deborah Tan on Feb 22, 2010 8:52 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2010 07:18:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-a-way-to-remove-static-code-reference-for-declarations/m-p/6636084#M1442684</guid>
      <dc:creator>former_member367551</dc:creator>
      <dc:date>2010-02-22T07:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to remove static code reference (for declarations)?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-a-way-to-remove-static-code-reference-for-declarations/m-p/6636085#M1442685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've tried this as well, but to no avail. Could someone please, please help me out here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
ta_mara TYPE STANDARD TABLE OF mara,
wa_mara LIKE LINE OF ta_mara.

DATA: selopt_name TYPE string VALUE 'WA_MARA-MATNR'.
TRANSLATE selopt_name TO UPPER CASE.

SELECT-OPTIONS: so_sel FOR (SELOPT_NAME).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2010 09:22:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-a-way-to-remove-static-code-reference-for-declarations/m-p/6636085#M1442685</guid>
      <dc:creator>former_member367551</dc:creator>
      <dc:date>2010-02-22T09:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to remove static code reference (for declarations)?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-a-way-to-remove-static-code-reference-for-declarations/m-p/6636086#M1442686</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;You can simply follow this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA  : v_matnr TYPE matnr. (define variable with data element)&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS : s_matnr FOR v_matnr. (use the variable defined here)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ganga&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2010 09:29:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-a-way-to-remove-static-code-reference-for-declarations/m-p/6636086#M1442686</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-22T09:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to remove static code reference (for declarations)?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-a-way-to-remove-static-code-reference-for-declarations/m-p/6636087#M1442687</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;Try the below code, it wil work:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: v_matnr TYPE mara-matnr.
 
SELECT-OPTIONS: s_matnr FOR v_matnr.
&lt;/CODE&gt;&lt;/PRE&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;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2010 09:35:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-a-way-to-remove-static-code-reference-for-declarations/m-p/6636087#M1442687</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2010-02-22T09:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to remove static code reference (for declarations)?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-a-way-to-remove-static-code-reference-for-declarations/m-p/6636088#M1442688</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;You can change value of selopt_name in INITIALIZATION or AT SELECTION-SCREEN....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you check your code didn't gave systax-error?&lt;/P&gt;&lt;P&gt;I haven't use dynamic coding in such a way...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although, there is another way...You keep your Selection Screen in an include and write some control program to populate that include with your selection screen code before you submit your main program...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you try to modify your selection screen from current program if may not work as code is already loaded for your program context in memory....(That is the reason I doubt whether code mentioned by you will work..)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mohaiyuddin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2010 10:10:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-a-way-to-remove-static-code-reference-for-declarations/m-p/6636088#M1442688</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-22T10:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to remove static code reference (for declarations)?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-a-way-to-remove-static-code-reference-for-declarations/m-p/6636089#M1442689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Hi,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; You can simply follow this way.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; DATA  : v_matnr TYPE matnr. (define variable with data element)&lt;/P&gt;&lt;P&gt;&amp;gt; SELECT-OPTIONS : s_matnr FOR v_matnr. (use the variable defined here)&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Regards,&lt;/P&gt;&lt;P&gt;&amp;gt; Ganga&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Ganga,&lt;/P&gt;&lt;P&gt;This works perfectly. THANKS a lot for your help here!&lt;/P&gt;&lt;P&gt;I can create the select-option well by just using refering to the variable defined with data element (no table references needed).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And for everyone, thanks a lot for the ideas and suggestions too. Appreciate that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2010 03:35:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-a-way-to-remove-static-code-reference-for-declarations/m-p/6636089#M1442689</guid>
      <dc:creator>former_member367551</dc:creator>
      <dc:date>2010-02-23T03:35:53Z</dc:date>
    </item>
  </channel>
</rss>

