SAP Program RFKORDJ4 - Print Program: Statement of Account (Period. Billing)

Description
The program prints a "statement of account" (a periodic invoice) whichis used frequently in Japan. The periodic invoice is a special type ofaccount statement for customers.
If you enter a selection such as the from date/to date of the invoice,then the program issues the following list.

  • Last invoiced amount

  • Payment amount between two key dates

  • Items not cleared between two key dates

  • Open items between two key dates

  • Invoiced amount at the current key date

  • All documents which are open at the key date are listed.
    All clearing procedures between two key dates can also be listed.
    If the SD module is in use, you can print the SD document numbers(reference numbers) (with the list of SD items if required) instead ofthe FI document numbers.
    If the documents are not listed in the "statement of account", such as"Pay immediately", you must define a payment term in the documents. Theprogram takes the exception documents into consideration.
    You can carry out the print program directly. You can also call theprogram by means of higher-level correspondence programs (programRFKORK00, Accounts Receivable menu -> Periodic processing -> Printcorrespondence -> Per.acct statements) if you have defined this incustomizing.

    Precondition
    Before you can print the statement of account within correspondence,the following requirements must be met:
    Configuration
    Make the basic settings for correspondence in the "Financial AccountingGlobal Settings" Implementation Guide. You can find more detailedexplanations on the standard settings further on in this programdocumentation.
    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 your own requirements.
    In the standard system, the form F140_CUS_STAT_J1 is used (portraitformat).
    RESET N1
    The following restrictions apply to the creation of the statement ofaccount:
    No statements of account can be created for one-time customers.
    Even for head offices with local processing, the statement of accountis addressed to the head office and not to the branch.
    Corespondence types for statement of account clearing with individualtext cannot be used for the periodic account statements created usingprogram RFKORD00.

    Output
    A statement of account is issued for each customer. A special spoolrequest is generated per company code. For test purposes, a statementcan be displayed on the screen. If you do not specify a printer for thecorrespondence in the print program, the printer is selected from theuser master of the person who started the program or the printerspecified when scheduling the job is taken.
    If errors occur during a program run which are not serious enough tocause termination of the processing, an error list is issued at the endof the program run. If error lists are to be printed on a particularprinter, then you must determine a printer for the log for the printprogram or the variants of the program. If you do not specify a printerfor the log in the print program, the printer is selected from the usermaster of the person who started the program or the printer specifiedwhen scheduling the job is taken. If the program is carried out online,then the error list is displayed on the screen. If the program isscheduled as a job, the spool request name of the error list consistsof the identifier F140ER, the printer name and, if necessary, thecorrespondence type as well as the company code.
    If the print program is carried out directly and a printout takesplace, a log with the created spool orders is issued for each programrun. If you do not specify a printer for the log in the print program,the printer is selected from the user master of the person who startedthe program or the printer specified when scheduling the job is taken.If the program is carried out online, the log is displayed on thescreen. If the program is scheduled as a job, the spool request name ofthe log is made up of the identifier F140, the printer name, the dateof creation and the program ID KORD. If the print program is started bya higher-level correspondence program, the log is issued by means ofthe higher-level program (trigger for correspondence).

    Explanation of the standard form
    In the standard system, this is the form F140_CUS_STAT_J1. It consistsof pages FIRST (first page) and NEXT (subsequent pages).

    The windows in the standard form
    The following windows must be defined for the statement of account:
    HEADER
    The company code-dependent standard text you have stored in the systemis used in the letter header.
    ADDRESS
    The company code-dependent standard text for the sender details storedin the system and the customer's address are inserted in the addresswindow. The formatting of the address complies with postal regulations.
    INFO
    General information is shown here - for example, date of issue, accountand accounting clerk details as well as key date.
    INFO2
    Date specification on the subsequent page.
    INDEX
    The total amount is listed here.
    The text elements: Balance output RF140J-TLSTINV RF140J-TPAIDRF140J-TFORWD RF140J-TSALES RF140J-TINVOC
    PAGE
    Page numbering of the subsequent pages.
    MAIN
    By means of its text elements, the main window defines the contents andappearance of the statement of account.

    The text elements for the statement of account
    There are the following elements for the "MAIN" window:
    The text elements 520 - 540 are used for issuing lists of line items.
    The closing balance of the open items and the balance of the due itemsare issued using text elements 550 - 572.
    Text element 596 is used for issuing the balance carried forward forthe open items.
    Text elements 573 - 577 are used for issuing due date sorted lists.
    Details regarding branches included in the account statement or openitem list are issued using text elements 580 and 581.
    Text elements 597 and 598 are used for details such as the materialnumber, the name, the price etc. from the SD data.
    Text element 590 - 593 can be used for your own purposes. They areoutput at different positions on the statement. You can use these textelements, for example, for a line in which the statement recipiententers the amount which he has to pay in the payment advice or use themfor a complimentary closing and the signature for an account or abalance reconciliation.
    The following elements exist for the "INFO" window:
    Text element 505 alsso issues the name of the accounting clerk at yourcustomer/vendor and the account number which your company has at thecustomer/vendor.
    Text element 506 does not contain this information.

    Text symbols you can use
    When the forms are set up with SAPscript, text symbols are included inthe text, which are then replaced by the appropriate values when theprint programs are run. The fields that can be used for this purposeare defined in the Repository and can be used in the following order asthe program runs:

    • Company code details

    • Company code table data (table T001)
      Company code address (internal structure RAADR)
      Sender details (table T001G)
      • Customer statement or open item list

      • Statement of account

      • During the whole time of the output of the statement of account, thefollowing can be used:
        Letter recipient = customer from document (internal structure DKADR)
        Accounting clerk (table T001S)
        Depending on the account type of the notice recipient, you can, inaddition to the structures listed above, use master record data in thefields belonging to tables KNA1 and KNB1.
        The following RF140 fields: RF140-TDNAME, RF140-TDSPRAS, RF140-SPRAS.RF140-DATU2 is transferred here as the key date for due dates
        Fields RF140-DATU1 and RF140-DATU2 for accruals and deferrals
        Also field RF140-STIDA for open item lists
        The RF140-ELEMENT field contains the three-digit number of the textelement to be printed.
        If the field BSID-SGTXT or BSIK-SGTXT can be used in a text element,then a text is only issued if there is a * at the beginning ofthe line item text.
        Text elements 530, 531 and 536: Line item output tables BSID, T003T andfields RF140-BELEGNUM, RF140-WAERS (= BSID-WAERS), RF140-WRSHB,RF140-DMSHB, RF140-WSSHB, RF140-SKSHB, RF140-ZLSHB. If you enter eithera key date for due dates or generally as the standard key date whenrunning the program or a variant, then the RF140-NETDT and RF140-VZTASfields are also available.
        Text elements 532, 533 and 537: Line item output tables BSIK, T003T andfields RF140-BELEGNUM, RF140-WAERS (= BSIK-WAERS), RF140-WRSHB,RF140-DMSHB, RF140-WSSHB, RF140-SKSHB, RF140-ZLSHB. If you enter eithera key date for due dates or generally as the standard key date whenrunning the program or a variant, then the RF140-NETDT and RF140-VZTASfields are also available.
        Text elements 550, 551, 561, 562, 564, 565, 570 and 571: Balance outputfields RF140-WAERS, RF140-SALDO, RF140-HWAER (= T001-WAERS) andRF140-SALDOHW

        Example
        Make the settings for correspondence in the "Financial accountingglobal settings" Implementation Guide. Make the settings for theaccount statements under the "Corespondence" option in the "AccountsReceivable and Accounts Payable" Implementation Guide. There youmaintain the suboptions in accordance with the following guidelines.
        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 a Zare examples of customer-specific objects which are not delivered inthe standard system.

        1. "Financial Accounting global settings": Correspondence settings:
        For statement of account, the settings are to be made as follows.
        1.1. Examples of the correspondence types:
        SAPJ1 Statement of account (single statement) customer
        X Document necessary
        Number of date specifications 2
        Meaning of date 1... Invoice from
        Meaning of date 2... Invoice to
        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 SAPJ1 RFKORDJ4 SAPJ1 F140_CUS_STAT_J1
        0001 SAPJ1 RFKORDJ4 SAPJ1 ZF140_CUS_STAT_1
        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 -> Word processing ->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.
        If you enter a language for the correspondence request, into which thedefault text is not translated, you receive an empty editor to enterthe text.
        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 RFKORDJ4 F140_CUS_STAT_J1
        0001 RFKORDJ1 IT ZF140_CUS_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.
        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 principle, however, you can use the individual texts at any positionof a form.
        Examples of form modifications:
        Form ZF140_CUS_STAT_1
        a.) Create the form ZF140_CUS_STAT_1 and copy
        the form F140_CUS_STAT_J1 into the form ZF140_CUS_STAT_1.
        b.) Modify the text elements 701 and 590 in the MAIN window
        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 RFKORDJ1 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 (Menu -> Utilities -> Copy from 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.Pmnt DocDsp Act
        -----------------------------------------------------------------------
        0001 SAPJ1 Statement of Account X X X X
        1.7. Sort variants for correspondence:
        You must define at least one sort variant for the correspondence forcustomer statements and open item lists. You determine the order inwhich the statement of accounts are issued using the sort variants forcorrespondence.
        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
        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,KNB1, LFA1 and LFB1. The fields KOART, KONTO, KTOGR (KNA1-KTOKD orLFA1-KTOKK) and KTOZE (KNB1-KNRZE or LFA1-LNRZE) are filled inaccordance with the account type, which is taken from the master recordtables. The fields "Document number" and "Fiscal year" are only filledin the case of document-related correspondence, such as paymentnotices.
        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 following tables, that are not yet in table RF140V,into table RF140VZZ: KNA1, KNB1, LFA1 and LFB1. When doing so, you musttake care to use the field names and data elements from the standardtables, as the fields in table RF140VZZ are supplied using the namesfrom the master records or one-time account data. After you have addedthese fields, you must activate table RF140VZZ. The sort fields arethen supplied in accordance with their names and in a pre-definedsequence as follows:
        The sort fields are drawn first from the KNA1 or LFA1 data and thenfrom KNB1 or LFB1 and finally from BSEC data.
        For this reason, fields that have the same name in tables KNA1 and KNB1or LFA1 and LFB1.
        1.8 Sort variants for line items:
        You must define at least one sort variant for the OI list and for thestatement of account as well as a sort variant for clearing prcoedures.You can use the sort variants for line items to determine the sequencein which the line 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
        Objects are always sorted initially by company code and thereafter inthe sequence of the fields in the sort variant being used.
        If the sort variant for line items contains the UMSKZ field in one ofthe five sort fields, then a sub-heading with the name of the specialG/L indicator is output in the standard system when changing thespecial G/L indicator for lists of open items or open noted items. Ifyou do not require this, you can deactivate the corresponding headingsin the form for account statements or open item lists by means of theformat line (entry /*).
        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.Examples of statement of account program variants:
        You make the settings for the program variant under the"Correspondence" option in the "Accounts Receivable and AccountsPayable" Implementation Guide.
        Program RFKORDJ1
        SAPJ1 Correspondence sorting K1
        OI list sorting P1
        Clearing procedure sorting P5
        Net due date sorted list X
        Overdue sorted list X
        DUe date sorted list 30 60 ___ ___ -