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

Option on TableControl

Former Member
0 Likes
487

Good Morning everybody,

Has someone the options that can activate (dinamictly) in a Table control?

For example:

I want that when the screen appears, the table control have to be Inactive ( with all the buttons of INSER, DELETE...). When I click on the button menu of modify, the tablecontrol has to be active.

Thanks a lot.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
466

Hi

When youcreate the dynpro set all fields as input/output, the in your status insert two button to set a flag to manage the state of the dynpro: active or deactive.

PROCESS PBO.
  
   MODULE SET_PF_STATUS.
   
   LOOP AT ....
       MODULE LOOP_SCREEN.
   ENDLOOP.

PROCESS PAI.

   LOOP AT ....

   ENDLOOP.

   MODULE USER_COMMAND.

   
MODULE SET_PF_STATUS.
    REFRESH T_EXCL.
     
    IF FL_ACTIVE = SPACE.
       T_EXCL-UCOMM = 'DELE'.
        APPEND T_EXCL.
       T_EXCL-UCOMM = 'INS'.
       APPEND T_EXCL.
       T_EXCL-UCOMM = 'DEACT'.
       APPEND T_EXCL.
       ..........................
     ELSE.
       T_EXCL-UCOMM = 'ACTIVE'.
       APPEND T_EXCL.
     ENDIF.
     
     SET PF-STATUS <STATUS> EXCLUDING T_EXCL.
ENDMODULE.

MODULE LOOP_SCREEN.
      CHECK FL_ACTIVE = SPACE.
      LOOP AT SCREEN.
          SCREEN-INPUT = 0.
          MODIFY SCREEN.
      ENDLOOP.
ENDMODULE.

MODULE USER_COMMAND.
      
      CASE OK_CODE.
          WHEN 'ACTIVE'. FL_ACTIVE = 'X'.
          WHEN 'DEACT'.  FL_ACTIVE = SPACE. 
          .........................................................
        ENDCASE.
ENDMODULE.

Max

4 REPLIES 4
Read only

Former Member
0 Likes
466

Hi Marc,

You need to use dynamic screen modifications concept.

Refer the link:

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbab6f35c111d1829f0000e829fbfe/content.htm

Regards,

Ravi

Read only

Former Member
0 Likes
466

Hi,

Assign all the fields of the screen that has to be input disabled to 1 screen group

and in the PBO of the screen insert :

LOOP AT SCREEN.

IF SCREEN-GROUP1 EQ 'DIS'.

SCREEN-INPUT = '0'.

ENDIF.

ENDLOOP.

and if you click modify change SCREEN-INPUT to 1 for the same Screen group.

regards,

Mahesh

Read only

Former Member
0 Likes
467

Hi

When youcreate the dynpro set all fields as input/output, the in your status insert two button to set a flag to manage the state of the dynpro: active or deactive.

PROCESS PBO.
  
   MODULE SET_PF_STATUS.
   
   LOOP AT ....
       MODULE LOOP_SCREEN.
   ENDLOOP.

PROCESS PAI.

   LOOP AT ....

   ENDLOOP.

   MODULE USER_COMMAND.

   
MODULE SET_PF_STATUS.
    REFRESH T_EXCL.
     
    IF FL_ACTIVE = SPACE.
       T_EXCL-UCOMM = 'DELE'.
        APPEND T_EXCL.
       T_EXCL-UCOMM = 'INS'.
       APPEND T_EXCL.
       T_EXCL-UCOMM = 'DEACT'.
       APPEND T_EXCL.
       ..........................
     ELSE.
       T_EXCL-UCOMM = 'ACTIVE'.
       APPEND T_EXCL.
     ENDIF.
     
     SET PF-STATUS <STATUS> EXCLUDING T_EXCL.
ENDMODULE.

MODULE LOOP_SCREEN.
      CHECK FL_ACTIVE = SPACE.
      LOOP AT SCREEN.
          SCREEN-INPUT = 0.
          MODIFY SCREEN.
      ENDLOOP.
ENDMODULE.

MODULE USER_COMMAND.
      
      CASE OK_CODE.
          WHEN 'ACTIVE'. FL_ACTIVE = 'X'.
          WHEN 'DEACT'.  FL_ACTIVE = SPACE. 
          .........................................................
        ENDCASE.
ENDMODULE.

Max

Read only

Former Member
0 Likes
466

HI Marc,

Try this way,

Loop at Screen.

If Screen-name = 'TAB_CTRL_NAME'.

Screen-input = '1'.

Modify Screen.

Endif.

Endloop.

Initially make the Table Control as display or Check Output Only.

Thanks,

Prashanth