Help on ABAP HR

Hi,
i learned ABAP HR can any body help me materials regardign this
any body having specifications regardsing ABAP HR it will be more helpfull to this id <b><REMOVED BY MODERATOR></b>
Message was edited by:
        Alvaro Tejada Galindo

Maybe this link can be helpfull
http://www.sapdevelopment.co.uk/hr/hr_infotypes2.htm
Have a look at http://www.sap-img.com/human/how-to-create-a-hr-infotype.htm, but have also a look at this thread
https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/thread.jspa%3FthreadID%3D9945%26messageID%3D63016
found this link probably can be helpful to someone
http://help.sap.com/saphelp_46b/helpdata/en/f7/2fe034ee251f34e10000009b38f83b/frameset.htm
http://sap.ittoolbox.com/groups/technical-functional/sap-hr/how-to-create-z-infotype-in-organizational-management-745603
How to create a HR infotype?
1) Go to Transaction PM01.
2) Enter the custom Infotype number which you want to create (Should be a 4 digit number, start with 9).
3) Select the ‘Employee Infotype’ radio button.
4) Select the ‘PS Structure Infotype’.
5) Click on Create… A separate table maintenance window appears…
6) Create a PS structure with all the fields you want on the Infotype
7) Save and Activate the PS structure
8) Go back to the initial screen of PM01.
9) Click on ‘All’ push button. It takes a few moments.
10) Click on ‘Technical Characteristics’. Infotype list screen appears
11) Click on ‘Change’(pencil) button
12) Select your Infotype and click on ‘Detail’ (magnifying glass) button
13) Give ‘T591A’ as subtype table
14) Give ‘T591S’ as subtype txt tab
15) Give your subtype field as subtype field
16) Save and come back to PM01 initial screen
17) Click on ‘Infotype Characteristics’ … Infotype list screen appears
18) Click on ‘Change’ (pencil) button
19) Click on ‘New Entries’
20) Enter your Infotype number and short text
21) Here we have to set different Infotype Characteristics as per the requirement. (Better open another session with some standard Infotype’s infotype characteristics screen and use as the reference to fill yours)
22) Save your entries.
23) Now the Infotype is created and ready to use.
24) If you want to change the layout of the Infotype as per your requirement…
25) In the PM01 initial screen…Select ‘Screen’ radio button and give 2000 as the screen name, then click on edit.
26) In the next screen.. Select ‘Layout Editor’ and click ‘Change’.
27) Screen default layout appears…here you can design/modify the screen..change the attributes of the fields..etc.
28) Save and activate. (Don’t forget to ‘Activate at every level)
InfoSets in the HR Application
You can use SAP Query in HR to report on HR data. Queries are maintained as described in Creating Queries. The special features of queries created for HR are described in Maintaining Queries in the Human Resources Application. The maintenance procedure for HR InfoSets differs from the described procedure inasmuch as HR data fields are grouped together in infotypes.
InfoSet management in SAP Query is also used for InfoSet Query. For further information, see Functions for Managing InfoSets.
If you want to create InfoSets for HR, you can use logical databases PNP, PAP, and PCH (see HR Logical Databases). The database you must use to create your InfoSet depends on the component in which the data you want to report on is stored.
The reports you can execute using InfoSets based on logical databases PNP or PCH are similar, but differ in that they can select different objects. The following table describes the connection between the logical database, and the infotypes you can include in an InfoSet. It also provides you with one or two examples of reports that you can execute using the appropriate InfoSets.
Logical database PNP PCH PAP
Selection of Persons Objects from Personnel Planning Applicants
Infotypes that can be included in the InfoSet Infotypes for
• Personnel Administration (0000-0999)
• Time Management (2000-2999)
• Payroll infotypes
• Infotypes for Personnel Planning objects that can be related to persons If the object type is specified:
• Infotypes for the object type
• Infotypes for objects that can be related to the specified object type
If the object type is not specified:
• All infotypes • Infotypes for Recruitment (4000-4999)
• Some infotypes for Personnel Administration (such as 0001 and 0002)
• Customer infotypes
Reporting examples • Selection of all persons who participated in a specific business event, output of prices for reserved business events
• Selection of all persons assigned to a specific personnel area, output of qualifications held by these persons • Selection of all business events held in London in March, output of all persons who participated in these business events
• Selection of all positions assigned to a specific organizational unit, output of all persons assigned to the positions • Selection of all applicants hired last year to work on special projects, output of addresses for the applicants selected
Creating InfoSets
The maintenance procedure for HR InfoSets differs from the procedure described so far in this section inasmuch as HR data fields are grouped together in infotypes. To set up an InfoSet for the HR application, proceed as follows:
1. On the initial screen for maintaining InfoSets, enter a name for the InfoSet and choose Create.
2. On the next screen, enter a name for the InfoSet and select one of the HR logical databases in accordance with your reporting requirements.
Customer infotypes can be created on all HR logical databases. In each individual case, therefore, you must decide which database to select so that you can report on customer infotypes.
This screen enables you to enter an authorization group. All of the queries that are subsequently created using this InfoSet can only be executed by persons who have this authorization group.
3. Choose .
This takes you to the Infotype Selection for InfoSet .
The logical HR database uses the table APPLICANT. You must declare it in the TABLES statement.
At the GET APPLICANT event, the APPLICANT structure contains the data for an applicant number chosen on the basis of selection screen entries.
The APPLICANT-APLNO field contains the applicant number which is selected for processing.
Only the APPLICANT-APLNO field should be read from the work area of the APPLICANT table. The other fields are intended for internal use only.
2.7 Authorization Checks in Reporting (PA-APP)
Generally, authorization checks in reporting do not differ from those in the transactions. Since data access in reporting is always of the read type, the system checks for a read authorization; the authorization group must be R or *.
In some situations, you may want to use a simplified authorization check when running reports. The object RPABAP is required for the check as well as the object RPORGIN; if these authorizations are available, a simpler and faster check is performed.
If the report cannot read certain applicant data due to lack of authorization, data for these persons is not processed at the GET APPLICANT time point. A note appears at the end of the list stating the number of applicants who were skipped due to lack of authorization.
2.8 Views
Introduction
When evaluating data, we distinguish between the logical and the physical view.
The physical view corresponds to the form in which the infotype data is stored in the HR tables. This data is stored in infotype records with a validity period.
In the logical view, the validity periods of individual fields are determined for several infotype records. For example, for an evaluation, the time period during which an employee worked at a particular job may be important, irrespective of whether a company code, personnel area or cost center change occurred during this time.
Data from several infotypes can also be provided for a specific partial period. When calculating partial payroll periods, it is especially important that data on basic pay, work schedule and cost distribution are provided for the relevant partial period.
These two types of logical views are implemented in the projection and join.
&#61607; Join
&#61607; Projection
&#61607; Join and Projection
&#61607; Time-Dependent Control Tables
&#61607; Generalization of the View
Join
A join processes records from two or more infotypes. The data from these infotypes is provided for a specific partial period.
&#61607; We would like to know in which time period an employee worked at which job and at which address he or she resided during this time.
The following address data is available:
January – June Hamburg
June – December Munich
The following work center data is available:
January – April Programmer
May – December Course instructor
If the address and work center data are provided for specific partial periods, the following cases result:
January – April Hamburg / programmer
May – June Hamburg / course instructor
July – December Munich / Course instructor
The ABAP syntax of this join is as follows:
PROVIDE * FROM Pomp
FROM Pnnnn
BETWEEN PN-BEGDA AND PN-ENDDA.
The partial periods for infotypes Pomp and Pnnnn as well as for all other infotypes of the join are defined in the fields BEGDA and ENDDA.
The data of each infotype in the join must be available during the entire validity period of the infotype. The time periods of infotype records may not overlap; therefore, the join may not contain infotypes with time constraint "three".
The time periods of records overlap if an infotype is read without any subtype restrictions. For example, the Address infotype has the subtypes Permanent residence, Temporary residence and Home address.
Time periods will ultimately overlap if all addresses are read. Therefore, you must always select a subtype for a join, and this subtype may not have the time constraint "three".
The program code for the above join for work center and address data is as follows:
REPORT RPABAP03.
TABLES: PERNR.
INFOTYPES: 0001, 0006.
GET PERNR.
PROVIDE * FROM P0001
FROM P0006 BETWEEN PN-BEGDA AND PN-ENDDA
WHERE P0006-SUBTY eq '1'.
WRITE: / PERNR-PERNR, P0001-STELL,
P0006-STRAS, P0006-BEGDA, P0006-ENDDA.
ENDPROVIDE.
Sometimes no data is available for a particular infotype in the selected partial period. Infotype validity periods may not overlap but gaps are permitted.
For example, gaps can occur when personal data is joined with address data:
Personal data
January 1960 - May 1998 Miller
May 1998 - December 1998 Smith
Address data:
January 1998 - December 1998 Hamburg
A join for personal and address data is presented as follows:
January 1960 - December 1997 Miller
January 1998 - April 1998 Miller / Hamburg
May 1998 - December 1998 Smith / Hamburg
Only personal data is available in the first partial period. Since the record does not provide the required information, the join's function of providing data from all associated infotypes has not been fulfilled.
The variables Pnnnn_VALID recognize that only incomplete data is available for a particular partial period.
This variable is formed when the report is run for each Pnnnn infotype included in a join.
If data exists in the partial period for the Pnnnn infotype, the variable Pnnnn_VALID is filled with X.
These variables are evaluated as follows:
REPORT RPDEMO03.
TABLES: PERNR.
INFOTYPES: 0002,
0006.
GET PERNR.
PROVIDE * FROM P0002
FROM P0006 BETWEEN PN-BEGDA AND PN-ENDDA
WHERE P0006-SUBTY = '1'.
IF P0006_VALID EQ 'X'.
WRITE: / PERNR-PERNR,
P0002-BEGDA DD/MM/YYYY,
P0002-ENDDA DD/MM/YYYY,
P0002-NACHN,
P0006-ORT01.
ENDIF.
ENDPROVIDE.
A list is generated only if address data is available. The first partial period, for which only personal data is available, is suppressed.
Projection
All data of an infotype is stored on the database with its period of validity.
When you change one or more fields of an infotype record, the system creates a new record with a new validity period. The date on which you changed the record is the start date of this new record.
Therefore, the data fields that are not affected by the changes contain the same data over several infotype records and validity periods.
From a logical perspective, these fields are valid in all infotype records until they are changed.
When seen from this logical perspective, each field of an infotype has its own validity period.
This is illustrated in the following case:
An employee has worked as a programmer for three years in three different personnel areas.
The following organizational assignment data is available:
January 1992 - December 1992: Programmer /personnel area 1
January 1993 - December 1993: Programmer /personnel area 2
January 1994 - December 1994: Programmer /personnel area 3
If you only require the time period during which an employee performs a specific job and not his or her personnel area for an evaluation, the following applies:
January 1996 - December 1998: Programmer
The physical view has three infotype records, the logical view one.
To create meaningful evaluations and avoid redundancies, create logical views for infotype records.
Select the infotype fields that are important for the evaluation and disregard the others.
In the above example, the data in the other fields is invalid for the evaluation since it is unknown which personnel area the employee belonged to from 1996 - 1998.
This view of the validity period of a group of infotype fields is known as projection.
The program code for the projection is:
PROVIDE  FROM Pnnnn
BETWEEN PN-BEGDA AND PN-ENDDA .
The infotype data for a projection must be available throughout the entire validity period. If the time periods of certain infotype records overlap, the data cannot be clearly assigned to one period.
Therefore, you should not use projections for infotype records with time constraint ‘three’. The report for the above projection is:
REPORT RPABAP04.
TABLES: PERNR.
INFOTYPES: 0001.
GET PERNR.
PROVIDE STELL FROM P0001 BETWEEN PN-BEGDA AND PN-ENDDA.
WRITE: / PERNR-PERNR, P0001-STELL, P0001-BEGDA,
P0001-ENDDA.
ENDPROVIDE .
The logical validity for the activity period is included in the infotype BEGDA and ENDDA fields.
Join and Projection
You can combine the two logical views of infotype data, the join and the projection.
We read the data from several infotypes and create new partial periods. We select the infotype fields that are important for the evaluation and combine these partial periods again.
The following example illustrates this.
An employee works as a programmer in the current year and marries in May. Her name does not change.
Organizational assignment:
January - December Programmer
Personal data:
January - April Donna Debug - single
May - December Donna Debug - married
When the data from both infotypes is read concurrently, the result is:
January - April Donna Debug - single /
programmer
May - December Donna Debug - married /
programmer
Since we can disregard her marital status in the evaluation, we project on her first and last names:
January - December Donna Debug / programmer
The following report exemplifies the above case:
REPORT RPDEMO04.
TABLES: PERNR.
INFOTYPES: 0001,
0002.
GET PERNR.
PROVIDE STELL FROM P0001
NACHN VORNA FROM P0002
BETWEEN PN-BEGDA AND PN-ENDDA
IF P0001_VALID = 'X'.
WRITE: / P0002-NACHN, P0002-VORNA,
P0001-BEGDA DD/MM/YYYY,
P0001-ENDDA DD/MM/YYYY,
P0001-STELL.
ENDIF.
ENDPROVIDE.
This report combines the associated validity periods and provides the data of relevant infotype fields for a specific period.
&#61607; Fields which are not accessed have their initial value in the projection.
Provision of data for a specific partial period is especially important for partial period factoring in payroll.
If an employee's basic pay or the cost distribution changes during the payroll period, you must calculate the salary proportionately for the resulting partial periods.
However, if the payroll administrator of the organizational unit changes, this has no effect on payroll.
By linking a join and a projection, you can read the master data for a specific partial period.
Time-Dependent Control Tables
Infotype data is generally coded as a key (for example, infotype P0006, address type 1 = permanent residence) to allow fast data entry and space-saving storage. When you process infotypes, the texts or attributes of the keys are read from the relevant control tables.
In many control tables, storage of data is time-dependent and therefore assigned a validity period.
In HR, this applies to the following areas:
• Work schedules
• Pay scale structures
• Wage types
• Wage type valuation
• Bank data
• Positions
• Payee codes
When you read the data for an infotype key from time-dependent control tables, you must determine which record is valid in the specified validity period.
If you use a transaction to process an infotype, the system reads the table record which is valid on the start date.
Generalization of the View
You can use the logical view to edit and output data according to user specifications.
The special feature of HR views is the time dependency of the data. Personnel data is almost always related to specific validity periods. A HR view provides data for specific time intervals.
In general terms, a HR view is a logical perspective of interval-dependent internal tables.
See also:
Processing All Infotype Records (PA-PAD)
Processing All Infotype Records (PA-APP)
Processing a Specific Infotype Record (PA-PAD)
Processing a Specific Infotype Record (PA-APP)
3 Import/Export Files in HR
The following sections describe the purpose of files PCL1 and PCL2 and explains how to access them.
Files PCL1, PCL2, PCL3 and PCL4
Storing Data in PCLn Files
PCLn Buffer
Cluster Directory Manager
3.1 Files PCL1, PCL2, PCL3 and PCL4
Which information is stored in the files?
File PCL1 is the basis for the HR work area data. It contains information from the time data recording, for example, incentive wage time tickets or infotype supplement texts.
File PCL2 contains derived information, for example, payroll results. It also contains all generated payroll schemas.
File PCL3 contains applicant data.
File PCL4 contains the change documents for HR master data and recruitment.
The structure of PCLn files corresponds to that of the INDX file which you may be familiar with from other applications. The structure of all PCLn files (n = 1, 2, 3, and 4) is identical.
Structure of Files
Like in almost all SAP files, the key element with the highest priority is the client; data within a client is grouped according to basic relations (field PCLn-RELID).
The type of basic relation is known as a cluster and characterizes the stored data according to the type, for example, cluster RX contains the payroll result for country X (from table T500L) and cluster TE contains the trip costs data.
Depending on the cluster, the structure of PCLn-SRTFD is defined in a field string xx-KEY, which is defined in an include RPCnxxy0.
Naming conventions
n = 1, 2, 3, or 4 (for PCL1, PCL2, PCL3, or PCL4)
xx = for the cluster
y = 0 for international clusters
y = country grouping according to T500L for national clusters
The personnel number is usually the first component of xx-KEY.
Importing and Exporting Data
The import/export files PCLn are managed with the ABAP/4® commands IMPORT and EXPORT . These commands store objects such as fields, field strings, or internal tables on the database, or read these from the database. Data is read from and written to the database using a unique key( xx-Key).
Please note that the RMAC macros RP-IMP-Cn-xx and RP-EXP-Cn-xx are provided for importing and exporting data. Only these macros should be used.
See also Macro Modules
3.2 Storing Data in PCLn Files
Data from the different HR application areas is stored in data clusters in PCLn files (n = 1, 2, 3, or 4).
This collection of data objects can consist of:
• Fields used within reports
• Field strings
• Internal tables
The structure of the PCLn files provides a framework for the individual application areas.
Each application area must have a two-character cluster name (relation ID). It must also have a key structure; 40 bytes of the SRTFD field are available for this structure.
When a record is exported to the PCLn file, the cluster ID is written to the RELID field and the key value to the SRTFD field.
Naming convention for includes when defining clusters:
RPCnxxy0 n = 1, 2, 3 or 4 (for PCL1, PCL2, PCL3, PCL4)
xx = cluster ID
y = country indicator
Description of Cluster Data using Cluster RX as an Example
The data definition is stored in the include RPC2RX00 in accordance with the above naming conventions.
Structure of cluster key:
Data: BEGIN OF RX-KEY.
INCLUDE STRUCTURE PC200.
DATA: END OF RX-KEY.
The DDIC structure PC200 contains the fields PERNR (personnel number) and SEQNO (sequential number).
The data definition of the cluster also contains other internal tables.
For a list of available data clusters, refer to the domain description in the Data Dictionary.
xx Key
The xx key name is dependent on the cluster.
The RX KEY is used for all Rx and Xx clusters. In all other cases, the name of the xx key corresponds to that of the cluster.
Cluster xx Key
RA RX-KEY
B1 B1-KEY
G3 G3-KEY
XA RX-KEY
3.3 PCLn Buffer
To keep the number of database accesses to a minimum, import and export data is stored in the main memory buffer. Buffer management routines ensure that exported data can be stored in the PCLn files.
The following two examples illustrate which problems can occur without a buffer.
Retroactive accounting of payroll results
Starting payroll in the test mode
Retroactive Accounting of Payroll Results
In February 1998, a retroactive accounting run is executed for January.
FOR PERIOD 199801 IN PERIOD 199802
The payroll results for January are recalculated and then written directly to the database.
Result:
The database now contains the results of the following payroll periods.
FOR-PERIOD 199801 IN-PERIOD 199802
FOR-PERIOD 199801 IN-PERIOD 199801
Payroll is then run for February.
FOR-PERIOD 199802 IN-PERIOD 199802
If problems should arise during the payroll run for this period, the February record is not stored on the database.
Result:
The current January record on the database is:
FOR-PERIOD 199801 IN-PERIOD 199802
This problem does not arise if you use the buffer since all data of a transaction is always updated collectively. In the above example, the recalculated January result would be stored in the buffer and, if the payroll run for February were terminated prematurely, the database would not be updated.
The current January record on the database would thus be:
FOR-PERIOD 199801 IN-PERIOD 199802
Starting Payroll in the Test Mode
In a test run, the database is not updated. Since the payroll results from the previous period are used as the basis for calculating the results of the following period, the results of the actual payroll run would differ from those of the test run, if this test run were executed over several periods.
The use of the buffer enables trouble-free access to the required results for the previous period.
What is required for exporting/importing data to/from the PCLn files using the buffer?
&#61607; The following includes contain the data definition for the buffer. They must be included in the report that writes the data to or reads the data from the database.
RPPPXD00
RPPPXD10
&#61607; Include RPPPXD10 must be in the common part ‘BUFFER’ .
Include RPPPXM00, which contains the buffer management routines, is also required.
The macros for importing and exporting data must comply with the following naming convention:
Naming Convention for EXPORT/ IMPORT Macros:
RP-aaa-Cn-xy
where aaa = IMP / EXP, n=1 for PCL1, 2 for PCL2, 3 for PCL3, 4 or PCL4
and xy = cluster name.
This guarantees consistency between the export and import of data and also ensures that all exported objects are imported again.
Export Using the Data Buffer
When macros are used for exporting, records are written to a main memory buffer and not directly to the database. When the program run has been completed, the records in the buffer are stored in the appropriate PCLn database.
Import Using the Data Buffer
When the macros are used to import data, the data records are not read directly from file PCLn. Instead, the system checks the buffer directory to see whether the main memory already contains a record with the same key. If this is not the case, the record is read from PCLn to the buffer and then retrieved from the buffer for the report.
If the import is successful, the return code RP-IMP-xy-SUBRC = 0 is set. When data is read from the buffer, the system carries out a check for cluster authorization. Standard import programs follow the naming convention RPCLSTxy (xy = cluster name).
&#61607; report rpttcdmg.
tables:
pernr,
pcl1,
pcl2.
include rpppxd00. "buffer definitions
data: begin of common part 'BUFFER'.
include rpppxd10. "PCLx buffer
data: end of common part.
data: begin of common part 'CLUSTER_DIRECTORY'.
include rpc2cd00. " "cluster directory definitions
data: end of common part.
include rpc2rdd0.
get pernr.
rp-init-buffer. "reset buffer
cd-key-pernr = pernr-pernr.
rp-imp-c2-cd. "read cluster CD from
buffer/DB
perform cd_manager using ... .
alternative: call function rp_evaluation_periods...
rx-key-pernr = pernr-pernr.
rx-key-seqno = rgdir-seqnr.
rp-imp-c2-rd. "read cluster RD from
buffer/DB
rp-exp-c2-rd. "update cluster RD in buffer
perform prepare_update using 'V'. "update database (DB)
Subroutines CD manager and Cluster buffer
include rpcmgr00. "Cluster Directory Manager
include rpppxm00. "module pcl1(2)-buffer
3.4 Cluster Directory
Finding Payroll Results for a Specific Query
Payroll results are stored in cluster Rx of the PCL2.
The cluster key is non-mnemonic. It contains the PERNR (personnel number) and SEQNO (sequential number) fields.
The internal table RGDIR contains a directory entry for each payroll result. This entry is a sequential number (RGDIR-SEQNR) which uniquely identifies the payroll result.
Payroll results can only be imported if the payroll cluster key contains the personnel number and sequential number.
Before you can import a payroll record, you must select the entry in the RGDIR on the basis of existing data such as for-period, for-payroll area, for-payroll category, in-period, in-payroll area, in-payroll category, and so on, in order to determine the sequential number.
You will probably always have the same queries when importing payroll records. For example, "Which payroll results (original and retroactively accounted records) were written for a specific payroll run (defined by IN payroll category, IN payroll area, IN period)"?
There are standard modules that can be used. It is advantageous to use the standard modules rather than self-programmed solutions because no program modifications will be required if the payroll directory changes. The modules are described in the following section:
Function Modules for Selecting Payroll Results
3.5 Function Modules for Selecting Payroll Results
The employee’s payroll directory is always transferred to the function modules using the table RGDIR.
The modules then transfer the payroll records which satisfy the specified selection criteria using a table whose type corresponds to that of the RGDIR but which has a different name. The selection parameters differ according to the function of the module. For more information, read the module documentation.
All module names begin with ‘CD_’.
Function Module: CD_EVALUATION_PERIODS
Function Module: CD_READ_PREVIOUS
Function Module: CD_READ_PREVIOUS_ORIGINAL
Other Modules for the Payroll Cluster
Sample Report
Function Module: CD_EVALUATION_PERIODS
This module transfers the payroll results to a payroll run as ‘A’ records (current). It also transfers the accompanying ‘P’ records (previous).
This is the module most frequently used in evaluation programs.
Table contents before the function module is accessed:
SEQNR FPPER FPBEG FPEND INPER IPBEG IPEND BONDT PAYTY PAYID INPTY INPID
00001 01.1996 01.01.96 01.15.96 01.1996 01.01.96 01.15.96
00002 01.1996 01.01.96 01.15.96 01.16.96 01.16.96 B 0
00003 01.16.96 01.16.96 01.16.96 01.16.96 01.16.96 B 0 B 0
00004 01.17.96 01.17.96 01.17.96 01.17.96 01.17.96 A 0 A 0
00005 01.17.96 01.17.96 01.17.96 01.17.96 01.17.96 A 1 A 1
00006 02.1996 01.16.96 01.31.96 02.1996 01.16.96 01.31.96
00007 02.1996 01.16.96 01.31.96 03.1996 02.01.96 01.15.96
00008 03.1996 01.16.96 01.31.96 03.1996 01.01.96 02.15.96
The following parameters are transferred:
- BONUS_DATE = '00000000'
- INPER_MODIF = '02'
- INPER = '199803'
- PAYTY = ' '
- PAYID = ' '
Result:
SEQNR FPPER FPBEG FPEND INPER IPBEG IPEND BONDT PAYTY INPTY INPID SRTZA
00006 02.1996 01.16.96 01.31.96 02.1996 01.16.96 01.31.96 P
00007 02.1996 01.16.96 01.31.96 03.1996 02.01.96 02.15.96 A
00008 03.1996 01.16.96 01.31.96 03.1996 02.01.96 02.15.96 A
Explanation of individual fields
Function Module: CD_READ_PREVIOUS
This module transfers a previous payroll record for a payroll record; this is the newest record for the payroll period (or daily payroll run) which was written before the transferred payroll record and contains the same FOR data as the transferring record.
Table contents before the function module is accessed:
SEQNR FPPER FPBEG FPEND INPER IPBEG IPEND BONDT PAYTY PAYID
00001 01.1996 01.01.96 01.15.96 01.1996 01.01.96 01.15.96
00002 01.1996 01.01.96 01.15.96 01.16.96 01.16.96
00003 01.16.96 01.16.96 01.16.96 01.16.96 01.16.96 B 0
00004 01.17.96 01.17.96 01.17.96 01.17.96 01.17.96 A 0
00005 01.17.96 01.17.96 01.17.96 01.17.96 01.17.96 A 1
00006 02.1996 01.16.96 01.31.96 02.1996 01.16.96 01.31.96
00007 02.1996 01.16.96 01.31.96 03.1996 02.01.96 02.15.96
00008 03.1996 01.16.96 01.31.96 03.1996 02.01.96 02.15.96
The following parameters are transferred:
- Record with SEQNR '00007'
Result:
SEQNR FPPER FPBEG FPEND INPER IPBEG IPEND BONDT PAYTY SRTZA
00006 02.1996 01.16.96 01.31.96 02.1996 01.16.96 01.31.96 P
Explanation of individual fields
Function Module: CD_READ_PREVIOUS_ORIGINAL
This module reads the previous original payroll result.
Table contents before the function module is accessed:
SEQNR FPPER FPBEG FPEND INPER IPBEG IIPEND BONDT PAYTY PAYID
00001 01.1996 01.01.96 01.15.96 01.1996 01.01.96 01.15.96
00002 01.1996 01.01.96 01.15.96 01.16.96 01.16.96
00003 01.16.96 01.16.96 01.16.96 01.16.96 01.16.96 B 0
00004 01.17.96 01.17.96 01.17.96 01.17.96 01.17.96 A 0
00005 01.17.96 01.17.96 01.17.96 01.17.96 01.17.96 A 1
00006 02.1996 01.16.96 01.31.96 02.1996 01.16.96 01.31.96
00007 02.1996 01.16.96 01.31.96 03.1996 02.01.96 02.15.96
00008 03.1996 01.16.96 01.31.96 03.1996 02.01.96 02.15.96
The following parameters are transferred:
- Record with SEQNR '00008'
Result:
SEQNR FPPER FPBEG FPEND INPER IPBEG IPEND BONDT PAYTY SRTZA
00006 02.1996 01.16.96 01.31.96 02.1996 01.16.96 01.3196 P
Explanation of individual fields
3.6 Other Modules for the Payroll Cluster
Modules which derive information from the payroll cluster are available in addition to the modules for payroll result selection.
1. CD_RETROCALC_PERIOD
This module differentiates between original payroll records and retroactive accounting records.
Table contents before the function module is accessed:
SEQNR FPPER FPBEG FPEND INPER IPBEG IPEND BONDT PAYTY PAYID
00001 01.1996 01.01.96 01.15.96 01.1996 01.01.96 01.15.96
00002 01.1996 01.01.96 01.15.96 01.16.96 01.16.96
00003 01.16.96 01.16.96 01.16.96 01.16.96 01.16.96 B 0
00004 01.17.96 01.17.96 01.17.96 01.17.96 01.17.96 A 0
00005 01.17.96 01.17.96 01.17.96 01.17.96 01.17.96 A 1
00006 02.1996 01.16.96 01.31.96 02.1996 01.16.96 01.31.96
00007 02.1996 01.16.96 01.31.96 03.1996 02.01.96 02.15.96
00008 03.1996 01.16.96 01.31.96 03.1996 02.01.96 02.15.96
The following parameters are transferred:
- Record with SEQNR '00008'
Result:
- CALCD = ' '
Explanation of individual fields
2. CD_PAYROLL_UNTIL
This module reads the RGDIR for the date up to which the regular payroll run was executed for an employee.
3. CD_HIGHEST_PAYDT
This module reads the most recent check date for an employee from the RGDIR.
4. CD_GET_INFO
This module provides information (most recent check date, accounted to date) for a particular personnel number.
3.7 Explanation of Individual Fields
For-Information
The FPPER, FPBEG, FPEND, BONDT, PAYTY, PAYID, ABKRS, PERMO, PAYDT, JUPER fields contain information on the period for which payroll is run.
In-Information
The INPER, IPEND, INPTY, INPID, IABKRS, IPERM fields contain information on the period in which payroll is run.
SEQNR
The field is used as a key to uniquely identify the payroll record.
This field also defines the sequence of payroll results (history).
Control Indicator (SRTZA)
Control indicator Meaning
a Current
p Previous
o Old
&#61607; For more information, see the online documentation for the individual function modules.
3.8 Sample Report
REPORT RPTTMWBS.
DATA: RGDIR LIKE PC261 OCCURS 0 WITH HEADER LINE.
DATA: EVPDIR LIKE RGDIR OCCURS 0 WITH HEADER LINE.
DATA: PREVIOUS_RESULTS LIKE RGDIR OCCURS 0 WITH HEADER LINE.
DATA: CALCD TYPE C.
DATA: IN_ENTRY LIKE PC261.
DATA: OUT_ENTRY LIKE PC261.
INCLUDE RPCCCD09.
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
PERSNR = '00021218'
TABLES IN_RGDIR = RGDIR
EXCEPTIONS
NO_RECORD_FOUND = 1
OTHERS = 2.
Read RGDIR
CALL FUNCTION 'CD_EVALUATION_PERIODS'
EXPORTING
BONUS_DATE = '00000000'
INPER_MODIF = '02'
INPER = '199603'
PAY_TYPE = CD_C-REGULAR
PAY_IDENT = ' '
TABLES
RGDIR = RGDIR
EVPDIR = EVPDIR
IABKRS =
EXCEPTIONS
NO_RECORD_FOUND = 1
OTHERS = 2.
output:
00006
00007
00008
Read regular payroll results for January
A results (original result plus retroactive calculations)
and P results
LOOP AT EVPDIR WHERE SRTZA = CD_C-ACTUAL.
Only current results (00007 and 00008)
CALL FUNCTION 'CD_RETROCALC_PERIOD'
EXPORTING
ENTRY = EVPDIR
IMPORTING
CALCD = CALCD
EXCEPTIONS
OTHERS = 1.
Determine, whether original result
CHECK CALCD = ' '.
Special processing: Only the original period
March is processed (seqnr 00008).
IN_ENTRY = EVPDIR.
CALL FUNCTION 'CD_READ_PREVIOUS_ORIGINAL'
EXPORTING
IN_RECORD = IN_ENTRY
IMPORTING
OUT_RECORD = OUT_ENTRY
TABLES
RGDIR = RGDIR
EXCEPTIONS
OTHERS = 1.
out_entry now contains the previous results
Input 00008 ----> Output 00006
ENDLOOP.
LOOP AT EVPDIR WHERE SRTZA = CD_C-ACTUAL.
IN_ENTRY = EVPDIR.
CALL FUNCTION 'CD_READ_PREVIOUS'
EXPORTING
IN_RECORD = IN_ENTRY
TABLES
RGDIR = RGDIR
OUT_RGDIR = PREVIOUS_RESULTS
EXCEPTIONS
NO_RECORD_FOUND = 1
OTHERS = 2.
Input 00007 ---> 00006
Input 00008 ---> no record found
Output structure is a table, since there can be
several previous results: for example, if legal person
changes, and is retroactively deleted
ENDLOOP
4 Specific Commands
The following sections describe the different specific commands in HR.
Function modules in HR
Macro modules
4.1 Function Modules in HR
Function modules are program modules which have a defined interface and allow type testing of parameters.
They are managed with transaction SE37 and combined to function groups according to relevant criteria. You can access this transaction under Tools &#61614; ABAP Workbench &#61614; Function Builder.
The HR function groups use the naming convention RPxx or HRxx where xx is an identifier of your choice.
You can use the SHOW FUNCTION * editor command to branch from report processing to function module display.
4.2 Macro Modules
Definition
An module that can be called within an ABAP program.
Use
Like subprograms and function modules, macro modules are a means of presenting programs in modular form. Macro modules (macros) are used often in the Human Resources application component (HR).
Defining and Calling Modules
Two options are provided:
• Macros can be defined in reports or includes using the ABAP command DEFINE. A macro can be used within a report or within an include. If a macro is used in a report, and the macro is defined in an include with the DEFINE command, the include must be integrated.
&#61607; Macros have the following advantages:
If a macro is changed, each report using this macro is automatically regenerated when it is executed.
• Macros can also be defined as RMAC macros. The source code of these modules is stored in the function section of the control table TRMAC (Macros in ABAP Programs). The coding is grouped under a specific name in the table key.
According to conventions, the first two letters of the name must stand for the application. The rest of the name is freely definable.
&#61607; Customer-specific RMAC modules should begin with a special character.
The macros defined in the control table TRMAC can be used by all reports.
&#61607; When you change a RMAC macro in the table TRMAC, the reports that use this macro are not regenerated automatically. You must regenerate them manually.
The following section includes a list of programming utilities for the logical databases PNP and PAP.
5 Utilities in HR
The following utilities are available.
General Utilities
Report Meaning
RPUACG00 Code generation / authorization check
RPUAUD00 Infotype auditing
Programming Utilities
Report Meaning
RPINCL10 String search in reports
Cluster Utilities
Report Meaning
RPCLSTyy Display cluster for PCLx (yy = RELID)
RPUPxD00 Delete cluster for PCLx (individual data records)
RPUPxD10 Delete cluster for PCLx (several data records)
6 References:
Different parts of the document has been prepared with the help of articles available on Internet
Following websites are referred :
a). http://help.sap.com
b). http://sapfans.com
c). http://www.sap-basis-abap.com/saphr.htm
HR:
HR deals with the INFOTYPES which are similar to Tables in General ABAP.
There are different ways of fetching data from these infotypes.
There are different areas in HR LIKE Personal Admn, Orgn Management, Benefits, Time amangement, Event Management, Payroll etc
Infotypes for these areas are different from one another area.
storing of records data in each type of area is different
LDBS like PNP are used in HR programing.
Instead of Select.. we use some ROUTINES and PROVIDE..ENDPROVIDE.. etc
and in the case of Pay roll we use Clusters and we Import and Export them for data fetching.
On the whole Normal ABAP is different from HR abap.
For Personal Admn the Infotypes start with PA0000 to PA1999
Time Related Infotypes start with PA2000 to PA2999.
Orgn related Infotypes start with HRP1000 to HRP1999.
All custom developed infotypes stsrat with PA9000 onwards.
In payroll processing we use Clusters like PCL1,2,3 and 4.
Instead of Select query we use PROVIDE and ENDPROVIDE..
You have to assign a Logical Database in the attributes PNP.
Go through the SAp doc for HR programming and start doing.
http://www.sapdevelopment.co.uk/hr/hrhome.htm
See:
http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
sites regarding hr-abap:
http://www.sapdevelopment.co.uk/hr/hrhome.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
http://www.atomhr.com/training/Technical_Topics_in_HR.htm
http://www.planetsap.com/hr_abap_main_page.htm
You can see some Standard Program examples in this one ...
http://www.sapdevelopment.co.uk/programs/programshr.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification
http://www.erpgenie.com/faq/hr.htm.
http://www.planetsap.com/hr_abap_main_page.htm
http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
These are the FAQ's that might helps you as well.
http://www.sap-img.com/human/hr-faq.htm
http://www.sapgenie.com/faq/hr.htm
http://www.planetsap.com/hr_abap_main_page.htm
http://www.atomhr.com/library_full.htm
HR Long texts Upload
Look at the below link
sample code
START-OF-SELECTION.
GET pernr.
rp_provide_from_frst p0000 space pn-begda pn-endda.
if pnp-sw-found EQ '1'.
READ TABLE p0001 WITH KEY pernr = p0000-pernr.
if sy-subrc = 0.
write : p0001-plans. " earliest.
endif.
endif.
rp_provide_from_last p0014 space pn-begda pn-endda.
if pnp-sw-found EQ '1'.
READ TABLE p0014 WITH KEY pernr = p0000-pernr.
if sy-subrc = 0.
write : p0014-LGART. .
endif.
endif.
check out the following links
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_DATAEX.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CAARCHR/CAARCHR.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAXX/PAXX.pdf
general links..
http://www.sap-img.com/abap.htm
http://help.sap.com/saphelp_46c/helpdata/en/fc/eb2d67358411d1829f0000e829fbfe/content.htm
http://www.geocities.com/victorav15/sapr3/abap.html
http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
http://abap4.tripod.com/Other_Useful_Tips.html
http://help.sap.com/saphelp_45b/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
http://www.sap-basis-abap.com/sapmm.htm
http://sap.ittoolbox.com/nav/t.asp?t=303&p=448&h1=303&h2=322&h3=448
http://sapfans.com/
http://cma.zdnet.com/book/abap/ch03/ch03.htm
http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
http://sappoint.com/abap/
http://www.henrikfrank.dk/abapuk.html
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
http://www.sapgenie.com/abap/index.htm
http://www.sap-img.com/abap.htm
http://www.sapdevelopment.co.uk/tips/tipshome.htm
http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
http://sap.ittoolbox.com/nav/t.asp?t=322&p=322&h1=322
http://sap.ittoolbox.com/nav/t.asp?t=448&p=448&h1=448
http://www.thespot4sap.com/
http://www.kabai.com/abaps/q.htm
http://www.geocities.com/mpioud/Abap_programs.html
http://www.sapgenie.com/abap/tips_and_tricks.htm
http://www.sapassist.com/code/d.asp?whichpage=1&pagesize=10&i=10&a=c&o=&t=&q=&qt=
https://www.sdn.sap.com/irj/sdn/collaboration
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/HRINF/HRINF.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CAARCHR/CAARCHR.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAXX/PAXX.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_DATAEX.pdf

