Ansicht
Dokumentation

PAY_DE_BW_340 - Set Up SAPscript Form

PAY_DE_BW_340 - Set Up SAPscript Form

BAL Application Log Documentation   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

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

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'

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.

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.

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'.
  1. 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
    ...............................
    ...............................
    1. First, decide which columns of the table are to be printed at which line position. In this example, the 2 x 3 columns are to be printed, for example, at the 2 x 3 positions 20mm, 40mm, 60mm, 100mm, 120mm, and 140mm 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 T3.
    3. Now create a page element (/E) for the table to be printed in the relevant window of the SAPscript form. The paragraph format must be *before* the page element. At the very end of the editor, you will find the control of the column break. After this, the paragraph format must be specified again.
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
/* Heading for printing of table
T3 ,,From,,To,,Amount,,From,,To,,Amount
/* In the following format columns is the paragraph format
T3
/* Definition of window element. Please note the
/* = sign in the format column. Furthermore, only
/* the first column – that is, only the three table fields -
/* is specified. In this case, therefore, only the first three
/* tabs. The program knows where columns 4, 5, and 6.
/* should be, because you defined the paragraph format
/* accordingly and will define later in the window control
/* that the table is to be printed with duplicates columns:
/E ANDRUCK BRT
= ,,&BRT-BEGDA&,,&BRT-ENDDA&,,&BRT-BETRG&
/* Definition of next window element
/E .............................
.............................
/* At the end of the editor are the following lines:
/E LEERABSATZ
/* *******************************************************
/* Element used to break lines for column control....
/* *******************************************************
/* At the end, paragraph format T1 must come again:
T3
  1. 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 must enter 'BRT', 'All table records', and '2' here.
  2. Further hints: The third procedure is the most general method for printing tables in a SAPscript form. It contains the second example described above as a special case. However, the first an simplest method with 'Number of columns' =0 does not come under the last, general procedure. However, you can of course implement this first layout by using the last procedure with number of columns = 1 and a corresponding paragraph format T1 consisting of three tabs at the desired line positions.
    1. If you choose the third, general method, you can only use one paragraph format (T3 in the example) in the entire window. However, it has the advantage of enabling layouts such as that described under point 2 to be implemented.
    2. With the first method, you can define any number of paragraph formats for printing tables. However, the layout described under point 2 is not possible.
    3. The two methods may be used in combination.






PERFORM Short Reference   PERFORM Short Reference  
This documentation is copyright by SAP AG.

Length: 11755 Date: 20240523 Time: 191214     sap01-206 ( 174 ms )