<?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 reg: assign component in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-assign-component/m-p/4269223#M1018673</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all ,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a requirement of having to download file presentation server or application server .while downloading making sure that if the field is available then its downloaded to the correct length for which its defined. If its a character field then text should be followed by space and if its a number then it should be leaded by zero to make it to the correct length.this is the piece of code i have used for it to download .but when i see the file after it has been downloaded when the field is empty it is not displaying spaces and what shud be done for zeros to be preceding and for character field followed by a text .any sample code .thanx in advance ......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF tp_output,&lt;/P&gt;&lt;P&gt;          z1633code(20),&lt;/P&gt;&lt;P&gt;          lot_no LIKE mchb-charg,&lt;/P&gt;&lt;P&gt;          zcontainer(20),&lt;/P&gt;&lt;P&gt;          zserialno(20),&lt;/P&gt;&lt;P&gt;          zdeltaqty(15),&lt;/P&gt;&lt;P&gt;          not_allocated(15),&lt;/P&gt;&lt;P&gt;          committed(15),&lt;/P&gt;&lt;P&gt;        END OF tp_output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF tp_data,&lt;/P&gt;&lt;P&gt;        line(4096),&lt;/P&gt;&lt;P&gt;        END   OF tp_data.&lt;/P&gt;&lt;P&gt;DATA : itab_csv_output TYPE STANDARD TABLE OF tp_data,&lt;/P&gt;&lt;P&gt;       wa_csv_output TYPE tp_data.&lt;/P&gt;&lt;P&gt;DATA : l_count     TYPE i.&lt;/P&gt;&lt;P&gt;DATA : itab_output TYPE STANDARD TABLE OF tp_output WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;         wa_ouput TYPE tp_output.&lt;/P&gt;&lt;P&gt;  CONSTANTS: con_tab TYPE x VALUE '09'.&lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS: &amp;lt;fs_download&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Count the number of fields&lt;/P&gt;&lt;P&gt;  DO.&lt;/P&gt;&lt;P&gt;    ASSIGN COMPONENT sy-index OF STRUCTURE wa_output TO &amp;lt;fs_download&amp;gt;.&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      l_count = l_count + 1.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;  CLEAR wa_output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Inserting the fields to the internal table in the required format&lt;/P&gt;&lt;P&gt;  LOOP AT itab_output INTO wa_output.&lt;/P&gt;&lt;P&gt;    DO l_count TIMES.&lt;/P&gt;&lt;P&gt;      ASSIGN COMPONENT sy-index OF STRUCTURE wa_output TO &amp;lt;fs_download&amp;gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;      SHIFT &amp;lt;fs_download&amp;gt; LEFT DELETING LEADING space.&lt;/P&gt;&lt;P&gt;      CONCATENATE wa_csv_output  &amp;lt;fs_download&amp;gt; INTO&lt;/P&gt;&lt;P&gt;                 wa_csv_output SEPARATED BY con_tab.&lt;/P&gt;&lt;P&gt;    ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SHIFT  wa_csv_output.&lt;/P&gt;&lt;P&gt;    APPEND wa_csv_output TO itab_csv_output.&lt;/P&gt;&lt;P&gt;    CLEAR  wa_csv_output.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Jul 2008 08:21:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-29T08:21:22Z</dc:date>
    <item>
      <title>reg: assign component</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-assign-component/m-p/4269223#M1018673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all ,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a requirement of having to download file presentation server or application server .while downloading making sure that if the field is available then its downloaded to the correct length for which its defined. If its a character field then text should be followed by space and if its a number then it should be leaded by zero to make it to the correct length.this is the piece of code i have used for it to download .but when i see the file after it has been downloaded when the field is empty it is not displaying spaces and what shud be done for zeros to be preceding and for character field followed by a text .any sample code .thanx in advance ......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF tp_output,&lt;/P&gt;&lt;P&gt;          z1633code(20),&lt;/P&gt;&lt;P&gt;          lot_no LIKE mchb-charg,&lt;/P&gt;&lt;P&gt;          zcontainer(20),&lt;/P&gt;&lt;P&gt;          zserialno(20),&lt;/P&gt;&lt;P&gt;          zdeltaqty(15),&lt;/P&gt;&lt;P&gt;          not_allocated(15),&lt;/P&gt;&lt;P&gt;          committed(15),&lt;/P&gt;&lt;P&gt;        END OF tp_output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF tp_data,&lt;/P&gt;&lt;P&gt;        line(4096),&lt;/P&gt;&lt;P&gt;        END   OF tp_data.&lt;/P&gt;&lt;P&gt;DATA : itab_csv_output TYPE STANDARD TABLE OF tp_data,&lt;/P&gt;&lt;P&gt;       wa_csv_output TYPE tp_data.&lt;/P&gt;&lt;P&gt;DATA : l_count     TYPE i.&lt;/P&gt;&lt;P&gt;DATA : itab_output TYPE STANDARD TABLE OF tp_output WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;         wa_ouput TYPE tp_output.&lt;/P&gt;&lt;P&gt;  CONSTANTS: con_tab TYPE x VALUE '09'.&lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS: &amp;lt;fs_download&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Count the number of fields&lt;/P&gt;&lt;P&gt;  DO.&lt;/P&gt;&lt;P&gt;    ASSIGN COMPONENT sy-index OF STRUCTURE wa_output TO &amp;lt;fs_download&amp;gt;.&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      l_count = l_count + 1.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;  CLEAR wa_output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Inserting the fields to the internal table in the required format&lt;/P&gt;&lt;P&gt;  LOOP AT itab_output INTO wa_output.&lt;/P&gt;&lt;P&gt;    DO l_count TIMES.&lt;/P&gt;&lt;P&gt;      ASSIGN COMPONENT sy-index OF STRUCTURE wa_output TO &amp;lt;fs_download&amp;gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;      SHIFT &amp;lt;fs_download&amp;gt; LEFT DELETING LEADING space.&lt;/P&gt;&lt;P&gt;      CONCATENATE wa_csv_output  &amp;lt;fs_download&amp;gt; INTO&lt;/P&gt;&lt;P&gt;                 wa_csv_output SEPARATED BY con_tab.&lt;/P&gt;&lt;P&gt;    ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SHIFT  wa_csv_output.&lt;/P&gt;&lt;P&gt;    APPEND wa_csv_output TO itab_csv_output.&lt;/P&gt;&lt;P&gt;    CLEAR  wa_csv_output.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2008 08:21:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-assign-component/m-p/4269223#M1018673</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-29T08:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: reg: assign component</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-assign-component/m-p/4269224#M1018674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Declare the varible as numeric. so that you will get leading zeros....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2008 10:53:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-assign-component/m-p/4269224#M1018674</guid>
      <dc:creator>raja_narayanan2</dc:creator>
      <dc:date>2008-07-29T10:53:04Z</dc:date>
    </item>
  </channel>
</rss>

