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

Passing value from module pool(screen) to Editable ALV(OOPS)..

0 Likes
1,678

I have a module pool screen with input field and Editable ALV (OOPS)display. I have a customized button in alv toolbar. Value from input field(module pool screen) has to be passed to handle_user_command by clicking the button. How to achieve this?

like sandra.rossi said, the value in the dynpro is global variable. You need to create a link between this global variable and the Event on the ALV toolbar.

When you want inside class to send an event to the dynpro part, you could simulate an action like this:

cl_gui_cfw=>set_new_ok_code( 'ENTER' ).

You will directly call the PAI

4 REPLIES 4
Read only

Sandra_Rossi
Active Contributor
1,376

Fields of dynpros correspond to global variables in the program. So, you don't need to pass them as parameters, they are directly available anywhere in your program.

Read only

0 Likes
1,376

Hello Sandra,

Value is filled only if any event is getting triggered.

For eg : After I fill value and press enter, then dynpro field is filled. But if I fill an value and press alv toolbar button directly, then value is empty. Is their any way to get value from dynpro field without any event? Please provide a valuable suggestion.

Read only

FredericGirod
Active Contributor
0 Likes
1,376

like sandra.rossi said, the value in the dynpro is global variable. You need to create a link between this global variable and the Event on the ALV toolbar.

When you want inside class to send an event to the dynpro part, you could simulate an action like this:

cl_gui_cfw=>set_new_ok_code( 'ENTER' ).

You will directly call the PAI

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,376

I guess that the ALV toolbar events are being registered by ALV so that to not trigger the PAI.

Do:

  • either as suggested by Frederic,
  • or read directly the dynpro fields by using the function module DYNP_VALUES_READ.