Similar Messages

  • Help on ABAP report

    Hi everyone,
          I am a newbie to ABAP. I have a requirement, wherein, I need to develop a program that takes another program name as a variant and calculate the time for execution for the program, given as variant. Please somebody help me with it. Thanks in advance.

    This does not make sense for background jobs, and for dialog processes there is a system parameter that limits the maximum allowed runtime, after which the process gets cancelled with a TIME_OUT short dump. This is usually set to 5 or 10 minutes.
    Who should see this pop-up anyway, and what should be the follow-on action after seeing it?
    Thomas
    P.S. in the future, please use more meaningful subject lines for your posts, as most people here need "help on ABAP report"

  • Help understanding ABAP Proxies

    Can someone point me to documentation to help understand ABAP proxies?  What they are, why I would use them and what are the considerations in using them over BAPI's or IDOCS?  I had a recent discussion with someone who is choosing to not use them because of security considerations.

    Hi Rick,
    For ABAP proxy documentation refer...
    http://help.sap.com/saphelp_nw04/helpdata/en/ab/585f3c482a7331e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/14/555f3c482a7331e10000000a114084/content.htm
    For considerations in using proxy over BAPI's or IDOCS Refer...
    /people/ravikumar.allampallam/blog/2005/08/14/choose-the-right-adapter-to-integrate-with-sap-systems
    Regards
    Anand

  • Is any HTML help for ABAP???

    Is any HTML help for ABAP??? Are any HTML help downloads there in anywhere?? if anyone knows let me know.

    Are you asking for help documentation on ABAP?  If so....
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
    Regards,
    RIch Heilman

  • Help in abap objects

    hallow
    i wont example in regular abap like select stetmet and how i do that in abap objects (the same code)and which benefit i have in using objects.
    Regards

    hi,
    check the below links lot of info and examples r there
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8

  • Urgent Help In ABAP

    Hi Gurus,
    Please i need an urgent help from you guys. There is a demand file which consits of (Siteno(plant), Item No ,Item Description, Delivery due date) will be placed in a unix system or windows system. I need to write an interface which shows a radiobutton for unix & windows and fileupload button & download button.When user clicks should be able to select only one radiobutton (unix or windows) to upload or download.When the user clicks the fileupload / download button,it should pick up the file or drop the file at particular unix or windows system.
    Please help me or give me sample code where in i can select the radiobutton and i can upload / download from unix or windows path. and during upload process (for both unix/windows) ,i should be able to persist into a custom table (ztable,if iam not wrong) and while downloading read the records from custome table and create an excel file to be placedon unix/windows based on the radio button.
    Thanks in advance, i need ur help please.
    Regards
    Bruno

    Hi Bruno,
    Please checkout this code sample
    ABAP code for uploading a TAB delimited file into an internal table.
    The code is base on uploading a simple txt file.
    <b>
    http://www.sapdevelopment.co.uk/file/file_uptabpc.htm</b>
    Thanks,
    Aby

  • To get f4 search help in Abap Web dynpro

    Hi web Dynpro Experts,
    i want to achieve XK03 Tcode payment mode search help functionality  in abap webdynpro,in clearly When i press f4 i payment mode input field a view should open with  different payment modes like
    a.ebanking payment method,
    b.ebanking treasury pay method,
    c.cheque ..etc..with check boxes when i select a and b methods types it should concatinate and shown as ab in payment methods field.
    I checked for this there is no predefined search helpin data element level(dzwels),and domain level,i hope it is provided by programming.
    if i want to achieve f4 search help through free programming?how to do that?
    how to re use the same screen design which is in XK03?
    please guide me to come out of this issue
    Thanks in advance
    Vijay
    Edited by: vijay kumar on Apr 17, 2010 10:17 AM

    hi friends my question is answere...thanks for ur support

  • Help on ABAP Function Module (Unit 1)

    Hello ABAP Experts,
    I need help with the below mentioned lesson plan. I donot have source code for The ABAP Function Module - BC401_GET_SEP_STRING. For the Source Code Solution in the Lesson Plan to work, I need the source code for the above mentioned function module.
    The Lesson Plan with Solution is posted below:
    Exercise 1 
    Unit: Data Types and Data Objects in Detail
    Topic: Defining Data Types and Data Objects
    Basic Statements
    Processing Character Strings
    At the conclusion of these exercises, you will be able to:
    u2022     Define structure types locally in the program
    u2022     Define elementary and complex data objects
    u2022     Split strings
    u2022     Use conversion rules
    u2022     Display the contents of data objects in lists
    In this exercise, you will use a template to create a program that receives a single data record from the database table SFLIGHT in form of a character string. The program will split the this character string into its components and display it formatted in a list.
    Because the focus of this exercise is not on the transfer of data as a character string, we will use a function module that will provide us with the required database. This will simulate actual cases, such as data transfer from an external system.
    Program: ZBC401_##_SPLIT_STRING
    Template: SAPBC401_DTOT_SPLIT_STRING
    Model solution: SAPBC401_DTOS_SPLIT_STRING
    is your two-digit group number
    1-1 Copy the program, SAPBC401_DTOT_SPLIT_STRING and give it the new name ZBC401_##_SPLIT_STRING.
    1-2 Familiarize yourself with the main body of the program. Pay special attention to the content of the data object datastring after the function module call. Use the Debugger to do this, and/or display the character string in a list. (The function module itself is here seen as a black box. For this exercise, it is not necessary to understand its construction.)
    1-3 To be able to split the character string into its components you must first remove the ## characters. Remove the two leading separators from the character string first. Then copy the initial part up to the closing separators to the auxiliary variable set_string. For this, set_string has to be defined appropriately.
    1-4 Now use the separators to split the contents of the auxiliary variable set_string into the structure wa_flight_c. The latter is typed with the local program structure type st_flight_c. You still have to comment out the components of this structure type and assign them an appropriate type.
    1-5 As a test, display the fields of the structure, wa_flight_c in a list.
    1-6 In the list displayed in exercise 1-5, you should have observed that some of the fields were displayed without formatting u2013 for example, the PRICE field. Your next step is to change this.
    To do this, convert the data you have extracted by copying it to data objects with suitable types. Also, not all components of wa_flight_c are to be displayed.
    For this purpose, a structure wa_flight has already been defined. It is typed with the structure type st_flight. You must comment out the components of st_flight and find appropriate types for these components for the formatting. Then copy the identically-named components of the character-type structure wa_flight_c to the fields of the structure wa_flight.
    Display the contents of the structure wa_flight in a list. Use the appropriate formatting options for the WRITE statement for the fldate and price components.
    Data Types and Data Objects in Detail Solution 1
    Unit: Data Types and Data Objects in Detail
    Topic: Defining Data Types and Data Objects
    Basic Statements
    Processing Character Strings
    REPORT sapbc401_dtos_split_string.
    TYPES:
    BEGIN OF st_flight_c,
    mandt(3) TYPE c,
    carrid(3) TYPE c,
    connid(4) TYPE n,
    fldate(8) TYPE n,
    price(20) TYPE c,
    currency(5) TYPE c,
    planetype(10) TYPE c,
    seatsmax(10) TYPE n,
    seatsocc(10) TYPE n,
    paymentsum(22) TYPE c,
    seatsmax_b(10) TYPE n,
    seatsocc_b(10) TYPE n,
    seatsmax_f(10) TYPE n,
    seatsocc_f(10) TYPE n,
    END OF st_flight_c,
    BEGIN OF st_flight,
    carrid(3) TYPE c,
    connid(4) TYPE n,
    fldate TYPE d,
    price(9) TYPE p DECIMALS 2,
    currency(5) TYPE c,
    planetype(10) TYPE c,
    seatsmax TYPE i,
    seatsocc TYPE i,
    END OF st_flight.
    DATA:
    datastring TYPE string,
    set_string TYPE string,
    wa_flight_c TYPE st_flight_c,
    wa_flight TYPE st_flight.
    START-OF-SELECTION.
    CALL FUNCTION 'BC401_GET_SEP_STRING'
    EXPORTING
    IM_NUMBER = '1'
    IM_TABLE_NAME = 'SFLIGHT'
    IM_SEPARATOR = '#'
    IM_UNIQUE = 'X'
    IMPORTING
    ex_string = datastring
    EXCEPTIONS
    no_data = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE a038(bc401).
    ENDIF.
    SHIFT datastring BY 2 PLACES.
    FIND '##' IN datastring.
    IF sy-subrc <> 0.
    MESSAGE a702(bc401).
    ENDIF.
    SPLIT datastring AT '##' INTO set_string datastring.
    SPLIT set_string AT '#' INTO
    wa_flight_c-mandt
    wa_flight_c-carrid
    wa_flight_c-connid
    wa_flight_c-fldate
    wa_flight_c-price
    wa_flight_c-currency
    wa_flight_c-planetype
    wa_flight_c-seatsmax
    wa_flight_c-seatsocc
    wa_flight_c-paymentsum
    wa_flight_c-seatsmax_b
    wa_flight_c-seatsocc_b
    wa_flight_c-seatsmax_f
    wa_flight_c-seatsocc_f.
    MOVE-CORRESPONDING wa_flight_c TO wa_flight.
    WRITE: /
    wa_flight-carrid,
    wa_flight-connid,
    wa_flight-fldate DD/MM/YYYY,
    wa_flight-price CURRENCY wa_flight-currency,
    wa_flight-currency,
    wa_flight-planetype,
    wa_flight-seatsmax,
    wa_flight-seatsocc.

    this FM is to get one element value from the XML
    if you want to convert the whole XML use FM SMUM_XML_PARSE
    Regards
    Raja
    Kindly close your previous threads and assing points.
    Re: Creation of SIMPLE TRANSFORMATIO(ST)for deserialisation of XML ->ABAP data.

  • Help in abap program

    hellow i have a table itab with value (ex. error value) and i wont to select some value from tables ( defined below.) and put it in table err_itab my problem is in the loop i dont now how to continued from their i thihk with append to intrernal tables and after to do read to err_itab, but im not sure this is my program any suggestion. thankes for your time and suggestion.
    form write_2_file .
    IF file_ser IS INITIAL.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    CODEPAGE = ' '
    filename = l_name
    FILETYPE = 'ASC'
    HEADLEN = ' '
    LINE_EXIT = ' '
    TRUNCLEN = ' '
    USER_FORM = ' '
    USER_PROG = ' '
    DAT_D_FORMAT = ' '
    IMPORTING
    FILELENGTH =
    TABLES
    data_tab = itab
    EXCEPTIONS
    conversion_error = 1
    file_open_error = 2
    file_read_error = 3
    invalid_type = 4
    no_batch = 5
    unknown_error = 6
    invalid_table_width = 7
    gui_refuse_filetransfer = 8
    customer_error = 9
    no_authority = 10
    OTHERS = 11
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ELSE.
    OPEN DATASET file_ser IN TEXT MODE
    ENCODING DEFAULT FOR INPUT.
    IF sy-subrc NE 0.
    MESSAGE e002(yhr) .
    ENDIF.
    DO.
    READ DATASET file_ser INTO wa_itab.
    IF sy-subrc NE 0.
    EXIT.
    ENDIF.
    APPEND wa_itab TO itab.
    ENDDO.
    ENDIF.
    endform. " write_2_file
    FORM get_data .
    CLEAR wa_itab.
    LOOP AT itab INTO wa_itab.
    IF wa_itab-action = 'y1'
    OR wa_itab-action = 'y2'
    OR wa_itab-action = 'y3'.
    SELECT SINGLE ansvh
    FROM t542a
    INTO wa_b_itab-ansvh
    WHERE molga ='IL'
    AND ansvh = wa_itab-contract.
    IF sy-subrc <> 0.
    APPEND wa_b_itab TO b_itab.
    SELECT SINGLE werks btrtl
    FROM t001p
    INTO (wa_c_itab-werks, wa_c_itab-btrtl)
    WHERE molga ='IL'
    AND werks = wa_itab-personnel_area
    AND btrtl = wa_itab-personnel_subarea.
    IF sy-subrc <> 0.
    APPEND wa_c_itab TO c_itab.
    SELECT SINGLE objid
    FROM hrp1000
    INTO wa_d_itab-objid
    WHERE otype = 'S'
    AND objid = wa_itab-plans
    AND begda <= currnt_date
    AND endda >= currnt_date.
    APPEND wa_d_itab TO d_itab.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDLOOP.

    <i>I have added authorization check in ABAP program(Progran level security).</i>
    i assume you have coded call authority within the program.
    <i>If an end user runs the transactionm, then which authorization check will fire first?</i>
    if he calls the transaction, then first authorization attached to the transaction will be checked.
    but if he executes the program attached to the transaction, then the authorization attached to the transaction dosent help here, the one coded in side the program is checked.
    <i>If I have web enabled my ABAP program via SICF (in other words, ITS).</i>
    it depends,
    if you are calling your transaction like
    webgui/?~transaction=<tcode> then first tcode level authorization.
    if you generate the templates for the program and callign the same, then i guess its progam level. (i need to check this)
    Regards
    Raja

  • Help in ABAP function module coding.

    Hi,
    i am having trouble coding the program where i have to select a number from the table and add one to it to create a new record back to the table.  example, i've select 1 from the table, i need the program to be able to return 2 and create a new record back into the table and the next time i generate the program, i will select 2 and create a 3 into the table. It needed to be a custom function module as i need to call it in another function module which would concatenate the generated number with some words..
    i'm very new to abap programing...so could anyone please provide a detailed on how i could code it...
    THANKS alot in advance!!!!

    Hi Lessy,
    i have done the same requirement where my sequence number will automatically get incremented by 1 as new record cames for update.as already discussed you have to cretae the numebr range and call the number range by function module 'Number_get_next'.
    PFB the code which will definitely help you.
    CALL FUNCTION 'NUMBER_GET_NEXT'
            EXPORTING
              NR_RANGE_NR                   = '01'  " specify this number this is
    *the same when you cretae numberrange  have specified.
              OBJECT                        = 'ZSEQNUM'    " This the number range
    *i have created
           IMPORTING
             NUMBER                         = wa_msg-seqnr
           EXCEPTIONS
             INTERVAL_NOT_FOUND            = 1
             NUMBER_RANGE_NOT_INTERN       = 2
             OBJECT_NOT_FOUND              = 3
             QUANTITY_IS_0                 = 4
             QUANTITY_IS_NOT_1             = 5
             INTERVAL_OVERFLOW             = 6
             BUFFER_OVERFLOW               = 7
             OTHERS                        = 8.
          modify lt_message FROM wa_msg TRANSPORTING seqnr.
    to cretete number range.
    goto transaction SNRO
    enter the name,short text, give the number length domain (char10 or what ever is your domain)
    click on number range and cretae interval.
    give the number , from number and to number.
    this number you have to give in FM also (i have given '01').
    hope this will help you.for any problem revert back
    thanks
    Tanmaya
    Code Formatted by: Alvaro Tejada Galindo on Jan 13, 2010 4:16 PM
    Edited by: Rob Burbank on Jan 13, 2010 5:20 PM

  • Help in ABAP+JAVA Homogeneous System copy

    Dear BASIS Gurus,
    We have SRM 4.0, Portal 6.0, BW 3.5 and XI 3.0 based on WAS 640, all with
    ABAP+JAVA stacks in HP-UX B.11/Oracle 9.2.x.
    We are planning Homogeneous System copies to refresh our Development
    environment.
    After reading the instguides, I'm a litle confused about the best
    strategy to use.
    Using SAPINST in the source System to export the Database, I have the
    dump files with Database data.
    Do I must run SAPINST again to get the JAVA data (both database and
    filesystem data)?
    In the target system do I must do two runs of SAPINST ? One for ABAP
    and other for JAVA?
    Yhanks in adavnce.
    Best regards.
    Arnaldo Calçada.

    Hi Arnaldo,
    There are basically two method of performing system copy.
    1. Using database tool (you can use backup/restore procedure)
    2. Using SAPINST tool (export/import)
    This is applicable for both ABAP and JAVA.
    Do I must run SAPINST again to get the JAVA data (both database and
    filesystem data)?
    It depends which method you are using.
    In the target system do I must do two runs of SAPINST ? One for ABAP
    and other for JAVA?
    Yes if you are using 2nd method.
    Hope this will help.
    -Pinkle

  • Help in ABAP code please!

    We have upgraded to ECC6.0 and I am trying to fix some syntax errors. Here is the piece of code with the problem:
    ====
    import i_key
               old_zsops to old_zzsops
               new_zsops to new_zzsops
               from database zsopshist(Z1)
               id i_key.
         import i_key
               old_zsops to old_prezsops
               new_zsops to new_prezsops
               from database zsopshist(Z1)
               id i_key.
    =====
    I am kind of new to ABAP and went throught the documentation but could someone please tell me what "old_zsops to old_zzsops" does?
    The code above is causing the dump with error "Error when attempting to IMPORT object "OLD_ZSOPS"". I went through the code and I found that old_zsops and new_zsops is not declared at all and it doesn't give any compilation errors! It goes to dump when I execute the problem. If it is required I would send the whole code but I see the following declarations in the code:
    data: old_prezsops like zsops_prev.     "PJCHG10854
    data: new_prezsops like zsops_prev.     "PJCHG10854
    data: old_zzsops like zsops.            "PJCHG10854
    data: new_zzsops like zsops.            "PJCHG10854
    data: long_rec(900) type c.             "PJCHG10854
    data: old_lzsops like long_rec.         "PJCHG10854
    data: new_lzsops like long_rec.         "PJCHG10854
    data: curr_zsops like zsops,
          prev_zsops like zsops_prev.
    Could someone please help me how to fix this problem? How do I declare "old_zsops and new_zsops" because they are used in 2 different import statements? All the answers will be rewarded.
    Thanks.
    Mithun

    Everything is in the same porgram. To avoid confusion I will send the whole code:
    ===
    REPORT ZCFICO6010
             line-count 65
             line-size 132
             no standard page heading.
    tables: zsopshist, zsops.
    *data: old_zsops like zsops,
         new_zsops like zsops.
    data: old_prezsops like zsops_prev.     "PJCHG10854
    data: new_prezsops like zsops_prev.     "PJCHG10854
    data: old_zzsops like zsops.            "PJCHG10854
    data: new_zzsops like zsops.            "PJCHG10854
    data: long_rec(900) type c.             "PJCHG10854
    data: old_lzsops like long_rec.         "PJCHG10854
    data: new_lzsops like long_rec.         "PJCHG10854
    data: curr_zsops like zsops,
          prev_zsops like zsops_prev.
    data: begin of i_key,
      kostl(5),
      aedat(8),
      cputm(6).
    data:   end of i_key.
    DATA: HEADER like zsops-oprcd,
          header1(92) type c.
        header1 like header.
    data: v_field(18) type c,
          v_old(20)  type c,
          v_new(20)  type c,
          user like zsops-uname,
          date like zsops-aedtm.
    data: begin of table occurs 0,
          text(20) type c,
          oprcd like zsops-oprcd,
          field(15) type c,
          user like zsops-uname,
          date like zsops-aedtm,
          v_old(20) ,
          v_new(20) ,
        end of table.
    data: text(30) type c.
    data: begin of itab occurs 0,
           srtfd like zsopshist-srtfd,
         end of itab.
    *data: ihist like old_zsops occurs 0 with header line,
         nhist like new_zsops occurs 0 with header line.
    data: ihist like zsops occurs 0 with header line,
          nhist like zsops occurs 0 with header line.
    *&      Selection Screen
    SELECTION-SCREEN BEGIN OF BLOCK one WITH FRAME TITLE TEXT-200.
    parameters: s_oprcd  like zsops-oprcd obligatory,
                s_oprcdh like zsops-oprcd .
                    s_cputm   for sy-uzeit.
    SELECTION-SCREEN END OF BLOCK one.
    SELECTION-SCREEN BEGIN OF BLOCK three WITH FRAME TITLE TEXT-300.
    parameters:s_aedtm  like zsops-aedtm obligatory,
    s_aedtmh like zsops-aedtm obligatory.
    SELECTION-SCREEN END OF BLOCK three.
    SELECTION-SCREEN BEGIN OF BLOCK TWO WITH FRAME TITLE TEXT-100.
    PARAMETERS: P_REGSRT RADIOBUTTON GROUP RADI,
                P_ACCSRT RADIOBUTTON GROUP RADI.
    SELECTION-SCREEN END OF BLOCK TWO.
    parameters: new_date like sy-datum obligatory default '20051214'.
    *&      Top-Of-Page
    top-of-page.
    BEGIN OF BLOCK INSERTED FOR                              "JJMM20040330
      DATA: CC_LOW LIKE ZSOPS-OPRCD,
            CC_HIGH LIKE ZSOPS-OPRCD,
            FROM_DATE(10) TYPE C,
            TO_DATE(10)   TYPE C.
      WRITE: S_OPRCD TO CC_LOW NO-ZERO,
             S_AEDTM TO FROM_DATE USING EDIT MASK '__/__/____',
             S_AEDTMH TO TO_DATE USING EDIT MASK '__/__/____'.
      IF S_OPRCDH = S_OPRCD.
        CONCATENATE: 'Cost Center'(T02) CC_LOW 'Changed On'(T04) FROM_DATE
                     'To'(T03) TO_DATE 'Sort By'(T05) text INTO HEADER1
                     separated by space.
      ELSE.
        WRITE: S_OPRCDH TO CC_HIGH NO-ZERO.
        CONCATENATE: 'Cost Center'(T02) CC_LOW 'To'(T03) CC_HIGH
                     'Changed On'(T04) FROM_DATE 'To'(T03) TO_DATE
                     'Sort By'(T05) text INTO HEADER1 separated by space.
      ENDIF.
    END OF BLOCK INSERTED FOR                                "JJMM20040330
      PERFORM DISPLAY_PAGE_HEADER(ZCLT0001) USING
                                          header1            "JJMM20040330
                                            HEADER
                                            TEXT-T01
                                            header1.           "JJMM20040330
    BEGIN OF BLOCK COMMENTED OUT FOR                         "JJMM20040330
    write:/5 'Cost Center'(T02), s_oprcd+5(5), 'To'(T03), s_oprcdh,
           40 'Changed On'(T04), s_aedtm, 'To'(T03), s_aedtmh,
           85 'Sort by'(T05), text.
    uline. skip.
    END OF BLOCK COMMENTED OUT FOR                           "JJMM20040330
      Write:/ 'Field Changed'(C01), 25 'Old Values'(C02),
               55 'New Values'(C03), 85 'Cost Center'(C04),
              105 'Changed By'(C05), 120 'Changed On'(C06).
      uline.
    start-of-selection.
      data: time(6),
            v_subrc like sy-subrc,
            prev_format(1),
            srtfd like zsopshist-srtfd,
            srtfdh like zsopshist-srtfd.
      srtfd0(5) = s_oprcd5(5).
      srtfd+5(8) = s_aedtm.
      srtfd+13(6) = '000000'.
       if s_oprcdh is initial.
         s_oprcdh = s_oprcd.
       endif.
      srtfdh0(5) = s_oprcdh5(5).
      srtfdh+5(8) = s_aedtmh.
      srtfdh+13(6) = '999999'.
      select srtfd from zsopshist into table itab
              WHERE  SRTFD >= SRTFD
              AND    SRTFD <= SRTFDH.
    sort itab by srtfd.
      loop at itab.
        IF ITAB+5(8) GE S_AEDTM  AND                            "IJHM00001
            ITAB+5(8) LE S_AEDTMH.                              "IJHM00001
          move: itab+0(5)          to i_key-kostl,
                itab+5(8)          to i_key-aedat,
                itab+13(6)         to i_key-cputm.
    /---  PJCHG10854 Begin commented/New code                     /
    /---  To change the import structure based on date the old    /
    /---  import was removed and following coded added.           /
          clear: v_subrc, prev_format.
          if itab+5(8) lt new_date.
            prev_format = 'X'.
            perform import_record_prev changing v_subrc.      "PJCHG10854
          else.
            perform import_record changing v_subrc.           "PJCHG10854
          endif.
         import i_key
              old_zsops
              new_zsops
              from database zsopshist(Z1)
              id i_key.
    /---   PJCHG10854 END commented/New code                /
          if v_subrc = 0.                                     "PJCHG10854
            perform get_final_table.
          endif.
        ENDIF.                                                  "IJHM00001
      endloop.
      if p_regsrt = 'X'.
        sort table by oprcd field date descending.
        text = 'Cost Center'(C04).
      else.
        sort table by field oprcd date descending.
        text = 'Field Changed'(C01).
      endif.
       perform write_report.
          FORM get_final_table                                          *
    form get_final_table.
    move old_zsops to ihist.           "PJCHG10854
    move new_zsops to nhist.           "PJCHG10854
      if prev_format eq 'X'.              "PJCHG10854
        move old_prezsops to ihist.       "PJCHG10854
        move new_prezsops to nhist.       "PJCHG10854
      else.                               "PJCHG10854
        move old_zzsops to ihist.         "PJCHG10854
        move new_zzsops to nhist.         "PJCHG10854
      endif.                              "PJCHG10854
      if ihist-ivcrg ne nhist-ivcrg.
       table-text = 'Invst Charge Base'(F01).
       table-field = 'IVCRG'.
        table-v_old   = ihist-ivcrg.
        table-v_new   = nhist-ivcrg.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
      if ihist-mgtfp ne nhist-mgtfp.
        table-field = 'MGTFP'.
        table-text = 'Mgt Fee %'(F02).
        table-v_old(12)   = ihist-mgtfp.
        table-v_new(12)   = nhist-mgtfp.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
      if ihist-discd ne nhist-discd.
        table-field = 'DISCD'.
        table-text = 'Cash Disc. Passback'(F03).
        table-v_old   = ihist-discd.
        table-v_new   = nhist-discd.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
      if ihist-consc ne nhist-consc.
        table-field = 'CONSC'.
        table-text = 'Subsidy Calc'(F04).
        table-v_old   = ihist-consc.
        table-v_new   = nhist-consc.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
      if ihist-payfart ne nhist-payfart.
        table-field = 'PAYFART'.
        table-text = 'Payroll Fringe'(F05).
        table-v_old(12)   = ihist-payfart.
        table-v_new(12)   = nhist-payfart.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
      if ihist-frbpb ne nhist-frbpb.
        table-field = 'FRBPB'.
        table-text = 'Rebate Pass Back'(F06).
        table-v_old(12)   = ihist-frbpb.
        table-v_new(12)   = nhist-frbpb.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
      if ihist-exlca ne nhist-exlca.
        table-field = 'EXLCA'.
        table-text = 'Excl Source27'(F07).
        table-v_old   = ihist-exlca.
        table-v_new   = nhist-exlca.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
      perform write_report.
        append table.
      endif.
      if ihist-exlcb ne nhist-exlcb.
        table-field = 'EXLCB'.
        table-text = 'Excl Source11'(F08).
        table-v_old   = ihist-exlcb.
        table-v_new   = nhist-exlcb.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
      perform write_report.
        append table.
      endif.
      if ihist-trnrate ne nhist-trnrate.
        table-field = 'TRNRATE'.
        table-text = 'Payroll Training'(F09).
        table-v_old(12)   = ihist-trnrate.
        table-v_new(12)   = nhist-trnrate.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
      if ihist-mgffa ne nhist-mgffa.
        table-field = 'MGFFA'.
        table-text = 'Mgt Fee Amt'(F10).
        table-v_old(12)   = ihist-mgffa.
        table-v_new(12)   = nhist-mgffa.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
      perform write_report.
        append table.
      endif.
      if ihist-mgtfi ne nhist-mgtfi.
        table-field = 'MGTFI'.
        table-text = 'Mgt Fees Indicator'(F11).
        table-v_old   = ihist-mgtfi.
        table-v_new   = nhist-mgtfi.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
      perform write_report.
        append table.
      endif.
      if ihist-eqres ne nhist-eqres.
        table-field = 'EQRES'.
        table-text = 'Eqip Res Accrual'(F12).
      table-v_old = ihist-eqres.                             "JJMM20040331
      table-v_new = nhist-eqres.                             "JJMM20040331
        table-v_old(12) = ihist-eqres.                         "JJMM20040331
        table-v_new(12) = nhist-eqres.                         "JJMM20040331
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
      if ihist-ovrhd ne nhist-ovrhd.
        table-field = 'OVRHD'.
        table-text = 'OverHead Amt'(F13).
        table-v_old(12)   = ihist-ovrhd.
        table-v_new(12)   = nhist-ovrhd.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
        if ihist-xaccural ne nhist-xaccural.
        table-field = 'XACCUARAL'.
        table-text = 'Exclude Accrual'(F14).
        table-v_old(12)   = ihist-xaccural.
        table-v_new(12)   = nhist-xaccural.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
      if ihist-ovrrt ne nhist-ovrrt.
        table-field = 'OVRRT'.
        table-text = 'OverHead Rate'(F15).
        table-v_old(12)   = ihist-ovrrt.
        table-v_new(12)   = nhist-ovrrt.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
        if ihist-ztbd01 ne nhist-ztbd01.
        table-field = 'ZTBD01'.
      table-text = 'Char1'.                                  "JJMM20040330
        table-text = 'Meal Allowance'(F16).                    "JJMM20040330
        table-v_old   = ihist-ztbd01.
        table-v_new   = nhist-ztbd01.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
    BEGIN OF BLOCK INSERTED FOR                            "JJMM20040330
      if ihist-earlybil ne nhist-earlybil.
        table-field = 'EARLYBIL'.
        table-text = 'Early Billing'(F17).
        table-v_old   = ihist-earlybil.
        table-v_new   = nhist-earlybil.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      endif.
      if ihist-combined ne nhist-combined.
        table-field = 'COMBINED'.
        table-text = 'Combined Billing'(F18).
        table-v_old   = ihist-COMBINED.
        table-v_new   = nhist-COMBINED.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      endif.
    END OF BLOCK INSERTED FOR                                "JJMM20040330
        if ihist-rate1 ne nhist-rate1.
        table-field = 'RATE1'.
        table-text = 'Rate 1'(F19).
        table-v_old(12)   = ihist-rate1.
        table-v_new(12)  = nhist-rate1.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
    *if ihist-rate1 ne nhist-rate2.                            "JJMM20040330
      table-field = 'RATE1'.                                 "JJMM20040330
    if ihist-rate2 ne nhist-rate2.                            "JJMM20040330
        table-field = 'RATE2'.                                 "JJMM20040330
        table-text = 'Rate 2'(F20).
        table-v_old(12)   = ihist-rate2.
        table-v_new(12)   = nhist-rate2.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
    *if ihist-rate1 ne nhist-rate3.                            "JJMM20040330
    if ihist-rate3 ne nhist-rate3.                            "JJMM20040330
        table-field = 'RATE3'.
        table-text = 'Rate 3'(F21).
        table-v_old(12)   = ihist-rate3.
        table-v_new(12)   = nhist-rate3.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
    *if ihist-rate1 ne nhist-rate4.                            "JJMM20040330
    if ihist-rate4 ne nhist-rate4.                            "JJMM20040330
        table-field = 'RATE4'.
        table-text = 'Rate 4'(F22).
        table-v_old(12)   = ihist-rate4.
        table-v_new(12)   = nhist-rate4.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
    *if ihist-rate1 ne nhist-rate5.                            "JJMM20040330
    if ihist-rate5 ne nhist-rate5.                            "JJMM20040330
        table-field = 'RATE5'.
        table-text = 'Rate 5'(F23).
        table-v_old(12)   = ihist-rate5.
        table-v_new(12)   = nhist-rate5.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
    *if ihist-rate1 ne nhist-rate6.                            "JJMM20040330
    if ihist-rate6 ne nhist-rate6.                            "JJMM20040330
        table-field = 'RATE6'.
        table-text = 'Rate 6'(F24).
        table-v_old(12)   = ihist-rate6.
        table-v_new(12)   = nhist-rate6.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
    *if ihist-rate1 ne nhist-rate7.                            "JJMM20040330
    if ihist-rate7 ne nhist-rate7.                            "JJMM20040330
        table-field = 'RATE7'.
        table-text = 'Rate 7'(F25).
        table-v_old(12)   = ihist-rate7.
        table-v_new(12)   = nhist-rate7.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
    *if ihist-rate1 ne nhist-rate8.                            "JJMM20040330
    if ihist-rate8 ne nhist-rate8.                            "JJMM20040330
        table-field = 'RATE8'.
        table-text = 'Rate 8'(F26).
        table-v_old(12)   = ihist-rate8.
        table-v_new(12)   = nhist-rate8.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
    *if ihist-rate1 ne nhist-rate9.                            "JJMM20040330
    if ihist-rate9 ne nhist-rate9.                            "JJMM20040330
        table-field = 'RATE9'.
        table-text = 'Rate 9'(F27).
        table-v_old(12)   = ihist-rate9.
        table-v_new(12)   = nhist-rate9.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
    *if ihist-rate1 ne nhist-rate10.                           "JJMM20040330
    if ihist-rate10 ne nhist-rate10.                          "JJMM20040330
        table-field = 'RATE10'.
        table-text = 'Rate 10'(F28).
        table-v_old(12)   = ihist-rate10.
        table-v_new(12)   = nhist-rate10.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
    *if ihist-rate1 ne nhist-rate11.                           "JJMM20040330
    if ihist-rate11 ne nhist-rate11.                          "JJMM20040330
       table-field = 'RATE11'.
        table-text = 'Rate 11'(F29).
        table-v_old(12)   = ihist-rate11.
        table-v_new(12)   = nhist-rate11.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      perform write_report.
      endif.
    The following lines of code have been added per change IJHM00001
    if ihist-rate12 ne nhist-rate12.
       table-field = 'RATE12'.
        table-text = 'Rate 12'(F30).
        table-v_old(12)   = ihist-rate12.
        table-v_new(12)   = nhist-rate12.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      endif.
    if ihist-rate13 ne nhist-rate13.
       table-field = 'RATE13'.
        table-text = 'Rate 13'(F31).
        table-v_old(12)   = ihist-rate13.
        table-v_new(12)   = nhist-rate13.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      endif.
    if ihist-rate14 ne nhist-rate14.
       table-field = 'RATE14'.
        table-text = 'Rate 14'(F32).
        table-v_old(12)   = ihist-rate14.
        table-v_new(12)   = nhist-rate14.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      endif.
    if ihist-rate15 ne nhist-rate15.
       table-field = 'RATE15'.
        table-text = 'Rate 15'(F33).
        table-v_old(12)   = ihist-rate15.
        table-v_new(12)   = nhist-rate15.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      endif.
    if ihist-rate16 ne nhist-rate16.
       table-field = 'RATE16'.
        table-text = 'Rate 16'(F34).
        table-v_old(12)   = ihist-rate16.
        table-v_new(12)   = nhist-rate16.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      endif.
    if ihist-rate17 ne nhist-rate17.
       table-field = 'RATE17'.
        table-text = 'Rate 17'(F35).
        table-v_old(12)   = ihist-rate17.
        table-v_new(12)   = nhist-rate17.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      endif.
    if ihist-rate18 ne nhist-rate18.
       table-field = 'RATE18'.
        table-text = 'Rate 18'(F36).
        table-v_old(12)   = ihist-rate18.
        table-v_new(12)   = nhist-rate18.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      endif.
    The following lines of code have been added per change IJHM00002
    if ihist-rate19 ne nhist-rate19.
       table-field = 'RATE19'.
        table-text = 'Rate 19'(F37).
        table-v_old(12)   = ihist-rate19.
        table-v_new(12)   = nhist-rate19.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      endif.
    if ihist-rate20 ne nhist-rate20.
       table-field = 'RATE20'.
        table-text = 'Rate 20'(F38).
        table-v_old(12)   = ihist-rate20.
        table-v_new(12)   = nhist-rate20.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      endif.
    if ihist-rate21 ne nhist-rate21.
       table-field = 'RATE21'.
        table-text = 'Rate 21'(F39).
        table-v_old(12)   = ihist-rate21.
        table-v_new(12)   = nhist-rate21.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      endif.
    if ihist-rate22 ne nhist-rate22.
       table-field = 'RATE22'.
        table-text = 'Rate 22'(F40).
        table-v_old(12)   = ihist-rate22.
        table-v_new(12)   = nhist-rate22.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      endif.
    if ihist-intcrb ne nhist-intcrb.
       table-field = 'INTCRB'.
        table-text = 'Intcrb'(F47).                             "IJHM00002
       table-text = 'Intcrb'(F37).                            "IJHM00002
        table-v_old   = ihist-intcrb.
        table-v_new   = nhist-intcrb.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      endif.
    if ihist-intcrr ne nhist-intcrr.
       table-field = 'INTCRR'.
        table-text = 'Intcrr'(F48).                             "IJHM00002
       table-text = 'Intcrr'(F38).                            "IJHM00002
        table-v_old(12)   = ihist-intcrr.
        table-v_new(12)   = nhist-intcrr.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      endif.
    if ihist-zwktran ne nhist-zwktran.
       table-field = 'ZWKTRAN'.
        table-text = 'Data Trans End Unit'(F49).                "IJHM00002
       table-text = 'Data Trans End Unit'(F39).               "IJHM00002
        table-v_old   = ihist-zwktran.
        table-v_new   = nhist-zwktran.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      endif.
    if ihist-zwkbud ne nhist-zwkbud.
       table-field = 'ZWKBUD'.
        table-text = 'Wkly Budget Ind'(F50).                    "IJHM00002
       table-text = 'Wkly Budget Ind'(F40).                   "IJHM00002
        table-v_old   = ihist-zwkbud.
        table-v_new   = nhist-zwkbud.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      endif.
    if ihist-bcycle ne nhist-bcycle.
       table-field = 'BCYCLE'.
        table-text = 'Bcycle'(F51).                             "IJHM00002
       table-text = 'Bcycle'(F41).                            "IJHM00002
        table-v_old   = ihist-bcycle.
        table-v_new   = nhist-bcycle.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      endif.
    if ihist-ovind ne nhist-ovind.
       table-field = 'OVIND'.
        table-text = 'Ovind'(F52).                              "IJHM00002
       table-text = 'Ovind'(F42).                             "IJHM00002
        table-v_old   = ihist-ovind.
        table-v_new   = nhist-ovind.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      endif.
    *New code for PRSID -
    "ZN032106
      if ihist-prsid ne nhist-prsid.
       table-field = 'PRSID'.
        table-text = 'PRSID'(F53).
        table-v_old   = ihist-prsid.
        table-v_new   = nhist-prsid.
        table-user    = nhist-uname.
        table-date    = nhist-aedtm.
        table-oprcd = nhist-oprcd.
        append table.
      endif.
    *End of new code----
    "ZN032106
    endform.
          FORM write_report                                             *
    form write_report.
    loop at table.
      write:/1 table-text,   25 table-v_old(12) left-justified,
             55 table-v_new(12) left-justified, 85 table-oprcd,
             106 table-user, 120 table-date.
      uline.
    endloop.
    skip 5.                                                    "JJMM20040330
    write:/35 TEXT-R01.                                        "JJMM20040330
    reserve 1 lines.                                           "JJMM20040330
    endform.
    *&      Form  import_record
    form import_record changing p_subrc.
         import i_key
               old_zsops to old_zzsops
               new_zsops to new_zzsops
               from database zsopshist(Z1)
               id i_key.
         p_subrc = sy-subrc.
    endform.                    " import_record
    *&      Form  import_record_prev
    form import_record_prev changing p_subrc.
         import i_key
               old_zsops to old_prezsops
               new_zsops to new_prezsops
               from database zsopshist(Z1)
               id i_key.
         p_subrc = sy-subrc.
    endform.                    " import_record_prev
    *&      Form  import_record_long
    form import_record_long changing p_subrc.
         import i_key
               old_zsops to old_lzsops
               new_zsops to new_lzsops
               from database zsopshist(Z1)
               id i_key.
         p_subrc = sy-subrc.
    endform.                    " import_record_prev
    ========
    Thanks.
    Mithun

  • Help In ABAP Object Certification Question

    Hi ABAP Gurus,
       iam going to write certification Exam on Nov 11. i have got some model question from SAP domain for all the topics Except ABAP Objects which is so important...
    Please anybody send me some Example question you guys got from the Certification Exam
    it will be be grateful to me...
    Thanks a lot in advance.
    Prabhu
    SAP Lead Consultant

    Hi,
    Sending ABAP Objects questions is not an option but normally, your concepts are tested for:
    - Classes and objects
    - Inheritance
    - Casting
    - Interfaces
    - Events
    - Global classes and interfaces
    - Exception handling
    - Dynamic programming
    You can use help.sap.com to take a look at these topics one by one. Hope this helps.
    Good luck.

  • Help in ABAP Obj Sample Question

    Hi ABAP Gurus,
    iam going to write certification Exam on Nov 11. i have got some model question from SAP domain for all the topics Except ABAP Objects which is so important...
    it will be be grateful to me if anybody send some ques...
    Thanks a lot in advance.
    Prabhu
    SAP Lead Consultant

    Hi,
        Some questions
    1) Which tool can be used to move a method of a class to an interface which the class implements?
    2) Can a CLASS-CONSTRUCTOR be defiend to raise exceptions?
    3) Can you access PROTECTED data using object reference of a subclass?
    4) Can a class method raise both normal exceptions and class based exception?
    It will be helpful if you share the links of other topics
    Regards,
    Sesh

  • Select Options and Search Help in ABAP Dynpro

    Hi Guys,
    I am new to ABAP WD. We are workin on ABAP Stack of the Portal with no DB Tables n data. we have to fetch the data from R/3 and display it on the Dynpro screen.
    But  here the problem is the Standard Search Help attached to the data elements cannot fetch any data, as by default it searchs the ABAP stack for the data. Is there any work around for the same wherein i can fetch the data from R/3 and display it when user requests for the search help.?
    Please let me know.
    Thanks and Regards,
    Sagar

    Hi,
    You can also use freely programmed help here.......
    Please check the following links for
    OVS
    http://help.sap.com/saphelp_nw04s/helpdata/en/47/9ef8c99b5e3c5ce10000000a421937/frameset.htm
    OVS Help in Web Dynpro ABAP
    Freely programmed
    http://help.sap.com/saphelp_nw04s/helpdata/en/47/9ef8cc9b5e3c5ce10000000a421937/frameset.htm
    regards
    Pranav

  • Hi need help in abap query

    hello friends,
    i am doing abap query,
    i created the
    user group in sq03
    infoset in sq02
    query in sq01
    it looks ok,
    but it is picking all the items from the table1,
    i want it to pick only those data which satisfy one specific condition,
    like
    vkorg = 'A123' or 'B456'.
    audat = anything after feb 04.
    likie that.
    can some one help.

    Check with below Link :
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40bec8da-4cd8-2910-27a9-81f5ce10676c
    Pls go through the below link.
    http://www.sappoint.com/abap/ab4query.pdf
    Thanks
    Seshu

