on 2023 Jul 17 7:13 PM
I have been working on a report for a Handheld device with Steploops. The problem I am having is that I need to disable a qty field when a checkbox is checked but enable it again when it is unchecked.
The main problem right now is that on my Loop at Screen, I will see one row instead of them all and if I change it to Screen-active = '0'. It disables all the qty fields.
There is any idea I will apply to fix it?
*THIS ANSWER WAS POSTED BY phil soady IN STACKOVERFLOW*
______________________________________________________________________________________________
The trick is to call a module from the DYNPRO inside LOOP on the screen. Here is minimum style solution, by hand to illustrate the concept.
PROCESS BEFORE OUTPUT.
LOOP AT DATA_AREA_TAB CURSOR current_line INTO data_area_rec.
MODULE LOOP_INIT.
MODULE DATA_AREA_TAB_SHOW.
ENDLOOP.
then inside the MODULE...
You can read the current line so you know the content and adjust the field accordingly. Since it is called per line of dynpro it updates the current line
MODULE DATA_AREA_TAB_SHOW OUTPUT.
READ TABLE data_area_tab INTO data_area_rec INDEX current_line.
LOOP AT SCREEN.
IF screen-name = '???'. " your rules here
IF data_area_rec-VALUE = '???'
screen-invisible = '0'.
screen-input = '1'.
ELSE.
screen-invisible = '1'.
screen-input = '0'.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDMODULE.
I test it and works as expected.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.