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

about module pool

prasanth_kasturi
Active Contributor
0 Likes
698

hi

i am using a tabstrip control which has two tabs .

one has three fields and other has a table control.

both are using the same sub screen area

but when i am executing the transaction i am lead into dump

the error is dynpro doesnt exist

can anyone suggest me with the solution.

the code is as follows

module program


 PROGRAM  zp_modulepool1.

TABLES: kna1,vbak.

TYPES : BEGIN OF ty_vbak,
          vbeln LIKE vbak-vbeln,
          erdat LIKE vbak-erdat,
          ernam LIKE vbak-ernam,
        END OF ty_vbak.

DATA : it_vbak TYPE TABLE OF ty_vbak with header line.

TYPES : BEGIN OF ty_kna1,
          kunnr LIKE kna1-kunnr,
          name1 LIKE kna1-name1,
          land1 LIKE kna1-land1,
          ort01 LIKE kna1-ort01,
        END OF ty_kna1.

DATA : wa_kna1 TYPE ty_kna1,
       scrno TYPE i VALUE '344'.

CONTROLS: tabstrip TYPE TABSTRIP,
          tablecontrol TYPE TABLEVIEW USING SCREEN '345'.
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0343  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*

MODULE user_command_0343 INPUT.

  CASE sy-ucomm.

    WHEN 'DISP'.

      SELECT SINGLE kunnr name1 land1 ort01
              FROM kna1
              INTO wa_kna1
              WHERE kunnr = kna1-kunnr.


      SELECT vbeln  erdat ernam
             FROM vbak
             INTO TABLE it_vbak
             WHERE kunnr = wa_kna1-kunnr.


    WHEN 'REFRESH'.

      REFRESH it_vbak.
      CLEAR wa_kna1.
      clear kna1-kunnr.


    WHEN 'EXIT'.
      LEAVE PROGRAM.

  ENDCASE.


ENDMODULE.                 " USER_COMMAND_0343  INPUT


*&---------------------------------------------------------------------*
*&      Module  STATUS_0344  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE status_0344 OUTPUT.
*  SET PF-STATUS 'xxxxxxxx'.
*  SET TITLEBAR 'xxx'.

  MOVE wa_kna1-name1 TO kna1-name1.
  MOVE wa_kna1-land1 TO kna1-land1.
  MOVE wa_kna1-ort01 TO kna1-ort01.

ENDMODULE.                 " STATUS_0344  OUTPUT


*&---------------------------------------------------------------------*
*&      Module  STATUS_0345  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE status_0345 OUTPUT.
*  SET PF-STATUS 'xxxxxxxx'.
*  SET TITLEBAR 'xxx'.

  move-corresponding it_vbak to vbak.

ENDMODULE.                 " STATUS_0345  OUTPUT
*&---------------------------------------------------------------------*
*&      Module  subscreen  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module subscreen input.

  case tabstrip-activetab.

    when 'TAB1'.
      screen = '344'.

   when 'TAB2'.
     screen = '345'.

     endcase.

endmodule.                 " subscreen  INPUT

flow logics of three screens are as follows

for 343


PROCESS BEFORE OUTPUT.

CALL SUBSCREEN SUB INCLUDING SY-REPID SCRNO.
*MODULE STATUS_0343.


PROCESS AFTER INPUT.

module subscreen.

 MODULE USER_COMMAND_0343.

for 344


PROCESS BEFORE OUTPUT.
 MODULE STATUS_0344.
*
PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0344.

for 345


PROCESS BEFORE OUTPUT.
LOOP at it_vbak WITH CONTROL TABLECONTROL.
 MODULE STATUS_0345.
ENDLOOP.
*
PROCESS AFTER INPUT.
LOOP WITH CONTROL TABLECONTROL .
  ENDLOOP.
* MODULE USER_COMMAND_0345.

the tabstip name is tabstrip

fct codes of two tabs are TAB1 and TAB2

<REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Apr 14, 2008 4:51 PM

6 REPLIES 6
Read only

Former Member
0 Likes
682

Hi,

