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

Selection-Screen - Default to last used input values

Former Member
0 Likes
1,793

Hi,

Please let me know the solution for the following example in a Selection-Screen:

For example,

If the radio button is selected initially by the user, then the system should auto select the same radio button when he enters the Selection-Screen newly.

If there are 3 radio buttons, p_rad1, p_rad2, p_rad3.

First time, user selects p_rad2. Then, second time when he executes the transaction, in the selection-screen, same p_rad2 should be auto-selected.

Thanks & Regards,

Sowmya

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,177

Hi,

For this you can maintain a z table. If the user clicks p_rad2, then maintain this entry in the table. Next time when he executes the same transaction, in the code you can check the entry and according to that you can display the same. So every time the table will contain only one record. If he changes from p_rad2 to p_rad3, update the z table.

I am not sure how much possible is this solution though suddenly this came into my mind. Its worth to give a try.

Hi,

Please let me know the solution for the following example in a Selection-Screen:

For example,

If the radio button is selected initially by the user, then the system should auto select the same radio button when he enters the Selection-Screen newly.

If there are 3 radio buttons, p_rad1, p_rad2, p_rad3.

First time, user selects p_rad2. Then, second time when he executes the transaction, in the selection-screen, same p_rad2 should be auto-selected.

Thanks & Regards,

Sowmya

5 REPLIES 5
Read only

Former Member
0 Likes
1,178

Hi,

For this you can maintain a z table. If the user clicks p_rad2, then maintain this entry in the table. Next time when he executes the same transaction, in the code you can check the entry and according to that you can display the same. So every time the table will contain only one record. If he changes from p_rad2 to p_rad3, update the z table.

I am not sure how much possible is this solution though suddenly this came into my mind. Its worth to give a try.

Read only

Former Member
0 Likes
1,177

HI Sree,

You can use SET PARAMETER ID and GET PARAMETER ID

For more info take F1 help on above key words

or you can maintain a Table(This is advised since you might run this tcode next time after few days in that case)

Take F1 help on UPDATE keyword for Database tables

every time you run this Report update the table with the latest selected radio button(At any point of time you will have only one record)

Hope this would resolve your Issue

Cheerz

Ramchander Rao.K

Read only

former_member1125862
Participant
0 Likes
1,177

Hi Sowmya,

First you have to create a Z table with two fields one for the radio buttons and the other for the combination of date and time.

Ex: let us think you have 3 radio buttons.

First the user select the first radio button for the first time and execute the prog at that time he has to update the Z table with the radio button and date&time.

Second time if the user select the second radio button insted of the first radio button then also update the Z table with the radio button and date&time.

like it...........

If the user execute the prog after so many time the Z table updated with so many entries by that we have to get the latest entry from the table and display it on the selection screen.

Hope this is helpfull to you.

Thanks,

kruthik

Read only

Former Member
0 Likes
1,177

Hi,

You can use the concept of hold data.

system->user profile ->hold data.

This holds the data that user has enterd on screen and next tiem when he executes the values are provided on screen.

Read only

Former Member
0 Likes
1,177

Thanks a lot vinraaj.

Your suggestion resolved my problem.

I have created a custom table.

1) AT SELECTION-SCREEN,

Modifying the Table entry based on the radio-button selection.

2) INITIALIZATION.

SELECT SINGLE <fields>

FROM custom-table INTO radio-buttons.

Thanks again!

Thanks to sap_wiz, kruthik & Ramachander too.

Regards,

Sowmya