‎2009 Jan 06 1:25 PM
hi all,
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.
all the output data i am sending to lt_items along with the new field.
the problem is with CALL METHOD.
In below call method ct_items does not match with lt_items.
call method gd_ref_to_ch_data->change_items
CHANGING
ct_items = lt_items.
CAN I COPY THE CALL METHOD TO Z, IF SO PLEASE TELL ME THE PROCEDURE.
thanks in advance
‎2009 Jan 06 1:29 PM
You can't copy to z a single method. You can copy a class and/or the parts where the object is used.
‎2009 Jan 06 1:29 PM
Hello Lakshmi,
What is the name of the std. program you are copying?
BR,
Suhas
PS: May be the class & 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
Edited by: Suhas Saha on Jan 6, 2009 2:29 PM
‎2009 Jan 06 1:38 PM
hi suhas,
the program is FAGL_ACCOUNT_ITEMS_GL, i need to add a new output field,
i copied to z and made some of the code changes.
in the function module FAGL_ITEMS_DISPLAY if we debug we have we have one more function module
REUSE_ALV_GRID_DISPLAY.
before the FM REUSE_ALV_GRID_DISPLAY We have a call method.
in the call method we have it_items these it_items we are passing in the FM REUSE_ALV_GRID_DISPLAY.
SO CALL METHOD IS DIFFERING.
‎2009 Jan 06 1:47 PM
Hello Lakshmi,
I suggested the method is for the BAdI FAGL_ITEMS_CH_DATA. You can comment out this code as you have copied the std. code to a custom one if this is posing some problems.
Plz see the following code lines, then it will be clear that the method is called for a BAdI.
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=>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->change_items
CHANGING
ct_items = lt_items.
it_items[] = Lt_items[].
endif.
Hope this is clear.
BR,
Suhas
Edited by: Suhas Saha on Jan 6, 2009 2:48 PM
‎2009 Jan 06 2:16 PM
hi suhas ,
as you said i commentd the code,
where as i also commented the following 2 call methods because here we have it_items, if not commented getting an error there.
if i comment i am getting the output field which i want but the data for OFFSET ACCT is missing in the output.
CALL METHOD GD_REF_TO_MENUE01->SHOW_BUTTONS
EXPORTING
it_items = it_items[]
FRANGE = lt_frange
IMPORTING
EXTAB = lt_extab.
if sy-subrc = 0.
append lines of lt_extab to rt_extab.
endif.
CALL METHOD GD_REF_TO_MENUE02->SHOW_BUTTONS
EXPORTING
it_items = it_items[]
FRANGE = lt_frange
IMPORTING
EXTAB = lt_extab.
if sy-subrc = 0.
append lines of lt_extab to rt_extab.
endif.
endif.
please suggest.
‎2009 Jan 06 2:26 PM
Hello Lakshmi,
the data for OFFSET ACCT is missing in the output
The methods are for the BAdI's FAGL_ITEMS_MENUE01 & FAGL_ITEMS_MENUE02. I dont think they will effect your output table.
Are the values coming the std. report for the same input? Plz check & let us know.
BR,
Suhas
Edited by: Suhas Saha on Jan 6, 2009 3:29 PM
‎2009 Jan 06 2:35 PM
the output is coming for the standard report , it is missing in Z report.
once i will debug and let u know.
thank u very much.
‎2009 Jan 06 1:50 PM
Hi,
You can make a copy of calss..and take that single method and change it...accrding to your requirements.
Regards
Sandeep Reddy
‎2009 Jan 06 2:23 PM
Hi,
I dont think you can copy the method alone.
You may need to copy the entire class.
Thanks,
Bala.