<?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: Structure in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/structure/m-p/2223954#M477734</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijaya,&lt;/P&gt;&lt;P&gt;The position ur passing should be &amp;lt;b&amp;gt;sy-tabix&amp;lt;/b&amp;gt; not &amp;lt;b&amp;gt;sytabix-1&amp;lt;/b&amp;gt; and remove if statement &amp;lt;b&amp;gt;'IF sy-tabix Gt 1.' 'endif'&amp;lt;/b&amp;gt; . it will work fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Apr 2007 09:33:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-23T09:33:34Z</dc:date>
    <item>
      <title>Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/structure/m-p/2223949#M477729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Friendz, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am trying to create a structure using abap program, &lt;/P&gt;&lt;P&gt;but after executing the program,  Structure is created, but the first field(FIELD1)  is missing, pls any one help me... this is my code &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;points for sure&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Vijaya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: my_row(500) TYPE c,&lt;/P&gt;&lt;P&gt;my_file_1 LIKE my_row OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: dd02v TYPE dd02v.&lt;/P&gt;&lt;P&gt;DATA: my_file_tab1 LIKE dd03p OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME TITLE text&lt;/P&gt;&lt;P&gt;NO INTERVALS.&lt;/P&gt;&lt;P&gt;PARAMETERS:&lt;/P&gt;&lt;P&gt;name TYPE ddobjname,&lt;/P&gt;&lt;P&gt;testo TYPE text40,&lt;/P&gt;&lt;P&gt;file_1 LIKE rlgrap-filename.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN SKIP.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK blk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR file_1.&lt;/P&gt;&lt;P&gt;  PERFORM file_selection USING file_1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;  text = text-001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;  IF file_1 IS INITIAL.&lt;/P&gt;&lt;P&gt;    MESSAGE ID 'Z0017_BDI' TYPE 'I' NUMBER 001.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'WS_UPLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename = file_1&lt;/P&gt;&lt;P&gt;      filetype = 'ASC'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      data_tab = my_file_1.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID 'Z0017_BDI' TYPE 'I' NUMBER 002.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT my_file_1.&lt;/P&gt;&lt;P&gt;    IF sy-tabix Gt 1.&lt;/P&gt;&lt;P&gt;      CLEAR my_file_tab1.&lt;/P&gt;&lt;P&gt;      SPLIT my_file_1 AT ';' INTO&lt;/P&gt;&lt;P&gt;      my_file_tab1-fieldname&lt;/P&gt;&lt;P&gt;      my_file_tab1-datatype&lt;/P&gt;&lt;P&gt;      my_file_tab1-leng&lt;/P&gt;&lt;P&gt;      my_file_tab1-decimals&lt;/P&gt;&lt;P&gt;      my_file_tab1-ddtext&lt;/P&gt;&lt;P&gt;      .&lt;/P&gt;&lt;P&gt;      my_file_tab1-inttype = 'C'.&lt;/P&gt;&lt;P&gt;      my_file_tab1-intlen = my_file_tab1-leng.&lt;/P&gt;&lt;P&gt;      my_file_tab1-tabname = name.&lt;/P&gt;&lt;P&gt;      my_file_tab1-position = sy-tabix - 1.&lt;/P&gt;&lt;P&gt;      my_file_tab1-ddlanguage = sy-langu.&lt;/P&gt;&lt;P&gt;      my_file_tab1-outputlen = my_file_tab1-leng.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      APPEND my_file_tab1.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  dd02v-tabname = name.&lt;/P&gt;&lt;P&gt;  dd02v-ddlanguage = sy-langu.&lt;/P&gt;&lt;P&gt;  dd02v-tabclass = 'INTTAB'.&lt;/P&gt;&lt;P&gt;  dd02v-ddtext = testo.&lt;/P&gt;&lt;P&gt;  dd02v-masterlang = sy-langu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT my_file_tab1[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'DDIF_TABL_PUT'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        name              = name&lt;/P&gt;&lt;P&gt;        dd02v_wa          = dd02v&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        dd03p_tab         = my_file_tab1&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        tabl_not_found    = 1&lt;/P&gt;&lt;P&gt;        name_inconsistent = 2&lt;/P&gt;&lt;P&gt;        tabl_inconsistent = 3&lt;/P&gt;&lt;P&gt;        put_failure       = 4&lt;/P&gt;&lt;P&gt;        put_refused       = 5&lt;/P&gt;&lt;P&gt;        OTHERS            = 6.&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;*MESSAGE ID 'Z0017_BDI' TYPE 'I' NUMBER 003.&lt;/P&gt;&lt;P&gt;    MESSAGE s100 WITH 'Structure created succesfully'.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form file_selection&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;--&amp;gt;P_FILE_1 text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM file_selection USING p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'WS_FILENAME_GET'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;  def_filename = ''&lt;/P&gt;&lt;P&gt;  def_path = 'c:\'&lt;/P&gt;&lt;P&gt;  mask = ',&lt;STRONG&gt;.&lt;/STRONG&gt;,&lt;STRONG&gt;.&lt;/STRONG&gt;.'&lt;/P&gt;&lt;P&gt;  mode = '0'&lt;/P&gt;&lt;P&gt;  title = 'Selezione file'&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;  filename = p_file&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;RC = RCODE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;  inv_winsys = 1&lt;/P&gt;&lt;P&gt;  no_batch = 2&lt;/P&gt;&lt;P&gt;  selection_cancel = 3&lt;/P&gt;&lt;P&gt;  selection_error = 4&lt;/P&gt;&lt;P&gt;  OTHERS = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " file_selection&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*And here is the file...&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*Fieldname;Data Type;Lentgh;Dec.;Descr.&lt;/P&gt;&lt;P&gt;*FIELD1;CHAR;000020;000000;my field 1&lt;/P&gt;&lt;P&gt;*FIELD2;CHAR;000008;000000;my field 2&lt;/P&gt;&lt;P&gt;*FIELD3;CHAR;000007;000000;my field 3&lt;/P&gt;&lt;P&gt;*FIELD4;CHAR;000006;000000;my field 4&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2007 09:14:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/structure/m-p/2223949#M477729</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-23T09:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/structure/m-p/2223950#M477730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are looping from second record , so obviously the first record will not be used , remove the one in bold&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT my_file_1.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;IF sy-tabix Gt 1.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2007 09:18:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/structure/m-p/2223950#M477730</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-23T09:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/structure/m-p/2223951#M477731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijaya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you want to check the sy-tabix count?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if yes then do this'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at my_file_1.&lt;/P&gt;&lt;P&gt;if sy-tabix GE 1.&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;endloo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greater than or equal to option will fetch you from the first record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpful answers.&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;Varun.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2007 09:28:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/structure/m-p/2223951#M477731</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-23T09:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/structure/m-p/2223952#M477732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YOu can as well remove the sy-tabix GT 1 and corresponding endif statement from the code.&lt;/P&gt;&lt;P&gt;Does your file contain a header record?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2007 09:31:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/structure/m-p/2223952#M477732</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-23T09:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/structure/m-p/2223953#M477733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijaya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with your code and found it got created with all the fields.&lt;/P&gt;&lt;P&gt;Just try to execute once again and test.  It will create the first field also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Krishna K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2007 09:32:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/structure/m-p/2223953#M477733</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-23T09:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/structure/m-p/2223954#M477734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijaya,&lt;/P&gt;&lt;P&gt;The position ur passing should be &amp;lt;b&amp;gt;sy-tabix&amp;lt;/b&amp;gt; not &amp;lt;b&amp;gt;sytabix-1&amp;lt;/b&amp;gt; and remove if statement &amp;lt;b&amp;gt;'IF sy-tabix Gt 1.' 'endif'&amp;lt;/b&amp;gt; . it will work fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2007 09:33:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/structure/m-p/2223954#M477734</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-23T09:33:34Z</dc:date>
    </item>
  </channel>
</rss>

