Developer

Implementing the BUSINESSPARTNERS_GET_ENTITYSET Method

Implement the GET_ENTITYSET method for the BusinessPartners entity.

Procedure

  1. In Service Builder, expand Start of the navigation path Service Implementation Next navigation step BusinessPartners End of the navigation path node. Right-click GetEntitySet (Query) and select Go to ABAP Workbench.


  2. To proceed, click the Enter/Continue icon in the information dialog.
  3. Once in the Class Builder:
    1. Toggle into edit mode.
    2. Scroll down and place the cursor in the BUSINESSPARTNERS_GET_ENTITYSET method row.
    3. Click Redefine.


    The BUSINESSPARTNERS_GET_ENTITYSET implementation opens.
  4. Select Start of the navigation path Edit Next navigation step Pattern End of the navigation path.
  5. Enter BAPI_EPM_BP_GET_LIST in the Call Function field and press Enter.
  6. Uncomment the line with TABLES and BPHEADERDATA by deleting the asterisk (*) and add et_entityset as the table variable to correspond to BPHEADERDATA:
    method BUSINESSPARTNERS_GET_ENTITYSET.
    CALL FUNCTION 'BAPI_EPM_BP_GET_LIST'
    * EXPORTING
    * MAX_ROWS =
    TABLES
    * SELPARAMBPID =
    * SELPARAMCOMPANYNAME =
    BPHEADERDATA = et_entityset
    * BPCONTACTDATA =
    * RETURN =
    .
    endmethod.

    The BAPI_EPM_BP_GET_LIST function is called to get the list of business partners and the result is captured and passed through et_entityset.

  7. Click the Activate icon.

  8. Confirm that the three objects are selected for activation and click Continue :


  9. If you see any warnings, recheck the code, correct any mistakes, then click Activate again.
  10. Click Back to return to the Class Interface screen.