2012 Jun 07 3:41 PM
Hi,
I am using classical screen programming method.
I have a single screen which has following elements
When the screen renders for the first time, only F4 help and input text fields are seen. I am able to hide sub area. Requirement is to see first 3 elements.
The hiding of sub area is done in PBO (depending upon certain input).
Once user selects F4 and chooses a value, i want to render (or unhide) the sub area.
But that doesn't happen, because control does not go back to PBO.
I have to explicitly hit a ENTER key (on the keyboard) to get the sub area.
How can I achieve this without hitting ENTER key.
Appreciate your help.
Thanks,
Advay
2012 Jun 08 3:15 PM
Hi Advay,
In your PAI, upon F4 select, use the event AT SELECTION-SCREEN ON VALUE-REQUEST, you can use the below code to unhide.
LOOP AT SCREEN.
"Here, make you subarea visible.
MODIFY SCREEN.
ENDLOOP.
Hope this helps you.
Regards,
Sindhu Pulluru.
2012 Jun 07 4:11 PM
Try with the Program Events
AT-SELECTION
AT SELECTION-SCREEN ON VALUE-REQUEST
REgards,
Venkat
2012 Jun 08 3:15 PM
Hi Advay,
In your PAI, upon F4 select, use the event AT SELECTION-SCREEN ON VALUE-REQUEST, you can use the below code to unhide.
LOOP AT SCREEN.
"Here, make you subarea visible.
MODIFY SCREEN.
ENDLOOP.
Hope this helps you.
Regards,
Sindhu Pulluru.
2012 Jun 10 3:24 PM
Hi Sindhu,
I tried the above approach but it did not work for me.
I am not using the report program for UI display, its a screen program with PBO and PAI modules.
In the PAI I am using, PROCESS ON VALUE-REQUEST event (which internally will trigger the event that you mentioned above.)
From inside POV module, I try to unhide the screen elements, by LOOP AT SCREEN and MODIFY SCREEN code, but the elements are still hidden even the code executes.
I have to explicitly hit ENTER key to unhide the screen elements.
Note that, I want to unhide the elements only F4 selection itself and not with ENTER key.
Thanks,
Advay
2012 Jun 12 12:41 PM
Hi,
Try to simulate an ENTER within the PROCESS ON VALUE-REQUEST event with the following code:
CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'
EXPORTING
functioncode = '=00'
EXCEPTIONS
function_not_supported = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF
.
You should put the LOOP AT SCREEN in the PBO.
Regards,
2012 Jun 13 9:19 AM