04-11-2007 10:18 AM
Hi Gurus,
Am studying screen exits scenario. When am studying this scenario am getting a doubt that when creating the screen with transaction se80 and develop the screen in a particular function group. Normally function group is used for functional modules to store in a same group so that they can share global data. What the purpose of function group while creating the screen in a particular function group.
Hope my problem will be clear.
Points will be awarded.
Regards
Ravi
04-11-2007 10:26 AM
hi Ravi,
I understand that your concern is specefic to Screen Exit scenario.
A screen exit is always bound with a function module exit; if we are creating
additional fields in a standard screen, there should be corresponding abap code
attached to this, to display/edit/validate these field data.
hence, screen exits as such will be part of a function group, which will have
atleast a fuction module in it.
Hope this helps,
Sajan Joseph.
04-11-2007 10:20 AM
Hi,
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
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.
Thanks,
Sankar M
04-11-2007 10:26 AM
hi Ravi,
I understand that your concern is specefic to Screen Exit scenario.
A screen exit is always bound with a function module exit; if we are creating
additional fields in a standard screen, there should be corresponding abap code
attached to this, to display/edit/validate these field data.
hence, screen exits as such will be part of a function group, which will have
atleast a fuction module in it.
Hope this helps,
Sajan Joseph.
04-11-2007 10:34 AM
Hi Joseph,
Thanks for your response. So before we are creating the subscreen we have to know the function exit for that screen exit and we must create subscreen in that function group. The function group name will be provided by the documentation in function exit which we can see this through SMOD.
Please give me the reply whether my expecting is correct or wrong.
Thanks,
Ravi
04-11-2007 10:41 AM
yes Ravi..you are almost in the right direction.
when we go to SMOD transaction, and enter the user exit, choose the radio button
COMPONENTS; you will see the list of exits..screens exit and function module
exit pertaining to the user exit.
select the screen exit..it will take you to screen painter with the subscreen open;
you just need to add the fields in that subscreen
now come back and select the function module exit, an include will be available
where you can enter the corresponding ABAP code...
Hope this information helps,
Sajan Joseph.
04-11-2007 11:46 AM
Hi Joseph
Thanks for your valuable suggestions. And sorry for delay to award points.
Thanks
Ravi