<?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: call method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056533#M1175246</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Lakshmi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggested the method is for the BAdI &lt;STRONG&gt;FAGL_ITEMS_CH_DATA&lt;/STRONG&gt;. You can comment out this code as you have copied the std. code to a custom one if this is posing some problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz see the following code lines, then it will be clear that the method is called for a BAdI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: gd_ref_to_ch_data TYPE REF TO IF_EX_FAGL_ITEMS_CH_DATA.

*...BADI FAGL_ITEMS_CH_DATA: change data
  call method cl_exithandler=&amp;gt;get_instance
    EXPORTING
      exit_name              = 'FAGL_ITEMS_CH_DATA'
      null_instance_accepted = 'X'
    IMPORTING
      act_imp_existing       = gd_act_imp_ch_data
    CHANGING
      instance               = gd_ref_to_ch_data.

*... BADI: external processing of lines
*... replaces BTE 00001650
  IF  NOT gd_act_imp_ch_data IS INITIAL
  AND NOT gd_ref_to_ch_data  IS INITIAL.
    lt_items[] = it_items[].
    call method gd_ref_to_ch_data-&amp;gt;change_items
      CHANGING
        ct_items = lt_items.
    it_items[] = Lt_items[].
  endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Jan 6, 2009 2:48 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Jan 2009 13:47:57 GMT</pubDate>
    <dc:creator>SuhaSaha</dc:creator>
    <dc:date>2009-01-06T13:47:57Z</dc:date>
    <item>
      <title>call method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056529#M1175242</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;&lt;/P&gt;&lt;P&gt;i copied one standard program and adding one new field, i have copied the structure FAGLPOSX to YFAGLPOSX  and added my new field in y structure.&lt;/P&gt;&lt;P&gt;all the output data i am sending to lt_items along with the new field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem is with CALL METHOD.&lt;/P&gt;&lt;P&gt;In below call method ct_items does not match with lt_items.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    call method gd_ref_to_ch_data-&amp;gt;change_items&lt;/P&gt;&lt;P&gt;      CHANGING&lt;/P&gt;&lt;P&gt;        ct_items = lt_items.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CAN I COPY THE CALL METHOD TO Z, IF SO PLEASE TELL ME THE PROCEDURE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 13:25:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056529#M1175242</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T13:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: call method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056530#M1175243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't copy to z a single method. You can copy a class and/or the parts where the object is used.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 13:29:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056530#M1175243</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T13:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: call method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056531#M1175244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Lakshmi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the name of the std. program you are copying?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: May be the class &amp;amp; the method that you want to copy are part of a BAdI. And since you are copying the std. code no need to use this. You can comment out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Jan 6, 2009 2:29 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 13:29:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056531#M1175244</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-01-06T13:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: call method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056532#M1175245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the program is FAGL_ACCOUNT_ITEMS_GL, i need to add a new output field,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i copied to z and made some of the code changes.&lt;/P&gt;&lt;P&gt;in the function module FAGL_ITEMS_DISPLAY if we debug we have we have one more function module&lt;/P&gt;&lt;P&gt;REUSE_ALV_GRID_DISPLAY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;before the FM REUSE_ALV_GRID_DISPLAY We have a call method.&lt;/P&gt;&lt;P&gt;in the call method we have it_items  these it_items we are passing in the FM REUSE_ALV_GRID_DISPLAY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SO CALL METHOD IS DIFFERING.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 13:38:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056532#M1175245</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T13:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: call method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056533#M1175246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Lakshmi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggested the method is for the BAdI &lt;STRONG&gt;FAGL_ITEMS_CH_DATA&lt;/STRONG&gt;. You can comment out this code as you have copied the std. code to a custom one if this is posing some problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz see the following code lines, then it will be clear that the method is called for a BAdI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: gd_ref_to_ch_data TYPE REF TO IF_EX_FAGL_ITEMS_CH_DATA.

*...BADI FAGL_ITEMS_CH_DATA: change data
  call method cl_exithandler=&amp;gt;get_instance
    EXPORTING
      exit_name              = 'FAGL_ITEMS_CH_DATA'
      null_instance_accepted = 'X'
    IMPORTING
      act_imp_existing       = gd_act_imp_ch_data
    CHANGING
      instance               = gd_ref_to_ch_data.

*... BADI: external processing of lines
*... replaces BTE 00001650
  IF  NOT gd_act_imp_ch_data IS INITIAL
  AND NOT gd_ref_to_ch_data  IS INITIAL.
    lt_items[] = it_items[].
    call method gd_ref_to_ch_data-&amp;gt;change_items
      CHANGING
        ct_items = lt_items.
    it_items[] = Lt_items[].
  endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Jan 6, 2009 2:48 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 13:47:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056533#M1175246</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-01-06T13:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: call method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056534#M1175247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can make a copy of calss..and take that single method and change it...accrding to your requirements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sandeep Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 13:50:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056534#M1175247</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T13:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: call method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056535#M1175248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi suhas ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as you said i commentd the code, &lt;/P&gt;&lt;P&gt;where as i also commented the following 2 call methods because here we have it_items, if not commented getting an error there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i comment i am getting the output field which i want but the data for OFFSET ACCT is missing in the output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   CALL METHOD GD_REF_TO_MENUE01-&amp;gt;SHOW_BUTTONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       it_items = it_items[]&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       FRANGE   = lt_frange&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;       EXTAB    = lt_extab.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   if sy-subrc = 0.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     append lines of lt_extab to rt_extab.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   CALL METHOD GD_REF_TO_MENUE02-&amp;gt;SHOW_BUTTONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       it_items = it_items[]&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       FRANGE   = lt_frange&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;       EXTAB    = lt_extab.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   if sy-subrc = 0.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     append lines of lt_extab to rt_extab.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please suggest.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 14:16:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056535#M1175248</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T14:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: call method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056536#M1175249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont think you can copy the method alone. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may need to copy the entire class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bala.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 14:23:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056536#M1175249</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T14:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: call method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056537#M1175250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Lakshmi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;the data for OFFSET ACCT is missing in the output&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The methods are for the BAdI's FAGL_ITEMS_MENUE01 &amp;amp; FAGL_ITEMS_MENUE02. I dont think they will effect your output table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are the values coming the std. report for the same input? Plz check &amp;amp; let us know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Jan 6, 2009 3:29 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 14:26:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056537#M1175250</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-01-06T14:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: call method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056538#M1175251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the output is coming for the standard report , it is missing in Z report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;once i will debug and let u know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank u  very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 14:35:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-method/m-p/5056538#M1175251</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T14:35:57Z</dc:date>
    </item>
  </channel>
</rss>

