2008 Sep 11 6:02 PM
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.
2008 Sep 11 6:20 PM
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
2008 Sep 12 4:53 PM
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.
2008 Sep 11 6:20 PM
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