Fonction SAP BAPI_PRODORDCONF_CREATE_HDR - Enter Order Confirmations

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
POST_WRONG_ENTRIES BAPI_CORU_PARAM-INS_ERR C 1 '0' X Ind.: Incorrect Data in Error Pool
TESTRUN BAPI_CORU_PARAM-TESTRUN C 1 X Ind.: Test Data Only, Without Saving

Paramètre Reférence Type Long. Description
RETURN BAPIRET1 u 470 Return Parameter

Paramètre Reférence Long. Facultatif Description
ATHDRLEVELS BAPI_PP_HDRLEVEL 187 Table of Order Confirmations
DETAIL_RETURN BAPI_CORU_RETURN 568 X Return Parameter for Confirmation Table
GOODSMOVEMENTS BAPI2017_GM_ITEM_CREATE 1106 X Table of Goods Movements
LINK_CONF_GOODSMOV BAPI_LINK_CONF_GOODSMOV 12 X Link Table for Confirmations/Goods Movement

Functionality
You can use this method to enter order confirmations forproduction orders.
You can also transfer good movements, that are posted together with aconfirmation. If no goods movements have been entered for aconfirmation, they are determined using the standard logic forbackflushing and automatic goods receipt for confirmations.

Notes
Authorization check
The authorization object C_AFRU_AWK is checkedtogether with activity 01 (create), the order type and the work of theproduction order to be confirmed.
Parameters

  • PostWrongEntries

  • You use the PostWrongEntries parameter to control whether in anexception (incorrect data/ locked objects) the confirmations areaccepted by the SAP system and placed in the pool of incorrectconfirmations.
    Exceptions for confirmations are logged in the DetailReturnparameter table.
    The following characteristic values of the PostWrongEntriesparameter are possible:
    " ": Confirmations, in which no exception occurred, are posted. All theconfirmations are not processed, they are not placed in the pool forincorrect confirmations.
    "1": Confirmations, in which no exception occurred, are posted. Allconfirmations with incorrect data are placed in the pool for incorrectconfirmations. On the other hand, confirmations that are not posted duea lock situation are not processed, they are not placed in the pool.
    "2": Confirmations, in which no exception occurred, are posted. Allconfirmations with exceptions are placed in the pool.
    • Testrun

    • You use the Testrun parameter to specify that the transfereddata are only checked to see if they are correct. Locking of objectssuch order and reservation as well as the updating of databases doesnot take place in this mode.
      You set the value "X" to activate the Testrun mode.
      • Return

      • If confirmations could not be processed, due to a serious error, youreceive information about the error in the Return parameter.
        • AtHdrLevels

        • The confirmation data is transfered to the AtHdrLevels table.
          • Goodsmovements

          • If goods movements should be posted that differ from the standardlogic, transfer these goods movements in the Goodsmovementstable.
            • LinkConfGoodsmov

            • The goods movements are linked to a confirmation via theLinkConfGoodsmov table. There must be an entry in this table forevery entry in the Goodsmovements table. The index in theLinkConfGoodsmov-Index_Confirm field refers to the lines in thecorresponding confirmation in the AtHdrLevels table and theindex in the LinkConfGoodsmov-Index_Goodsmov field refers thecorresponding good movement in the Goodsmovements table.
              If you want to prevent a goods movement being posted during aconfirmation according to the standard logic, make an entry in theLinkConfGoodsmov table as well as in the AtHdrLevelstable. The index in the LinkConfGoodsmov-Index_Confirm fieldrefers to the lines of the corresponding confirmation in theAtHdrLevels table. Enter the initial value 0 in theLinkConfGoodsmov-Index_Goodsmov field. It is not necessary tomake an entry in the Goodsmovements table, in this case.
              If no entry exists in the LinkConfGoodsmov table for aconfirmation, goods movements are determined using the standard logicfor backflushing and automatic goods receipt for confirmations.
              • DetailReturn

              • The DetailReturn table informs you for each confirmation to beentered, whether a confirmation could not be entered due to a lockconflict or which error occurred.
                If the confirmation could be enterd successfully, the key of theconfirmation is logged in the fields DetailReturn-Conf_No andDetailReturn-Conf_Cnt.
                In the case of a lock conflict, the DetailReturn-Flg_Locked indicator is set.
                If the data is found to be incorrect, a corresponding error message iswritten in the relevant fileds of the DetailReturn table.

                Description
                The Return parameter is only used for serious errors that prevent allconfirmations from being processed further. As a rule, this type oferror only occurs if the transferred confirmation data cannot beconverted into the internal structures, because conventions regardingdata definitions have not been adhered to.
                The Return parameter's structure contains all the necessaryinformation about the error in detail. This is also prepared in themessage text MESSAGE.

                Default
                If no serious error is found, the return parameter is returned withinitial values.

                Description
                Controls which confirmations are transferred to the error pool.
                Error pool entries can be corrected and posted usingReprocessing Confirmations.

                Value range
                0: Neither confirmations with errors nor confirmations that cannot beprocessed due to a lock situation are transferred to the error pool.
                1: Confirmations with errors are transferred to the error pool, whereasconfirmations that cannot be processed due to a lock situation are nottransferred to the error pool.
                2: Both confirmations with errors and confirmations that cannot beprocessed due to a lock situation are transferred to the error pool.

                Default
                The default value is "0". That is, no confirmations are transferred tothe error pool.

                Description
                Indicator that can be used to control whether confirmation data is tobe defined for posting, or whether confirmation data is merely to bechecked in test mode. In test mode, none of the objects are locked andthey can still be accessed if required.

                Value range

                • "X": The transferred data is merely checked in test mode.

                • " " (SPACE): If the check was successful, the confirmation data is
                • defined for posting. Lock entries are set for the affected objects.

                  Default
                  With the preassigned value " ", the confirmation data is defined forposting, provided no error can be found.

                  Description
                  Table of confirmations to be entered, as order confirmations.
                  You can identify the confirmed order by entering the order in theORDERID field.
                  Each entry in the AtHdrLevels table represents a separateconfirmation that is checked and processed in the sequence in which itis transferred.

                  Description
                  The parameter table DetailReturn provides information about thesuccessful entry of each individual confirmation in theAtHdrLevels table, or about any exceptions that occur due toincorrect data or a current lock situation.
                  An entry is made in the DetailReturn table for each confirmationthat is transferred to the AtHdrLevels table. For example, thethird entry in the DetailReturn table provides information aboutthe posting of the third confirmation in the AtHdrLevels table.If the confirmation is successfully entered, the key assigned to theconfirmation is found in the CONF_NO and CONF_CNT fields.Otherwise, all details about the exception are found in the individualfields, but also transferred in the prepared message textMESSAGE. If a lock situation occurs, the indicatorFLG_LOCKED is also set.

                  Description
                  Goods movements that should only be posted as the result of aconfirmation.
                  Automatic goods movements can be posted with a confirmation. One formof this is backflushing of components, the other isautomatic goods receipt posting for an assembly. If this data isadded to or corrected, the goods movements data can be transferred viathe Goodsmovements table. The assignment of goods movements toconfirmations occurs via the additional parameter tableLinkConfGoodsmov.
                  If at least one goods movement is assigned to a confirmation, noautomatic goods movements are determined for the confirmation when itis saved. In other words, the goods movements that are transferredcannot be regarded as being supplementary to the goods movements thatare automatically posted. Rather, the goods movements that aretransferred represent, as it were, the replacement items for the goodsmovements that are automatically posted.

                  Default

                  Note
                  Note that not all of the indicators in the Goodsmovements tablecan be used. For example, indicator NO_TRANSFER_REQ = X is set in orderto avoid creation of a transfer request during a goods movement.However, this indicator has no effect - a transfer request is creatednonetheless.
                  Cause: Inventory management structure BAPI2017_GM_ITEM_CREATE is usedto transfer goods movements to confirmation BAPIs. However, thiscontains some fields that have no effect or are not supported duringthe confirmation of production orders. Generally, the complete range ofMM functions cannot be supported during posting of goods movements.This is valid for both confirmation dialog functions and confirmationBAPIs.

                  Description
                  Each individual goods movement item is assigned to a confirmation viathe parameter table LinkConfGoodsmov. Items that are notassigned to a confirmation cannot be included in the process when theconfirmation is saved.
                  Assignment occurs via the IndexConfirm and IndexGoodsmovindices. For this process the IndexConfirm index has to refer tothe entry in the parameter table AtHdrLevels and theIndexGoodsmov index has to refer to the entry in the parametertable Goodsmovements.
                  As a rule, therefore, the total number of entries in theLinkConfGoodsmov table corresponds to the total number ofentries in the Goodsmovements table.
                  Exception: You want to prevent goods movements from being automaticallydetermined for a confirmation, because, as an exception, none havearisen. This can be achieved by making an entry in theLinkConfGoodsmov table, without having to make an entry in theGoodsmovements table. In this case, the index in theIndexConfirm field has to refer to the confirmation in question,whereas the initial value 0 has to be entered in theIndexGoodsmov field.

1586230FAQ: Confirmation using BAPI in production order
607156 Goods movements in IS OIL: MB_CREATE_GOODS_MOVEMENT
569988Confirmation with BAPI: Goods issues are not posted
744403Confirmation BAPI's do not produce any results