‎2010 Feb 15 5:09 AM
Hi all,
i am have to make a dynamic attribute for a report, can anyone please help me? actually i made 6 pushbutton on selection screen and after click of every pushbutton i want to call same Z program with different program title.
can anyone please help me?
regards
‎2010 Feb 15 5:17 AM
Hello,
I guess program attribute title will remain same however to set the list title create 6 different PF-status. And set those PF-status as per your requirement( the button).
Regards,
Amarjit
‎2010 Feb 15 5:23 AM
Hi,
You can populate the variable SY-TITLE for this.
Check below sample code where i am changing the title based on selection screen input.
PARAMETERS: po_1 TYPE c.
END-OF-SELECTION.
CASE po_1.
WHEN 1.
sy-title = 'Title1'.
WHEN 2.
sy-title = 'Title2'.
WHEN OTHERS.
sy-title = 'Other title'.
ENDCASE.
WRITE: 'Test'.
Thanks,
Vinod.
‎2010 Feb 15 5:26 AM
Hi Saurabh,
I think you can achieve this using your own PF-STATUs for each of the six scenarious and change them in
even AT SELECTION-SCREEN.
In order to copy standard PF-STATUS do it fom (Standard prog. to copy GUI status - SAPLKKBL) and use transaction 'SE41'.
Regards,
Salil Sonam.
‎2010 Feb 15 6:02 AM
hello all,
thanx for reply...actually i made Text element for all the title and now on user selection i m transferring it in SY-TITLE under event AT SELECTION-SCREEN OUTPUT, but still it is not changing. i putted the program title &1&2 while creating program but now it is not overwriting.
can anyone plz help me?
code:
AT SELECTION-SCREEN OUTPUT.
IMPORT GC_FLG1 FROM MEMORY ID 'GV_FLG'.
if GC_FLG1 ne lc_blk.
lv_flg = GC_FLG1.
sy-title = text-008.
endif.
IMPORT GC_FLG2 FROM MEMORY ID 'GV_FLG'.
if GC_FLG2 ne lc_blk.
lv_flg = GC_FLG2.
sy-title = text-009.
endif.
IMPORT GC_FLG3 FROM MEMORY ID 'GV_FLG'.
if GC_FLG3 ne lc_blk.
lv_flg = GC_FLG3.
sy-title = text-010.
endif.
IMPORT GC_FLG4 FROM MEMORY ID 'GV_FLG'.
if GC_FLG4 ne lc_blk.
lv_flg = GC_FLG4.
sy-title = text-011.
endif.
IMPORT GC_FLG5 FROM MEMORY ID 'GV_FLG'.
if GC_FLG5 ne lc_blk.
lv_flg = GC_FLG5.
sy-title = text-012.
endif.
IMPORT GC_FLG6 FROM MEMORY ID 'GV_FLG'.
if GC_FLG6 ne lc_blk.
lv_flg = GC_FLG6.
sy-title = text-013.
endif.
IMPORT GC_FLG7 FROM MEMORY ID 'GV_FLG'.
if GC_FLG7 ne lc_blk.
lv_flg = GC_FLG7.
sy-title = text-014.
endif.
regards.
‎2010 Feb 15 6:17 AM
Hi,
After creating the text elements for each of the program,
then you can assign that text elements to the titles on the
AT Selection-Screen event.
Hope it helps
Regards
Mansi
‎2010 Feb 15 7:03 AM
Hi Saurabh,
If you want to display the title after you press push button on the selection screen, then at event START-OF-SELECTION you can write the logic same logic as you tried in AT-SELECTION-SCREEN OUTPUT.
I think this will solve your problem.
‎2016 Jul 26 5:11 PM
Hi,
You can modify your program name dynamically in the Initialization of your program Z.
For example :
Initialization.
If sy-tcode = 'ZTCODE1'.
sy-tittle = 'Program name 1'.
endif.
Regards,
Younes