<?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: Method changing parameter in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-changing-parameter/m-p/8678453#M1668928</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Keshav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you have written is correct.&lt;/P&gt;&lt;P&gt;I resolved my issue by having a look at the following link.&lt;/P&gt;&lt;P&gt;&lt;A href="http://wiki.sdn.sap.com/wiki/display/ABAP/HR" target="test_blank"&gt;http://wiki.sdn.sap.com/wiki/display/ABAP/HR&lt;/A&gt;&lt;EM&gt;Programming&lt;/EM&gt;-&lt;EM&gt;Read&lt;/EM&gt;Infotype&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It does the same as you have written.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Hari Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Feb 2012 10:07:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-02-29T10:07:54Z</dc:date>
    <item>
      <title>Method changing parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-changing-parameter/m-p/8678450#M1668925</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 am new to oops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to write a method which has 2 importing parameters-&lt;/P&gt;&lt;P&gt;1. Employee number.(W_pernr type persno)&lt;/P&gt;&lt;P&gt;2. infotype.(w_infotype type char4)&lt;/P&gt;&lt;P&gt;As of now the output parameter is -&lt;/P&gt;&lt;P&gt;3. changing t_data type table.(I am not sure about this statement at all)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output has to be an internal table with infotype data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I didn't want to use the function module"HR_READ_INFOTYPE" repeatedly to fetch data from&lt;/P&gt;&lt;P&gt;different infotypes I created the method.I cannot write a perform inside a method and therefore the method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the code--&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method get_infotype_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: w_pernr type persno,&lt;/P&gt;&lt;P&gt;        w_infty type char6,&lt;/P&gt;&lt;P&gt;        w_dref type ref to data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  w_pernr = w_input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  field-symbols: &amp;lt;t_data&amp;gt; type standard table."Tried any table- I am gettin error&lt;/P&gt;&lt;P&gt;  concatenate 'PA' w_infotype into w_infty."(W_infotype can be'0000' or,'0001' or,'0002')&lt;/P&gt;&lt;P&gt;  create data w_dref type table of (w_infty).&lt;/P&gt;&lt;P&gt;  assign w_dref-&amp;gt;* to &amp;lt;t_data&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'HR_READ_INFOTYPE'&lt;/P&gt;&lt;P&gt;               exporting&lt;/P&gt;&lt;P&gt;                 tclas                 = 'A'&lt;/P&gt;&lt;P&gt;                 pernr                 = w_pernr&lt;/P&gt;&lt;P&gt;                 infty                 = w_infotype&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         BEGDA                 = '18000101'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         ENDDA                 = '99991231'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         BYPASS_BUFFER         = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         LEGACY_MODE           = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         SUBRC                 =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;               tables&lt;/P&gt;&lt;P&gt;                 infty_tab             =  &amp;lt;t_data&amp;gt;&lt;/P&gt;&lt;P&gt;              exceptions&lt;/P&gt;&lt;P&gt;                infty_not_found       = 1&lt;/P&gt;&lt;P&gt;                others                = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_data[] = &amp;lt;t_data&amp;gt;[]."I know this statement is wrong.Data gets concatenated.Cannot move data like this.&lt;/P&gt;&lt;P&gt;  endmethod.&lt;/P&gt;&lt;P&gt;************&lt;/P&gt;&lt;P&gt;data comes till &amp;lt;t_data&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i don't know how to move it to ouput.&lt;/P&gt;&lt;P&gt;What should the output parameter be like ?because the output internal table structure is dynamic. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Warm regards,&lt;/P&gt;&lt;P&gt;Hari Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2012 07:13:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-changing-parameter/m-p/8678450#M1668925</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-28T07:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Method changing parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-changing-parameter/m-p/8678451#M1668926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you mean by concatenated ? I just wrote it through function for example. it works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:it_mara TYPE TABLE OF mara.
FIELD-SYMBOLS:&amp;lt;fs&amp;gt; TYPE table.
ASSIGN it_mara TO &amp;lt;fs&amp;gt;.
CALL FUNCTION 'YTESTDATA'
     CHANGING
          t_data = &amp;lt;fs&amp;gt;.

function ytestdata.
*"----------------------------------------------------------------------
*"*"Local interface:
*"  CHANGING
*"     REFERENCE(T_DATA) TYPE  TABLE
*"----------------------------------------------------------------------
  data:it_mara type table of mara.
  field-symbols:&amp;lt;fs&amp;gt; type table.
  assign it_mara to &amp;lt;fs&amp;gt;.
  select * from mara up to 2 rows into table &amp;lt;fs&amp;gt;.
  t_data = &amp;lt;fs&amp;gt;.
endfunction.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2012 07:58:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-changing-parameter/m-p/8678451#M1668926</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2012-02-28T07:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Method changing parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-changing-parameter/m-p/8678452#M1668927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Closing thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2012 08:02:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-changing-parameter/m-p/8678452#M1668927</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-28T08:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Method changing parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-changing-parameter/m-p/8678453#M1668928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Keshav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you have written is correct.&lt;/P&gt;&lt;P&gt;I resolved my issue by having a look at the following link.&lt;/P&gt;&lt;P&gt;&lt;A href="http://wiki.sdn.sap.com/wiki/display/ABAP/HR" target="test_blank"&gt;http://wiki.sdn.sap.com/wiki/display/ABAP/HR&lt;/A&gt;&lt;EM&gt;Programming&lt;/EM&gt;-&lt;EM&gt;Read&lt;/EM&gt;Infotype&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It does the same as you have written.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Hari Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Feb 2012 10:07:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-changing-parameter/m-p/8678453#M1668928</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-29T10:07:54Z</dc:date>
    </item>
  </channel>
</rss>

