‎2010 Feb 05 8:55 AM
iam using table control wizard in my program ... initial screen contains 3 push buttons like create ,change , display. than in next screen table control wizard, at the time of creation filed rows should displsy non editable and remaining is editable when change it should be complete editable , when display it should be completely non editable, whare shuld i write the screen controlling code?
thanks in advance..
‎2010 Feb 05 12:07 PM
Hi,
You can control the table control - change / display in PBO of the flow logic..
In PAI,
WHEN 'CREATE'.
clear: v_dsiplay, v_change.
v_create = 'X'.
WHEN 'CHANGE'.
clear: v_display, v_create.
v_change = 'X'.
WHEN 'DISPLAY'.
clear: v_create, v_change.
v_display = 'X'.
In PBO,
PROCESS BEFORE OUTPUT.
LOOP AT itab INTO wa_tab WITH CONTROL ctrl CURSOR ctrl-CURRENT_LINE.
MODULE modify_screen.
ENDLOOP.
*** Group all the table control column fields as G1 in the screen attributes
MODULE modify_screen OUTPUT.
IF v_create = 'X'.
IF wa_fld1 IS INITIAL. *** (Considering fld1 is a key field)
PERFORM modify_screen USING 'G1' '1'.
ENDIF.
ENDIF
** Similarly do it for CHANGE and DISPLAY by checking fld1 is initial or not...
ENDMODULE.
FORM modify_screen USING v_group TYPE char2
v_input TYPE char1.
* Screen modification
LOOP AT SCREEN.
IF screen-group1 = v_group.
screen-input = v_input.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDFORM. "modify_screen
‎2010 Feb 05 11:32 AM
HI ,
kIRAN ,
What acually you want .
1) all buttons on one screen and after clicking on those button call another screen for display ,update and delete
2) OR every thing should be done on one screen .
Regards
Deepak .
‎2010 Feb 05 12:07 PM
Hi,
You can control the table control - change / display in PBO of the flow logic..
In PAI,
WHEN 'CREATE'.
clear: v_dsiplay, v_change.
v_create = 'X'.
WHEN 'CHANGE'.
clear: v_display, v_create.
v_change = 'X'.
WHEN 'DISPLAY'.
clear: v_create, v_change.
v_display = 'X'.
In PBO,
PROCESS BEFORE OUTPUT.
LOOP AT itab INTO wa_tab WITH CONTROL ctrl CURSOR ctrl-CURRENT_LINE.
MODULE modify_screen.
ENDLOOP.
*** Group all the table control column fields as G1 in the screen attributes
MODULE modify_screen OUTPUT.
IF v_create = 'X'.
IF wa_fld1 IS INITIAL. *** (Considering fld1 is a key field)
PERFORM modify_screen USING 'G1' '1'.
ENDIF.
ENDIF
** Similarly do it for CHANGE and DISPLAY by checking fld1 is initial or not...
ENDMODULE.
FORM modify_screen USING v_group TYPE char2
v_input TYPE char1.
* Screen modification
LOOP AT SCREEN.
IF screen-group1 = v_group.
screen-input = v_input.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDFORM. "modify_screen
‎2010 Feb 12 5:26 AM
‎2021 Oct 23 12:58 PM
what if we use one push button for both display & change ( Display/Change)?