<?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: Code Modification in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-modification/m-p/1385311#M187614</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Flora&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through the following Link&lt;/P&gt;&lt;P&gt;This documentation should answer your question. I use field symbols when using dynamic programming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just go through these links.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/16/0dce0a0cf711d3b9360000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/16/0dce0a0cf711d3b9360000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3930358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3930358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field-Symbols are place holders for existing fields.&lt;/P&gt;&lt;P&gt;A Field-Symbol does not physically reserve space for a field but points to a field, which is not known until run time of the program.&lt;/P&gt;&lt;P&gt;Field-Symbols are like Pointers in Programming language &amp;#145; C &amp;#145;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax check is not effective.&lt;/P&gt;&lt;P&gt;Syntax :&lt;/P&gt;&lt;P&gt;Data : v1(4) value &amp;#145;abcd&amp;#146;.&lt;/P&gt;&lt;P&gt;Field-symbols &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;Assign v1 to &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;Write:/ &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF LINE,&lt;/P&gt;&lt;P&gt;COL1 TYPE I,&lt;/P&gt;&lt;P&gt;COL2 TYPE I,&lt;/P&gt;&lt;P&gt;END OF LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA ITAB LIKE SORTED TABLE OF LINE WITH UNIQUE KEY COL1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;FS&amp;gt; LIKE LINE OF ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 4 TIMES.&lt;/P&gt;&lt;P&gt;LINE-COL1 = SY-INDEX.&lt;/P&gt;&lt;P&gt;LINE-COL2 = SY-INDEX ** 2.&lt;/P&gt;&lt;P&gt;APPEND LINE TO ITAB.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE ITAB WITH TABLE KEY COL1 = 2 ASSIGNING &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;&amp;lt;FS&amp;gt;-COL2 = 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE ITAB WITH TABLE KEY COL1 = 3 ASSIGNING &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;DELETE ITAB INDEX 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF &amp;lt;FS&amp;gt; IS ASSIGNED.&lt;/P&gt;&lt;P&gt;WRITE '&amp;lt;FS&amp;gt; is assigned!'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB ASSIGNING &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;WRITE: / &amp;lt;FS&amp;gt;-COL1, &amp;lt;FS&amp;gt;-COL2.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output is: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4 16&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;Sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Jun 2006 08:34:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-26T08:34:52Z</dc:date>
    <item>
      <title>Code Modification</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-modification/m-p/1385307#M187610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can i avoid the Case .. Endcase in the following code: (like in C i cud have used array and did something like wa[tabix] = wa_in)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: itab TYPE TABLE OF string, 
      sep(3)   VALUE '[*]',
      p_head type string.

data: begin of itab_show Occurs 0,
col1(20),
col2(20),
.....
col8(20),
end of itab_show.

p_head = 'Bolier No.[*]1[*]2[*]3[*]4[*]5[*]6[*]TOTAL'.

  SPLIT p_head AT sep INTO:
                            TABLE itab.

loop at itab into wa_in.
case tabix.
when 1.
wa-col1 = wa_in.
when 2.
wa-col2 = wa_in.
....
when 8.
wa-col8 = wa_in.
endloop.