CREATING TABSTRIPS IN MPP:

-


In a normal screen, we can add only maximum of 40 components.

To make a screen hold more than 40 components, we can use tabstrip controls.

NAVIGATIONS TO CREATE TABSTRIP CONTROL:

-


1. Create an MPP program.

2. Create a normal screen (100)

-> Add Tabstrip Control component from toolbar

-> By default, a tabstrip control is created with 2 tab buttons

-> Double click on tabstrip control

-> Specify name (TBSTR) in Attributes box

-> Click on First tab button

-> Add Subscreen Area from toolbar to first tab button

-> Double click on subscreen area

-> Specify name (SUB1)

-> Click on Second tab button

-> Repeat same process for adding subscreen area (SUB2)

-> Double click on First tab button

-> Specify attributes (TAB1,FIRST,TAB1)

-> Double click on Second tab button

-> Specify attributes (TAB2, SECOND, TAB2)

-> SAve

-> Flowlogic.

3. Create two subscreens (10, 20) -> Add required components in each subscreen.

4. In Top Include File, specify following code:

DATA : IO1(10), IO2(10), IO3(10), IO4(10).

CONTROLS TBSTR TYPE TABSTRIP.

DATA A LIKE SY-DYNNR.

'CONTROLS' statement is used to allocate a memory area for the tabstrip created in the normal screen. 'TABSTRIP' itself is a data type for the tabstrip control. Whenever a tabstrip is created, SAP creates an object called 'ACTIVETAB' which is used to call the corresponding subscreens for each tab button in PAI.

5. In Flowlogic editor, write following code to initiate the subscreens to the corresponding subscreen areas of each tab button when the main screen is called:

PROCESS BEFORE OUTPUT.

MODULE STATUS_0100.

CALL SUBSCREEN SUB1 INCLUDING 'SAPMZTABSTRIP' '10'.

CALL SUBSCREEN SUB2 INCLUDING 'SAPMZTABSTRIP' '20'.

PROCESS AFTER INPUT.

MODULE USER_COMMAND_0100.

CALL SUBSCREEN SUB1.

CALL SUBSCREEN SUB2.

6. In PAI, specify following code for click events on each tab button:

CASE SY-UCOMM.

WHEN 'TAB1'.

A = '10'. * calls specified subscreen during PAI

TBSTR-ACTIVETAB = 'TAB1'. * makes entire tab button in active status

WHEN 'TAB2'.

A = '20'.

TBSTR-ACTIVETAB = 'TAB2'.

WHEN 'DISPLAY'.

LEAVE TO LIST-PROCESSING.

WRITE 😕 IO1, IO2, IO3, IO4.

WHEN 'EXIT'.

LEAVE PROGRAM.

ENDCASE.

7. Create a Tcode -> Activate all -> Execute.

Regards,

Priya.

Read only

0 Likes
682

hiiii priya

i am using the same sub screen area. not different subscreen areas

Read only

Former Member
0 Likes
682

Hi prasanth,

Goto PBO

Call subscreen sub1 including sy-repid '1001' . "Screen number

Call subscreen sub2 including sy-repid '1002'.

"Sy-repid = current program

Goto PAI.

Call subscreen sub1.

Call subscreen sub2.

<REMOVED BY MODERATOR>

Regards,

S.Suresh

Edited by: Alvaro Tejada Galindo on Apr 14, 2008 4:52 PM

Read only

0 Likes
682

hiii veryone take a note that i am singlesub screen area.

so i annot wite two call subscreen statements

Read only

0 Likes
682

Hi prasanth,

Goto PBO

Call subscreen sub1 including 'sapmztab' '1001' . "Screen number

Call subscreen sub2 including 'sapmztab' '1002'. -->Table control

Goto PAI.

Call subscreen sub1.

Call subscreen sub2.

<REMOVED BY MODERATOR>

Regards,

S.Suresh

Edited by: Alvaro Tejada Galindo on Apr 14, 2008 4:53 PM

Read only

0 Likes
682

Hi,

You cant use the same subscreen area. You need to define separate subscreen.

Regards,

Raghu