Application Development 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: 

DYNP_VALUES_UPDATE does not change the value of my screen fields

helga_raemaekers2
Participant
0 Kudos

Hi,

I have a screen with a header area and a control with an ALV.

In my header area i have 2 fields shown as an icon. These icons should change

with an event triggered in the ALV (in handle_user_command)

In handle_user_command I check the values of a column in my ALV - I have 3 possible cases : a green led, a yellow led or a red led.

When i'm debugging the program, everything seems to be ok. In my table i see the new values of the icons, but when I see the screen afterwards the old values have not been replaced. (I also use an refresh of my ALV)

Any help is welcome!

THx,

Helga

1 ACCEPTED SOLUTION

former_member194669
Active Contributor

Hi,

PAI (and succeeding PBO) will never be executed when an event ist raised.

If you want to move the flow control from the ALV control (at the frontend) to the ABAP program (backend) then you have to call method CL_GUI_CFW=>SET_NEW_OK_CODE in your event handler method. You can set a dummy ok-code that does not cause any functionality except that PAI is triggered followed by PBO.


method:
double_click_100.

call method cl_gui_cfw=>set_new_ok_code
exporting
new_code = 'REFR'.             " Dummy F code
endmethod.

after this in the user command

module user_command_0100 input.
save_ok = ok_code. clear ok_code.
case save_ok.
when c_refr.          " Why blank ? this for PBO refresh after Double click
when others.
leave to screen 0.
endcase.
endmodule. 

7 REPLIES 7

Former Member
0 Kudos

the 2 fields which displays icons, are updated on the event in alv.

after assign a new value to fields say

field1 = green_icom

have you writen modify statement as follows:-

loop at screen.

if screen-name = 'FIELD1'

modify screen.

endloop.

0 Kudos

sorry, this doesn' t work either ...

Helga

0 Kudos

Can anyone help me ? It's rather urgent ...

THx in advance,

Helga

Former Member
0 Kudos

Hi,

declare the internal table like below:

DATA: i_fieldvalues TYPE dynpread OCCURS 0 WITH HEADER LINE.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR field.

PERFORM Display_contion_types.

FORM Display_contion_types.

  • Search help for Condition Type

PERFORM Display_contion_types.

Update screen fields like below:

  • Update Screen Field.

CLEAR i_fieldvalues[].

MOVE: 'V_TEXT' TO i_fieldvalues-fieldname .

WRITE i_t685-vtext TO i_fieldvalues-fieldvalue .

APPEND i_fieldvalues.

CALL FUNCTION 'DYNP_VALUES_UPDATE'

EXPORTING

dyname = sy-cprog

dynumb = sy-dynnr

TABLES

dynpfields = i_fieldvalues.

endif

regards,

Raja

former_member194669
Active Contributor

Hi,

PAI (and succeeding PBO) will never be executed when an event ist raised.

If you want to move the flow control from the ALV control (at the frontend) to the ABAP program (backend) then you have to call method CL_GUI_CFW=>SET_NEW_OK_CODE in your event handler method. You can set a dummy ok-code that does not cause any functionality except that PAI is triggered followed by PBO.


method:
double_click_100.

call method cl_gui_cfw=>set_new_ok_code
exporting
new_code = 'REFR'.             " Dummy F code
endmethod.

after this in the user command

module user_command_0100 input.
save_ok = ok_code. clear ok_code.
case save_ok.
when c_refr.          " Why blank ? this for PBO refresh after Double click
when others.
leave to screen 0.
endcase.
endmodule. 

0 Kudos

Hi all,

this solution works fine for my problem ! So i set a dummy ok_code and PAI/PBO is triggered and all my icons have the right color !

THANK YOU VERY MUCH !!!

Helga

Former Member
0 Kudos

Hey,

Please use

call function 'DYNP_VALUES_READ'

exporting

dyname = mf_hlp_repid

dynumb = sy-dynnr

tables

dynpfields = mf_dynpfields.

After the refresh ( call method g_grid->refresh_table_display.) I hope you are triggering the changes in PAI of the program.

I have worked on similar lines. Let me know if you have any further questions.

BR

Rakesh