Ansicht
Dokumentation
RFKORD10 - Print Program: Account Statement
ABAP Short Reference ABAP Short ReferenceThis documentation is copyright by SAP AG.
Description
This program prints account statements and open items lists for customers and vendors in letter form.
For account statements, all postings between two key dates, as well as the opening and closing balance, are listed. Alternatively, the opening balance can be divided up into the causal open items.
For the open items list, all open items at a key date, and the balance at the key date are listed.
The account statements and open items lists can be supplemented by totals specifications to due items, sorting of open items, and specifications on noted items.
As a rule, the print program is carried out directly only during the configuration for testing purposes. Otherwise, the call is carried out automatically by means of higher-level correspondence programs.
Requirements
Before you can print account statements and open items lists within correspondence, the following requirements must be met.
- Configuration
- Make the basic settings for correspondence in the "Financial Accounting Global Settings" Implementation Guide. You can find more detailed explanations on the standard settings further on in this program documentation.
- Defining forms
- Forms must be defined and activated in the system so that you can print the required letters. The standard system provides a form that you can copy and adapt to your own requirements.
- In the standard system, the forms F140_ACC_STAT_01 and F140_ACC_STAT_02 are used.
The following restrictions apply to the creation of account statements and open items lists:
- No account statements can be created for one-time customers.
- Even with head offices with local processing, payment notices are addressed to the head office and not to the branch.
- Correspondence types for account statements or open items lists with individual text cannot be used for the periodic account statements created using program RFKORK00.
Output
An account statement or an open items list is output for each customer or vendor. A separate spool request is created for each company code. For test purposes, the data can be displayed on the screen. If you do not specify for the print program on which printer the correspondence should be printed, the program may take the printer specified in the user master of the user who started the program or the printer specified when the job is scheduled.
If minor errors occur during the program run, that is errors that do not lead to a program termination, these are listed after the run in an error list. If you want these error lists to be printed on a certain printer, you should specify a printer for the log in the print program or the print program variant. If you do not make this specification, the program reacts as above (as for the printer for the correspondence). If the program is run online, the error list is displayed on the screen. If, however, the program is scheduled as a job, the job request name for the error list is composed of the identifier F140ER, the printer name, and maybe the correspondence type and/or the company code.
If the print program is carried out directly and a printout issued, then a log with the spool orders created is issued for each program run. If you do not specify for the print program on which printer the log should be printed, the program may take the printer specified in the user master of the user who started the program or the printer specified when the job is scheduled. If the program is carried out online, the error list is displayed on the screen. If the program is planned as a job, the spool request name of the error list is made up of the identifier F140, the printer destination, the date of creation and the program ID KORD. If the print program is started by a higher-level correspondence program, the log entry is made by means of the higher-level program (for example, trigger for correspondence or periodic account statements).
Information about Standard Forms and Text Symbols
Information about text symbols
Example
Customizing for account statements or open items lists is explained below using the standard system and examples of customer-specific extensions.
Customizing:
Make the settings for correspondence in the "Financial Accounting Global Settings" Implementation Guide. There you maintain 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 special company code exist. If you do not want this, you should only make
table entries with which the company code is predefined. For the relevant tables, a note exists further down on the default entry company code.
The correspondence types, forms and standard texts which start with a Z are examples of customer-specific objects which are not delivered in the standard system.
1. "Financial Accounting Global Settings": Correspondence Settings:
For account statements or open item lists, the settings are to be made as follows.
1.1. Examples of the correspondence types:
SAP06 Account statement without open items
X Account necessary
Number date specif... 2
Meaning date 1....... postings from
Meaning date 2....... postings until
SAP08 Open item list
X Account necessary
Number date specif... 1
Meaning date 1....... OI at key date
SAP15 Open item list (group)
X Account necessary
Number date specif... 1
Meaning date 1....... OI at key date
ZAP04 Account statement with open items and arrears
X Account necessary
Number date specif... 2
Meaning date 1....... postings from
Meaning date 2....... postings until
ZAP05 Open item list with arrears
X Account necessary
Number date specif... 1
Meaning date 1....... OI at key date
ZAP06 Account statement with individual text
X Account necessary
Individual text...... X
Number date specif... 2
Meaning date 1....... postings from
Meaning date 2....... postings until
ZAP07 OI list with arrears and individual text
X Account necessary
X Individual text
Number date specif... 1
Meaning date 1....... OI at key date
1.2. Examples of program assignment:
The entries are to be left blank either for individual or explicitly for all company codes or are to be left blank as default for company code.
CCode CorID Program Variant Default text
----------------------------------------------------
0001 SAP06 RFKORD10 SAP06
0001 SAP08 RFKORD10 SAP08
0001 SAP15 RFKORD10 SAP15
0001 ZAP04 RFKORD10 ZAP04
0001 ZAP05 RFKORD10 ZAP05
0001 ZAP06 RFKORD10 ZAP06 ZF140_ACC_STAT
0001 ZAP07 RFKORD10 ZAP07 ZF140_OPI_LIST
1.3. Examples of default texts:
The default texts must be stored as a standard text with the text ID FIKO. For the use of individual texts, there must always be a standard text, which is entered during program assignment. A standard text must contain at least one comment line (format line = /*). Default texts can be 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 exist in the client in which you need them. The text ID is FIKO. You can copy standard texts from other clients with the transaction SO10 (Menu -> Utilities -> Copy from client).
Everyone wanting to use the text ID FIKO requires the necessary authorization. The authorization object for which the authorization must be defined is called "standard text". In the standard system, it is contained in the profile S_SACHBEARB and authorizes for every text ID. However, everyone needs the authorization for at least the text ID ST and FIKO.
In the standard text, you may only use the paragraph formats defined for the relevant form.
If, you enter a language for the correspondence request, into which the default text is not translated, you receive a blank text editor to enter the text.
Default text ZF140_ACC_STAT, TEXT-ID FIKO
Format Text area
/* Text for individual account statement
AF Accnt.statement from &RF140-DATU1& to &RF140-DATU2&
AF
AF
Default text ZF140_OPI_LIST, TEXT-ID FIKO
Format Text area
/* Text for individual open items list with arrears
AF Open item list for &RF140-STIDA&
AF
AF
If you want to enter individual text passages at several positions in the form, you can create the default text analog to the following example:
Default text ZBEISPIEL, 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, however, cannot be applied in windows that do not contain events (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 all text elements in your form for which individual text passages are to be issued 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 each correspondence request. The names of these
texts are made up of the identification code F140, the user ID, the date of request and the time of text creation. These texts can be changed with the maintenance transaction for correspondence requests.
1.4. Examples of the forms:
The entries are to be left blank either for individual or explicitly for all company codes or are to be left blank as default for company code.
CCode Program Fo Form
--------------------------------------
0001 RFKORD10 F140_ACC_STAT_01
0001 RFKORD10 IT ZF140_ACC_STAT_1
0001 RFKORD10 IV ZF140_ACC_STAT_2
0001 RFKORD10 VZ F140_ACC_STAT_02
0001 RFKORD10 VB F140_ACC_STAT_03
With the transaction SE71, you should check whether the standard forms exist in the client in which you need them. If standard forms do not exist, you can copy the missing forms from client 000 with the transaction SE71 (Menu -> Utilities -> Copy from client).
You can create your own forms by copying the standard form and changing the layout set text (generally in the MAIN window). Your forms must start with a "Y" or a "Z". The form name should contain the identification code "F140".
Your own forms or standard forms in clients not equal to 000 might have to be adapted during release changeovers according to the standard form in client 000.
If you need the standard form or a form created by you in languages for which no translation exists, you can translate the forms using the transaction SE63.
In the standard form for account statements and open items lists, preparations are made for the use of individual texts or the direct use of a standard text in the following text elements:
Form Window Text elements
F140_ACC_STAT_01 MAIN 510, 511
F140_ACC_STAT_02 MAIN 510, 511
In principle, however, you can use the individual texts at any position of a form.
Examples of form modifications:
Form ZF140_ACC_STAT_1
a.) Create the form ZF140_ACC_STAT_1 and copy
the form F140_ACC_STAT_01 into the form ZF140_ACC_STAT_1.
b.) Modify the text elements in the window MAIN as follows:
Format text area
/E 510
/* Accnt.stmnt. from &RF140-DATU1& to &RF140-DATU2&
/: INCLUDE &RF140-TDNAME& OBJECT BKORM ID FIKO LANGUAGE
&RF140-TDSPRAS&
/E 511
/* Open items list for &RF140-STIDA&
/: INCLUDE &RF140-TDNAME& OBJECT BKORM ID FIKO LANGUAGE
&RF140-TDSPRAS&
During output, the variable RF140-TDNAME receives in each case the name of the individual text belonging
to a correspondence request. The variable RF140-TDSPRAS contains the entry language or output language of the text. The entire letter is output in this language.
Example for including document long texts:
If you have entered texts for a document and want them to be printed in the correspondence, proceed as follows:
- Copy the standard form into an individual customer form.
- Determine the window and, if necessary, the text element in which you want to print the document text.
- Determine which data is available when printing the window or text element by using the program documentation (for example, tables BKPF, BSEG, BSID, BSIK, RF140 fields)
- Define the text ID of the document long text which you want to print (for example, 001) within the "Financial Accounting Global Settings" Implementation Guide in the "Define text IDs for documents" step.
- Then insert two lines similar to the following lines at the required position 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 explicitly for all company codes, or are to be left blank as default for company code.
CCode Program TXTID Header text Footer text Signature
Sender
-----------------------------------------------------------------------
0001 RFKORD10 ADRS_HEADER ADRS_FOOTER ADRS_SIGNATURE
ADRS_SENDER
With the transaction SO10, you should check whether standard texts exist in the client in which you need them. The text ID is ADRS. If standard texts do not exist, you can copy the missing texts from client 000 with the transaction SO10 (Menu -> Utilities -> Copy from client).
If, on account of company stationery, you do not require individual specifications - such as the header
text and the footer text - you can leave the respective fields in the table blank. Normally, however,
at least the standard text for the signature is needed. You should, however, make a default entry (company
code = blank and name of the print program) in the table to avoid error messages if you do not want to use texts.
1.6. Call options:
The entries are to be left blank either for individual or explicitly for all company codes, or are to be left blank as default for company code.
CCode Type of correspondence DocEnt. Pymt DocNo. Acct
------------------------------------------------------------------------
0001 SAP06 Account statement w/o open items X X X X
0001 SAP08 Open items list X X X X
0001 SAP15 Open item list (group) X X X X
0001 ZAP04 Accnt statement with OI and arrears X X X X
0001 ZAP05 Open items list with arrears X X X X
0001 ZAP06 Accnt statement with indiv. text X X X X
0001 ZAP07 OI list w. arrears under indiv.text X X X X
1.7. Sort Variants for Correspondence:
There must be at least one sort variant defined for correspondence for account statements and open item lists. You use the correspondence sort variants to determine the sequence in which the account statements or the open item lists are printed.
Sort variant Name
Sequence Field name Name Offset length
K1 Sort by postal code
1 LAND1 Country 3
2 HPSTL Postal code of P.O.box or PSTLZ 10
3 KOART Account type 1
4 KONTO Account 10
K2 Sort by account number
1 KOART Account type 1
2 KONTO Account 10
K3 Sort 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 sequence of 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 contains a selection of fields from the master record tables KNA1, KNB1, LFA1 and LFB1. The fields KOART, KONTO, KTOGR (KNA1-KTOKD or LFA1-KTOKK), and KTOZE (KNB1-KNRZE or LFA1-LNRZE) are filled in accordance with the account type, which is taken from the master record tables. The fields "Document number" and "Fiscal year" are only filled in the case of document-related correspondence, such as payment notices.
You can extend this list of selectable fields in order to meet your requirements. To do so, you can use a repair correction to import fields from the following tables, that are not yet in table RF140V, into table RF140VZZ: KNA1, KNB1, LFA1, and LFB1. When doing so, you must take care to use the field names and data elements from the standard tables, as the fields in table 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 in a pre-defined sequence as follows:
The sort fields are drawn first from the KNA1 or LFA1 data and then from KNB1 or LFB1.
For this reason, fields that have the same name in tables KNA1 and KNB1, or LFA1 and LFB1 may be overwritten.
1.8 Sort variants for line items:
There must be at least one sort variant defined for line items. You can use the sort variants for line items to determine the sequence in 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
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 Group open items
1 KONTO Account 10
2 BLDAT Document date 8
3 XBLNR Reference 16
4 BUZEI Item 3
Objects are always sorted initially by company code and thereafter in the sequence of the fields in the sort variant being used. If the sort variant for line items contains the field UMSKZ in one of its five sort fields, the standard system issues a sub-heading with the name of the special G/L indicator in cases where the special G/L indicator has changed for lists of open items or open noted items. If you do not require this, you can deactivate the appropriate heading lines from the form for account statements or open item lists by using the format column (enter "/*").
To obtain a list of the fields by which the objects are sorted, select "Possible entries" (F4). This 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 your requirements. To do so, you can use a repair correction to import fields 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 field names and data elements from the standard tables, as the fields in table RF140WZZ are supplied using the names from the documents. After you have added these fields, you must activate table RF140WZZ. The sort fields are then supplied in accordance with their names and in a pre-defined sequence as follows:
The sort fields are drawn first from the BKPF data, and then from the BSEG data.
For this reason, fields that have the same name in tables BKPF and BSEG may be overwritten.
2. Account statements:
You make the following settings under "Correspondence" in the "Accounts Receivable and Accounts Payable" Implementation Guide.
2.1. Period types:
The definition of the period types is used for validation and for the possible entries help for the
customer master record field "Account statement". It is also used for the parameter for indicators in the master record of the program for periodic account statements.
AccntStatement Text
---------------------------------------
1 weekly account statement
2 monthly account statement
2.2. Examples of account statement program variants:
Program RFKORD10
SAP06 Correspondence sorting K1
Open item sorting P1
Statement also w/o items 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)
SAP08 Correspondence sorting K1
Line item sorting P1
Open item list X
Statement also w/o items 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)
SAP15 Form set VB
Correspondence sorting K1
Open item sorting P6
Open item list X
Buying group X
Statement also w/o items 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)
ZAP04 Form set IT
Correspondence sorting K1
Line item sorting P1
Break down bal.carr.fwd X
Statement also w/o items X
Key date for due days _______ Standard 1
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)
ZAP05 Form set VZ
Correspondence sorting K1
Line item sorting P1
Open item list X
Statement also w/o items X
Key date for due days _______ Standard 1
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)
ZAP06 Form set IT
Correspondence sorting K1
Line item sorting P1
Break down bal.carr.fwd X
Statement also w/o items 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)
ZAP07 Form set IV
Correspondence sorting K1
Line item sorting P1
Open item list X
Statement also w/o items X
Key date for due days _______ Standard 1
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)
SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up Fill RESBD Structure from EBP Component Structure
This documentation is copyright by SAP AG.
Length: 66842 Date: 20240601 Time: 024559 sap01-206 ( 426 ms )