Fonction SAP BAPI_ACC_CO_DOCUMENT_FIND - Read CO Document for Manual Actual Postings

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
DOCUMENT BAPIDOCHDRF u 38 Document Header
RETURN_COSTS BAPIIW-RETCOSTS C 1 'X' X Indicator: Read Costs
RETURN_ITEMS BAPIIW-RETITM C 1 SPACE X Return Document Rows
RETURN_QTY BAPIIW-RETQUANT C 1 SPACE X Indicator: Read Quantities
RETURN_SKF BAPIIW-RETSTATKEY C 1 SPACE X Indicator: Read Statistical Key Figures
RETURN_VALID_ONLY BAPIIW-RETVALDOCS C 1 SPACE X Indicator: Do Not Read Reversal Documents

Paramètre Reférence Long. Facultatif Description
DOC_HEADERS BAPIDOCHDR 180 X Document Header: Activity Allocation - BAPI Actual Postings
LINE_ITEMS BAPILICO2 395 X CO Document: Posting Rows
LINE_ITEMS_ACTIVITY BAPILIACO2 131 X Posting Rows, Activity Types, CO Document
LINE_ITEMS_STAT_KEY_FIG BAPILISCO2 187 X Posting Rows, Statistical Key Figures, CO Document
RETURN BAPIRET2 548 Return Parameters
SELECT_CRITERIA BAPI_COSEL 113 X Selection Table with Field Name

Functionality
The method searches for CO documents that meet the specified criteria.The system only looks for actual postings (costs, revenues, activityallocations, statistical key figures and sender activities), andprovides you with information on the documents it finds.
You specify the search criteria by using the DOCUMENT import parameterand the SELECT_CRITERIA table. You can also restrict the search area byusing the RETURN_VALID_ONLY, RETURN_COSTS, RETURN_QTY, and RETURN_SKFindicators.
The RETURN_ITEMS parameter determines the information that is to beprovided for the CO documents.
All of the messages that are issued during processing are collected inthe RETURN return table.
The system saves the information on the documents found (with thesearch criteria) in the DOC_HEADERS, LINE_ITEMS, LINE_ITEMS_ACTIVITY,and LINE_ITEMS_STAT_KEY_FIG tables. The DOC_HEADERS table containsinformation on the document headers. If you request line items, thesystem provides them in the LINE_ITEMS, LINE_ITEMS_ACTIVITY, orLINE_ITEMS_STAT_KEY_FIG tables.

Example
A controlling area and a cost center are defaulted as search criteria.The RETURN_VALID_ONLY indicator is set. The method then providesinformation for all documents that contain cost or revenue postings tothis cost center, and have neither been reversed, nor are reversaldocuments. The system only provides information from the documentheaders.

