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: 

Problem with custom button in SM30

Former Member
0 Kudos
2,558

HI all,

i have created a custom button in sm30 screen (using ST event).on pressing this button ,it lead us to a selection screen of a report.the problem i am facing is when i select a line and then click on the button ,it opens the selection screen . but when i come back to sm30 , the button is disappeared.

this is only happening when i am selecting a line and clicking on the button.

                                             select a line -> push button -> selection screen of report.

                                            

                                            selection screen of report - > Back -> No button (PROBLEM).                                  

1 ACCEPTED SOLUTION

vladimir_erakovic
Contributor
0 Kudos
1,028

Well, the PF Status is changing as the modes changes. When you are in modify mode status is EUGL:

When you in show mode the status is ESLG:

So my guess is that when you come back from your report you are in mode where ESLG status is on, so just add your button in that PF status also.

17 REPLIES 17

vladimir_erakovic
Contributor
0 Kudos
1,028

Hi Sri,

My guess is that your code is not being executed when you go back. Try to add in exit event of your report CALL TRANSACTION 'SM30' AND SKIP FIRST SCREEN, but before you must provide input for first screen. You can export MEMORY ID from SM30 and import to your report. Then you can provide it before calling transaction when going back from report.

Hope it will work.

Regards,

Vladimir

0 Kudos
1,028

hi vladimir

    when i execute the report and press back,the button(button name : 'REPORT') is present on the screen.when i dont execute the report(i.e its still on selection screen of report) and then go back,the button('REPORT') disappears.

PS : 'REPORT' is the custom button that i created on sm30 screen.

vladimir_erakovic
Contributor
0 Kudos
1,028

Ok let's elaborate one more time. On first screen of SM30, on picture below,

you added button 'Report'. When you press that button you go to selection screen of your custom report. Do you forward some data to selection screen?

When you execute report and go back twice, the button on SM30 screen is there, but when you don't execute report and go back just once, the button isn't there.

I'm I right?

0 Kudos
1,028

i have marked the button on the screen.tat is the button i am talking about.

0 Kudos
1,028

When i click on 'Change Log' button ,i go to a selection screen of a report ,here ,if i press back , the button is not present (i.e disappeared) on the screen.

0 Kudos
1,028

How have you added this button..?

0 Kudos
1,028

Using event ST.

0 Kudos
1,028

When you just press back did you put a break point in your code to see what is happening. Please attach the sample code for ST events also

0 Kudos
1,028

in ST event, we dont write code.its all GUI based.we give the tcode and button description. tats it.

0 Kudos
1,028

Can you please be more specific and show us exactly where you added this. Like in which gui status. I can't find ST event.

0 Kudos
1,028

se11 ->utilities -> table maintenance generator -> environment - > modification -> events.

in events select 'ST' (f4 help).

i have followed the following link to create.

http://zevolving.com/2008/09/add-custom-button-on-maintianence-view-sm30/

0 Kudos
1,028

Ok, now it's much clearer

You add button only in EUGL PF Status that is Change mode and when you come back from your report some other PF Status is on because the mode is changed. Try to fing what affects PF Status changes in SM03 and than you can set it manually when exiting your report.

0 Kudos
1,028

hi vladimir

you are ryt!! the status is EULG on sm30 screen  ,but when i click on any line ,the status is EULGM .  i have checked in both the status ,i have tat button.

can you please elobrate on sm03 pf status ??..i did not understand tat.

vladimir_erakovic
Contributor
0 Kudos
1,029

Well, the PF Status is changing as the modes changes. When you are in modify mode status is EUGL:

When you in show mode the status is ESLG:

So my guess is that when you come back from your report you are in mode where ESLG status is on, so just add your button in that PF status also.

0 Kudos
1,028

HI VLADIMIR

THANKS FOR ALL THE HELP!! THE PROBLEM PERSISTS BUT THEN FOUND A MAKE SHIFT SOLUTION, THANKS AND ALL THE VERY BEST FOR YOUR HYBRID MOBILE APP.

THANKS

SRI HARSHA

0 Kudos
1,028

You're welcome! Thanks!

0 Kudos
1,028

Hi Sri!

I think you forgot to activate your FCODE in Status GUI EULGM .

Simply select your FCODE Function and click on the Function Code button (hint Function Active <-> Inactive (F7)).

(I had the same problem)

Regards,

Adriano