Maybe you are looking for

  • Error running SIP code

    Hi I am using Websphere Studio Device Developer 5.6.1 with Nokia SDK for J2ME 4.0. I am trying to run the SIP examples (SendMessage, ReceiveMessage MIDlets) distributed with the JSR180 RI. These run successfully on the emulator distributed with JSR18

  • Slo-mo not working? I guess cmd+J won't do it for me?

    Hopefully this is a dumb question that gets resolved by the first person who reads it.... but.... changing speed isn't working for me. I click on a video clip. cmd+J to bring up the change speeds box. Trying to make it slower, I'll type in 80 or 70 o

  • Solution Composer Interface

    One of our customer is using Aris to manage the business processes and also use Solution Composer define Solution map and processes. They hope can import the content of business process of Aris to Solution Composer. Is there any interface can do that

  • Transport of Loyalty Programs

    Hi , Can we transport Loyalty programs created with the Reward Rule Groups and Ruleset. I know how to transport rules. Is there anyway to transport rule groups and rulesets and loaylty programs, instead of creating the program in each system.

  • Publishing Book on iBook Store - How Long To Wait?

    Does any good soul know how long it usually takes to a book to get published on iBook Store after it gets delivered via iTunes Producer App? I uploaded a title about 5 days back and I see that the status of my book is 'Pending'. I am quite curious if