Skip to Content
author's profile photo Former Member
Former Member

module pool programming query

Dear friends,

I have a problem in handling tabstrips in module pool programming.

the problem is when i go to next screen it gets initiated to the tab number which i have declared in the data part.

but the data in the screen remains intact.

after pressing the option in the status it gets initiated and then i have to click the particular tab to go the tab and to see the changes get affected.

how to solve this problem.

plz do the needful.

regards

samarendra

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Mar 18, 2008 at 01:16 PM

    Hi,

    You just need to create the screen........

    PAI

    
    *&---------------------------------------------------------------------*
    *&  Include           MZDS_CRTSCREENI01
    *&---------------------------------------------------------------------*
    *&---------------------------------------------------------------------*
    *&      Module  USER_COMMAND_0100  INPUT
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    MODULE USER_COMMAND_0100 INPUT.
    CASE OK_CODE.
      WHEN 'BACK'.
        LEAVE TO SCREEN 0.
      WHEN 'SPFLI' OR 'SBOOK'.
         TAB1-ACTIVETAB = OK_CODE.
      WHEN 'EXIT'.
        LEAVE PROGRAM.
      WHEN 'CANCEL'.
        LEAVE TO SCREEN 100.
     ENDCASE.
    
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    
    
    

    PBO

    
    *&---------------------------------------------------------------------*
    *&  Include           MZDS_CRTSCREENO01
    *&---------------------------------------------------------------------*
    *&---------------------------------------------------------------------*
    *&      Module  STATUS_0100  OUTPUT
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'BASE'.
      SET TITLEBAR 'TITLE'.
    
    ENDMODULE.                 " STATUS_0100  OUTPUT
    
    *&---------------------------------------------------------------------*
    *&      Module  CLEAR_OKCODE  OUTPUT
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    MODULE CLEAR_OKCODE OUTPUT.
    CLEAR OK_CODE.
    ENDMODULE.                 " CLEAR_OKCODE  OUTPUT
    
    MODULE DISPLAY_DATA OUTPUT.
     CASE 'X' .
       WHEN RBT-SPFLI.
        SELECT CITYFROM AIRPFROM CITYTO AIRPTO FROM SPFLI
        INTO CORRESPONDING FIELDS OF TABLE IT_SPFLI
        WHERE CARRID = SPFLI-CARRID
        AND CONNID = SPFLI-CONNID.
    
    FLDATE = ' '.
    BOOKNO = ' '.
    CUSTNO = ' '.
    LOOP AT IT_SPFLI.
       DEP_CITY = IT_SPFLI-CITYFROM.
       DEP_AIR = IT_SPFLI-AIRPFROM.
       DES_CITY = IT_SPFLI-CITYTO.
       DES_AIR = IT_SPFLI-AIRPTO.
    ENDLOOP.
    
      WHEN RBT-SBOOK.
        SELECT SINGLE FLDATE BOOKID CUSTOMID FROM SBOOK
        INTO CORRESPONDING FIELDS OF IT_SBOOK
        WHERE CARRID = SPFLI-CARRID
        AND CONNID = SPFLI-CONNID.
    
    
       FLDATE = IT_SBOOK-FLDATE.
       BOOKNO = IT_SBOOK-BOOKID.
       CUSTNO = IT_SBOOK-CUSTOMID.
    
    DEP_CITY = ' '.
    DEP_AIR = ' '.
    DES_CITY = ' '.
    DES_AIR = ' '.
    
    ENDCASE.
    ENDMODULE.
    *&---------------------------------------------------------------------*
    *&      Module  CALL_DYNNR  OUTPUT
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    MODULE CALL_DYNNR OUTPUT.
    
    CASE TAB1-ACTIVETAB.
    
      WHEN 'SPFLI'.
        DYNNR = 102.
      WHEN 'SBOOK'.
        DYNNR = 103.
      WHEN OTHERS.
        TAB1-ACTIVETAB = 'SPFLI'.
        DYNNR = 102.
    ENDCASE.
    ENDMODULE.                 " CALL_DYNNR  OUTPUT
    *&---------------------------------------------------------------------*
    *&      Module  DISPLAY_SFLIGHT  OUTPUT
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    MODULE DISPLAY_SFLIGHT OUTPUT.
    SELECT CITYFROM AIRPFROM CITYTO AIRPTO FROM SPFLI
        INTO CORRESPONDING FIELDS OF TABLE IT_SPFLI
        WHERE CARRID = SPFLI-CARRID
        AND CONNID = SPFLI-CONNID.
    
    CITY_FROM = IT_SPFLI-CITYFROM.
    AIRP_FROM = IT_SPFLI-AIRPFROM.
    CITY_TO = IT_SPFLI-CITYTO.
    AIRP_TO = IT_SPFLI-AIRPTO.
    ENDMODULE.                 " DISPLAY_SFLIGHT  OUTPUT
    *&---------------------------------------------------------------------*
    *&      Module  DISPLAY_SBOOK  OUTPUT
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    MODULE DISPLAY_SBOOK OUTPUT.
    
    SELECT SINGLE FLDATE BOOKID CUSTOMID FROM SBOOK
        INTO CORRESPONDING FIELDS OF IT_SBOOK
        WHERE CARRID = SPFLI-CARRID
        AND CONNID = SPFLI-CONNID.
    
    FL_DATE = IT_SBOOK-FLDATE.
    BOOKID = IT_SBOOK-BOOKID.
    CUSTOMID = IT_SBOOK-CUSTOMID.
    
    ENDMODULE.                 " DISPLAY_SBOOK  OUTPUT
    
    
    

    TOP INCLUDE

    
    *&---------------------------------------------------------------------*
    *& Include MZDS_CRTSCREENTOP                                 Module Pool      SAPMZDS_CRTSCREEN
    *&
    *&---------------------------------------------------------------------*
    
    PROGRAM  SAPMZDS_CRTSCREEN.
    
    TABLES: SPFLI,SBOOK.
    DATA: OK_CODE TYPE SYUCOMM.
    
    CONTROLS TAB1 TYPE TABSTRIP.
    
    DATA: BEGIN OF IT_SPFLI OCCURS 0,
          CITYFROM TYPE SPFLI-CITYFROM,
          AIRPFROM TYPE SPFLI-AIRPFROM,
          CITYTO TYPE SPFLI-CITYTO,
          AIRPTO TYPE SPFLI-AIRPTO,
      END OF IT_SPFLI.
    
    DATA: IT_SBOOK TYPE SBOOK.
    
    DATA: DYNNR TYPE SY-DYNNR.
    
    DATA: DEP_CITY(20) TYPE C,
          DEP_AIR(20) TYPE C,
          DES_CITY(20) TYPE C,
          DES_AIR(20) TYPE C.
    
    DATA: FLDATE(20) TYPE C,
          BOOKNO(20) TYPE C,
          CUSTNO(20) TYPE C.
    
    DATA:CITY_FROM(20) TYPE C,
         AIRP_FROM(20) TYPE C,
         CITY_TO(20) TYPE C,
         AIRP_TO(20) TYPE C.
    
    DATA: FL_DATE(20) TYPE C,
          BOOKID(20) TYPE C,
          CUSTOMID(20) TYPE C.
    
    DATA: BEGIN OF RBT,
          SPFLI VALUE 'X',
          SBOOK,
          END OF RBT.
    
    

    HTH

    Regards,

    Dhruv Shah

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 19, 2008 at 11:41 AM

    hi,

    i cant understand ur query...

    have u created tabstrip using wizard?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.