<?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 How can I change the parameter's type dynamically in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-change-the-parameter-s-type-dynamically/m-p/4479217#M1060682</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,everybody!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm creating a fuction modul or a class's method. But met a problem.I want to change the exporting parameter's type dynamically.&lt;/P&gt;&lt;P&gt;Here is what I want to do.&lt;/P&gt;&lt;P&gt;import data:&lt;/P&gt;&lt;P&gt;     stru_name  (structure name) dictionary table &lt;/P&gt;&lt;P&gt;     indata        (input data)         string &lt;/P&gt;&lt;P&gt;output&lt;/P&gt;&lt;P&gt;    outdata      (output data)     &lt;/P&gt;&lt;P&gt;The output data will be divided according to the structure of stru_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;structure(a(3),b(3),c(3))&lt;/P&gt;&lt;P&gt;indata(123456789)&lt;/P&gt;&lt;P&gt;u2192outdata(123,456,789)&lt;/P&gt;&lt;P&gt;structure(a(2),b(3),c(4))&lt;/P&gt;&lt;P&gt;indata(123456789)&lt;/P&gt;&lt;P&gt;u2192outdata(12,345,6789)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody give me some advices? &lt;/P&gt;&lt;P&gt;I will appreciate your help. &lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Sep 2008 07:23:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-19T07:23:25Z</dc:date>
    <item>
      <title>How can I change the parameter's type dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-change-the-parameter-s-type-dynamically/m-p/4479217#M1060682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,everybody!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm creating a fuction modul or a class's method. But met a problem.I want to change the exporting parameter's type dynamically.&lt;/P&gt;&lt;P&gt;Here is what I want to do.&lt;/P&gt;&lt;P&gt;import data:&lt;/P&gt;&lt;P&gt;     stru_name  (structure name) dictionary table &lt;/P&gt;&lt;P&gt;     indata        (input data)         string &lt;/P&gt;&lt;P&gt;output&lt;/P&gt;&lt;P&gt;    outdata      (output data)     &lt;/P&gt;&lt;P&gt;The output data will be divided according to the structure of stru_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;structure(a(3),b(3),c(3))&lt;/P&gt;&lt;P&gt;indata(123456789)&lt;/P&gt;&lt;P&gt;u2192outdata(123,456,789)&lt;/P&gt;&lt;P&gt;structure(a(2),b(3),c(4))&lt;/P&gt;&lt;P&gt;indata(123456789)&lt;/P&gt;&lt;P&gt;u2192outdata(12,345,6789)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody give me some advices? &lt;/P&gt;&lt;P&gt;I will appreciate your help. &lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Sep 2008 07:23:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-change-the-parameter-s-type-dynamically/m-p/4479217#M1060682</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-19T07:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: How can I change the parameter's type dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-change-the-parameter-s-type-dynamically/m-p/4479218#M1060683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make the parameter type ANY. Then you can pass data of any structure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2008 22:01:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-change-the-parameter-s-type-dynamically/m-p/4479218#M1060683</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-22T22:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: How can I change the parameter's type dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-change-the-parameter-s-type-dynamically/m-p/4479219#M1060684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Junhua,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don give any type for the parameters in the function module to make it generic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Farzan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2008 03:08:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-change-the-parameter-s-type-dynamically/m-p/4479219#M1060684</guid>
      <dc:creator>former_member137336</dc:creator>
      <dc:date>2008-09-23T03:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: How can I change the parameter's type dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-change-the-parameter-s-type-dynamically/m-p/4479220#M1060685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sourav,Farzan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have give any type for the output parameter .&lt;/P&gt;&lt;P&gt;But at the end of my source ,how I move the data to the output parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION z_divide_data_by_stru.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"ローカルインタフェース:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     REFERENCE(STRU_NAME) TYPE  STRUNAME&lt;/P&gt;&lt;P&gt;*"     REFERENCE(I_DATA) TYPE  STRING&lt;/P&gt;&lt;P&gt;*"  EXPORTING&lt;/P&gt;&lt;P&gt;*"     REFERENCE(O_DATA) TYPE  ANY&lt;/P&gt;&lt;P&gt;*"  EXCEPTIONS&lt;/P&gt;&lt;P&gt;*"      LENGTH_ERROR&lt;/P&gt;&lt;P&gt;*"      OTHER_ERROR&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;  DATA:&lt;/P&gt;&lt;P&gt;    dy_stru TYPE REF TO data,&lt;/P&gt;&lt;P&gt;    res_dfies TYPE ddfields,&lt;/P&gt;&lt;P&gt;    res_header TYPE x030l,&lt;/P&gt;&lt;P&gt;    wl_dfies TYPE dfies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA:&lt;/P&gt;&lt;P&gt;    wa_offset TYPE doffset,&lt;/P&gt;&lt;P&gt;    wa_length TYPE ddleng.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS:&lt;/P&gt;&lt;P&gt;    &amp;lt;dyn_stru&amp;gt;,&lt;/P&gt;&lt;P&gt;    &amp;lt;dyn_field&amp;gt;.&lt;/P&gt;&lt;P&gt;  CREATE DATA dy_stru TYPE (stru_name).&lt;/P&gt;&lt;P&gt;  ASSIGN dy_stru-&amp;gt;* TO &amp;lt;dyn_stru&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'TR_NAMETAB_GET'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      iv_tabname                       = stru_name&lt;/P&gt;&lt;P&gt;      iv_get_lengths_in_charmode       = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    IV_GET_TEXTS                     = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      et_dfies                         = res_dfies&lt;/P&gt;&lt;P&gt;      es_header                        = res_header&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      not_found                        = 1&lt;/P&gt;&lt;P&gt;      OTHERS                           = 2.&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;  DO.&lt;/P&gt;&lt;P&gt;    ASSIGN COMPONENT  sy-index&lt;/P&gt;&lt;P&gt;       OF STRUCTURE &amp;lt;dyn_stru&amp;gt; TO &amp;lt;dyn_field&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    READ TABLE res_dfies INTO wl_dfies INDEX sy-index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    wa_offset = wl_dfies-offset.&lt;/P&gt;&lt;P&gt;    wa_length = wl_dfies-leng.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &amp;lt;dyn_field&amp;gt; = i_data+wa_offset(wa_length).&lt;/P&gt;&lt;P&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;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WRITE &amp;lt;dyn_stru&amp;gt; TO o_data. -&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;&amp;gt;&lt;EM&gt;Here is my problem.&lt;/EM&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you give me some other advice?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2008 00:29:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-change-the-parameter-s-type-dynamically/m-p/4479220#M1060685</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-24T00:29:08Z</dc:date>
    </item>
  </channel>
</rss>

