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

PAI after ALV Grid User Command

Former Member
0 Likes
2,720

Hi there,

I created a custom toolbar for my ALV Grid with some buttons and a input/output-field on the same dynpro. If I press button "X" my own defined user command is triggered and I get the selected row. Now I set the value of the io-field to display some text.

That works fine, but my problem is, the value of the i/o-field is only shown after I type "Enter" (keyboard).

Is there a way to trigger the PAI section manually in the code? Or is there another solution for my problem?

Thanks in advance,

Daniel

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,683

I think you need to refresh the alv forcibly using

layout-refresh = 'X'.

Regards,

ravi

Hi there,

I created a custom toolbar for my ALV Grid with some buttons and a input/output-field on the same dynpro. If I press button "X" my own defined user command is triggered and I get the selected row. Now I set the value of the io-field to display some text.

That works fine, but my problem is, the value of the i/o-field is only shown after I type "Enter" (keyboard).

Is there a way to trigger the PAI section manually in the code? Or is there another solution for my problem?

Thanks in advance,

Daniel

6 REPLIES 6
Read only

Former Member
0 Likes
1,684

I think you need to refresh the alv forcibly using

layout-refresh = 'X'.

Regards,

ravi

Read only

0 Likes
1,683

Hi Ravi,

the problem is not my ALV Grid. I want to display some text in a seperated i/o-field! That works, but I have to press enter on my keyboard to see the text.

So I think, I have to trigger the PAI section of the dynpro.

Read only

0 Likes
1,683

Hi,

Pass X to the parameter I_APPL_EVENTS of the ALV Grid and check.

  • Create instance of ALV Grid

CREATE OBJECT O_ALVGRID

EXPORTING

I_PARENT = CONTAINER

I_APPL_EVENTS = 'X'.

Laxman

Read only

0 Likes
1,683

Thanks for all the help!

@Laxmana: Your solution works!

Kind regards,

Daniel

Read only

1,683

hi Daniel,

write the following Code in usercommand.

CALL METHOD cl_gui_cfw=>set_new_ok_code

EXPORTING

new_code = e_ucomm

and then depending on the fcode triggered you perform the operation in PAI

Read only

Former Member
0 Likes
1,683

Hi,

call this methods before calling the method set_display method.

  CALL METHOD G_GRID->REGISTER_EDIT_EVENT
    EXPORTING
      I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER.
  CALL METHOD G_GRID->REGISTER_EDIT_EVENT
    EXPORTING
      I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.

regards

vijay