<?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 Dynamic assignment problems! in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-assignment-problems/m-p/2267027#M492020</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus!&lt;/P&gt;&lt;P&gt;I´m having some problems with dynamic assignments. The problem is as follows: in my program I have some Parameters and some Select-Options. In some cases, I have to change the value of this variables in a dynamic way. When I run the program, the value that I read from the table and I assign it to the variable is not changed (for example I want to change the value from P_BUKRS). &lt;/P&gt;&lt;P&gt;I include the source code. Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Header Line contains the following record:&lt;/P&gt;&lt;P&gt;t_zfii018-var_name = P_BUKRS&lt;/P&gt;&lt;P&gt;t_zfii018-ruta     = 3245&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  Z_TEMPORAL_EW                                               *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;                                                                     *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*

REPORT  z_temporal_ew                           .



PARAMETERS: p_bukrs LIKE t001-bukrs,
            p_belnr LIKE bkpf-belnr,
            p_budat LIKE bkpf-budat,
            p_xblnr LIKE bkpf-xblnr.
SELECT-OPTIONS:
            s_datum    FOR  sy-datum.

START-OF-SELECTION.

  PERFORM f_change_file_parameters.

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  f_check_paramers
*&amp;amp;---------------------------------------------------------------------*
*       Este perform cambia la ruta de los archivos, por la ruta
*       que es leida en la tabla Z.
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM f_change_file_parameters.

  FIELD-SYMBOLS: &amp;lt;fs_table&amp;gt;.
  DATA: p_it TYPE string,
        t_zfii018 LIKE zfii018 OCCURS 0 WITH HEADER LINE.

* Leo la tabla de customizing con los valores que hay que modificar.
  SELECT *
    INTO TABLE t_zfii018
    FROM zfii018
    WHERE programa = sy-cprog.

* Leo cada registro y lo modifico.
  LOOP AT t_zfii018.
    p_it = t_zfii018-var_name.
    ASSIGN (p_it) TO &amp;lt;fs_table&amp;gt;.
    IF sy-subrc = 0.
      ASSIGN t_zfii018-ruta TO &amp;lt;fs_table&amp;gt;.
    ENDIF.
  ENDLOOP.

write p_bukrs.

ENDFORM.                    " f_check_paramers
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 May 2007 16:02:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-22T16:02:09Z</dc:date>
    <item>
      <title>Dynamic assignment problems!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-assignment-problems/m-p/2267027#M492020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus!&lt;/P&gt;&lt;P&gt;I´m having some problems with dynamic assignments. The problem is as follows: in my program I have some Parameters and some Select-Options. In some cases, I have to change the value of this variables in a dynamic way. When I run the program, the value that I read from the table and I assign it to the variable is not changed (for example I want to change the value from P_BUKRS). &lt;/P&gt;&lt;P&gt;I include the source code. Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Header Line contains the following record:&lt;/P&gt;&lt;P&gt;t_zfii018-var_name = P_BUKRS&lt;/P&gt;&lt;P&gt;t_zfii018-ruta     = 3245&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  Z_TEMPORAL_EW                                               *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;                                                                     *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*

REPORT  z_temporal_ew                           .



PARAMETERS: p_bukrs LIKE t001-bukrs,
            p_belnr LIKE bkpf-belnr,
            p_budat LIKE bkpf-budat,
            p_xblnr LIKE bkpf-xblnr.
SELECT-OPTIONS:
            s_datum    FOR  sy-datum.

START-OF-SELECTION.

  PERFORM f_change_file_parameters.

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  f_check_paramers
*&amp;amp;---------------------------------------------------------------------*
*       Este perform cambia la ruta de los archivos, por la ruta
*       que es leida en la tabla Z.
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM f_change_file_parameters.

  FIELD-SYMBOLS: &amp;lt;fs_table&amp;gt;.
  DATA: p_it TYPE string,
        t_zfii018 LIKE zfii018 OCCURS 0 WITH HEADER LINE.

* Leo la tabla de customizing con los valores que hay que modificar.
  SELECT *
    INTO TABLE t_zfii018
    FROM zfii018
    WHERE programa = sy-cprog.

* Leo cada registro y lo modifico.
  LOOP AT t_zfii018.
    p_it = t_zfii018-var_name.
    ASSIGN (p_it) TO &amp;lt;fs_table&amp;gt;.
    IF sy-subrc = 0.
      ASSIGN t_zfii018-ruta TO &amp;lt;fs_table&amp;gt;.
    ENDIF.
  ENDLOOP.

write p_bukrs.

ENDFORM.                    " f_check_paramers
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 16:02:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-assignment-problems/m-p/2267027#M492020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T16:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic assignment problems!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-assignment-problems/m-p/2267028#M492021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Esteban.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe it is connect to two things i discovered:&lt;/P&gt;&lt;P&gt;1: You should put the field in the second assign statement into brackets.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ASSIGN (t_zfii018-ruta) TO &amp;lt;fs_table&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then &amp;lt;fs_table&amp;gt; points to P_BUKRS.&lt;/P&gt;&lt;P&gt;2: You never move a new value to P_BUKRS or &amp;lt;fs_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Timo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 21:24:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-assignment-problems/m-p/2267028#M492021</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T21:24:55Z</dc:date>
    </item>
  </channel>
</rss>

