Application Development 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: 

Changing Menu TEXT of a GUI status

Former Member
0 Kudos
665

Hello experts,

My problem is related to the changing menu text for a specific condition.

We normally have default menu texts 'System' and 'Help' on any transaction or any session. I have created one GUI status with 4 menu texts. Say 'Mntxt1' 'MnTxt2'. By dafault 'System'and 'Help' will be there.

My problem is I need to change the 'MnTxt1' to 'File' of the Menu based on one condition. Instead of 'MnTxt1' i should get 'File' as menu text in the output.

Please Suggest me a way.

Regards.

3 REPLIES 3

former_member585060
Active Contributor
0 Kudos
195

Hi,

Create 2 Menu status, and change according to any button pressed.

Ex:-

*********************************************************************

AT USER-COMMAND.

CASE SY-UCOMM.

WHEN 'DAILY'.

SET PF-STATUS 'PRODREP' EXCLUDING 'DAILY'.

PERFORM DISPLAY_DATA_DAILY.

SY-LSIND = 1.

WHEN 'MONTHLY'.

SET PF-STATUS 'PRODREP' EXCLUDING 'MONTHLY'.

PERFORM WRITE_DATA_MONTHLY.

SY-LSIND = 1.

WHEN 'YEARLY'.

CLEAR : V1,Q1,V2,Q2,Q3,V3,Q4,V4,Q5,V5,Q6,V6,Q7,V7,Q8,V8,Q9,V9,Q10,V10,

Q11,V11,Q12,V12.

CLEAR: TV1,TQ1,TV,TQ,VT1,QT1.

SET PF-STATUS 'REPO' EXCLUDING 'YEARLY'.

PERFORM WRITE_DATA.

SY-LSIND = 1.

WHEN 'SUMMARY'.

SET PF-STATUS 'MANU' EXCLUDING 'SUMMARY'.

PERFORM WRITE_SUMM.

SY-LSIND = 1.

ENDCASE.

***********************************************************************

Regards

Bala Krishna

0 Kudos
195

Hi Balakrishna,

Thanks for your reply.

But I should not create another GUI status. I have to use the same and should be able to change the text in the program.

Regards.

Former Member
0 Kudos
195

Hi,

You can define dynamic texts...

When you give the function code...choose the dynamic text and give a variable name...and populate the text in the variable in the program based on the condition..

Thanks

Naren