sitemap
ABAP HR
Repetitive Structures processing

 In many master data infotypes the data is stored in the form of repetitive structures. For
example infotype 0008, the structure wage type line is available for 20 times, that is an
employee is eligible for having 20 different wage types based on his benefits. When
evaluating repeat structures, you must ensure that all fields are entered. In the case of
the Basic Pay infotype, 20 * 5 = 100 fields are queried.
 
To use this method of evaluation, define a field string whose structure corresponds to the
fields in one line of the repetitive structure.

Example for understanding the repetitive Structure

Say, for an employee you want to know that for what all wage types an employee is eligible
for the latest period you mentioned on the selection screen.

Using LDB (PNP)

Program:

Report zhk_repstru.

Tables Pernr.

Infotypes 0008.
 

  • You have to declare a structure same as repetitive structure in the 0008 infotype

Data: begin of s_wagetypes,
        Wagetype type p0008-lga01,
        Amount      type p0008-bet01,
        Hours         type p0008-anz01,
        Unit            type p0008-ein01,
        Ind             type p0008-opk01,
    End of s_wagetypes,  

  • Selecting data from the Data base       Get pernr

  • Getting the latest record based on the selection period.
         RP_PROVIDE_FROM_LAST P0008 SPACE PN-BEGDA PN-ENDDA.

  • Now knowing for what all wage types the employee is eligible.
    Do 20 times varying s_wagetypes from p0008-lga01 next p0008-lga02.  If
    s_wagetypes-wagetype is initial.

    Here the data is stored sequentially, i.e., if the employee is eligible for 5 wage types
    then all the 5 wage types are stored sequentially in lga01 to lga05 respectively. So, if
    say the lga05 is initial then it is understood that, employee is eligible for only 4 wage
    types and from lga05 to lga20 structures will be empty so, we need not process
    further

               Exit.
           Else.
              Write: / s_wagetypes-wagetype,
                           S_wagetypes-amount.
           Endif.
    Enddo.  
Back to ABAP HR Page
All of the  product names here are trademarks of their respective companies.  The site
www.allsaplinks.com no way affiliated with SAP AG. We have made every effort for the content
integrity.  Information used on this site is at your own risk.
SapMaterial.com  
ABAP TECHNICAL

SAP Introduction

sap abap faq

sap Tables

SAP Transaction codes

Internal tables

data dictionary

performance tuning

transports & Requests

Sap scripts

Smartforms

lsmw

reports

sap Workflow

module pool/ dialog
programming

table control

user exits

sap memory

abap memory

alv reports

ABAP ADVANCED

IDOC

ALE

BAPI

BADI

RFC


FUNCTIONAL SIDE

Materials Management

FICO

Human Resources

BIW / BW / SEM


Free Documentation
Abap Material

Ale Material

BAPI Material

BC Material

IDOC Material

R/3 Database Management

SAP material

RFC

Transport

Sales & Distribution Material

Basic Data and Function
Material

Basis (BC) Material

Billing Material

CA Material

CATT : Computer Aided Test
Tool

Capacity Evaluation and
leveling Material

Capacity Planning Material

Cross Application Material

Countries

Customer Service Material

Enterpise  Material

Financial / Controlling (FICO)

Internet Time Sheet

Inspection Material

HR Material

Material Management
Material

Payments Material

Payroll Material

Pension Fund

Production Planning and
Control

Plant Maintenance

Quality Management Material

Real Estate Material

SAP material

Wage Types