cancel
Showing results for 
Search instead for 
Did you mean: 

Requested function ZTAB2 is not available here

n_sharavdorj
Explorer

I am created control tabstrip with 2 tabs inside screen SAPLXWOC 0900 of enhancement IWO10018.

Then set Function codes "ZTAB1", "ZTAB2" into tabs TAB1 and TAB2.

Following error message has appeared when I try to switch between tabs.

How can I handle it?

Flow Logic

PROCESS BEFORE OUTPUT.
* MODULE STATUS_0900.
*
  CALL SUBSCREEN tab_messages_ref1 INCLUDING 'SAPLXWOC' '0901'.
  CALL SUBSCREEN tab_kpi_ref1 INCLUDING 'SAPLXWOC' '0902'.

PROCESS AFTER INPUT.
 MODULE USER_COMMAND_0900.
  CALL SUBSCREEN tab_messages_ref1.
  CALL SUBSCREEN tab_kpi_ref1.
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0900  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE user_command_0900 INPUT.
  ok_code = sy-ucomm.
  CASE ok_code.
    WHEN 'ZTAB1'.
      ts_enh-activetab = 'TAB_MESSAGES'.
    WHEN 'ZTAB2'.
      ts_enh-activetab = 'TAB_KPI'.
    WHEN 'BACK'.
      LEAVE PROGRAM.
  ENDCASE.
ENDMODULE.                 " USER_COMMAND_0900  INPUT

Sandra_Rossi
Active Contributor

Seems correct except that I don't understand OK_CODE = SY-UCOMM, what is OK_CODE, why do you fill it with SY-UCOMM? I also don't understand LEAVE TO PROGRAM. Did you debug to make sure what happens?

Maybe clear SY-UCOMM at the end of the PAI in case SY-UCOMM is interpreted by the code of the parent screens.

View Entire Topic
n_sharavdorj
Explorer

I added custom Function codes into tables T185 and T185F. use Transaction code VFBS.

And I changed Function codes to "Z9T1" and "Z9T2" for meet to the requirement "Customer namespace reservation".

Now my codes are works perfect. Thanks for all replies.

n_sharavdorj
Explorer
0 Kudos

And I changed User command module below. The activetab's value is same with the tab's function code.

*----------------------------------------------------------------------*
***INCLUDE ZXWOCI02.
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0900  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE user_command_0900 INPUT.
  CASE sy-ucomm.
    WHEN 'Z9T1'.
      ts_enh-activetab = 'Z9T1'.
    WHEN 'Z9T2'.
      ts_enh-activetab = 'Z9T2'.
  ENDCASE.
ENDMODULE.                 " USER_COMMAND_0900  INPUT
Sandra_Rossi
Active Contributor

Thanks for the feedback!