Programme SAP RM06BBIE - Create Sequential Dataset for Batch Input: Purchase Requisition


Description
This report serves as an example of how to use a batch input program tocreate sessions in order to create and change purchase requisitions inthe system. On the basis of the example report, you can note thestructure of the required sequential file.
The program reads the sequential file specified in it as parameter, andgenerates one or more batch input sessions from this file.

Precondition
Before you generate the session, you must extract the data to beadopted from the source system and write it to a sequential file usinga program you have written yourself.
The data is expected on the sequential file in the following sequence:

  • For each session, a session record (BGR00, record type 0)

  • All further records up to the next session record are assigned to thelast-read session unless the session reaches the prescribed maximumnumber of transactions per session.
    • For each transaction, a header record (BEBA0, record type 1)

    • All further records up to the next header record are assigned to thelast-read transaction.
      The header record contains the transaction code, the document type, thepurchase requisition number (if the number is to be assignedexternally),and an indicator for automatic source determination.
      • For each requisition item, a record with the data of this item (BEBAN,
      • record type 2, table name BEBAN).
        All records for purchase requisition items are combined in atransaction until
        the next session record follows
        the next header record follows
        an item record contains a different, external requisition number
        the maximum number of items for the transaction is reached.
        • For each account assignment of a requisition item, a record with the
        • account assignment data (BEBKN, record type 3, table name BEBKN).
          All account assignments for an item must follow directly after therecord for the item (BEBAN).
          • For each subcontracting component of an item, a record with the
          • component data (BKOMP, record type 4, table name BKOMP).
            All components for an item must follow directly after the record forthe item (BEBAN) or after any existing account assignments for theitem.
            • For each line of long text, a record (BLINES, record type 5, table name
            • BLINES).
              All lines of a text type must follow consecutively and are kepttogether through specification of the same two-character number in thefield BLINES-TBNAM. With this number, you also determine which texttype is filled with the relevant text. Example: BLINES-TBNAM = '02'causes the second text on the text overview screen of the requisitionto be filled with text lines.
              All text types for an item must follow directly after the item or anyexisting account assignments or components of the item.
              • The release of purchase requisitions is not supported by this batch
              • input.
                • Items can be deleted by setting the field BEBAN-LOEKZ. Cancellation of
                • the deletion is not supported.

                  Vorgehen
                  Extract the data that is to be transferred with the relevant program,in the process writing the data to the sequential file.
                  Generate a session with the batch input program.
                  At this stage your data will be checked for the first time. Errors willbe logged.
                  Run the session. The data will be adopted in the system and saved.

                  Hinweis

                  • During creation, the number can be assigned both internally and
                  • externally. When extending or creating, you must always specify thenumber.
                    A requisition that has been newly created in a run immediatelybeforehand with internal number assignment cannot be changed in thesame run.
                    • For each field, an entry must be defined. This can be

                    • an explicitly entered field value (to transfer a certain value)
                      a blank (to delete an entry when changing)
                      a special character (to transfer no value)
                      The special character must be defined in the session record in thefield "BGR00-NODATA" (default special character is '/').
                      • You must define all fields in output format.

                      • The following authorizations must be noted when running sessions:

                      • If a session is run in the foreground, the user running it must havethe relevant authorizations for maintaining purchase requisitions.
                        If the session is run in the background, the user entered in the recordsession under "USER-ID" must have the relevant authorizations formaintaining requisitions.