‎2009 Sep 25 7:35 AM
Hi,
I copied one of my ALV report to a local program to add one more column into ALV display.
+ When I tested my local program I used F8 to run directly my report - I CAN NOT see my added column.
+ If I created a Tcode for my local program and ran it from Tcode - The added column is displayed.
Please explain for me the reason why.
Thanks,
Khanh
‎2009 Sep 25 8:03 AM
Hi all,
I tested carefully and found that my new column is only displayed in the local program if:
+ I create a TCode for my local program
+ I have to run this report using this Tcode at least one time (after that my new column will always be displayed)
Thanks,
Khanh
‎2009 Sep 25 8:03 AM
Hi all,
I tested carefully and found that my new column is only displayed in the local program if:
+ I create a TCode for my local program
+ I have to run this report using this Tcode at least one time (after that my new column will always be displayed)
Thanks,
Khanh
‎2009 Sep 25 9:30 AM
There is no difference between calling a report by SE38 or by a transaction code that calls the same report.
The transaction code is like a short cut for that report.
Maybe the problem has to do with activating/generating the code ?
regards,
Hans
‎2009 Sep 25 9:48 AM
Hi Senden,
I agree with you that TCode is just the shortcut for the program but my case is a bit different:
I debugged and found that my report used FM REUSE_ALV_FIELDCATALOG_MERGE to build field cat.
If no Tcode is created and run for this report at least one time this FM can not generate the new column in output.
I still don't know the reason why.
Thanks,
Khanh
‎2009 Sep 25 9:48 AM
Hi,
there is no difference using SE38 or by Tcode.... We create transaction codes inorder to go directly to the selection screen, instead of typing the program name and executing it which is not needed for endusers....also tcode gives easy navigation.
Regards,
Nagarak
‎2009 Sep 25 9:50 AM
can you please show how you are calling the FM fieldcat merge?
‎2009 Sep 25 9:51 AM
Hi,
Have u passed the program name correctly...when u copy a program , please see the REPORT program name is ur copied one.
use SY-CPROG.
Regards,
Nagaraj
‎2009 Sep 25 9:53 AM
Hi Mishra,
Here is my code to call the FM
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = v_repid
i_internal_tabname = v_tab
i_inclname = v_incl
CHANGING
ct_fieldcat = i_field[]
EXCEPTIONS
inconsistent_interface = 0
program_error = 0
OTHERS = 0.Where: v_tab stores the name of output internal table
v_repid stores the name of my report
v_incl stores the name of the include (here the include name and program name are the same)
Thanks,
Khanh
‎2009 Sep 25 9:53 AM
you have to pass sy-repid in include name and program of that FM
‎2009 Sep 25 9:57 AM
hi Khanh,
see the values for v_repid and v_incl, i guess here you are passing the wrong names. you can directly pass sy-repid.
‎2009 Sep 25 10:01 AM
Hello,
Before calling the FM I also add the new column in I_FINAL definition.
v_tab = 'I_FINAL'.
*
MOVE sy-repid TO : v_repid,
v_incl.The problem is not at passing parameters. All are correct.
Thanks,
Khanh
‎2009 Sep 25 10:05 AM
‎2009 Sep 28 5:14 AM