Append wa to itab_show.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;*... exporting itab_show to smartform interface&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2006 08:18:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-modification/m-p/1385307#M187610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-26T08:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: Code Modification</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-modification/m-p/1385308#M187611</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 use a field-symbol to fill ypur array:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;FS_FIELD&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into wa_in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT SY-TABIX OF STRUCTURE WA TO &amp;lt;FS_FIELD&amp;gt;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;  &amp;lt;FS_FIELD&amp;gt; = WA_IN.&lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*case tabix.&lt;/P&gt;&lt;P&gt;*when 1.&lt;/P&gt;&lt;P&gt;*wa-col1 = wa_in.&lt;/P&gt;&lt;P&gt;*when 2.&lt;/P&gt;&lt;P&gt;*wa-col2 = wa_in.&lt;/P&gt;&lt;P&gt;*....&lt;/P&gt;&lt;P&gt;*when 8.&lt;/P&gt;&lt;P&gt;*wa-col8 = wa_in.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2006 08:23:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-modification/m-p/1385308#M187611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-26T08:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Code Modification</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-modification/m-p/1385309#M187612</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 do something like this - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at itab assigning &amp;lt;fs_wa&amp;gt;.
  l_index = sy-tabix.
  assign component l of structure &amp;lt;fs_wa&amp;gt; to &amp;lt;fs_col&amp;gt;.
  &amp;lt;fs_col&amp;gt; = wa_in.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course, you need to declare the necessary field symbols...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2006 08:24:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-modification/m-p/1385309#M187612</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-26T08:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Code Modification</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-modification/m-p/1385310#M187613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Try if this is possible in ur case&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_head = 'Bolier No.[&lt;STRONG&gt;]1[&lt;/STRONG&gt;]2[&lt;STRONG&gt;]3[&lt;/STRONG&gt;]4[&lt;STRONG&gt;]5[&lt;/STRONG&gt;]6[*]TOTAL'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SPLIT p_head&lt;/P&gt;&lt;P&gt;AT sep&lt;/P&gt;&lt;P&gt;INTO wa-col1 wa-col2 wa-col3 wa-col4 wa-col5 ....Extra_string&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2006 08:31:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-modification/m-p/1385310#M187613</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-26T08:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: Code Modification</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-modification/m-p/1385311#M187614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Flora&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through the following Link&lt;/P&gt;&lt;P&gt;This documentation should answer your question. I use field symbols when using dynamic programming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just go through these links.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/16/0dce0a0cf711d3b9360000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/16/0dce0a0cf711d3b9360000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3930358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3930358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field-Symbols are place holders for existing fields.&lt;/P&gt;&lt;P&gt;A Field-Symbol does not physically reserve space for a field but points to a field, which is not known until run time of the program.&lt;/P&gt;&lt;P&gt;Field-Symbols are like Pointers in Programming language &amp;#145; C &amp;#145;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax check is not effective.&lt;/P&gt;&lt;P&gt;Syntax :&lt;/P&gt;&lt;P&gt;Data : v1(4) value &amp;#145;abcd&amp;#146;.&lt;/P&gt;&lt;P&gt;Field-symbols &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;Assign v1 to &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;Write:/ &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF LINE,&lt;/P&gt;&lt;P&gt;COL1 TYPE I,&lt;/P&gt;&lt;P&gt;COL2 TYPE I,&lt;/P&gt;&lt;P&gt;END OF LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA ITAB LIKE SORTED TABLE OF LINE WITH UNIQUE KEY COL1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;FS&amp;gt; LIKE LINE OF ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 4 TIMES.&lt;/P&gt;&lt;P&gt;LINE-COL1 = SY-INDEX.&lt;/P&gt;&lt;P&gt;LINE-COL2 = SY-INDEX ** 2.&lt;/P&gt;&lt;P&gt;APPEND LINE TO ITAB.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE ITAB WITH TABLE KEY COL1 = 2 ASSIGNING &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;&amp;lt;FS&amp;gt;-COL2 = 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE ITAB WITH TABLE KEY COL1 = 3 ASSIGNING &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;DELETE ITAB INDEX 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF &amp;lt;FS&amp;gt; IS ASSIGNED.&lt;/P&gt;&lt;P&gt;WRITE '&amp;lt;FS&amp;gt; is assigned!'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB ASSIGNING &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;WRITE: / &amp;lt;FS&amp;gt;-COL1, &amp;lt;FS&amp;gt;-COL2.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output is: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4 16&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;Sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2006 08:34:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-modification/m-p/1385311#M187614</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-26T08:34:52Z</dc:date>
    </item>
  </channel>
</rss>

