03-12-2007 3:07 PM
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
03-12-2007 4:43 PM
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.
03-12-2007 3:19 PM
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.
03-12-2007 3:25 PM
03-12-2007 3:59 PM
03-12-2007 4:26 PM
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
03-12-2007 4:43 PM
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.
03-13-2007 7:46 AM
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
03-12-2007 6:51 PM
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