SAP ABAP IMG Activity PAY_DE_BW_340 (Set Up SAPscript Form)
Hierarchy
SAP_HRRXX (Software Component) Sub component SAP_HRRXX of SAP_HR
   PY-XX-RS (Application Component) Reuse Services for Country Development
     P01W (Package) HR Germany: Statements
IMG Activity
ID PAY_DE_BW_340 Set Up SAPscript Form  
Transaction Code S_AHR_61011963   (empty) 
Created on 19990204    
Customizing Attributes PAY_DE_BW_100   Customizing for Statements 
Customizing Activity PAY_DE_BW_340   Set Up SAPscript Form 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name PAY_DE_BW_340    

The general documentation on setting up a SAPscript form can be found under Application Help for the Form Painter for SAPscript.

Special features in Statements

A. Manual Fields

To flag a field as a manual field, set it in the following parenthetical expression:
<M> .... </>

The field is then displayed in a tree on the left-hand side of the screen. It can be changed here.

You can differentiate between two field types:

  • Fields that already contain data in the creation report
  • Fields to be given data:
    • Text fields: TEXTxx, xx = 1, 2, ... , 50
    • Date fields: DATUMxx, xx = 1, 2, ... , 30
    • Amount fields: BETRAGxx, xx = 1, 2, ... , 30

You can preset values for these fields in the SAPscript form. You do this in a comment line
/: TEXT13 = 'No'

B. Table Printing- General

Table printing is controlled by the interaction between Set Up Statement Parameters -> Control Window Elements and the window element set up in the SAPscript form.

The window element LEERABSATZ

is necessary to control the printing. You also enter the paragraph format.

Example
/E LEERABSATZ
/* *******************************************************************
/* Element used to break lines for column control - do not delete
/* *******************************************************************
L

Under Set Up Statement Parameters -> Control Window Elements, enter the characteristics of the table:

  • Is the table is linked to a statement wage type? If yes, which statement wage type should be printed?
  • Should all table records, the most recent record, or the first record be printed?
  • How many columns are used to print the table?

For more information, see Set Up Statement Parameters.

C. Special Features and Difficulties When Printing Tables in SAPscript

The following section describes the technique for printing a table in SAPscript forms. This is illustrated using examples with increasing complexity.

  1. Simple table printing: This is not complicated to implement. For example, you want the following layout:

    From To Amount

    01/01/2000 01/31/2000 1,340.00
    02/01/2000 02/29/2000 1,340.00
    03/01/2000 03/31/2000 1,340.00
    04/01/2000 04/30/2000 1,340.00
    ...............................
    ...............................
    1. First, decide on the line position of the individual table columns in the SAPscript form. In this example, the three columns are to be printed 20mm, 40mm, and 60mm from the left-hand margin of the form.
    2. In Form Painter (via IMG path Payroll: Germany -> Statements with SAPscript --> Set Up Customer Statements --> Set Up SAPscript Form), first create a suitable paragraph format in the required form. Select tabs that correspond to the position on the page. For each position in a line, you must set a tab. Let us call the paragraph format for the example above T1.
    3. Now create a page element (/E) for the table to be printed in the relevant window of the SAPscript form. Let us call the page element in the example above 'ANDRUCK BRT'. The SAPscript code in Form Painter should now look like this:

      /* Definition of window element for heading
      /E ANDRUCK BRT UEBERSCHRIFT
      T1 From To Amount
      /* Definition of window element for printing table.
      /* The paragraph format is in the definition of the
      /* window element
      /E ANDRUCK BRT
      T1 &BRT-BEGDA&,,&BRT-ENDDA&,,&BRT-BETRG&
      /* Definition of next window element
      /E ...............................
      ...............................
    4. Finally, you must set parameters for the control of the assigned window element. In our example, this is the control of window element 'ANDRUCK BRT'. To do this, in Customizing choose the path Payroll: Germany -> Statements with SAPscript --> Set Up Customer Statements --> Set Up Statement Parameters --> Control of Window Elements. In the detail view for the entry for the window element ('ANDRUCK BRT'), in the second selection block you will find the entries 'Permitted Table', 'Number of Records', and 'Number of Columns'. In our example, you can enter 'BRT', 'All table records', and '0' here.
  2. In our second example, you want to describe the printing of a table that looks like this:

    Unpaid absences: 05/03/2000 to 05/05/2000
    05/21/2000 to 05/26/2000

    This layout is encoded as follows. This time, let us call the table UBAB, with the fields UBAB-BEGDA and UBAB-ENDDA. 'Unpaid absences' is to be in a position 1.50cm from the left-hand margin, '05/03/2000' at 5cm, and '05/05/2000' at 9cm. Define paragraph format T2 with the first tab at the 1.5cm position, the second and third at 5cm, and the third and fourth at 9cm. The SAPscript then looks something like this:

    /* Window element for the words 'Unpaid absences'
    /E FEHLZEITEN VORSATZ
    T2 ,,Unpaid absences
    /* Window element for printing table. Please note:
    /* On the one hand, with this technique the paragraph format
    /* of the table stands before the definition of the
    /* window element. On the other hand, the = sign is in
    /* the definition of the window element:
    /E FEHLZEITEN
    = ,,,,&UBAB-BEGDA&,,,,'to '&UBAB-ENDDA&
    /* Definition of next window element
    ......................................
    ......................................
    /* Finally, in window paragraph LEERABSATZ, you need
    /* to specify T2 again:
    /E LEERABSATZ
    T2

    In the window control for 'FEHLZEITEN VORSATZ', in selection block 'Table Control', nothing is encrypted. For the entry 'FEHLZEITEN', the permitted table is 'UBAB', 'All table records' are selected, and the 'Number of columns' is '1'.

  3. If you want to print one or more columns in a SAPscript form, proceed in the sequence described below. Again, we will use an example to illustrate the procedure. You want to print table BRT, consisting of three fields: BRT-BEGDA, BRT-ENDDA, and BRT-BETRG, with duplicated columns. In other words, the desired layout is this:

    From To Amount From To Amount

    01/01/2000 01/31/2000 1,340.00 02/01/2000 02/29/2000 1,340.00
    03/01/2000 03/31/2000 1,340.00 04/01/2000 04/30/2000 1,340.00
    05/01/2000 05/31/2000 1,340.00 06/01/2000 06/30/2000 1,340.00
    07/01/2000 07/31/2000 1,340.00 08/01/2000 08/31/2000 1,340.00
    
Business Attributes
ASAP Roadmap ID 204   Establish Functions and Processes 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency I   Valid for countries specified 
Maintenance Objects
Maintenance object type C   Customizing Object 
Assigned objects
Customizing Object Object Type Transaction Code Sub-object Do not Summarize Skip Subset Dialog Box Description for multiple selections
IMGDUMMY D - Dummy object SE71 PY_DE_BW  
History
Last changed by/on SAP  19990204 
SAP Release Created in