SAP Program RSBTCHH0 - *** Batch Heading Routine ***

Use
Batch Heading Routine

Note
This report contains the following subroutines that can be startedexternally from every report.

  • BATCH-HEADING

  • NEW-SECTION

  • JUST-ROUTINE

  • BATCH-HEADING-ROUTINE
    ---------------------
    It should be used to provide more information in the first two lines ofthe list than the standard report page header. In addition, microficheinformation can, if required, be printed in the first line and thus beevaluated by the companies that produce the microfiches.
    The callup command is as follows:
    PERFORM BATCH-HEADING(RSBTCHH0).
    When calling up the routine from a function module, use the command
    PERFORM BATCH-HEADING1(RSBTCHH0) USING BHDGD.
    As one would expect, the callup is made at TOP-OF-PAGE. The programstatement contains the parameter NO STANDARD PAGE HEADING.
    Alternatively, the parameters listed below can be transferred via theDictionary table BHDGD at START-OF-SELECTION or a comparable timepoint:
    BHDGD-LINE1: the report title (SY-TITLE)
    BHDGD-LINE2: a subtitle up to 60 characters long, which can, forexample, be used as a parameter by the person requesting the report(therefore you must declare PARAMETERS: TITLE(40) TYPE C for thereport).
    BHDGD-LINES: line width of the report (SY-LINSZ).
    BHDGD-UNAME: name of person requesting report (SY-UNAME).
    BHDGD-REPID: report name
    It is now possible to have the company code name and city displayeddynamically left-justified onscreen when you change the company codeand the new company code is entered in field BHDGD-BUKRS at timepointAT NEW BUKRS.
    In the case of cross-company code control levels (e.g. the timepoint ATLAST within the LOOP of a sorted dataset, for which the totals acrossall company codes are printed on a separate sheet) you can, bytransferring ' ' to field BHDGD-BUKRS, ensure that the corporategroup entry from table T000 is displayed.
    Use of field BHDGD-INIFL:
    Normally the batch heading routine initializes the fields once and thenonly evaluates the company code changes.
    However, depending on the data, you may want to have a different reportheading. If this is so, you must reset the fields BHDGD-LINE1 andBHDGD-LINE2 with SPACE and then fill them with the new contents. Youshould also set field BHDGD-INIFL to '0'. This initializes the fieldonce again.
    Determining the Print Format of the Microfiche Information----------------------------------------------------------
    If you want the microfiche information to be printed in the first lineof the list, you must first select the parameter BHDGD-MIFFL atSTART-OF-SELECTION or a similar timepoint. To print the possibleselections for the user requesting the report, use PARAMETERS:MI-FICHE(1) TYPE C.
    This means that initially only standard information is printed (whichis in character format, left-justified and includes no blanks), suchas:
    - Client (3 characters)
    - Selection date (8 characters in format YYYYMMDD)
    - Selection time (6 characters in format HHMMSS)
    - Report name (8 characters, BHDGD-REPID)
    - Sequence number (3 characters, currently always '001')
    - User requesting report (8 characters, BHDGD-UNAME)
    This microfiche header can now be dynamically supplemented by thereportwith the relevant group definitions. To do this, you must fillthe field BHDGD-GRPIN at the timepoint AT NEW....(.....- relevantcontrol level).
    You may have to delete a part of the field for the relevant controllevel at the timepoint AT END OF (e.g. if you want to print data on aseparate page).
    The person who wrote the report must manage field BHDGD-GRPINhim/herself.
    An example of how the batch heading routine is programmed can be foundin report RFKOPO00.
    NEW-SECTION-ROUTINE
    -------------------
    This routine enables you to split up the printed list according to acriteria of your choice, for example company code.
    This routine is called up from the calling report at a timepoint wheredata needs to be printed on a new page, e.g. AT NEW BUKRS.
    The callup command is as follows:
    PERFORM NEW-SECTION(RSBTCHH0).
    When calling up the routine from a function module, you should use thefollowing command:
    PERFORM NEW-SECTION1(RSBTCHH0) USING BHDGD.
    For the callup to be successful, the following fields from table BHDGDmust be filled:
    BHDGD-SEPAR - 'X'
    BHDGD-DOMAI - name of a domain, e.g. 'BUKRS'
    Bhdgd-Werte - current value of this domain, e.g. '0001' for company
    code 0001
    This routine causes a form feed and renumbers the pages accordingly.The system then searches for an appropriate entry in table LSEP on thebasis of the fields BHDGD-DOMAI and BHDGD-WERTE, on the basis of whichthe data should be divided. One of the possible choices for the useris whether to manage the print data in various logical print files orto divert the print dataset to the SAP spool. For more detailedinformation on such selection options, consult the documentation ontable LSEP. If you do not find the entry you require in table LSEP,the print dataset is transferred to the print file defined for theoriginal print and printed on a separate cover-sheet. If field BHDGD-SEPAR is not filled, the system triggers a form feed and numbers thepages. In this case the list is not printed separately. durchgeführt.
    JUST_Routine
    ------------
    This routine centers a text within a field.
    The callup command is as follows:
    PERFORM JUST_ROUTINE(RSBTCHH0) USING p1 p2.
    where
    p1 - name of the field containing the text to be centered.
    p2 - field length.

878776RSBTCHH0 - Ledger is displayed by mistake