Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Different titles for different transactions using same program

Former Member
0 Likes
1,078

Hi,

I would like to call the same program from four different transactions. Each transaction executes a different scenario of the same program, so requires a different title each time. How do I set the Title such that it changes dynamically for each different transaction that is called?

Thanks,

Sruthy

8 REPLIES 8
Read only

Former Member
0 Likes
930

Hi,

try this

<b>report xxxxx no standard page heading.

Top-of-page.

write : sy-tcode.</b>

award point if it helps.

Regards,

Sudhakar.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
930

Just do a case statement in your PBO.




module status_0100 output.
  set pf-status '0100'.

case sy-tcode.

when 'ZTC1'.
set titlebar 'ZTC1'.

when 'ZTC2'.
set titlebar 'ZTC2'.


when 'ZTC3'.
set titlebar 'ZTC3'.

endcase.

endmodule.


Regards,

Rich Heilman

Read only

0 Likes
930

if sy-tcode eq 'ABC' .

set titlebar 'MAIN' with 'Maintain' .

else .

set titlebar 'MAIN' with 'Display' .

endif .

when you define the title bar

just give

& Plan Transaction

this would result in

when tcode is ABC

Maintain Plan Transaction and

when others

Display Plan Transaction.

Regards

Raja

Read only

0 Likes
930

To expand on my previous answer, & will get replaced by the text you had given in set title bar. this allows to have one one object.

You dont need multiple titlebar objects.

Regards

Raja

Read only

Former Member
0 Likes
930

Hi sruthy,

1. Use the INITIALIZATION EVENT

and check for sy-tcode.

2. like this.

3.

INITIALIZATION.

IF SY-TCODE = 'ZT01'.

<b>sy-title = 'My title 1'.</b>

endif.

IF SY-TCODE = 'ZT02'.

<b>sy-title = 'My title 2'.</b>

endif.

regards,

amit m.

Read only

alejandro_lpez
Contributor
0 Likes
930

Hi,

You can create different transaction to call the same program in transaction SE93. In the program you can evaluate sy-tcode to indentify what transaction was executed. Depending of the transaction code is posible modify the title of the program with the system variable sy-title.

regards,

Alejandro

Read only

Former Member
0 Likes
930

thanks,

Problem solved.

Read only

0 Likes
930

If the problwm is solved can you mark the thread as answered.

Regards

Raja