Skip to Content
0

BAPI_PO_CREATE1 fill EKPO-SERRU, error "Not possible to determine any components"

Mar 13 at 01:36 PM

50

avatar image

Dear Experts,

I need to fill EKPO-SERRU (Subcontracting Type) with BAPI_PO_CREATE1, I've used the following code:

TYPES: BEGIN OF gty_adsub,
         ebelp TYPE ekpo-ebelp.
        INCLUDE TYPE disub_mepoitem_data.
TYPES END OF gty_adsub.

TYPES: BEGIN OF gty_adsubx,
         ebelp TYPE ekpo-ebelp.
        INCLUDE TYPE disub_mepoitem_datax.
TYPES END OF gty_adsubx.

          "Assign Ad sub data
          lw_po_adsub-ebelp = lw_upl_item-ebelp.
          lw_po_adsub-serru = lw_upl_itemdtl-serru.
          lw_ext_adsub-structure = cl_adsub_constants=>extin_po_struc.
          lw_ext_adsub-valuepart1 = lw_po_adsub.
          APPEND lw_ext_adsub TO lt_extensionin.

          CLEAR lw_ext_adsub.
          lw_po_adsubx-ebelp = lw_upl_item-ebelp.
          lw_po_adsubx-serru = abap_true.
          lw_ext_adsub-structure = cl_adsub_constants=>extin_po_strucx.
          lw_ext_adsub-valuepart1 = lw_po_adsubx    ##ENH_OK.
          APPEND lw_ext_adsub TO lt_extensionin.

However, I get the error "Not possible to determine any components" when calling BAPI_PO_CREATE1.

When I create the PO manually, the components is filled automatically by the material itself. But this doesn't happen when creating Subcont PO with BAPI.

I've checked Notes number 1566153, it is said there filling the ADSUB fields is handled by class CL_ADSUB_IM_MM_BAPI, but checking the class and the BaDI implementation in my SAP environment, the implementation is not called because of the AD_SUB_SFWS_01 is activated.

So, I think that the note is old and there's a new way to fill ADSUB fields from BAPI. How to fill ADSUB fields from BAPI?

Thank you.

Regards,

Suwandi C.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers