SAP Program RFKORD30 - Print Program: Internal Documents

Description
Accounting documents can be printed with this program. As a result, themanual creation of an auxiliary document is no longer necessary.
As a rule, the print program is only carried out directly, for testpurposes, during the system configuration. In all other cases, it iscalled up automatically by higher-level correspondence programs.

Precondition
Before you print internal documents for correspondence purposes, thefollowing 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.
Define forms
Forms must be defined and activated so that you can print thecorrespondence you require. A form is delivered in the standard systemwhich you can copy and adjust as necessary.
In the standard system, form F140_INT_DOCU_01 is used.
Correspondence types for internal documents with individual textscannot be used for the internal documents created with programRFKORB00.

Output
Every document is issued separately. A seperate spool request iscreated per company code. For test purposes, documents can also bedisplayed on the screen. If you do not specify for the print program onwhich printer the correspondence should be printed, the program maytake the printer specified in the user master of the user who startedthe program or the printer specified when the job is scheduled.
If minor errors occur during the program run, i.e. errors that do notlead to a program termination, these are listed after the run in anerror list. If you want these error lists to be printed on a certainprinter, you should specify a printer for the log in the print programor the print program variant. If you do not make this specification,the program reacts as above (as for the printer for thecorrespondence). If the program is run online, the error list isdisplayed on the screen. If,however, the program is scheduled as a job,the job request name for the error list is composed of the identifierF140ER, the printer name and maybe the correspondence type and/or thecompany code.
If the print program is carried out directly, a log of the generatedspool requests is printed per program run. If you do not specify forthe print program on which printer the log should be printed, theprogram may take the printer specified in the user master of the userwho started the program or the printer specified when the job isscheduled. If the program is run online, the log is displayed on thescreen. If the program is planned as a job, the spool request name ofthe log consists of the ID F140, the printer name, the date of creationand the program ID KORD. If the print program is started by ahigher-level correspondence program, the the log is issued by thatprogram (for example, trigger for correspondence or internal document).

Information about the Standard Form and Text Symbols
INCLUDE FI_RFFO_SAPSCRIPT_LAYOUT_SET OBJECT DOKU ID TX
Information on form layout
Information on text symbols
INCLUDE FI_RFFO_SAPSCRIPT_MAINTAIN OBJECT DOKU ID TX
RESET N1

Example
Customizing for internal documents is described in the following, onthe basis of the standard delivery system, with an example ofcustomer-specific adaptations.

Customizing:
Make the settings for correspondence in the "Financial AccountingGlobal Settings" Implementation Guide. There you maintain thesuboptions in accordance with the following guidelines.
Note:
For tables in which a default entry without the company code ispermitted, the system refers back to the default entry if there are noentries available for a specific company code. If you do not want this,you should make sure that you only make table entries for which thecompany code is specified. A note on the default entry company codeblank is available further down in the relevant tables.
The correspondence types, forms and standard texts which start with Z,are examples of customer-specific objects which are not delivered withthe standard system.