Notes
The following applies when search criteria are transferred:

  • In the SELECT_CRITERIA table, you can enter any selection criteria. The
  • FIELD field is used for identifying the search criterion, and needs tobe filled with default values (passwords) (see the SELECT_CRITERIAparameter). The SIGN, OPTION, LOW and HIGH fields are filled in thenormal way for selection tables. The selection tables can have morethan one entry with the same entry for FIELD. These entries should,however, not conflict with each other.
    • If you enter a criterion in the selection table that has also been
    • specified in the DOCUMENT header structure (for example, posting date,period or fiscal year), then the entry from the header structure istransferred and the entries in the SELECT_CRITERIA table are ignored.

      Description
      Document header with fields that are used as criteria for CO documentsearches.
      The components have the following significance:

      • CO_AREA: Controlling area

      • DOC_NO: Document number

      • PSTNG_DATE.: Posting date

      • PERIOD: Posting period

      • FISC_YEAR: Fiscal year

      • OBJ_TYPE: Reference transaction that refers to the application in which
      • the original document was created.
        • ORIG_TRANSAC: Original transaction that refers to the business
        • transaction for which the original document was created.

          Description
          Indicator that specifies whether the system should search for actualpostings that contain cost or revenue postings.

          Value range
          'X' = search for cost and revenue postings (standard value)
          ' ' = do not search for cost and revenue postings

          Description
          Indicator that determines whether the line items for the CO documentsfound should be returned or not.

          Value range
          'X' = Return line items
          ' ' = Do not return line items (default value).

          Description
          Indicator that determines whether the system should search for actualpostings that contain activity quantities or not.

          Value range
          'X' = Search for CO documents that contain activity quantities
          ' ' = Do not search for CO documents that contain activity quantities(standard value).

          Description
          Indicator that determines whether the system looks for documents forstatistical key figures or not.

          Value range
          'X' = Search for documents that contain statistical key figures.
          ' ' = Ignore documents for statistical key figures in search (defaultvalue).

          Description
          Indicator that determines whether the system is to also look forreversal and reversed documents.

          Value range
          'X' = Only search for documents that are not reversal documents andthat have not been reversed.
          ' ' = Include all documents in search (default value).

          Description
          The table contains the document headers for the CO documents that thesystem found using the search criteria.

          Description
          This table contains the CO line items that the system found using theselection criteria.

          Description
          The table contains the posting rows for activity quantities that thesystem found using your selection criteria.

          Description
          The table contains the posting rows for statistical key figures thatthe system found using the search criteria that you entered.

          Description
          Message collector for the messages issued when you call the method.
          The table contains the following fields:

          • TYPE: Message type

          • ID: Name of the message class to which the message belongs.

          • NUMBER: Message number

          • MESSAGE: Message text

          • LOG_NO: Log number (when you use the application log)

          • LOG_MSG_NO: Sequential number of the message (when you use the
          • application log).
            • MESSAGE_V1 - MESSAGE_V4: Message variables

            • SYSTEM: Name of the logical system from which the error message came.
            • Description
              You can enter criteria for the CO document search in this table. TheSIGN, OPTION, LOW and HIGH fields are filled in the normal way forselection tables. The FIELD field contains passwords that are used toidentify the search criterion. You must use the passwords that arelisted in the following section. You can transfer more than one entryto the table using the same password. The entries must not contain anyconflicting values.

              Value range
              Use the following values for FIELD:
              Account assignment objects:

              • COSTCENTER for cost center

              • ACTTYPE for activity type

              • COSTCENTER/ACTTYPE for the cost center/activity type (10/6) object

              • ORDERID for internal orders

              • WBS_ELEM for WBS elements

              • SALES_ORD for sales orders

              • S_ORD_ITEM for sales order items (only the items)

              • SALES_ORD/S_ORD_ITEM for sales order items in a special order (10/6)

              • COST_OBJ for cost objects

              • CO_BUSPROC for business processes

              • NETWORK for networks

              • NETWORK/OPERATION for network activities (12/4)

              • RUNSCHD_HD for run schedule headers

              • PROFIT_SEGM_NO for profitability segments

              • OBJECT for any account assignment object

              • You need to enter the names of the account assignment objects, forexample, a cost center name or order number. You need to enter theleading zeros also. For the combined account assignment objects, youneed to enter both object parts together without a hyphen or leadingzeros, whereas the character string must be completed with spaces orleading zeros. The length of the subobjects is given above inparentheses.
                Example: You want the selection to be made using sales order item 10 insales order 339. The fields must be filled as follows: FIELD='SALES_ORD/S_ORD_ITEM', SIGN = 'I', OPTION = 'EQ', LOW ='0000000339000010').
                If you want to search by profitability segments or any objects, youneed to enter the internal object number as the value.
                Search criteria without account assignment:
                • COST_ELEM for cost elements

                • FISC_YEAR for fiscal years

                • PERIOD for posting periods

                • POSTGDATE for posting dates

                • DOCDATE for document dates

                • OBJ_TYPE for reference transactions

                • ORIG_TRANSAC for original transactions

                • STATKEYFIG for statistical key figures

                • Since some criteria may be in the selection table SELECT_CRITERIA andthe DOC_NO structure, it has been specified that the system ignoresentries in the SELECT_CRITERIA table if the same entries are already inthe DOC_NO structure.