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

Screen elements activated based on input field

jepi_flanders
Participant
0 Likes
1,624

Hi to all,

I have the following need that I am not able to implement: in the screen of my report, I have a first input field populated with three values and I would like that, based on the value selected by the user in that input field, the next elements in the screen (another input field, few check boxes and a couple of radiobuttons) get activated, or set as invisible, accordingly.

The screen has been designed with the screen painter. I found in other threads that I should use LOOP AT SCREEN and then MODIFY SCREEN, but what I am not able to achieve is to get the value the user has chosen for the first input field, so that to modify the properties of the other elements.

Can you help me with this, giving me some code examples?

Thank you!

Regards,

JFlan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,580

Hi,

but what I am not able to achieve is to get the value the user has chosen for the first input field, so that to modify the properties of the other elements.

Have you declare your input field in the calling program (with same type and length)?

e.g: DATA: w_rout TYPE ...

Kr,

Manu.

12 REPLIES 12
Read only

laurent_fournier2
Contributor
0 Likes
1,580

Hi,

You must code the loop at screen... endloop block in the PBO of the screen.

Can you please paste the flow of the screen in order to help you in more detail ?

regards.

Read only

0 Likes
1,580

Hi Laurent,

Here the flow logic:

PROCESS BEFORE OUTPUT.

  MODULE status_1000.

PROCESS AFTER INPUT.

  CHAIN.

    FIELD w_rout.

    FIELD w_test.

    FIELD w_prod.

    FIELD w_char.

  ENDCHAIN.

  MODULE user_command_1000.

When the report is run, the user shall choose a value for w_rout, then the other fields properties shall be changed according to certain rules.

Thank you for helping.

Read only

0 Likes
1,580

Hi again,

Change it like this :

PROCESS BEFORE OUTPUT.

  MODULE status_1000.

  MODULE Modify_screen.

PROCESS AFTER INPUT.

Create the module and write there the loop at screen... endloop coding that changes your fields.

Try it and reply.

Read only

0 Likes
1,580

Hi Laurent,

Thank you. I tried but noticed that the modify_screen module is only run before screen output, and not when field w_rout gets, or change, value. Do you have further clues?

Thanks

Read only

Former Member
0 Likes
1,580

Hi,

Use the FM DYNP_VALUES_READ to read the values of the screen elements.

Cheers

~Niranjan

Read only

0 Likes
1,580

Hi,

Do you have an example? Where and how to call it?

Thanks a lot.

Bye

Read only

Former Member
0 Likes
1,581

Hi,

but what I am not able to achieve is to get the value the user has chosen for the first input field, so that to modify the properties of the other elements.

Have you declare your input field in the calling program (with same type and length)?

e.g: DATA: w_rout TYPE ...

Kr,

Manu.

Read only

0 Likes
1,580

Hi Manu,

Yes sure, field is declared.

Thanks anyway

Read only

0 Likes
1,580

So once your input field is filled, you just need to press the enter key so that your PBO module is processed... What is your issue exactly?

Manu.

Read only

0 Likes
1,580

Oh I think I understood : your "input" field is a list box, isn't it?

If yes, have you assigned a function code to the list box?

Manu.

Read only

0 Likes
1,580

As said by Manu, assign function code and write code in PBO to modify screen

Regards,

Vinod

Read only

0 Likes
1,580

Thank you, Manu.