1. "Financial Accounting Global Settings": Correspondence Settings:
For internal documents, maintain the base parameters as follows.
Do not maintain the sender details, since the internal documents arenot sent in letter form.
1.1. Examples of the various correspondence types:
SAP09 Internal document
X Document required
ZAP08 Internal documents with individual note
X Document required
X Individual text
1.2. Examples of program allocation
The entries should be made either explicitly for individual companycodes or all company codes or as a default for company code blank.
CoCde CorID Program Variant Proposed text
-----------------------------------------------------
0001 SAP09 RFKORD30 SAP09
0001 ZAP08 RFKORD30 ZAP08 ZF140_INT_DOCU
1.3. Examples of text proposals
The text proposals must be stored as a standard text with the text IDFIKO. For individual texts, a text reference must exist which isentered during program allocation. A text reference must contain atleast one comment line (format line = /*). Text proposals can bemaintained in the detail screen for program allocation via Goto -> Texteditor or in the configuration menu via Tools -> Word processing ->Standard text.
With Transaction SO10 you can check to see whether standard texts areavailable in the client in which you need them. The text ID is FIKO.You can use Transaction SO10 to copy standard texts from other clients(Menu -> Utilities -> Copy from client).
You need the relevant authorization to use Text ID FIKO. Theauthorization object for which the authorization must be defined iscalled "Standard text". In the standard system it is included in theprofile S_SACHBEARB and authorizes you to use all text ID's. However,everyone needs authorization for at least text ID's ST and FIKO.
In the standard text you can only use those paragraph formats whichhave been defined for the corresponding form.
If you enter a language on requesting correspondence, into which thetext proposal has not been translated, the system displays an emptytext editor in which you can enter your text.
Text proposal ZF140_INT_DOCU, TEXT-ID FIKO
Format Text area
/* Individual note on internal document
AF <(>&ULINE(72)&<)>
AF
If you want to enter individual passages at various points in the text,you can create a text proposal based on the following example:
Text proposal ZEXAMPLE, TEXT-ID FIKO
Format Text area
/* Example for several individual text passages
/: IF <(>&RF140-ELEMENT&<)> = 'XXX'.
/* Text in text element XXX
AF Text 1
/: ENDIF
/: IF <(>&RF140-ELEMENT&<)> = 'YYY'
/* Text in text element YYY
AF Text 2
/: ENDIF.
XXX and YYY represent numbers of text elements.
In windows which contain no text elements marked by numbers, thispossibility cannot be used however.
On the basis of the text proposals, individual texts whose nameconsists of the ID F140, the user name, the request date and the timethe text was created, are then generated per correspondence type. Thesetexts can be changed with the maintenance transaction forcorrespondence requests.
1.4. Examples for the forms
The entries are either made explicitly for individual or all companycodes or as a default for company code blank.
CoCd Program FS Form
--------------------------------------
0001 RFKORD30 F140_INT_DOCU_01
0001 RFKORD30 IT ZF140_INT_DOCU_1
With transaction SE71 you should check to see whether the standard formis available in the client you require. If standard forms are notavailable, you can copy the missing forms from client 000 withtransaction SE7 1 (Menu -> Utilities -> Copy from client).
You can create your own forms by copying the standard form and changingthe form text (usually in the MAIN window). Your forms must start with"Y" or "Z". The form name should contain the ID "F140".
Your own forms or standard forms in clients other then client 000, mayneed to be modified to comply with the standard form in client 000 whenthere are release changes.
If you need the standard form or an individually created form inlanguages for which there are, as yet, no translations, you cantranslate the forms using transaction SE63.
In the standard form for internal documents, provision has been madefor the use of individual texts or the direct use of a standard text inthe following text elements:
Form Window Text elements
F140_INT_DOCU_01 MAIN 510
On principle, however, you can use the individual texts at any place inthe form.
Examples of form modifications
Form ZF140_IND_DOCU_1
a.) Create the form ZF140_IND_DOCU_1. Transfer form F140_IND_DOCU_01to form ZF140_IND_DOCU_1.
b.) Modify text element 510 in the MAIN window as follows:
Format Text area
/E 510
/: INCLUDE <(>&RF140-TDNAME&<)> OBJECT BKORM ID FIKO LANGUAGE
<(>&RF140-TDSPRAS<)>
On output, the variable RF140-TDNAME contains the name of theindividual text belonging to a correspondence request. VariableRF140-TDSPRAS contains the input or output language of the text. Theentire letter is issued in this language.
Example for 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 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. Call options
          The entries should be made either explicitly for individual or allcompany codes or as a default for company code blank.
          CoCd Type of correspondence DocEnt No. DocDis Act
          ------------------------------------------------------------------------
          0001 SAP09 Internal document X X X
          0001 ZAP08 Internal document with indiv. note X X X
          1.6. Examples of Sort Varaints:
          For internal documents, you must define at least one sort variant forthe internal documents. You use the sort variants to determine thesequence in which the internal documents are printed.
          Sort variant Name
          Sequence Field name Name Offset length
          B1 Document number, fiscal year
          1 BELNR Document number 10
          2 GJAHR Fiscal year 4
          B2 Reference, fiscal year
          1 XBLNR Reference 16
          2 GJAHR Fiscal year 4
          B3 Document type, document number, year
          1 BLART Document type 2
          2 BELNR Document number 10
          3 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 document header table BKPF.
          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 table BKPF, that are not yet in table RF140V, into tableRF140UZZ. When doing so, you must take care to use the field names anddata elements from the standard tables, as the fields in table RF140UZZare supplied using the names from the master records. After you haveadded these fields, you must activate table RF140UZZ.
          1.6 Examples for report variants
          Program RFKORD30
          SAP09 Correspondence sorting B1
          No. of lines in address 3
          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)
          ZAP08 Form set IT
          Correspondence sorting B1
          No. of lines in address 3
          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)

863809RFKORD30: Adjustment to the New General Ledger
366042Expiring currencies processes FI
362277Expiring currencies: correspondence