Application Development and Automation 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: 
Read only

Table control wizard Screen Controlling In Module pool programming

Former Member
0 Likes
1,116

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..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
716

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

4 REPLIES 4
Read only

deepak_dhamat
Active Contributor
0 Likes
716

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 .

Read only

Former Member
0 Likes
717

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

Read only

0 Likes
716

hi karthik ...

thanks for the example code ...

Read only

0 Likes
716

what if we use one push button for both display & change ( Display/Change)?