PSWATCHSRV - Monitoring a Domain
Monitoring a Domain
To detect any orphaned application server processes, a server process, PSWATCHSRV, monitors the application server domain. Every two minutes, PSWATCHSRV identifies and stops any hung or orphaned server processes. If any hung or orphaned processes are found, it writes a message to the application server log file.
The PSWATCHSRV process is the first process to start when you boot up the domain and the last one to stop when you shut down the domain.
Use Dynamic SQL for Prompts - SqlText
Normally you can not use dynamically generated SQL at runtime as your prompt record. You can use %EDITTABLE to specify the prompt table you want to use, but it has to be predefined. There is this little known property SqlText for Field Class, which allows you to do exactly that.
Here is the description and sample code taken from people books.
This property is valid only for fields that have a dynamic view as their prompt record. If you set SqlText to a non-null value, that text is used instead of the dynamic view's normal text used for prompting.
Suppose you wanted to have a different prompt table depending on the settings of other fields in the row. Normally you could use %EDITTABLE to dynamically specify the prompt table you want. However in this case there are too many possible combinations of values, which would require too many views. Furthermore, the values are customizable by the end-user or the application, which means even if you, the developer, wanted to, you couldn't provide all the combinations of views necessary. However you can generate the desired SQL text for the view in PeopleCode based on what the user enters.
If you use a dynamic view as the prompt table, and have the dynamic view contain a SQL object that is updated from PeopleCode, you could achieve this functionality. However, a SQL object is a shared object, so if multiple users used the same page, they overwrite each other's settings and the SQL object contains the SQL for the most recent user. Similarly if a single user had multiple rows on a page, the SQL object is valid only for the most recent row. This means if the user went to another row and did a prompt, they would get the wrong values again.
The purpose of this property is to enable you to specify the generated SQL text independently for each occurrence in each transaction. It enables you to override the text of a dynamic view being used as a prompt table on a field by field basis.
It is up to the developer to verify that the text specified for this property is valid, that is, that it selects the correct number of fields for the record definition, and so on.
This property is read-write.
Local string &SQLSTRING;
Function set_jrnl_id_prompt();
&SQLSTRING = "SELECT DISTINCT JOURNAL_ID, BUSINESS_UNIT_IU, JOURNAL_DATE, LEDGER_GROUP, SOURCE, SYSTEM_SOURCE, PROC_PART_ID, JRNL_HDR_STATUS, DESCR FROM PS_JRNL_HEADER WHERE JRNL_HDR_STATUS IN ('N','E','V')"
If All(JRNL_EDIT_REQ.BUSINESS_UNIT) Then
&SQLSTRING = &SQLSTRING | " AND BUSINESS_UNIT_IU='" | JRNL_EDIT_REQ.BUSINESS_UNIT | "'"
End-If;
If All(JRNL_EDIT_REQ.LEDGER_GROUP) Then
&SQLSTRING = &SQLSTRING | " AND LEDGER_GROUP='" | JRNL_EDIT_REQ.LEDGER_GROUP | "'"
End-If;
If All(JRNL_EDIT_REQ.SOURCE) Then
&SQLSTRING = &SQLSTRING | " AND SOURCE='" | JRNL_EDIT_REQ.SOURCE | "'"
End-If;
If All(JRNL_EDIT_REQ.SYSTEM_SOURCE) Then
&SQLSTRING = &SQLSTRING | " AND SYSTEM_SOURCE='" | JRNL_EDIT_REQ.SYSTEM_SOURCE | "'"
End-If;
If All(JRNL_EDIT_REQ.PROC_PART_ID) Then
&SQLSTRING = &SQLSTRING | " AND PROC_PART_ID='" | JRNL_EDIT_REQ.PROC_PART_ID | "'"
End-If;
GetRecord().GetField(Field.JOURNAL_ID_FROM).SqlText = &SQLSTRING;
GetRecord().GetField(Field.JOURNAL_ID_TO).SqlText = &SQLSTRING;
End-Function;
- Ganesh A.M
Built in functions used to control translate values dynamically.
Built in functions used to control translate values dynamically.
We can control the Translate values in peoplecode using the function AddDropDownItem.
Syntax :
AddDropDownItem(CodeString, DescriptionString)
Description
The AddDropDownItem method adds an item to the dropdown list in the control for the field. The first time this method is called, it overrides the prompt table or translate table used to populate the list. Those items no longer appear in the list. Only the items added using this method display.
Subsequent calls to this method adds additional items to the dropdown list. The items added with the first call to the method also display.
If there is an existing value and the dropdown list is changed with these functions, the selection shows as (Invalid value) unless the new list contains an entry with the same code as the existing value.
Considerations Using AddDropDownItem
If the data for the dropdown is language sensitive, the values for the dropdown should come from the message catalog or from a database field that has a related language record, and should not be hard-coded.
A good place for your Peoplecode program to populate a dropdown list is in the RowInit event. This event executes before the page is shown for the first time, so it prevents unnecessary SQL.
Parameters
CodeString
Specify the value used to set the field value if this item is selected.
Codes longer than the size of the field are truncated.
DescriptionString
Specify the value the end-user sees in the dropdown list.
Returns
None.
Example
Using a hard coded list is not appropriate for this function because translations do not work.
The data must come from the Translate Table (or other record) directly so that the data is translated correctly.
Local Rowset &Xlat;
&FLD = GetRecord(Record.JOB).GetField(Field.ACTION);
&FLD.ClearDropDownList();
Evaluate %Component
When Component.JOB_DATA_CONCUR
&Xlat = CreateRowset(Record.PSXLATITEM);
&Xlat.Fill("WHERE FILL.FIELDNAME = 'ACTION' AND Fill.FIELDVALUE in ('ADL','HIR') and EFFDT = (select max(EFFDT) from PSXLATITEM
B where B.FIELDNAME = 'ACTION' and B.FIELDVALUE in ('ADL','HIR') and EFFDT <= JOB.EFFDT)");
&Xlat_cnt = &Xlat.ActiveRowCount;
For &I = 1 To &Xlat_cnt
&CodeIn = &Xlat.GetRow(&I).GetRecord(1).FIELDVALUE.Value;
&DescIn = &Xlat.GetRow(&I).GetRecord(1).XLATLONGNAME.Value;
&FLD.AddDropDownItem(&CodeIn, &DescIn);
End-For;
Break;
When-Other
End-Evaluate;
See Also
Field class: ClearDropDownList method.
-Ganesh A.M
PSADMIN - Executables and Configuration Files
Executables and Configuration Files
Executables:
- PSADMIN.EXE. This PeopleSoft executable resides in PS_HOME\appserv.
- UBBGEN.EXE. This PeopleSoft executable resides in PS_HOME\bin\server\winx86.
- TMLOADCF.EXE. This BEA executable resides in TUXDIR\bin.
- TMBOOT.EXE. This BEA executable resides in TUXDIR\bin.
- TMSHUTDOWN.EXE. This BEA executable resides in TUXDIR\bin.
The configuration/data files on which the executables rely all reside in the following directory PS_HOME\appserv\<domain_name>. Each domain has its own set of these files. Namely, these files are:
- PSAPPSRV.CFG. This is the catchall configuration file that contains the entire collection configuration values for a given application server domain.
- PSAPPSRV.UBX. This is the template or model file for PSAPPSRV.UBB.
- PSAPPSRV.UBB. This is the file that stores and passes all of the domain values to the Tuxedo load configuration program (tmloadcf.exe).
- PSAPPSRV.PSX. This file is the template or model file specifically for the messaging server configuration sections, such as PSBRKRSRV, PSSUBSRV, and so on.
- PSAPPSRV.ENV. This file contains environment information such as the PS_HOME and connectivity locations on the application server machine.
- PSAPPSRV.VAL. The VAL file contains valid values for selected parameters. This helps to prevent administrators from entering invalid values.
- PSTUXCFG. This file contains PeopleSoft and Tuxedo information regarding the location of executables, files, as well as command lines for server processes. This file is required to boot a domain.
psprcsrv.ubx - PS_ENVFILE - Process Scheduler Environment
PS_ENVFILE section in the *.UBX file. [psprcsrv.ubx]
This section is where we can setup the environment for the process scheduler, the process scheduler will pick up the values from this section to create the *.env file.
Note: Do not try to add the Path info directly to psprcsrv.env file as this may get re-created when you re-configure the process scheduler even without changing any values.
Issue we faced:
We had an issue where in the Unix sendmail command was not working when user ran SQR from the Process scheduler. However we were able to run the SQR successfully from the command line.
So I added the path "/usr/sbin/sendmail" to the PS_ENVFILE section and hence it worked without any issues.
RECORDS associated with a particular component
Query to find the RECORDS associated with a particular component:
select distinct recname from pspnlfield where pnlname in (select distinct pnlname from pspnlgroup where pnlgrpname ='Component_Name')
This might useful when we look for tunning a particular component for performance issues.
SAP - ABAP Basics
SAP R/3 - ABAP - BASICS
SAP originally developed the ABAP/4 (Advanced Business Application Programming) language for internal use. It is being constantly improved and modified to meet the needs of the business world. Today, ABAP/4 is the sole tool used by SAP to develop all of its applications. Now ABAP/4 is just called "ABAP", by SAP. The ABAP/4 Development Workbench (DW) contains all the tools needed to create and maintain ABAP programs. ABAP is a fourth generation language which supports structured programming. Some of its basic features include the following:
ABAP/4 contains- declarative elements for declaring data of various types
- operational elements for data manipulation
- control elements for controlling the program flow
- event elements for reacting external events
ABAP/4 supports several languages. Text elements (e.g. titles, headers, and other text) are stored separately from the program code. You can change translate and maintain these at any time without changing the program code.
ABAP/4 supports business data types and operations. You can perform calculations with special date and time fields.
ABAP/4 contains a subset of SQL called Open SQL which will enable the user to read and access database tables regardless of the database system (Oracle, DB/2, etc.).
ABAP/4 allows the user to define and process internal tables which exist only as long as the program is running. Internal tables make it easier to work with database tables.
ABAP/4 allows you to define and call subroutines. You can also call the subroutines of other programs. Parameters can be passed to and from subroutines in various ways.
ABAP/4 contains a special kind of subroutine known as a function module. You create and maintain function modules in a central library. They can be tested in a stand-alone mode independently of the calling program.
There are two main types of ABAP/4 programs
- Report ProgramsReport programs are used to analyze data from database tables. In reporting you use ABAP/4 Open SQL to read data from the R/3 database. A report consists of a selection screen, on which you define the data set you wish to display, and a list, which displays the data itself. Typically, reports merely read data from the database. However, it is also possible to make changes in the database using a report. Report programs are based on logical databases which are special ABAP/4 programs which provide access to all databases. List in SAP is called a report.- Dialog ProgramsDialog programs are organized as module pools which contain dialog modules. Each "dynpro" (a Dynamic program which consists of a screen and its flow logic) is based on exactly one ABAP/4 dialog program. In dialog programming you use the Screen Painter to create screens and program the sequence in which they appear. You write a ABAP program (ABAP/4 module pool) for your screens. Dialog program is a SAP transaction.Creating an ABAP Program
Creating a simple ABAP Program involves the following basic steps:
Naming the programSpecifying the program attributes
Writing the program code
Testing the program
The procedures described here apply to reports and short training programs. To create dialog programs (module pools for a new transaction, you can proceed in a different way than for a report program). There are two menu paths to create a new program.Tools -> ABAP/4 Workbench; Choose ABAP/4 Editor; Enter a name for the program you want to create in the program field; Choose Create; ABAP/4 Program attribute screen appears.Tools -> ABAP/4 Workbench; Choose Object Browser; Choose Program under Object List; Choose Program Objects under Single Object list; Enter the name of program and click Display. If the program does not already exist, you are asked whether you want to create it - yes
Some rules and conventions for naming a program
Use at least one, but not more than eight, charactersDo not use the following characters:
- period .
- comma ,
- space
- parentheses ( )
- single or double quotation marks ' "
- equal sign =
- asterisk *
- percentage % and underscore _
Report programs (for outputting data analyses in list format): Yaxxxxxx or Zaxxxxxx. Replace a with the classification letter of the application area (f for finance, s for sales, etc.). Replace x with any valid character. SAP report programs follow a similar naming convention: Raxxxxxx.
Any other ABAP/4 programs (training programs or programs for transactions); SAPMYxxx or SAPMZxxx. Replace x with any valid character. Standard SAP programs follow a similar naming convention: SAPMaxxx, where a represents an application area.
Program attributes
When you have assigned a name to the program and chosen Create on the ABAP/4 editor: the Program Attributes screen appears - To enter the program attributes:
Enter the title for the program in the field Title. Choose a title which describes the function of the program. The system automatically incorporates the title in the text elements. If you want to change the title later you can change it: Choose Text Elements or Attributes on the ABAP/4 Editor: Initial Screen, Choose Change.Complete the two mandatory fields Type and Application
- For a report program enter 1 and for module pool enter M in the Type. You can look at possible values in the list box.- Enter the classification letter for your application in the Application field i.e. F for financial accounting
If you are creating a report (type = 1) Choose, Enter. The system automatically inserts input fields for report specific attributes:
TypeApart from type 1 and type M, there is a type I for include programs. An include program is an independent program which contains program code, that can be used by different programs. In addition, include programs serve to modularize program source codes into logically related parts. Each of these parts is stored in a different include program. Include programs improve readability of source code and facilitate maintenance.
Development Class
The development class is important for transporting between systems. When performing a transport, you can combine workbench objects (different programs, tables, transactions, etc.) assigned to one development class together. If you are working in a team, you may have to assign your program to an existing development class or create a new one. Programs assigned to development calass $TMP are private objects and can not be transported to other systems. You can, however change the development class to which a program is assigned by choosing Program -> Reassign on the ABAP/4 Editor, Initial Screen.
Logical database from application (report programs only)
These attributes determine which logical database the report uses to retrieve data and to which application the logical database belongs. Database names within an application must be unique. However, the entire system may contain several databases with the same name. It is therefore important to specify an application. If your program reads data directly instead of using a logical database, you should specify an application as usual but leave the logical database field blank.
Selection Screen Version (report programs only)
If you do not specify a selection screen version, the system automatically creates a selection screen based on the logical database selection criteria. If you want to use your own selection screen, enter a number in this field. The number must be smaller than 1000.
Editor lock
If you set this attribute, other users cannot modify, rename, or delete your program. Only you can release the lock.
Fixed point arithmetic
If you set this attribute the system rounds type P fields according to the number of decimal places.
After entering the program attributes save the attributes by choosing Save. Maintain Object Catalog Entry window appears. Enter the development class $TMP or choose Local Object. Save the development class by choosing Save. You will be now in the Program Attributes Screen.
Leave the screen by choosing back. If you want to branch to the ABAP/4 editor directly,
choose Goto -> Source code.
Writing the Program
The ABAP/4 Editor: Edit Program screen appears. The editor can run in three different modes: "Command Mode", "PC Mode with line numbering", and "PC Mode without line numbering". You can switch between editor modes by choosing Settings -> Editor Mode. The system automatically enters the first ABAP/4 statement, e.g. REPORT <report name> or PROGRAM <program name>. For report name/ program name the system uses the name you entered on the ABAP/4 Editor: Initial Screen.
Enter the program code. Check the Syntax by choosing Check. The system then scans the program code for any syntax errors and incompatibilities. In an error, is detected, a message appears to report this and, if possible proposes a solution or correction. The cursor is placed in the appropriate position. Then save the code by choosing Save. The source text is stored in the program library. You can also change the source code of the program by Choosing Change from ABAP/4 editor. You can again check for syntax errors after making changes and then save the source code. If the development class is $TMP the changed version is saved immediately. If it is not $TMP you see a window where you can specify a correction number.
Testing the Program
Assigning Transaction Codes to Report Programs
ABAP/4 Program Syntax
Statements - must end with a period. First word should be a key word.PROGRAM SAPMTEST.WRITE 'FIRST PROGRAM'.
KeywordsDeclarative KeywordsDefine data types or declare the data objects which the program can access. Ex: TYPES, DATA, TABLES They are processed independently of their position in the program.Event KeywordsDefine processing blocks in a program. Processing blocks are groups of statements which are processed as soon as a particular event occurs. Ex: AT SELECTION SCREEN, START-OF-SELECTION, AT USER-COMMANDControl KeywordsControl the flow of a program according to certain conditions. Ex: IF, WHILE, CASEOperational KeywordsThe process the data (defined by declarative keywords) when certain events (triggered by event keywords) and conditions (defined by control keywords) occur. Ex: WRITE, MOVE, ADDCommentsComments are text elements which you can write between the statements of the ABAP program to explain the purpose to a reader. Comments are flagged by special characters which cause the system to ignore them. Comment should be used to document the program. Example:*********************************************** PROGRAM SAPMTZTST
* Created by Dr. Prattipati, 11/22/1998
* Last Change by Dr. Grambo 11/23/1998
* Purpose Demonstration
***********************************************
PROGRAM SAPMTZTST
***********************************************
* Declaration Part
***********************************************
DATA.....
All lines beginning with an asterisk (*) are comments and are ignored by the system.
Syntax Structure
An ABAP program is a sequence of different statements which have a particular structure. Comments can be inserted between statements. Sequences of separate, but similar, statements can be combined into chain statements. There are no format restrictions. Statements can be entered in free format. This means that you can indent statements, write several statements on one line, or extend one statement over several lines.Words within a statement must be separated with at least one space. You can insert comment lines anywhere in a program. If you want to entire line to be a comment enter an asterisk (*) at the beginning of the line. If you want part of a line to be a comment, enter a double quotation mark (") before the comment. Some examples of valid Syntax Structures:***********************************************REPORT SAPMZTST.TABLES SPFLT.
GET SPLFI.
WRITE SPFLI-CITYFROM.
WRITE SPFLI-CITYTO.
WRITE SPFLI-CITYTO UNDER SPFLI-CITYFROM.*************************************************PROGRAM SAPMZTST.
WRITE 'THIS IS A STATEMENT'.
Could also be written as
PROGRAM SAPMZTST. WRITE 'THIS IS A STATEMENT'.
**************************************************
Statement sequence
WRITE SPFLI-CITYFROM.
WRITE SPFLI-CITYTO.
WRITE SPFLI-AIRPTO.
Chain statement
WRITE: SPFLI-CITYFROM, SPFLI-CITYTO, SPFLI-AIRPTO.
You could also write these statements as
WRITE: SPFLI-CITIYFROM,
SPFLI-CITYTO,
SPFLI-AIRPTO.
**************************************************
Statement sequence;
SUM = SUM + 1.
SUM = SUM +2.
SUM = SUM + 3.
SUM = SUM + 4.
Can be written as a chain statement
SUM = SUM +:1,2,3,4.
****************************************************
Concepts of Data Types & Objects
elementary (non-structured) or structuredPre-defined or user-defined
Elementary Data Types - Pre-definedC -- Text, character (alpha numeric characters default size = 1)D -- Date format (yyyymmdd)
F -- Floating point number - accuracy range upto 15 decimals
I -- Integer (whole numbers - fractions are rounded not truncated)
N -- Numeric text (Telephone numbers, IDs, Account numbers, etc.)
P -- Packed Number - allows digits after the decimal point - "Fixed Point arithmetic" - rounds to the nearest decimal point specified. Used for such values as distances, weights, amounts of money, etc.
T -- Time format (HHMMSS)
X -- Hexadecimal
Numeric pre-defined data types: I,P, and F
Elementary Data Types - User definedUser defined elementary data types are based on pre-defined elementary data types. To define your own elementary data types, you use the TYPES statement. Examples are given later.Structured data types
In general, structured data types in ABAP programs are user defined. There are two kinds of structured data types:
Field Strings: A consecutive collection of other data types. A data object with a field string data type occupies a continuous area in the memory. The components of the field strings can themselves field strings or internal tables. The field strings are defined with TYPES statement or with the DATA statementInternal tables: An internal table consists of several lines of the same type. Unlike field strings, which extend only horizontally, internal tables also extend vertically. You define internal tables with OCCURS parameter of the TYPES or DATA statements.
Data Objects
In ABAP/4 you can work with several kinds of data objects, such as:Internal data objects: They are created for use in one particular program. They have no validity outside this program. Internal data objects are literals (text literals, and number literals), variables and constants. Text literals are sequences of alphanumeric characters enclosed in single quotation marks ex: 'Antony Smith'. Example of number literals: '-8473.67'.Variables: A variable is used to store and reference data under a certain name and in a certain format. Variables can differ in name, type, length, and structure. You declare variables in your program with the DATA statement.
Constants: A constant is a data object containing a value which you fix at initialization. Their values can not be changed during the execution of the program. You declare constants with the CONSTANTS statement. Use constants if you need specific value frequently in your program. In this case do not use literals.
External Data Objects: External data objects exist independently of programs. You can not work with them directly, but you can copy them to internal data objects and write them back when you have finished. External data objects can be used globally throughout the system environment. External data objects are stored in tables defined in ABAP/4 dictionary. To access this data from within a program, you declare the tables in the program with the TABLES statement.
System Defined Data Objects: Some data objects are defined automatically by the system and do not need to be declared. System-defined data objects include: SPACE (constant of type C) and SYSTEM FIELDS. All system fields have names with the format SY-<name>. Some examples of system fields are: SY-SUBRC (return code value '0' if an operation is successful) SY-UNAME (log on name of the user), SY-DATUM (current date), SY-UZEIT (current time), SY-TCODE (current transaction), etc.
Special Data Objects: ABAP/4 also includes some data objects with special features - namely: PARAMETERS, and SELECTION CRITERIA.
Declaring Data - Examples
Pre-Defined Elementary Data Types and Objects
PROGRAM SAPMZTST.DATA TEXT1 (14) TYPE C.
DATA TEXT2 LIKE TEXT1.
DATA NUMBER TYPE I.
TEXT1 = 'The Number'.
NUMBER = 100.
TEXT2 = 'is an integer.'.
WRITE: TEXT1, NUMBER, TEXT2.
OUTPUT: The Number 100 is an integer.
In this example the data objects TEXT1, TEXT2, and NUMBER are declared with data statement. The data type of each is specified with the TYPE or the LIKE parameter of the DATA statement. The data types used here (C,I) are pre-defined in the system. The values are assigned to the data objects, contents of which are displayed.
**********************************************************************
User Defined-Elementary Data Types and Objects
PROGRAM SAPMZTST.TYPES MYTEXT (10) TYPE C.
TYPES MYAMOUNT TYPE P DECIMALS 2.
DATA TEXT TYPE MYTEXT.
DATA AMOUNT TYPE MYAMOUNT.
TEXT = '4 /3 = '.
AMOUNT = 4/3.
WRITE : TEXT, AMOUNT.
Output: 4 /3 = 1.33
Here user-defined data types MYTEXT and MYAMOUNT are defined with the TYPES statement with reference to elementary data types that are pre-defined in the system. Then the data objects TEXT and AMOUNT are declared with DATA statement. Their data types are determined to be MYTEXT, and MYAMOUNT.*******************************************************************
Example of field Strings (Structured)PROGRAM SAPMZTST.TYPES: BEGIN OF NAME,
TITLE (5) TYPE C,
FIRST_NAME (10) TYPE C,
LAST_NAME (10) TYPE C,
END OF NAME.
TYPES: BEGIN OF MYLIST,
CLIENT TYPE NAME,
NUMBER TYPE I,
END OF MYLIST.
DATA LIST TYPE MYLIST.
LIST-CLIENT-TITLE = 'Lord'.
LIST-CLIENT-FIRST_NAME = 'Howard'.
LIST-CLIENT-LAST_NAME = 'Mac Duff'.
LIST-NUMBER = 1.
WRITE LIST-CLIENT-TITLE.
WRITE LIST-CLIENT-FIRST_NAME.
WRITE LIST-CLIENT-LAST_NAME.
WRITE / 'Number'.
WRITE LIST-NUMBER.
Output: Lord Howard Mac Duff
Number 1
In this example, the structured data types NAME and MYLIST are defined with the TYPES statement. The field string, NAME contains three components, TITLE, FIRST_NAME, and LAST_NAME, which have pre-defined elementary data type C. The field string MYLIST contains two components, namely CLIENT and NUMBER, CLIENT it self is already structured because it is given data type NAME. A structured data object LIST is declared with data type MYLIST. Values are assigned to the components and their contents are then displayed.
******************************************************************
Example of Internal TablesPROGRAM SAPMZTST.TYPES: BEGIN OF MYSTRING,
NUMBER TYPE I,
NAME TYPE C,
END OF MYSTRING.
TYPES MYTAB TYPE MYSTRING OCCURS 5.
DATA STRING TYPE MYSTRING.
DATA ITAB TYPE MYTAB.
STRING-NUMBER = 1. STRING-NAME = 'John'.
APPEND STRING TO ITAB.
STRING-NUMBER = 2. STRING-NAME = 'Paul'.
APPEND STRING TO ITAB.
STRING-NUMBER = 3. STRING-NAME = 'Ringo'.
APPEND STRING TO ITAB.
STRING-NUMBER = 4. STRING-NAME = 'George'.
APPEND STRING TO ITAB.
LOOP AT ITAB INTO STRING.
WRITE: / STRING-NUMBER, STRING-NAME.
ENDLOOP.
Output
1 John
2 Paul
3 Ringo
4 George
First a data type MYSTRING is defined as a field string. Then, based on field string MYSTRING, a data type MYTAB is defined as an internal table with the OCCURS parameter of the TYPES statement. The data objects STRING and ITAB are declared with data types MYSTRING and MYTAB. The fields of the internal table ITAB are then filled line by line. By using the field string STRING, the contents of ITAB are displayed on the screen.
__________________________________________________________________________________________________________________________
Compilation - Arun KK
Peoplesoft Interview Questions - PeopleTools
Peoplesoft Interview questions - SQR
- What are the sections and paragraphs available?
- Begin-setup End-setup.
- Begin-program End-program.
- Begin-procedure End-procedure.
- Begin-heading End-heading.
- Begin-footing End-footing
- Can you Call a SQR from another SQR? How?
- Briefly explain Most commonly used SQC’s in SQR programs?
- What are the commands used in filehandling of sqr?
- What are On-break parameters?
- How can you Debug SQR programs?
- What is the difference between sqr and sqc?
- What are different types of variables in sqr?