<?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 Field name while fetching its content from db table dynamically. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-name-while-fetching-its-content-from-db-table-dynamically/m-p/7125190#M1511654</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;&lt;/P&gt;&lt;P&gt;I am new to ABAP and I  have a situation as follows.&lt;/P&gt;&lt;P&gt;I have a table say ztable where there are seven fields monday,tuesday,wednesday,thursday,friday and saturday.&lt;/P&gt;&lt;P&gt;Depending on the current calender day i have to fetch the content.&lt;/P&gt;&lt;P&gt;Suppose for monday, i have to fetch ztable-monday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any other way other than using if statements 7 times ? Like i wanna capture the day and substitute it in the place of z_table-"day".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Jul 2010 11:38:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-07-02T11:38:56Z</dc:date>
    <item>
      <title>Field name while fetching its content from db table dynamically.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-name-while-fetching-its-content-from-db-table-dynamically/m-p/7125190#M1511654</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;&lt;/P&gt;&lt;P&gt;I am new to ABAP and I  have a situation as follows.&lt;/P&gt;&lt;P&gt;I have a table say ztable where there are seven fields monday,tuesday,wednesday,thursday,friday and saturday.&lt;/P&gt;&lt;P&gt;Depending on the current calender day i have to fetch the content.&lt;/P&gt;&lt;P&gt;Suppose for monday, i have to fetch ztable-monday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any other way other than using if statements 7 times ? Like i wanna capture the day and substitute it in the place of z_table-"day".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 11:38:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-name-while-fetching-its-content-from-db-table-dynamically/m-p/7125190#M1511654</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-02T11:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: Field name while fetching its content from db table dynamically.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-name-while-fetching-its-content-from-db-table-dynamically/m-p/7125191#M1511655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey ,&lt;/P&gt;&lt;P&gt;yes there is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can write a Dynamic select query and it will solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Search on SDN for 'Dynamic Select query'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is helpful.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Uma Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 11:43:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-name-while-fetching-its-content-from-db-table-dynamically/m-p/7125191#M1511655</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-02T11:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: Field name while fetching its content from db table dynamically.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-name-while-fetching-its-content-from-db-table-dynamically/m-p/7125192#M1511656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; In the below code you can pass any field of the table in W_FIELD.... It will fetch the particular field from the table....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_block should be of same data element of your field in W_FIELD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETER : w_field TYPE NAME_FELD.

DATA w_block(1) TYPE c.

Select single (w_field) FROM RSEG INTO w_block
  WHERE belnr EQ '5105701294'.

  IF sy-subrc EQ 0.

    WRITE / w_block.

  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Senthil Kumar Anantham.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Senthil Kumar on Jul 2, 2010 5:37 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 12:04:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-name-while-fetching-its-content-from-db-table-dynamically/m-p/7125192#M1511656</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-02T12:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Field name while fetching its content from db table dynamically.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-name-while-fetching-its-content-from-db-table-dynamically/m-p/7125193#M1511657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a solution with FIELD-SYMBOLS:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 FIELD-SYMBOLS &amp;lt;FS&amp;gt;.
  DATA: WWFIELDN(100).
  DATA: wwday(20).

  wwday = 'monday'.

  CONCATENATE 'z_table-'  wwday INTO WWFIELDN.
  ASSIGN (WWFIELDN) TO &amp;lt;FS&amp;gt;.


  MOVE 100 TO &amp;lt;FS&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is another solution using DO ... VARYING.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 12:08:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-name-while-fetching-its-content-from-db-table-dynamically/m-p/7125193#M1511657</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-02T12:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Field name while fetching its content from db table dynamically.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-name-while-fetching-its-content-from-db-table-dynamically/m-p/7125194#M1511658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not create seven select options and execute a single query ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this what you want ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:r1 type range of z-monday.&lt;/P&gt;&lt;P&gt;data:r2 type range of z-tuesday.&lt;/P&gt;&lt;P&gt;data:r3 type range of z-wednesday.&lt;/P&gt;&lt;P&gt;data:r4 type range of z-thursday.&lt;/P&gt;&lt;P&gt;data:r5 type range of z-friday.&lt;/P&gt;&lt;P&gt;data:r6 type range of z-saturday.&lt;/P&gt;&lt;P&gt;data:r7 type range of z-sunday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Populate the required ranges as required depending on your current calenadar day and leave others blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then select * from ztable where&lt;/P&gt;&lt;P&gt;monday in r1 and&lt;/P&gt;&lt;P&gt;tuesday in r2 and&lt;/P&gt;&lt;P&gt;wednesday in r3 and&lt;/P&gt;&lt;P&gt;thursday in r4 and&lt;/P&gt;&lt;P&gt;friday in r5 and&lt;/P&gt;&lt;P&gt;saturday in r6 and &lt;/P&gt;&lt;P&gt;friday in r7.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 12:16:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-name-while-fetching-its-content-from-db-table-dynamically/m-p/7125194#M1511658</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-07-02T12:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Field name while fetching its content from db table dynamically.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-name-while-fetching-its-content-from-db-table-dynamically/m-p/7125195#M1511659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks one and all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jul 2010 12:14:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-name-while-fetching-its-content-from-db-table-dynamically/m-p/7125195#M1511659</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-06T12:14:07Z</dc:date>
    </item>
  </channel>
</rss>

