************************************************************************
* Yet another logon screen modification solution.
* This one is similar to program #90 (same setup steps) but:
* - it runs during logon but also can be run any time from SAP from the
* help menu
* - it displays a list type window with active elements. By clicking
* on those elements the user can start a report, an SAP transaction
* or a web browser displaying a particular web page.
* - the format (color, element type, intensified, program to run ...)
* for the dynamic logon screen for the different SAP systems is
* configured in a single config file residing on a filesystem shared
* between all SAP the systems.
*This is an example config file:
*
* SID|XX|YY|T|#|#|#|#|#|Text|URL
* | | | | | | | | | | |
* | | | | | | | | | | Url, Transaction or Program/type U,T or P
* | | | | | | | | | Text to be displayed
* | | | | | | | | 1/0 Input on/off
* | | | | | | | 1/0 Hotspot on/off
* | | | | | | 1/0 Inverse on/off
* | | | | | 1/0 Intensified on/off
* | | | | 0-7 Color
* | | | R:Regular, U:URL, T:Start transact., P:Start program
* | | Y coordinate (<20)
* | X coordinate (<66)
* System
*
*SID|1|1|R|6|0|0|0|0| SID: SAP 3.1 Development|
*SID|2|3|R|2|1|0|0|0|This is the first line of the important message|
*SID|2|4|R|2|1|0|0|0|This is the second line of the important message|
*SID|2|5|R|2|1|0|0|0|This is the third line of the important message|
*SID|1|7|U|1|0|1|1|0|Click here for more info from the WEB|http://XXX
*SID|1|9|T|1|0|1|1|0|Click here to start transaction SICK|SICK
*SID|1|11|P|1|0|1|1|0|Click here to start program SHOWCOLO|SHOWCOLO
*SID|1|13|S|1|0|1|1|0|Send mail to the BASIS team|imre@kabai.com
*SID|1|18|R|2|0|1|0|0|To display this window from SAP go to Help/webhelp
*
***********************************************************************
FUNCTION Z_POPUP_SYSTEM_INFO_LIST.
*"----------------------------------------------------------------------
*"*"Local interface:
*"----------------------------------------------------------------------
CALL SCREEN 333 STARTING AT 1 3
ENDING AT 65 16.
ENDFUNCTION.
*---------------------------------------------------------------------*
* MODULE STATUS_0333 OUTPUT *
*---------------------------------------------------------------------*
MODULE STATUS_0333 OUTPUT.
SET TITLEBAR '000'.
INCLUDE .
DATA: MESSAGE(20), L1(81), L2(81), L3(81), L4(81),
L5(81), L6(81), L7(81), L8(81), L9(81).
DATA: C.
DATA: L(200), A1(81), A2(81), A3(81), A4(81), A5(81), A6(81).
DATA: DESRCIPTION(6) VALUE 'Z| |',
SYSTEM_MESSAGE(6) VALUE 'M| |'.
DATA: BEGIN OF A.
INCLUDE STRUCTURE RFCSI.
DATA: END OF A.
DATA: BEGIN OF LINE_TBL OCCURS 100.
INCLUDE STRUCTURE SPFLIST.
DATA: END OF LINE_TBL.
* Run only on my pc (good for the testing)
* CALL FUNCTION 'RFC_SYSTEM_INFO' DESTINATION 'SAPGUI'
* IMPORTING RFCSI_EXPORT = A.
* IF A NS 'IMRE'.
* EXIT.
* ENDIF.
* Create the SID specific search patterns
DESRCIPTION+2(3) = SY-SYSID.
SYSTEM_MESSAGE+2(3) = SY-SYSID.
* Trick to avoid OPEN DATASET (no user->no authorization->open fails)
CALL FUNCTION 'RZL_READ_FILE_LOCAL'
EXPORTING
DIRECTORY = '/globaldirectory'
NAME = 'login_screen_list.ctl'
TABLES
LINE_TBL = LINE_TBL
EXCEPTIONS
NOT_FOUND = 1.
* If the file is missing: do not display anything
IF SY-SUBRC = 1.
SET SCREEN 0. LEAVE SCREEN.
ENDIF.
* Get the text from the internal table
SUPPRESS DIALOG.
LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
NEW-PAGE NO-TITLE NO-HEADING.
DATA: SYS(3),X(2),Y(2),T, COL,INT,INV,HOT,INP,TXT(62),URL(60).
LOOP AT LINE_TBL.
IF LINE_TBL CS SY-SYSID.
SPLIT LINE_TBL AT '|' INTO SYS X Y T COL INT INV HOT INP TXT URL.
*
CASE COL.
WHEN '1'. FORMAT COLOR 1.
WHEN '2'. FORMAT COLOR 2.
WHEN '3'. FORMAT COLOR 3.
WHEN '4'. FORMAT COLOR 4.
WHEN '5'. FORMAT COLOR 5.
WHEN '6'. FORMAT COLOR 6.
WHEN '7'. FORMAT COLOR 7.
ENDCASE.
*
FORMAT INTENSIFIED OFF.
FORMAT INVERSE OFF.
FORMAT HOTSPOT OFF.
FORMAT INPUT OFF.
IF HOT = '1'. FORMAT HOTSPOT ON. ENDIF.
IF INT = '1'. FORMAT INTENSIFIED ON. ENDIF.
IF INV = '1'. FORMAT INVERSE ON. ENDIF.
IF INP = '1'. FORMAT INPUT ON. ENDIF.
*
SKIP TO LINE Y.
IF T = 'U'.
WRITE AT X(2) ICON_SYSTEM_HELP AS ICON.
X = X + 3.
WRITE AT X TXT. HIDE: T, URL.
ELSEIF T = 'T'.
WRITE AT X(2) ICON_EXECUTE_OBJECT AS ICON.
X = X + 3.
WRITE AT X TXT. HIDE: T, URL.
ELSEIF T = 'S'.
WRITE AT X(2) ICON_MAIL AS ICON.
X = X + 3.
WRITE AT X TXT. HIDE: T, URL.
ELSEIF T = 'P'.
WRITE AT X(2) ICON_EXECUTE_OBJECT AS ICON.
X = X + 3.
WRITE AT X TXT. HIDE: T, URL.
ELSE.
WRITE AT X TXT.
ENDIF.
*
ENDIF.
ENDLOOP.
CLEAR: SYS, X, Y, T, COL, INT, INV, HOT, INP, TXT, URL.
ENDMODULE.
*
AT LINE-SELECTION.
READ LINE SY-INDEX.
DATA: LOCATION(200).
IF T = 'U'.
CALL FUNCTION 'REGISTRY_GET'
EXPORTING
KEY = 'protocol\StdFileEditing\server'
SECTION = 'NetscapeMarkup'
IMPORTING
VALUE = LOCATION.
IF LOCATION IS INITIAL.
MESSAGE ID 00 TYPE 'I' NUMBER 208
WITH 'Can not locate Netscape in the registry'.
EXIT.
ENDIF.
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
PROGRAM = LOCATION
COMMANDLINE = URL
INFORM = ''
EXCEPTIONS
FRONTEND_ERROR = 1
NO_BATCH = 2
PROG_NOT_FOUND = 3
ILLEGAL_OPTION = 4.
IF SY-SUBRC <> 0.
MESSAGE ID 00 TYPE 'I' NUMBER 208
WITH 'Can not start Netscape on your pc'.
EXIT.
ENDIF.
ELSEIF T = 'T' AND NOT SY-UNAME IS INITIAL.
CALL TRANSACTION URL.
ELSEIF T = 'P' AND NOT SY-UNAME IS INITIAL.
SUBMIT (URL) AND RETURN.
ELSEIF T = 'S' AND NOT SY-UNAME IS INITIAL.
*
ENDIF.
*---------------------------------------------------------------------*
* MODULE USER_COMMAND_0333 INPUT *
*---------------------------------------------------------------------*
MODULE USER_COMMAND_0333 INPUT.
ENDMODULE.
*---------------------------------------------------------------------*
* MODULE STATUS_0222 OUTPUT *
*---------------------------------------------------------------------*
MODULE STATUS_0222 OUTPUT.
CALL FUNCTION 'Z_POPUP_SYSTEM_INFO_LIST'.
ENDMODULE.
Friday, October 15, 2010
ABAP Program for Yet another customized logon screen - this one with configurable active elements (URL ...)
Subscribe to:
Post Comments (Atom)
Automation Testing
- Manual and Automation testing Challenges
- What you need to know about BVT (Build Verification Testing)
- BVT types
- Learning basics of QTP automation tool and preparation of QTP interview questions
- QuickTest Pro - QTP Functional testing tool review
- Tips you should read before automating your testing work
- Choosing Automation tool for your organization
Blog Archive
-
▼
2010
(342)
-
▼
October
(127)
- free downloadABAP/4 OLE Automation Controller pdf ...
- sap abap program Sample XML Source Code For SAP
- sap abap XML file to word document through SAP
- abap program for How to determine the number of av...
- Handling favorites in ABAP Workbench
- ABAP/4 Programming Quickstart
- Number Range Object in sap
- PERFORMENCE TIPS IN ABAP
- ABAP Tips and Tricks
- ABAP Tips and Tricks
- What is the use of the POSITION and SIZE command i...
- How to find the Driver Program for the given SAPsc...
- How can I set the header and footer in the main wi...
- What the conditional statements used in SAP Scripts?
- What the conditional statements used in SAP Scripts?
- What is the difference between the SAP Script text...
- How can I change the page size of the layout?
- How can I apply shading for the BOXes in SAP Script?
- How can I format the date being displayed in the S...
- How can I format the time in the SAP Script?
- Frequently Used System Variables in SAPScript?
- What are the different types of windows in SAP Scr...
- How can I set the position of the leading sign to ...
- What are the various text formatting options in SA...
- How can I trigger new page in SAPScripts?
- How can I prevent page-break in the message that i...
- How can I copy SAPScripts from one client to another?
- How can I print logos in SAPScripts?
- How can I copy SAPScripts from one client to another?
- How can I Word Wrap the text being displayed in SA...
- How can I display barcodes in SAPScripts?
- I have created a script in language DE. Now I need...
- ABAP Tips and Tricks
- PERFORMENCE TIPS IN ABAP
- ABAP Tips and Tricks
- Number Range Object in sap
- Handling favorites in ABAP Workbench
- abap program for How to determine the number of av...
- ABAP/4 Programming Quickstart
- Some ABAP/4 Query header line variable
- ABAP Quick Viewer
- Creating The Query
- SAP ABAP Queries
- Creating Functional Areas Without a Logical Database
- Creating Functional Areas using a Logical Database
- Creating the ABAP Query
- Creating the User Group in SAP ABAP Queries
- Ranked List and Statistics in abap query
- Data Retrieval Using Program in abap query
- Authorizations in abap query
- What Is SAP Queries
- Authorizations in abap query
- SAP Query (BC-SRV-QUE)
- click on link
- HOW TO DEVELOPE ABAP QUERY
- ABAP/4 Query Hints and Tips IN Abap Query
- ABAP Program: Output of Date Format
- ABAP Programs : Using the events start-of-selectio...
- C program that uses the GUI automatization interfa...
- This ABAP rings the bell on any chosen pc, that ha...
- Method of displaying the hidden ABAPs of SAP - fro...
- abap program for Parallel processing: breaks a rep...
- Simple macro that prevents runnig more than one in...
- abap Program to download/upload table data dynamic...
- Create/Modify/Delete records in any table from CSV...
- Displaying Graphics using an ABAP Program
- ABAP Program: Output of Date Format
- Making a Java Editor in ABAP and compiling it
- Program to Hide ABAP's Source Code and Protects it
- Program to Hide ABAP's Source Code and Protects it
- Using Different Color in ABAP
- Protect part of ABAP code from modifying
- String Handling in ABAP - Removing Unwanted Char
- How to find out Total No of Pages of a Report Outp...
- Split String into two parts at delimiter in sap abap
- Macro to validate Date in abap sap
- How to get the field descriptions of a table?
- Dynamically increase/decrease the number of batch/...
- Have active URL-s in the list an ABAP report creates
- ABAP Program: show and hide windows by request
- Perl script to check the status of the SAP systems...
- abap program for Customized, dynamic login screen
- ABAP Program for refresh dynamically - once a seco...
- ABAP Program for Limit the parallel instances a pa...
- Hide and password-protect any ABAP's source - stil...
- Display the long raw fields of such SAP tables as ...
- ABAP Program for Yet another customized logon scre...
- The abap part, that retrieves the data from the SA...
- abap program for The remote script for 96a
- ABAP Program for This perl displays a self-refresh...
- abap program for Automatically save and circulate ...
- Tree display of the UNIX process table - a click o...
- ABAP Program for Continuously display the rejected...
- abap program for Display the true average response...
- COMMUNICATION INTERFACE IN ABAP COMPLETE
- COMMUNICATION INTERFACE 1
- COMMUNICATION INTERFACE 2
- COMMUNICATION INTERFACE 3
- COMMUNICATION INTERFACE 4
- COMMUNICATION INTERFACE 5
-
▼
October
(127)
No comments:
Post a Comment