SAP Program RFKORD70 - Print Program: Periodic Settlement

Description
This program prints periodic settlements (10-day settlements) forcustomers in letter form.
With the 10-day settlement, a customer's open items are assigned to asettlement period or to a settlement key date using the cash discount 1due date criterion. You can define the key dates for the settlementsusing a factory calendar and the 10-day settlement is then carried outon one of these key date.
You can use parameters to control which balances, open items, and listsare to be displayed in the 10-day settlement.
The print program is only carried out directly during systemconfiguration for testing purposes. Otherwise, the call is carried outautomatically by means of higher-level correspondence programs.

Precondition
Before you can print 10-day settlements within the correspondencefunction, you must make the following settings:
System settings in Customizing
You can find more information on the standard settings under the"Customizing" heading (see below).
Defining forms
Forms must be defined and activated in the system so that you can printthe required letters. The standard system provides a form you can copyand adapt to meet your own requirements. In the standard system, theform F140_DEC_STAT_01 is used.
RESET N1
The following restrictions apply to the creation of 10-day settlements:

  • You can only create 10-day settlements for customers

  • You cannot create any 10-day settlements for one-time customers

  • Even for head offices with local processing, 10-day settlements are
  • addressed to the head office and not to the branch
    • The system only reads the open items current at the time of the
    • request. You should therefore repeat the printout, such as by means ofoptical archiving.
      • You cannot use correspondence types for period settlements with an
      • individual text for the periodic account statements created usingprogram RFKORK00.

        Output

        Printing and Printer Selection
        A 10-day settlement is created for each customer and a separate spoolrequest is created for each company code. For test purposes, thesettlement can be displayed on the screen.
        If you do not specify for the print program on which printer thecorrespondence should be printed, the program may take the printerspecified in the user master of the user who started the program or theprinter specified when the job is scheduled. The same is true forprinting error lists if you have not defined a printer for the log inthe print program or in its variants.

        Errors During the Program Run
        If minor errors occur during the program run, that is errors that donot lead to a program termination, these are listed after the run in anerror list.
        If the program is run online, the error list is displayed on thescreen. If, however, the program is scheduled as a job, the spoolrequest name for the error list is composed of the identifier F140ER,the printer name, and maybe the correspondence type and/or the companycode.

        Executing the Print Program
        If the print program is carried out directly and a printout issued,then a log with the created spool requests is issued for each programrun.
        If the program is carried out online, the log is displayed on thescreen. If the program is planned as a job, the spool request name ofthe log is made up of the identifier F140, the printer destination, thedate of creation, and the program ID KORD.
        If the print program is started by a higher-level correspondenceprogram, the log entry is made by means of the higher-level program(such as trigger for correspondence or periodic account statements).

        Information on the Standard Form and the Text Symbols You Can Use
        INCLUDE FI_RFFO_SAPSCRIPT_LAYOUT_SET OBJECT DOKU ID TX
        Information on the form layout
        Information on the text symbols
        INCLUDE FI_RFFO_SAPSCRIPT_MAINTAIN OBJECT DOKU ID TX

        Example
        Customizing for 10-day settlements is explained below by means of thestandard system, with examples of customer-specific enhancements.

        Customizing:
        Make the settings for Correspondence in Customizing forFinancial Accounting under Financial Accounting GlobalSettings. There you follow the steps described below.

        Note:
        For tables in which a default entry without a company code is allowed,the default entry is accessed if no entries for a specific company codeexist. If you do not want this, you should only make table entries incases where the company code is predefined. For the relevant tables,there is a note further down on the default entry company code blank.
        The correspondence types, forms, and standard texts which start with aZ are examples of customer-specific objects which are not delivered inthe standard system.

        1. "Financial Accounting Global Settings": Settings forCorrespondence:
        For account statements or open item lists, the settings are to be madeas follows.
        1.1. Examples of the correspondence types:
        SAP17 10-day settlement
        X Account necessary
        Number of date details.... 1
        Date 1 name... Settlement date
        ZAP17 10-day settlement and individual text
        X Account necessary
        X Individual text
        Number of date details.... 1
        Date 1 name... Settlement date
        1.2. Examples of program allocation:
        The entries are to be left blank for single or explicitly for allcompany codes or are to be left blank as a default for company code.
        CCode CorID Program Variant Default text
        ----------------------------------------------------
        0001 SAP17 RFKORD70 SAP17
        0001 ZAP17 RFKORD70 ZAP17 ZF140_DEC_STAT
        1.3. Examples of default texts:
        The default texts must be stored as a standard text with the text IDFIKO. For the use of individual texts, a standard text must alwaysexist and be entered during program allocation. A standard text mustcontain at least one comment line (format line = /*). Default texts canbe maintained in the detail screen of program allocation via Goto-> Text editor or, in the initial menu via Tools -> Wordprocessing -> Standard text.
        With the transaction SO10, you can check whether standard texts existin the client in which you need them. The text ID is FIKO. With thetransaction SO10, you can copy standard texts from other clients in themenu under Utilities -> Copy from client.
        Everyone wanting to use the text ID FIKO requires the authorization.The authorization object for which the authorization must be defined iscalled "standard text". In the standard system, it is contained in theprofile S_SACHBEARB, and authorizes for every text ID. But everyoneneeds at least the authorization for the text ID ST and FIKO.
        In the standard text, you may only use the paragraph formats which aredefined for the relevant form.
        If you enter a language for the correspondence request, into which thedefault text is not translated, you receive an empty editor to enterthe text.
        Default text ZF140_DEC_STAT, TEXT-ID FIKO
        Format Text area
        /* Text for individual 10-day settlement
        AS Settlement for <(>&RF140-STIDA&<)> 10-day <(>&RF140-DECADE&<)>
        AS
        AS
        If you want to enter individual text passages at several positions inthe form, you can create the default text analog to the followingexample:
        Default text ZEXAMPLE, TEXT-ID FIKO
        Format Text area
        /* Example of several individual text passages
        /: IF<(> &RF140-ELEMENT<)>& = 'XXX'.
        /* Text in the text element XXX
        AF Text 1
        /: ENDIF.
        /: IF<(> &RF140-ELEMENT<)>& = 'YYY'.
        /* Text in the text element YYY
        AF Text 2
        /: ENDIF.
        XXX and YYY represent numbers of text elements
        This option cannot be applied, however, in windows that do not containevents (text elements indicated by numbers).
        If, however, you want to use individual text passages in, for example,the INFO window as well as in the MAIN window, you must complete alltext elements in your form for which individual text passages are to beissued according to the following example:
        Text element in INFO window
        Format Text area
        /E XXX
        /: DEFINE <(>&RF140-ELEMENT&<)> ="XXX"
        /: INCLUDE <(>&RF140-TDNAME&<)> OBJECT BKORM ID FIKO LANGUAGE
        <(>&RF140-TDSPRAS&<)>
        Text element in MAIN window
        Format Text area
        /E YYY
        /: DEFINE <(>&RF140-ELEMENT&<)> ="YYY"
        /: INCLUDE <(>&RF140-TDNAME&<)> OBJECT BKORM ID FIKO LANGUAGE
        <(>&RF140-TDSPRAS&<)>
        Individual texts are then created from default texts for eachcorrespondence request, whose names are made up of the followingelements:

        • F140 identifier

        • User name

        • Request date

        • Time of text creation

        • You can change these texts in the menu under Account ->Correspondence -> Maintain in the correspondence requests.
          1.4. Examples of the forms:
          The entries are to be left blank either for individual company codes orexplicitly for all company codes and/or as a default for company code.
          CCode Program Fo Form
          --------------------------------------
          0001 RFKORD70 F140_DEC_STAT_01
          0001 RFKORD70 IT ZF140_DEC_STAT_1
          With transaction SE71, you should check whether the standard formsexist in the client in which you need them. If standard forms do notexist, you can copy the missing forms from client 000 with thetransaction SE71 in the menu under Utilities -> Copy from client
          .
          You can create your own forms by copying the standard form and changingthe layout set text (generally in the MAIN window). Your forms muststart with a "Y" or a "Z". The form name should contain theidentification code "F140".
          Your own forms or standard forms in clients not equal to 000 might haveto be adapted during release changeovers according to the standard formin client 000.
          If you need the standard form or a form created by you in languages forwhich no translation exists, you can translate the forms using thetransaction SE63.
          In the standard form for 10-day settlements, preparations are made forthe usage of individual texts or the direct usage of a standard text inthe following text elements:
          Form Window Text elements
          F140_DEC_STAT_01 MAIN 510
          In principle, however, you can use the individual texts at any positionof a form.
          Examples of form modifications:
          Form ZF140_DEC_STAT_1
          Create the form ZF140_DEC_STAT_1 and copy the form F140_DEC_STAT_01into the form ZF140_DEC_STAT_1.
          Modify the text elements in the MAIN window as follows:
          Format Text area
          /E 510
          /* Settlem.for <(>&RF140-STIDA&<)> 10-day <(>&RF140-DECADE&<)>
          /: INCLUDE <(>&RF140-TDNAME&<)> OBJECT BKORM ID FIKO LANGUAGE
          <(>&RF140-TDSPRAS&<)>
          During output, the variable RF140-TDNAME receives in each case the nameof the individual text belonging to a correspondence request. Thevariable RF140-TDSPRAS contains the entry language or the outputlanguage of the text. The whole letter is output in this language.
          Example of including document long texts:
          If you have entered texts for a document and want them to be printed inthe correspondence, proceed as follows:
          Copy the standard form into an individual customer form.
          Determine the window and, if necessary, the text element in which youwant to print the document text.
          Determine which data is available when printing the window or textelement by using the program documentation (such as tables BKPF, BSEG,BSID, RF140 fields)
          Determine the text ID for the document long text which you want toprint (such as 001) in the Define text ID for documents step inCustomizing for Financial Accounting in the global settings.
          Then insert two lines similar to the following lines at the requiredposition on the form.
          /: DEFINE &TEXTNAME& := '&BKPF-BUKRS(*)&&BKPF-BELNR(*RF0)&&BKPF-GJAHR&'
          /: INCLUDE &TEXTNAME& OBJECT BELEG ID 0001 LANGUAGE &RF140-SPRAS&
          1.5. Sender details:
          The entries are to be left blank either for individual or explicitlyfor all company codes or are to be left blank as default for companycode.
          CCode Program TXTID Header text Footer text Signature
          Sender
          -----------------------------------------------------------------------
          0001 RFKORD70 ADRS ADRS_HEADER ADRS_FOOTER ADRS_SIGNATURE
          ADRS_SENDER
          With the transaction SO10, you should check whether standard textsexist in the client in which you need them. The text ID is ADRS. Ifstandard texts do not exist, you can copy the missing texts from client000 with the transaction SO10 in the menu under Utilities -> Copyfrom client.
          If, on account of company stationery, you do not require individualspecifications - such as the header text and the footer text - you canleave the respective fields in the table blank. Normally, however, atleast the standard text for the signature is needed. You should,however, make a default entry (company code = blank and name of theprint program) in the table to avoid error messages if you do not wantto use texts.
          1.6. Call options:
          The entries are to be left blank either for individual or explicitlyfor all company codes or are to be left blank as default for companycode.
          CCode Type of correspondence DocEnt. Pmt DocDsp Act
          -----------------------------------------------------------------------
          0001 SAP17 10-day settlement X X X X
          0001 ZAP17 Individual 10-day settlement X X X X
          1.7. Correspondence sort variants:
          You must store at least one sort variant for the correspondence for10-day settlements. You determine the order in which the accountstatements or open item lists are issued using these sort variants.
          Sort variant Name
          Order Field name Name Offset length
          K1 Sorting by postal code
          1 LAND1 Country 3
          2 HPSTL P.O.box post.code otherwise post.code 10
          3 KOART Account type 1
          4 KONTO Account 10
          K2 Sorting by account number
          1 KOART Account type 1
          2 KONTO Account 10
          K3 Sorting by document number
          1 BELNR Document number 10
          2 GJAHR Fiscal year 4
          All objects are sorted first by company code and then in the sequenceof fields specified in the sort variant being used.
          To display a list of the fields by which an object can be sorted by,select "Possible entries" (F4). This list of the fields you can selectcontains a selection of fields from the master record tables KNA1 andKNB1. The fields KOART, KONTO, KTOGR (KNA1-KTOKD), and KTOZE(KNB1-KNRZE) are filled in accordance with the account type, which istaken from the master record tables. The fields "Document number" and"Fiscal year" are only filled in the case of document-relatedcorrespondence, such as payment notices.
          You can extend this list of selectable fields in order to meet yourrequirements. To do so, you can use a repair correction to importfields from the tables KNA1 and KNB1 that are not yet in table RF140V,into table RF140VZZ. When doing so, you must take care to use the fieldnames and data elements from the standard tables, as the fields intable RF140VZZ are supplied using the names from the master records.After you have added these fields, you must activate table RF140VZZ.The sort fields are then supplied in accordance with their names and ina pre-defined sequence as follows:
          The sort fields are drawn first from the KNA1 data and then from theKNB1 data.
          For this reason, fields that have the same name in tables KNA1 and KNB1may be overwritten.
          1.8 Sort variants for line items:
          You define at least one sort variant for the line items. You can usethe sort variants for line items to determine the sequence in which theline items are displayed.
          Sort variant Name
          Sequence Field name Name Offset length
          P1 Document date, ref.or doc.no.
          1 BLDAT Document date 8
          2 HBELN Ref.no.otherwise doc.no. 16
          3 BUZEI Item 3
          P2 Sp.G/L ind.,doc.date, doc.no.
          1 UMSKZ Special G/L indicator 1
          2 BLDAT Document date 8
          3 HBELN Ref.no. otherwise doc.no. 16
          4 BUZEI Item 3
          P3 Document date, document number
          1 BLDAT Document date 8
          2 BELNR Document number 10
          3 BUZEI Item 3
          P4 Document date, reference
          1 BLDAT Document date 8
          2 XBLNR Reference 16
          3 BUZEI Item 3
          P6 Association open items
          1 KONTO Account 10
          2 BLDAT Document date 8
          3 HBELN Ref.no.otherwise doc.no. 16
          4 BUZEI Item 3
          Objects are always sorted initially by company code and thereafter inthe sequence of the fields in the sort variant being used.
          To obtain a list of the fields by which the objects are sorted, select"Possible entries" (F4). This list of fields that the user can selectfrom contains a range of fields from the document tables BKPF and BSEG.The field HBELN contains the reference number in case this is needed;otherwise it contains the document number.
          You can extend this list of selectable fields in order to meet yourrequirements. To do so, you can use a repair correction to importfields from tables BKPF and BSEG, that are not yet in table RF140W,into table RF140WZZ. When doing so, you must take care to use the fieldnames and data elements from the standard tables, as the fields intable RF140WZZ are supplied using the names from the documents. Afteryou have added these fields, you must activate table RF140WZZ. The sortfields are then supplied in accordance with their names and in apre-defined sequence as follows:
          The sort fields are drawn first from the BKPF data and then from theBSEG data.
          For this reason, fields that have the same name in tables BKPF and BSEGmay be overwritten.

          2. Account statements:
          You make the following settings in Customizing for AccountsReceivable and Accounts Payable under Correspondence.
          2.1. Period types:
          Defining period types enables the following functions:

          • Validation

          • Possible entries (F4) for the customer master record field Account
          • statement
            • Parameter indicator in the master record for the program on periodic
            • account statements.
              Acct stmnt Text
              ------------------------------------------
              1 Weekly account statement
              2 Monthly account statement
              2.2. Examples of program variants for account statement:
              Program RFKORD70
              SAP17 Correspondence sorting K1
              Line item sorting P1
              Calendar ID ZR
              Balance for prev.10-days X
              Current 10-day open items X
              Open./clos.bal.f.curr.10-day X
              Bal.for subsequent 10-days X
              Output to printer Define printer (for
              each company code
              if necessary)
              Log to printer Define printer for error
              list (for each company
              code if necessary)
              ZAP17 Form set IT
              Correspondence sorting K1
              Line item sorting P1
              Calendar ID ZR
              Balance for prev.10-days X
              Current 10-day open items X
              Open./clos.bal.f.curr.10-day X
              Bal.for subsequent 10-days X
              Output to printer Define printer (for
              each company code
              if necessary)
              Log to printer Define printer for error
              list (for each company
              code if necessary)

              3. Factory calendar:
              You make the following settings in Customizing for Global Settings
              under Maintain calendar.
              ID Calendar name
              -----------------------
              ZR 10-day settlement
              Here you define a factory calendar which only contains the settlementdates as work days.
              If you create a factory calendar for agency business (such as ZR), youcan use program RWLFCALC for this.

145200Correspondence: data from central address management
366042Expiring currencies processes FI
362277Expiring currencies: correspondence