SAP Program RFFMBTCH - *** Batch Heading Routine ***

Use
Batch Heading Routine

Note
The program contains the following subroutines, which can be accessedfrom every report program:

  • BATCH-HEADING

  • NEW-SECTION

  • JUST-ROUTINE

  • BATCH-HEADING-ROUTINE
    ---------------------
    You use this routine to include more information on the first two linesof the list than the standard report page header can accommodate. Inaddition, you can also have microfiche information printed as the firstline. This is useful if your company uses microfiche to evaluateinformation.
    The call is as follows:
    PERFORM BATCH-HEADING(RSBTCHH0).
    The following call should be used from function modules:
    PERFORM BATCH-HEADING1(RSBTCHH0) USING BHDGD.
    Naturally, the call takes place in TOP-OF-PAGE. The report programinstruction contains subparameter NO STANDARD PAGE HEADING.
    At START-OF-SELECTION or a comparable point in time, the following
    parameters are transferred, at your option, into dictionary tableBHDGD:
    BHDGD-LINE1: Report program title (SY-TITLE)
    BHDGD-LINE2: A subtitle of up to 60 characters, which the user can, forexample, set as a parameter (also in report program PARAMETERS:TITLE(40) TYPE C agree).
    BHDGD-LINES: Line width in report program (SY-LINSZ).
    BHDGD-UNAME: User name (SY-UNAME).
    BHDGD-REPID: Name of report program
    In the event of a company code change, the company code name andlocation can be shown, left-justified, when the company code is broughtinto field BHDGD-BUKRS at event AT NEW BUKRS.
    In the case of cross-company group levels (example: event AT LAST inthe loop of a sorted dataset in which the totals for all company codesis output on a separate sheet), you can have the system make availablethe group entry from table T000 by entering " " in fieldBHDGD-BUKRS.
    Use of Field BHDGD-INIFL:
    Normally, the batch heading routine initializes once; after that, itonly evaluates the company code changes.
    However, depending on the data, a situation may arise where you want adifferent report program header. You must then reset the fieldsBHDGD-LINE1 and BHDGD-LINE2 with SPACE and enter the new header. Youmust also set field BHDGD-INIFL to "0", thereby reinitializing it.
    Output and Setting of Microfiche Information--------------------------------------------
    If you want to see microfiche infromation in the first line of thelist,you must first check off parameter BHDGD-MIFFL inSTART-OF-SELECTION or a similar event. Use PARAMETERS: MI-FICHE(1) TYPEC to offer the user this option.
    The system then prints standard information only, in character format,left justified and without blanks, as follows:
    - Client (3 characters)
    - Selection date (8 characters, format YYYYMMDD)
    - Selection time (6 characters, format HHMMSS)
    - Report prog.name (8 characters, BHDGD-REPID)
    - Sequence nummer (3 characters, always 001 at this time)
    - Person using prog.(8 characters BHDGD-UNAME)
    Dieser Mikrofiche-Kopf kann nun dynamisch vom Report um die relevantenGruppenbegriffe ergänzt werden. Dazu muß man zum Zeitpunkt AT NEW ...(... - relevante Gruppenstufe) das Feld BHDGD-GRPIN füllen.
    Eventuell ist zum Zeitpunkt AT END OF rel. Gruppenstufe ein Teil desFeldes zu löschen (z.B. bei Ausgaben auf einem separatem Blatt).
    Der Reportautor hat das Feld BHDGD-GRPIN selbst zu verwalten.
    Ein Beispiel der Programmierung der Batch-Heading-Routine findet sichim Report RFKOPO00.
    NEW-SECTION-ROUTINE
    -------------------
    Diese Routine ermöglicht die Trennung der Listausgabe nach einemKriterium, z.B. nach Buchungskreis.
    Der Aufruf erfolgt vom rufenden Report zu einem Zeitpunkt, an dem einSeitenvorschub auf eine neue Seite erfolgen würde, z.B. AT NEW BUKRS.
    Der Aufruf lautet:
    PERFORM NEW-SECTION(RSBTCHH0).
    Aus Funktionsbausteinen sollte folgender Aufruf verwendet werden:
    PERFORM NEW-SECTION1(RSBTCHH0) USING BHDGD.
    Zuvor müssen folgende Felder der Tabelle BHDGD gefüllt sein:
    BHDGD-SEPAR - 'X'
    BHDGD-DOMAI - Name einer Domäne, z.B. 'BUKRS'
    Bhdgd-Werte - aktueller Wert der Domäne, z.B. '0001' für
    Buchungskreis 0001
    Die Routine macht einen Seitenvorschub und führt eine Neunumerierungder Seiten durch. Mit den Inhalten der Felder BHDGD-DOMAI undBHDGD-WERTE wird nun ein entsprechender Eintrag in der Tabelle LSEPgesucht, um die Druckausgabe zu separieren. Unter anderem ist esmöglich, die Druckausgabe auf unterschiedliche logische Druckdateien zusteuern oder die Druckausgabe in den SAP-Spool umzuleiten. Eine genaueDokumentation der Möglichkeiten findet sich in der Dokumentation derTabelle LSEP. Wird kein entsprechender Eintrag in der Tabelle LSEPgefunden, so wird die Druckausgabe auf die in der ursprünglichenBatchanforderung definierte Druckdatei geleitet und auf einem separatenDeckblatt gemeldet. Ist das Feld BHDGD-SEPAR nicht gefüllt, so wirdlediglich ein Seitenvorschub und eine Seitenneunumerierungdurchgeführt. Die Listenseparation unterbleibt.
    JUST_Routine
    ------------
    Die Routine dient dazu, einen Text innerhalb eines Feldes zuzentrieren.
    Der Aufruf lautet wie folgt:
    PERFORM JUST_ROUTINE(RSBTCHH0) USING p1 p2.
    Dabei bedeutet
    p1 - Name eines Feldes, das den zu zentrierenden Text enthält
    p2 - Länge des Feldes