SAP Program RFBIBL00 - Batch Input Documents

Use
The RFBIBL00 program is used for entering accounting documents and forclearing open items. This is done by importing and processing a UNIXfile with the structure described below.
The program is primarily intended for generating batch input sessions.Documents can, however, also be generated immediately using "calltransaction" or "direct input" by means of the "Data transfer type"parameter. Both of these procedures lead to improvements in systemperformance when transferring large quantities of data (more than 10,000transactions).
The difference between a call transaction and batch input is that thedocuments are posted immediately by calling the correspondingtransactions. The same screens are processed as for batch input.
The documents are also posted immediately with direct input. Theimprovement in system performance compared with a call transaction isachieved because no screens are processed and the documents aretherefore posted directly by calling function modules. Direct input isonly available for some of the posting options. No FB05 postings(posting with clearing), FBS1 postings (accrual/deferral documents),FBV1 postings (park document), nor postings with special G/Ltransactions can be generated.

Restart mechanism
Since the documents are posted immediately into the SAP System with"call transaction" or "direct input", you must take precautions to allowa program restart after a program termination. This restart (which isreferred to here as the restart mechanism), is used to prevent duplicateposting of documents during a new program start.
If you select call transaction or direct input, you should definitelyuse the restart mechanism. To do this, carry out the following steps:

  • First of all create a variant for the RFBIBL00 program.

  • IF &DEVICE& = 'SCREEN'
    Proceed
    ENDIF
    • Define a job which can be restarted.

    • IF &DEVICE& = 'SCREEN'
      Proceed.
      ENDIF
      • Start the job which can be restarted.

      • IF &DEVICE& = 'SCREEN'
        Proceed.
        ENDIF
        Requirements for the restart mechanism:
        • The input file may not contain any formal errors. This can be
        • established using the "Check file" parameter. The restart procedurecannot be used if there is a termination due to a formal error. You mustthen find out yourself which documents were posted up until thetermination and then reduce the file correspondingly.
          If a file which is to be processed using direct input contains FB05transactions, then a termination occurs without a restart option.
          • The program may only be imported in the way described above.

          • Transactions with errors are collected in a batch input session. The
          • session name of the first BGR00 record is always used.
            Direct input or call transaction can also be used without the restartmechanism for test purposes. In this case, however, the input file mayno longer contain more than 20 transactions. A restart after a programtermination is, however, then not possible.

            Note

            Structures:

            • Information which affects the entire batch input session is defined in
            • the session prefix.
              • Information which applies to an entire document is defined in the header
              • record.
                • The document fields for which batch input is to be possible are defined
                • in separate Data Dictionary structures.
                  Each structure is identified by record type and possibly by table name.
                  The structures, in detail, are:
                  • BGR00 record type 0 session prefix

                  • BBKPF record type 1 header data

                  • BBSEG record type 2 document segment data (including one-time data,

                  • COBL data)
                    • BBTAX record type 2 document taxes (see paragraph on "New entry methods

                    • for tax amounts")
                      • BWITH record type 2 document withholding tax data (extended withholding

                      • tax functions; FB01 and FBV1 only)
                        • BSELK record type 2 selection header data (FB05 only)

                        • BSELP record type 2 selection items (FB05 only)

                        • For each field which is transferred to the batch input structure, youmust decide whether the value of the field is initial (for example, thefield should be reset to zero) or whether no batch input at all isnecessary for this field.
                          This means that a special character must be specified which has thefunction: "No batch input for this field".
                          This special character is the character "/" by default.
                          If you do not wish to use the special character "/", you can specifyanother special character in the session prefix in field BGR00-NODATA,which will carry out this function.
                          Before filling the batch input structure, each structure field (exceptthe session prefix BGR00) must be "prepared" at the beginning of thefield with this special character.
                          The structure fields refer to data elements of fields from the originaltables. However, numeric and packed fields are an exception. These needseparate data elements of category CHAR for batch input, since packedfields cannot be "initialized" with a special character.
                          That means that amounts can be transferred with decimal points to theinterface.

                          Record end indicator:
                          If a batch input structure is extended later, the new end of thestructure is indicated by a special field (SENDE). If you are alreadyworking with the new, extended structure, then enter the specialcharacter NODATA in this field when "initializing" the structure. Youcan then see when importing the structure whether the data is based onthe old or the new structure.

                          Special fields in the session prefix:
                          In the session prefix, the batch input session name must be given(BGR00-GROUP). Sending a further session prefix causes the closing ofthe current session and the opening of a further session.
                          In the session prefix, you can transfer the special characterBGR00-NODATA.
                          You can transfer a lock date in the session prefix (BGR00-START). Thelock date specifies the day up until which a batch input session islocked. If you set this date, it must have the format "YYYYMMDD".

                          Customer-defined batch input structures:
                          If you do not need certain fields in the standard batch input structuresand do not want to enter the special character NODATA each time, you candefine your own structures that contain only those fields you reallyuse.
                          The following structures are possible:

                          • ZBSEG record type 2 document segment data

                          • ZSELP record type 2 selection items (FB05 only)

                          • The customer-defined structures beginning with "Z" may only vary fromthe standard structures beginning with "B" such that part of the fieldsare not contained in them. However, you may not omit the fields "Recordtype" (-STYPE) or "Table name" (-TBNAM).
                            You generate your own batch input structure by creating a new structureunder the specified name and copying the fields you need from thereference structure. You then activate the structure.
                            You can access structure maintenance via Development -> ABAPDictionary in the development environment. Alternatively, you canaccess the maintenance function here: Proceed.
                            Programs:
                            • RFBIBL00 starts RFBIBL01 and possibly RFBIBLG0

                            • RFBIBL01 contains the processing logic and includes RFBIBL02

                            • RFBIBLG0 generation program

                            • The generation program RFBIBLG0 generates the ABAP coding of RFBIBL02which is included in RFBIBL01. The generation program startsautomatically if RFBIBL02 does not have the latest version. This appliesif you have created or deleted the customer- specific structures ZBSEGor ZSELP.
                              You should start the generation program even if the RFBIBL01 programcontains a syntax error.

                              Transactions supported

                              • FB01 Post document

                              • FBB1 Post foreign currency valuation

                              • FBS1 Enter accrual/deferral document

                              • FBV1 Park document

                              • FB05 Post with clearing

                              • For transaction FB01, a document header (BBKPF) must be transferred perdocument and a BBSEG structure per line item.
                                A maximum of 950 line items are permitted, the remaining line items arereserved for automatically generated items (for example, tax details).
                                Structure BBSEG also contains the fields for the additional screens.When processing the session, the additional screens are only output ifbatch input data was transferred to them.
                                Structure BBSEG also contains the fields for one-time data and the datafor the coding block. The screen for one-time data is displayed if youhave to post to a one-time account or if an alternative payee is to bespecified in the document. The data for the coding block in batch inputis generally displayed on a separate screen. Here, you should note thefollowing name differences:
                                ,,COBL-KDAUF,, ,,=,,BBSEG-VBEL2,, Sales order number
                                ,,COBL-KDPOS,, ,,=,,BBSEG-POSN2,, Item in sales order
                                ,,COBL-RMVCT,, ,,=,,BBSEG-BEWAR,, Transaction type
                                ,,COBL-PS_PSP_PNR,,=,,BBSEG-PROJK,, Project account assignment
                                ,,COBL-PPRCTR,, ,,=,,BBSEG-PPRCT,, Partner profit center
                                ,,COBL-KDEIN,, ,,=,,BBSEG-ETEN2,, Schedule line in sales order
                                With effect from Release 3.0D, you can also enter the characteristicsfrom profitability analysis in the BBSEG structure. Program RFBIBL00will then automatically generate a batch input session for FB01 withaccount assignment to the profitability segment (including assigning theprofitability segment number, deriving characteristics and allvalidations that also take place during online posting).

                                Transferring the commitment item
                                In the standard system the BBSEG-FIPOS field has been defined fortransferring the commitment item. The only exception is for the IS-PS(Public Sector) industry solution. Here the BBSEG-FIPEX field is to beused for the commitment item rather than the BBSEG-FIPOS field.

                                Post with clearing (FB05)
                                For transaction FB05, in addition to the header record (BBKPF) andpossibly line items (BBSEG), the selection header data (BSELK) and theselection items (BSELP) must be transferred. For technical reasons, youmust transfer the data for BBSEG before BSELK and BSELP.
                                In a BSELP structure, you can transfer up to 18 selection items. If thatis not sufficient, further BSELP structures can be transferred.
                                You can also use a BSELP structure to select a specific line item in theform . The document numbermust have 10 characters and the line item 3, and the preceding zerosshould also be entered.
                                Example: Selecting the third line of document 0000222222 from fiscalyear 1997.
                                BSELP-FELDN_1 = "BELNR"
                                BSELP-SLVON_1 = "00002222221997003"

                                New entry method for tax amounts
                                With effect from Release 2.2A, the entry method for taxes hasfundamentally changed. You no longer have to specify the taxes in theG/L account items. For transactions FB01 and FB05 you now have thefollowing options when entering taxes:

                                • Calculate taxes automatically

                                • Enter taxes on a separate screen

                                • Enter tax amounts in total on the customer or vendor screen.

                                • This results in the following changes in RFBIBL00:
                                  • Simple postings with taxes are upwardly compatible, that is, the data
                                  • can be transferred in the form used until now. This applies to thefollowing:
                                    Postings where all tax amounts for a transaction are calculated byentering "*" in the WMWST field.
                                    Postings where all tax amounts for a transaction are specified in fieldWMWST.
                                    • The following options now exist for transferring taxes:

                                    • Tax is calculated automatically if field BBKPF-XMWST is transferred withthe value "X".
                                      The data relevant to tax calculation should be transferred in the BBTAXstructure. A BBTAX structure must be supplied for each tax codebelonging to a posting key. You can also send a BBTAX structure for eachtax-relevant line item. Transfer the BBTAX structure after the BBSEGentries. If you are using the direct input method for data transfer, youcan transfer taxes only in this way.
                                      The total tax amount can be entered on the customer or vendor screen.
                                      • You should transfer the taxes either in the new form or in the old form.
                                      • If you mix the forms, a system error will occur.

                                        Extended withholding tax functions:
                                        Only transactions FB01 and FBV1 are supported for the extendedwithholding tax functions. Direct input is not supported.
                                        The withholding tax data for BWITH must be transferred for everycustomer/vendor line item. The withholding tax data must come after theBBSEG data. A BWITH structure must be transferred for each withholdingtax type.

                                        The following transactions are not yet supported:
                                        Special G/L transactions which cannot be posted with the usual screensfor FB01.

                                        Generation of record layouts:
                                        This tool generates structure descriptions from tables or structures inthe ABAP Dictionary in a higher level programming language (for example,COBOL).
                                        Alternatively you can go from this screen directly to Customizing.Proceed.

51366CO-PA: Actual data update with PERFORM ON COMMIT
1116141BBKPF-VATDATE has the wrong data type
1391341VATDATE: Incorrect initialization for direct input
1347046VATDATE: Field missing in batch input parking (FBV1)
890237New GL with document splitting: Legacy data transfer
1114546Batch Input: No data entry possible on tax screen 450
658991FB01: Consolidtn transctn type on customer/vendor line itms
1046987PSCD: Runtime error in the program RFBIBL000
863392RFBIBL00: The first record is not a session record
673641RFBIBL00: Message 00 344 for screen SAPLFWTD0100 (IV)
427546Important notes for FI-FM and PSM-FM
488137§48 EStG: Composite note on questions/probs in environment
510856F5302 when executing RFBIBL00 in 'Direct input' mode
42615Substitution in FI
134430Information: Euro conversion and CO-PA
63019RFBIBL00 'D': fields missing in accounting doc
204707RFBELJ00: SPOOL_I/O_ERROR
414951RFBIBL00: FIPOS not updated correctly for down payment
309554FB01: Barcode dialog box in batch input with 'C'
166487TABLE_INVALID_INDEX in FI/CO interface
76016Performance: RFBIBL00, RFBIDE00, RFBIKR00
17649Selected items are inactive for FB05