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

Press button thru transaction

Former Member
0 Likes
2,776

Hey experts,

I have a screen with a field and a few buttons and I wanna make a transaction with parameters which fill the field and press one of the button, I do it before with Table Maintenance generator, but now it's different. I can fill the field, but I can't achieve pressing the button.

When I'm setting the transaction I can set only the field and no other default values I can set.

what should I do? Thanks

Regards,

Robert

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,501

Hello,

You can do it easily i guess.

In your program code, you can check the t-code by sy-tcode and if it's the t-code you created than you can run the subroutine of the button.

For example, let's say that the tcode you created is ZTEST.

Example code:

if sy-tcode eq 'ZTEST'.

perform operation.

endif.

Regards.

Ali Murat

Hey experts,

I have a screen with a field and a few buttons and I wanna make a transaction with parameters which fill the field and press one of the button, I do it before with Table Maintenance generator, but now it's different. I can fill the field, but I can't achieve pressing the button.

When I'm setting the transaction I can set only the field and no other default values I can set.

what should I do? Thanks

Regards,

Robert

12 REPLIES 12
Read only

Former Member
0 Likes
2,501

when i'm pressing the button i'm setting a field scr_mode, but i don't how to set that scr_mode thru transaction, because it writes out a warning message that it doesn't exists, but it is. how to solve it?

Read only

0 Likes
2,501

HI Robert,

Maybe you should make your question much clearer to understand. Maybe the experts dont really understand.

Maybe you can provide some screen capture for us.

Thank you..

Read only

0 Likes
2,501

Hi Robert,

do you want to create a parameter Transaction for SM30?

Then you have to fill field VIEWNAME with your table name or view name and either field SHOW or field UPDATE with 'X'. There is a value help available in SE93, after transaction SM30 is known. And there is an option to skip the start screen.

Regards,

Klaus

Read only

0 Likes
2,501

I want exactly this, but on my own screen and not on the SM30. When you set the UPDATE with 'X' on SM30 the Table maintenance generator will be opened in update mode and I want the same on my custom program, I made my own transaction to that custom program, where I can fill the Input Field thru a transaction with parameter, but I can't simulate the button click like it's the UPDATE field on SM30.

Read only

0 Likes
2,501

I made a video, check it out

Read only

Former Member
0 Likes
2,502

Hello,

You can do it easily i guess.

In your program code, you can check the t-code by sy-tcode and if it's the t-code you created than you can run the subroutine of the button.

For example, let's say that the tcode you created is ZTEST.

Example code:

if sy-tcode eq 'ZTEST'.

perform operation.

endif.

Regards.

Ali Murat

Read only

0 Likes
2,501

Yeh this could be the solution. But I would like to do it like I show it in the video here

If it will be not possible, I will do it like you said thank you.

Read only

NagaPrakashT
Contributor
0 Likes
2,501

Hello Robert,

Are you creating a transaction for a custom program,if so you can write the code to fill the fields in INITIALIZATION event and you can incorporate the logic of Button here itself.

Thanks,

Naga

Read only

0 Likes
2,501

Check out my video for better understand

I want to do more transactions for all of the buttons there and for more tables.

Read only

former_member202818
Active Contributor
0 Likes
2,501

Hi,

Try with this Function Module..

You should pass the function code while calling t-code, and set the function code in the called program by using the function module.

SAPGUI_SET_FUNCTIONCODE

Read only

Former Member
0 Likes
2,501

The most of you didn't understand me, because of my fault.

So I made a video, I hope, now it is clear  what I need.

Simulate button press thru parameter transaction - YouTube

Read only

Former Member
0 Likes
2,501

Can you watch the youtube video? if not, to which video server should I upload it?