Application Development 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: 

Sub Screen

Former Member
0 Kudos

hi friends ,

1. how to create sub screen in report program and how to control ?

2. how to hidden the button in table control

any body reply .

regards

pauldharma

4 REPLIES 4

Former Member
0 Kudos

Hi pauldharma ,

To hide Button try this...

1. define group name for the Button to be hidden

2. Add the following code...

(define)

controls tbl_ctrl type tableview ...

wa like tbl_ctrl-cols.

loop at tbl_ctrl-cols into wa.

if wa-screen-group1 = <group defined for the BUtton>

wa-invisible = 1.

modify tbl_ctrl-cols from wa

endif

endloop ...

Regards,

Vijay

former_member386202
Active Contributor
0 Kudos

Hi,

Try like this

CALL CUSTOMER-SUBSCREEN b INCLUDING 'SAPLX...' dynnr.

Effect

This call is only effective if you have activated the

screen in Transaction CMOD as part of an enhancement. Unlike in the CALL SUBSCREEN statement, you must specify the program name as a literal, and it must begin with SAPLX. In other words, the screen must belong to a function group whose name begins with 'X'.

For further information, refer to the online manual for Transaction SMOD.

Regards,

Prashant

Former Member
0 Kudos

Sub-Screens on ABAP Program:

Sample Code:

A demo program to create subscreen in your ABAP Program

  • A demo program to create subscreen in your ABAP Program

  • This report will display the user last login date and time.

  • Subscreen selection 1 : User Name

  • 2 : Last Login Date

  • 3 : Class Belong To

  • Written by : SAP Basis, ABAP Programming and Other IMG Stuff

  • http://www.sap-img.com

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.

Best Regards,

Raj

<b>Please award points if helpful.</b>