SAP® Documentation

Single view

/CONSOLUT/IC_RFKORD50 - Print Program: Document Extract

TXBHW - Original Tax Base Amount in Local Currency   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

Description

The program prints letters in which selected customer items and/or vendor items of a document are listed. The selection is carried out via the selection options for posting keys and special G/L indicators. In the standard system, the print program is used for the output of credit memo displays to customers.

The print program is generally only carried out directly during the configuration for testing purposes. Otherwise, the call is carried out automatically by higher-level correspondence programs.

Requirements

Before being able to print document extracts within the correspondence, the following requirements must be met.

  1. 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.
  1. 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 you can copy and correspondingly adapt to your requirements.
The form F140_DOCU_EXC_01 is used in the standard system.

The following restrictions apply to the creation of document extracts:

  1. Intercompany transactions are not supported.
  2. Even with head offices with local processing, document extracts are also addressed to the head office and not to the branch.
  3. With document extracts to one-time customers, only business transactions for one customer may be posted in a document.
  4. For clearings between customers and vendors, a document extract is created for each pair of customers/vendors in case of a corresponding indicator in the master records and is addressed to the customer.

Output

For each customer, vendor or pair of customers/vendors of a document, a document extract is created. A separate spool request is created for each company code. For test purposes, an output can be carried out 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, i.e. 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, a log with the created spool requests is output for each program run if a print request was carried out. 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 log is output on the screen. If the program is planned as a job, the spool request name of the log 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 carried out by the higher-level program (trigger for correspondence).

Information about the Standard Form and Text Symbols

Information on the form layout

Information on text symbols

Example

Customizing for document extracts is explained in the following by means of the standard system and an example of customer-specific extensions.

Customizing:

Make the settings for correspondence in the "Financial accounting global settings" Implementation Guide. Make the settings for the document extract under the "Outgoing credit memo correspondence" option in the "Accounts Receivable and Accounts Payable" Implementation Guide. There you maintain the suboptions in accordance with the following guidelines.

Note:
With tables, in which a default entry without company code is allowed, the default entry is accessed if no entries for the special company code exist. If you do not want this, you should only make table entries with which the company code is predefined. With the relevant tables, there is a note on the default entry company code blank below.

The correspondence types, the forms and standard texts starting with Z are examples of customer-specific objects which are not delivered with the standard system.

1. "Financial Accounting global settings": Correspondence settings:

For document extracts, the settings are to be maintained as follows.

1.1. Examples of the correspondence types:

             SAP11  Customer credit memo

                    X Document necessary

             ZAP10  Customer credit memo with individual text

                    X Document necessary

                    X Individual text

1.2. Examples of program allocation:

The entries are to be left blank either explicitly for individual or all company codes or as a default for company code.

                   CCode   CorID  Program   Variant   Default text

----------------------------------------------------

                   0001    SAP11  RFKORD50  SAP11

                   0001    ZAP10  RFKORD50  ZAP10     ZF140_DOCU_EXC

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, a standard text must always exist and be entered during program allocation. 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 using the transaction SO10 (Menu -> Utilities -> Copy from client).

Everybody who wants to use the text ID FIKO needs the authorization to do so. The authorization object for which the authorization must be defined is called "standard text". In the standard system, it is included in the profile S_SACHBEARB and authorizes for every text ID. However, everybody needs at least the authorization for the text ID ST and FIKO.

In the standard text, you may only use the paragraph formats defined for the corresponding form.

If you enter a language for the correspondence request, into which the default text is not translated, you receive an empty editor to enter the text.

Default text ZF140_DOCU_EXC, TEXT-ID FIKO

Format  Text area

/*      Text for individual customer credit memo

AF

If you want to enter individual text passages at several positions in the form, you can create the default text analogous 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

However, this option 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&

From the default texts, individual texts whose names are made up of the identification code F140, the user ID, the request date and the time of day of word processing are then created for each correspondence request. You can change these texts with the maintenance transaction for correspondence requests.

1.4. Examples of forms:

The entries are to be left blank either explicitly for individual or all company codes or as a default for company code.

        CCode Program  Fo      Form

        ---------------------------------------

        0001  RFKORD50         F140_DOCU_EXC_01

        0001  RFKORD50 IT      ZF140_DOCU_EXC_1

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 "Y" or "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 you created in languages for which no translation exists, you can translate the forms using the transaction SE63.

In the standard form for document extracts, preparations have been made in the following text elements for the usage of individual texts or the direct usage of a standard text:

        Form                Window   Text elements

        F140_DOCU_EXC_01    MAIN     510, 511, 512, 513, 514

However, you can principally use the individual texts at every position of a form.

Examples of form modifications:

Form ZF140_DOCU_EXC_1

a.) Create the form ZF140_DOCU_EXC_1 and copy

the form F140_DOCU_EXC_01 into the form ZF140_DOCU_EXC_1.

b.) Modify text elements 510, 511, 512, 512,

and 514 in the window MAIN analogous to the following example:

    Format Text area

    /E     510

    /*     Credit memo

    /*

    /*

    /*     &SGDH&,

    /*

    /*     we have credited the amount listed below to your account.

           Please clear this amount with your next payment.

    /:     INCLUDE &RF140-TDNAME& OBJECT BKORM ID FIKO LANGUAGE

           &RF140-TDSPRAS&

During output, the variable RF140-TDNAME contains the name of the individual text belonging to a correspondence request respectively. The variable RF140-TDSPRAS contains the entry language or the output language of the text. The entire letter is output in this language.

Additional date specifications are supplied in the variables RF140-DATU1 and RF140-DATU2 for printing out the form for each correspondence request. You can integrate these variables into a form which you want to create at the place required.

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 specifications:

The entries are to be left blank either explicitly for individual or all company codes or as a default for company code.

CCode Program TXTID Header text      Footer text      Signature

                    Sender

-----------------------------------------------------------------------

0001  RFKORD50      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 you do not need individual specifications, such as header text and footer text due to printed company paper, you can leave the respective fields in the table blank. However, at least the standard text for the signature is generally needed. However, you should enter 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 explicitly for individual or all company codes or as a default for company code.

CCode Type of correspondence                  DocEnt. Pymt DocNo. Acct

------------------------------------------------------------------------

0001  SAP11 Customer credit memo               X             X      X

0001  ZAP10 Cust. credit memo w. indiv. text   X             X      X

1.7. Sort Variants for Correspondence:

You must define at least one sort variant for the correspondence for document extracts. You determine the order in which the document extracts are issued using the sort variants for correspondence.

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 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 list of the fields you can select 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:

You can define sort variants for the 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

Objects are always sorted initially by company code and thereafter in the 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 select from 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. Document extracts:

You define the variants under the "Outgoing credit memo correspondence" option in the "Accounts Receivable and Accounts Payable" Implementation Guide. Examples of program variants:

        Program RFKORD50

        SAP11  Posting key                   11

               Sorting of correspondence     K1

               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)

        ZAP10  Posting key                   11

               Form set                      IT

               Sorting of correspondence     K1

               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)






BAL_S_LOG - Application Log: Log header data   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 38062 Date: 20191021 Time: 180621     sap01-206 ( 127 ms )

Our Service

Looking for Support? Questions?

The

Consolut

Callback-Service

Leave us your contact details and we will call you back. Panels marked with * are mandatory.