Fonction SAP BAPI_PO_GETITEMS - List Purchase Order Items

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
ACCTASSCAT BAPIEKPO-ACCTASSCAT C 1 X Account Assignment Category
CREATED_BY BAPIEKKOC-CREATED_BY C 12 X Creator
DELETED_ITEMS BAPIMMPARA-SELECTION C 1 SPACE X Including Deleted Items
DOC_DATE BAPIEKKO-DOC_DATE D 8 X As of PO Date
DOC_TYPE BAPIEKKO-DOC_TYPE C 4 X Order Type
ITEMS_OPEN_FOR_RECEIPT BAPIMMPARA-SELECTION C 1 SPACE X Items with Still-Open Goods Receipt Only
ITEM_CAT BAPIEKPO-ITEM_CAT C 1 X Item Category
MATERIAL BAPIEKPO-MATERIAL C 18 X Material
MATERIAL_EVG BAPIMGVMATNR u 82 X Long Material Number
MAT_GRP BAPIEKPO-MAT_GRP C 9 X Material Group
PLANT BAPIEKPO-PLANT C 4 X Plant
PREQ_NAME BAPIEKPOC-PREQ_NAME C 12 SPACE X
PURCHASEORDER BAPIEKKO-PO_NUMBER C 10 X Purchase Order Number
PURCH_ORG BAPIEKKO-PURCH_ORG C 4 X Purchasing Organization
PUR_GROUP BAPIEKKO-PUR_GROUP C 3 X Purchasing Group
PUR_MAT BAPIEKPO-PUR_MAT C 18 SPACE X Material Number
PUR_MAT_EVG BAPIMGVMATNR u 82 X Long Material Number
SHORT_TEXT BAPIEKPO-SHORT_TEXT C 40 X Short Text
SUPPL_PLANT BAPIEKKO-SUPPL_PLNT C 4 X Supplying Plant
TRACKINGNO BAPIEKPO-TRACKINGNO C 10 X Requirement Tracking Number
VENDOR BAPIEKKO-VENDOR C 10 X Vendor
WITH_PO_HEADERS BAPIMMPARA-SELECTION C 1 SPACE X Also Provide Header Data

Paramètre Reférence Long. Facultatif Description
PO_HEADERS BAPIEKKOL 472 X Table of PO Header Data
PO_ITEMS BAPIEKPOC 541 Table of Items
RETURN BAPIRETURN 452 X Return Messages

Functionality
This method enables you to list purchase order items. You pass on thedesired selection criteria (e.g. purchasing group, plant, vendor) inthe import parameters. For more information, refer to the relevantparameter documentation.

Notes
The following authorization objects are checked with the activity 03(Display):

  • M_BEST_BSA,,Document type in purchase order

  • M_BEST_EKG,,Purchasing group in purchase order

  • M_BEST_EKO,,Purchasing organization in purchase
  • order
    • M_BEST_WRK,,Plant in purchase order

    • Return
      The items that satisfy the selection criteria are returned in the tablePoItems.
      Return messages
      INCLUDE BAPI_RET

      Description
      You will find information on the meaning of the account assignmentcategory in the relevant data element documentation:
      Account assignment category

      Description
      Name of the person who created the purchase order.

      Description
      If you set the indicator, deleted purchase order items will also bereturned.

      Description
      All purchase order items created as of the date that was passed on arelisted.

      Description
      You will find information on the meaning of the order type (Purchasing)in the relevant data element documentation:
      Order Type

      Description
      You will find information on the meaning of the item category in therelevant data element documentation:
      Item Category

      Description
      You will find information on the meaning of the material number in therelevant data element documentation:
      Material Number

      Description
      Parameter for the long material number.
      This parameter can be used to transfer long material numbers, whosemaximum length may not exceed 40 characters.
      To be able to use this parameter, you must activate the switch for thebusiness function LAMA (long material number) in the system.
      The business function LAMA is available as a component of the businessfunction set for DIMP.

      Value range
      None.

      Default
      None.

      Description
      You will find information on the meaning of the material group in therelevant data element documentation:
      Material Group

      Description
      You will find information on the meaning of the plant in the relevantdata element documentation:
      Plant
      Source text identical to that of data element AFNAM (dev. class BM).

      Description
      Indicates for whom the material or external service shown in the
      purchase requisition isto be ordered.

      Description
      INCLUDE BAPI_KEYFIELD

      Description
      You will find information on the meaning of the purchasing organizationin the relevant data element documentation:
      Purchasing organization

      Description
      You will find information on the meaning of the purchasing group in therelevant data element documentation:
      Purchasing Group

      Description
      Parameter for the long material number.
      This parameter can be used to transfer long material numbers, whosemaximum length may not exceed 40 characters.
      To be able to use this parameter, you must activate the switch for thebusiness function LAMA (long material number) in the system.
      The business function LAMA is available as a component of the businessfunction set for DIMP.

      Value range
      None.

      Default
      None.

      Description
      You will find information on the meaning of the short text in therelevant data element documentation:
      Short text

      Description
      You will find information on the meaning of the supplying plant in therelevant data element documentation:
      Supplying plant

      Description
      You will find information on the meaning of the requirement trackingnumber in the relevant data element documentation:
      Requirement tracking number

      Description
      You will find information on the meaning of the vendor in the relevantdata element documentation:
      Vendor

      Description
      If you set the indicator, the most important header data belonging tothe purchase order item will also be listed (e.g. vendor number,document type, purchasing organization).

      Description
      If you have set the parameter WithPoHeaders, the header data isreturned in this table.
      INCLUDE BAPI_DATAELEMENT

      Description
      The table contains the purchase order items.
      INCLUDE BAPI_DATAELEMENT

      Description
      INCLUDE BAPI_TABLE

      Value range
      Type,,ID,,Number,,Message
      E,,W5,,036,,Please pass on at least one selection parameter
      E,,W5,,037,,No purchase orders satisfying selection criteria

488619Vendor's material numbers with more than 22 characters
539978Automatic generation of BAPI test data directory
375886BAPI: Error analysis for BAPIs in purchasing