<?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: reading data from application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-application-server/m-p/3374332#M810247</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT ...  AT ...  INTO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have to name all components of your workarea. You have to name a component for each column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex.:&lt;/P&gt;&lt;P&gt;Let`s say your target structure (TGT_STRUCT) has three components (COMP1, COMP2 and COMP3), then you have to execute the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SPLIT wa_data AT c_tab INTO tgt_struct-comp1 tgt_struct-comp2 tgt_struct-comp3.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward point, if reply is applicable&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Jan 2008 10:27:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-31T10:27:00Z</dc:date>
    <item>
      <title>reading data from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-application-server/m-p/3374331#M810246</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 have created a dynamic internal table . Now i want to read data from application server which has a flat file with tab delimited records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the flat file format is like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERNR#SUBTY#TMART#TERMN#MNDAT#ANZHL#ZEINX&lt;/P&gt;&lt;P&gt;00000010#04#04#21.11.2007#20.11.2007#1#123&lt;/P&gt;&lt;P&gt;00000058#04#04#21.11.2007#20.11.2007#1#123&lt;/P&gt;&lt;P&gt;00000054#04#04#21.11.2007#20.11.2007#1#123&lt;/P&gt;&lt;P&gt;00000007#04#04#21.11.2007#20.11.2007#1#123&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below is the piece of code for&lt;/P&gt;&lt;P&gt;****creating dynamic internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table&lt;/P&gt;&lt;P&gt;            EXPORTING&lt;/P&gt;&lt;P&gt;              it_fieldcatalog = i_fieldcat_at&lt;/P&gt;&lt;P&gt;            IMPORTING&lt;/P&gt;&lt;P&gt;              ep_table        = new_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          ASSIGN new_table-&amp;gt;* TO &amp;lt;dyn_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Create dynamic work area and assign to FS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          CREATE DATA new_line LIKE LINE OF &amp;lt;dyn_table&amp;gt;.&lt;/P&gt;&lt;P&gt;          ASSIGN new_line-&amp;gt;* TO &amp;lt;dyn_wa&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          CREATE DATA new_line1 LIKE LINE OF &amp;lt;dyn_table&amp;gt;.&lt;/P&gt;&lt;P&gt;          ASSIGN new_line1-&amp;gt;* TO &amp;lt;dyn_wa1&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          OPEN DATASET l_file_path FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;          IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            MESSAGE s000(zwb) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            DO .&lt;/P&gt;&lt;P&gt;              READ DATASET l_file_path INTO wa_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              IF sy-index = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              do l_col times.  "where l_col is no. of columns in extract file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            SPLIT wa_data AT c_tab INTO  &amp;lt;dyn_wa1&amp;gt; wa_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            &lt;/P&gt;&lt;P&gt;            endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now i want to seperate each entity (column value) and place it in corresponding filed of the dynamic internal table.  But in the above code for splitting i can't  specify column for the field symbol &amp;lt;dyn_wa1&amp;gt;..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex: &amp;lt;dyn_wa1&amp;gt;-pernr  is not possible in the split statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so iam not able to move the entries into corresponding fields of &lt;/P&gt;&lt;P&gt;the dynamic internal table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could anybody please provide the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it's urgent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Badri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2008 06:56:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-application-server/m-p/3374331#M810246</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-31T06:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: reading data from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-application-server/m-p/3374332#M810247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT ...  AT ...  INTO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have to name all components of your workarea. You have to name a component for each column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex.:&lt;/P&gt;&lt;P&gt;Let`s say your target structure (TGT_STRUCT) has three components (COMP1, COMP2 and COMP3), then you have to execute the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SPLIT wa_data AT c_tab INTO tgt_struct-comp1 tgt_struct-comp2 tgt_struct-comp3.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward point, if reply is applicable&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2008 10:27:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-application-server/m-p/3374332#M810247</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-31T10:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: reading data from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-application-server/m-p/3374333#M810248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Badri, try this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: lw_fieldvalue(40) TYPE c,&lt;/P&gt;&lt;P&gt;lw_fieldname(30) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gwa_output TYPE REF TO data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;gwa_output&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;l_fvalue&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---Create a pointer to store the workarea of the final output table.&lt;/P&gt;&lt;P&gt;CREATE DATA gwa_output LIKE LINE OF &amp;lt;git_output&amp;gt;.(this is the output table)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---Assign it to a fieldsymbol which will be used in populating the&lt;/P&gt;&lt;P&gt;*---final output table.&lt;/P&gt;&lt;P&gt;ASSIGN gwa_output-&amp;gt;* TO &amp;lt;gwa_output&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at i_tab into wa_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move wa_tab-field1 to v_fieldvalue. (moving the first field value into field value variable).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONDENSE v_fieldvalue NO-GAPS. (Condense the output).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: &amp;lt;gwa_output&amp;gt;.&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT 'FIELD1' OF STRUCTURE &amp;lt;gwa_output&amp;gt; TO &amp;lt;l_fvalue&amp;gt;.&lt;/P&gt;&lt;P&gt;&amp;lt;l_fvalue&amp;gt; = V_fieldvalue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Repeat the same with other fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---Append the current record to final output table.&lt;/P&gt;&lt;P&gt;APPEND &amp;lt;gwa_output&amp;gt; TO &amp;lt;git_output&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;Hema.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2008 15:24:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-application-server/m-p/3374333#M810248</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-31T15:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: reading data from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-application-server/m-p/3374334#M810249</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;the target structure is not know until run time.  So how do i specify component name after the field-symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Badri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 07:12:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-application-server/m-p/3374334#M810249</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T07:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: reading data from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-application-server/m-p/3374335#M810250</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 this way.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data:delimiter(1) type c value '#'.
field-symbols:&amp;lt;fs_val&amp;gt; type any,
              &amp;lt;fs_data&amp;gt; type any.	
data: begin of lt_values occurs 0,
        field_value type string,
      end of lt_values.

OPEN DATASET l_file_path FOR INPUT IN TEXT MODE ENCODING DEFAULT.
if sy-subrc = 0.
  DO.
    READ DATASET l_file_path INTO wa_data.
    IF sy-subrc &amp;lt;&amp;gt; 0.
      EXIT.
    ELSE.
      CHECK sy-index &amp;gt; 1.
      SPLIT wa_data AT lv_delimiter INTO table lt_values.
      LOOP AT lt_values ASSIGNING &amp;lt;fs_val&amp;gt;.
        ASSIGN COMPONENT sy-tabix OF STRUCTURE wa_data TO &amp;lt;fs_data&amp;gt;.
        IF sy-subrc = 0.
          &amp;lt;fs_data&amp;gt; = &amp;lt;fs_val&amp;gt;.
        ENDIF.
      ENDLOOP.
    ENDIF.
  ENDDO.
ELSE.
  MESSAGE s000(zwb) .
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Feb 2008 23:45:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-application-server/m-p/3374335#M810250</guid>
      <dc:creator>mnicolai_77</dc:creator>
      <dc:date>2008-02-02T23:45:31Z</dc:date>
    </item>
  </channel>
</rss>

