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

help in module pool?

Former Member
0 Likes
582

How to work with subscreen i module pool?

Please help its urgent!!1

answers will be rewarded!!!!

6 REPLIES 6
Read only

Former Member
0 Likes
553

hi,

Check

http://www.sap-img.com/ab005.htm

;�

http://www.sapdevelopment.co.uk/tips/tips_subscreen.htm

<b>A demo program to create subscreen in your ABAP Program</b>

REPORT ZSUBSCREEN.

TABLES: USR02,       "Logon data
        SSCRFIELDS.  "FIELDS ON SELECTION SCREENS
*---------------------------------------------------------------
* SUBSCREEN 1
*---------------------------------------------------------------
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-010.
   SELECT-OPTIONS: USERNAME FOR USR02-BNAME.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN END OF SCREEN 100.

*---------------------------------------------------------------
* SUBSCREEN 2
*---------------------------------------------------------------
SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-020.
   SELECT-OPTIONS: LASTLOGI FOR USR02-TRDAT.
SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN END OF SCREEN 200.

*---------------------------------------------------------------
* SUBSCREEN 3
*---------------------------------------------------------------
SELECTION-SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-030.
   SELECT-OPTIONS: CLASSTYP FOR USR02-CLASS.
SELECTION-SCREEN END OF BLOCK B3.
SELECTION-SCREEN END OF SCREEN 300.

* STANDARD SELECTION SCREEN FOR SCROLLING LEFT AND RIGHT
SELECTION-SCREEN: FUNCTION KEY 1,
                  FUNCTION KEY 2.

SELECTION-SCREEN: BEGIN OF TABBED BLOCK SUB FOR 15 LINES,
                  END OF BLOCK SUB.

START-OF-SELECTION.
    SELECT * FROM USR02 WHERE BNAME IN USERNAME
                          AND ERDAT IN LASTLOGI
                          AND CLASS IN CLASSTYP.
       WRITE: / 'User ', USR02-BNAME,
                'Last Login Date ', USR02-TRDAT,
                'Last Login Time ', USR02-LTIME,
                'CLASS ', USR02-CLASS.
    ENDSELECT.
END-OF-SELECTION.

INITIALIZATION.
* SCREEN ICON LEFT AND RIGHT
  SSCRFIELDS-FUNCTXT_01 = '@0D@'.
  SSCRFIELDS-FUNCTXT_02 = '@0E@'.
  SUB-PROG = SY-REPID.
  SUB-DYNNR = 100.

AT SELECTION-SCREEN.
  CASE SY-DYNNR.

    WHEN 100.
      IF SSCRFIELDS-UCOMM = 'FC01'.
        SUB-DYNNR = 300.
      ELSEIF SSCRFIELDS-UCOMM = 'FC02'.
        SUB-DYNNR = 200.
      ENDIF.

    WHEN 200.
      IF SSCRFIELDS-UCOMM = 'FC01'.
        SUB-DYNNR = 100.
      ELSEIF SSCRFIELDS-UCOMM = 'FC02'.
        SUB-DYNNR = 300.
      ENDIF.

    WHEN 300.
      IF SSCRFIELDS-UCOMM = 'FC01'.
        SUB-DYNNR = 200.
      ELSEIF SSCRFIELDS-UCOMM = 'FC02'.
        SUB-DYNNR = 100.
      ENDIF.
  ENDCASE.

Regards,

Santosh

Read only

Former Member
0 Likes
553

hi,

1. Create a new program in se80.

2. Right click and create a new screen.

3. in this new screen, click on layout.

Drag and drop a subscreen area and give some name to that screen ex abc_scr and 2 push buttons one to call that subscreen and another to exit from program.

4. Come to original program and write the following code there :

PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
*
CALL SUBSCREEN: abc_scr_data INCLUDING SY-REPID S_NO. "Calling the subscreen in PBO

PROCESS AFTER INPUT.
MODULE USER_COMMAND_1000.
CALL SUBSCREEN : VEND_data."calling the subscreen in PAI

5. Create another screen say 1110 with screen type in attributes as subscreen.

6. Click on layout and create a vendor screen with some fields and buttons.

7. Go to the main screen 0100 and double click on module user command.

8. Write the code to display data in the subscreen.

Also, check out the links.

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

http://www.thespot4sap.com/Articles/SAP_Design_Dynpro.asp

http://www.thespot4sap.com/Articles/Create_Subscreen_In_ABAP.asp

http://help.sap.com/saphelp_46c/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm

http://www.sapdevelopment.co.uk/tips/tips_subscreen.htm

Hope this helps.

Regards,

Richa

Read only

Former Member
0 Likes
553

Hello Abhay,

Use the following link..

<a href="http://help.sap.com/saphelp_46c/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm">Subscreen</a>

Read only

Former Member
0 Likes
553

1.First create a screen (2000) in module pool program.

2.in layout option select tabstrip and give a name.

3.select the subscreen and paste it in any one tab for dynamic call , name the subscreen.

4.now create two screens(2100 ,2200) , with screen type as subscreen.

5. in 2100 layout and 2200 layout place ur requirements and continue

Example code.

in PBO of 2000 write this code.

PROCESS BEFORE OUTPUT.

  • MODULE STATUS_2000.

CALL SUBSCREEN SUB INCLUDING SY-REPID DNR.

*

PROCESS AFTER INPUT.

CALL SUBSCREEN SUB.

MODULE USER_COMMAND_2000.

<b>main prgram</b>

ROGRAM ZSCREENSAMPLE .

CONTROLS MYTAB TYPE TABSTRIP. "tabstrip name

DATA : EXIT1, EXIT2.

DATA : DNR TYPE SY-DYNNR.

MYTAB-ACTIVETAB = 'TAB1'.

DNR = '2100'.

CALL SCREEN 2000.

MODULE USER_COMMAND_2000 INPUT.

CASE SY-UCOMM.

WHEN 'TAB1'.

MYTAB-ACTIVETAB = 'TAB1'.

DNR = '2100'.

WHEN 'TAB2'.

MYTAB-ACTIVETAB = 'TAB2'.

DNR = '2200'.

ENDCASE.

ENDMODULE.

&----


*& Module USER_COMMAND_2100 INPUT

&----


  • text

----


MODULE USER_COMMAND_2100 INPUT.

CASE SY-UCOMM.

WHEN 'EXIT1'.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE. " USER_COMMAND_2100 INPUT

&----


*& Module USER_COMMAND_2200 INPUT

&----


  • text

----


MODULE USER_COMMAND_2200 INPUT.

CASE SY-UCOMM.

WHEN 'EXIT2'.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE. " USER_COMMAND_2200 INPUT

Read only

Former Member
0 Likes
553

Have a look at bellow link. Go to page 647.

<a href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf">Subscreen Details</a>

I hope it helps.

Best Regards,

Vibha

*Please mark all the helpful answers

Read only

Former Member
0 Likes
553

u r the one 2 decode

ssik ym ssa

frm

siva