REPORT ZURLS.
************************************************************************
* This program dynamically increases/decreases the number of
* dialog/batch workpocesses by 1,2,3 or 4. Before running the program
* two working test (non-productive) operation mode has to be created
* called flex1 and flex2.
* The program does not switch workprocesses, if the workprocess number
* gets too low (min. dia: 2, min. btc.: 1)
* The instance name is hardcoded in this program version!
************************************************************************
TABLES: TPFID.
PARAMETERS:
PLUS_4 RADIOBUTTON GROUP AAA,
PLUS_3 RADIOBUTTON GROUP AAA,
PLUS_2 RADIOBUTTON GROUP AAA,
PLUS_1 RADIOBUTTON GROUP AAA,
MINUS_1 RADIOBUTTON GROUP AAA,
MINUS_2 RADIOBUTTON GROUP AAA,
MINUS_3 RADIOBUTTON GROUP AAA,
MINUS_4 RADIOBUTTON GROUP AAA.
DATA: SWITCH_TO_OPMODE LIKE TPFID-BANAME,
RECENT_OPMODE LIKE TPFID-BANAME.
DATA: MIN_DIA TYPE I VALUE '2',
MIN_BTCH TYPE I VALUE '1',
RECENT_DIA TYPE I,
RECENT_BTCH TYPE I,
TARGET_DIA TYPE I,
TARGET_BTCH TYPE I.
DATA: BEGIN OF REQ_TBL OCCURS 20.
INCLUDE STRUCTURE STHCMLIST.
DATA: END OF REQ_TBL.
DATA: BEGIN OF RSP_TBL OCCURS 50.
INCLUDE STRUCTURE STHCMLIST.
DATA: END OF RSP_TBL.
DATA: SUBRC LIKE SY-SUBRC.
* Find out the active operation
CALL FUNCTION 'RZL_MAKE_STRG_READ_REQ'
EXPORTING
NAME = 'RZL_BANAME'
TYP = 'C'
TABLES
REQ_TBL = REQ_TBL.
CALL FUNCTION 'TH_SEND_ADM_MESS'
EXPORTING
LEVEL = 2
SERVER_NAME = 'instance_name' "e.g. hostname_SID_00
SERVER_TYPES = 0
WAIT_FOR_ANSWER = 1
TRACE = 1
IMPORTING
SUBRC = SUBRC
TABLES
IN_DATA = REQ_TBL
OUT_DATA = RSP_TBL
EXCEPTIONS
SEND_ERROR = 1
OTHERS = 2.
READ TABLE RSP_TBL INDEX 1.
RECENT_OPMODE = RSP_TBL-BUFFER+24.
* Determine the switch_to operation mode
IF RECENT_OPMODE = 'flex1'.
SWITCH_TO_OPMODE = 'flex2'.
ELSE.
SWITCH_TO_OPMODE = 'flex1'.
ENDIF.
* Determine the current workprocess number.
SELECT * FROM TPFID WHERE BANAME = RECENT_OPMODE.
ENDSELECT.
RECENT_DIA = TPFID-WPNODIA.
RECENT_BTCH = TPFID-WPNOBTC.
* Is the switch is possible? (min. dia=2, min. batch=1)
IF PLUS_4 = 'X'. TARGET_DIA = RECENT_DIA + 4. ENDIF.
IF PLUS_3 = 'X'. TARGET_DIA = RECENT_DIA + 3. ENDIF.
IF PLUS_2 = 'X'. TARGET_DIA = RECENT_DIA + 2. ENDIF.
IF PLUS_1 = 'X'. TARGET_DIA = RECENT_DIA + 1. ENDIF.
IF MINUS_1 = 'X'. TARGET_DIA = RECENT_DIA - 1. ENDIF.
IF MINUS_2 = 'X'. TARGET_DIA = RECENT_DIA - 2. ENDIF.
IF MINUS_3 = 'X'. TARGET_DIA = RECENT_DIA - 3. ENDIF.
IF MINUS_4 = 'X'. TARGET_DIA = RECENT_DIA - 4. ENDIF.
TARGET_BTCH = RECENT_DIA + RECENT_BTCH - TARGET_DIA.
IF TARGET_DIA < MIN_DIA.
WRITE: 'ERROR: less then ',MIN_DIA, 'dialog process is not permitted'.
EXIT.
ENDIF.
IF TARGET_BTCH < MIN_BTCH.
WRITE: 'ERROR: less then ',MIN_BTCH, 'batch process is not permitted'.
EXIT.
ENDIF.
* Modify the instance definition
SELECT * FROM TPFID WHERE BANAME = SWITCH_TO_OPMODE.
ENDSELECT.
TPFID-WPNODIA = TARGET_DIA.
TPFID-WPNOBTC = TARGET_BTCH.
MODIFY TPFID.
COMMIT WORK.
* Carry out the actual switch
CALL FUNCTION 'RZL_SWITCH_TO_BA'
EXPORTING
BANAME = SWITCH_TO_OPMODE.
Friday, October 15, 2010
Dynamically increase/decrease the number of batch/dialog workprocesses from ABAP
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