Skip to Content

Create a BP in MDG: "Specify at least one number for the business partner"

Hello experts,

I try to create a BP in MDG using BusinessPartnerSUITEBulkReplicateRequest.

The inbound processing results in the following error:

  • Error for mapping BPBUPA_RPLRQ_BSFND_IN step BUSINESSPARTNER (SMT 151)
  • Error on call-up of transformation method MAP_BP_ID_IN of class CL_MDG_FND_SMT_TRANSFORMATION (SMT 073)
  • Specify at least one number for the business partner (R11 123)

The process is defined in a way that the BP should not be created in the sending system before the governance process was finished successfully. Therefore we don't have a BP Number or a Business Partner ID in the sending system yet.

So I generated a GUID and passed it to proxy-business_partner-uuid-content. But this does not solve the problem.

The reason is that in the inbound mapping in CL_MDG_FND_SMT_TRANSFORMATION=>MAP_BP_ID_IN it is checked whether a key mapping exists for the provided GUID:

...
  ELSEIF NOT i_uuid IS INITIAL.
...
    cl_mdg_ukm=>get_own_object_id(
      EXPORTING
        i_foreign_object_id = lv_sender_partner_uuid
        i_foreign_system_id = i_sender_system_id
        i_object_type_code  = cl_mdg_ukm=>c_type_code_bp
        i_ids_type_code     = cl_mdg_ukm=>c_ids_code_bp_uuid
      IMPORTING
        e_own_object_id     = lv_receiver_partner_uuid ).
   ...
    "Determine InternalID of receiver
    CALL FUNCTION 'BUPA_NUMBERS_GET'
      EXPORTING
        iv_partner_guid = lv_sender_uuid_x
      IMPORTING
        ev_partner      = e_bpartner
      TABLES
        et_return       = lt_messages.

    "Add messages to SMT log
    IF NOT lt_messages[] IS INITIAL.
...
        RAISE EXCEPTION TYPE cx_smt_unsuccessful_trans
          EXPORTING
            a_protocol = lo_protocol.
    ENDIF.

No surprise that in this case no receiver GUID is found. In the end the processing ends in the mentioned error.

The question is, how should I fill the Service to achive the required result?

If I pass the GUID to the EXTERNAL_ID the following surprising thing happens:

...
  ELSEIF NOT i_external_id IS INITIAL. "MDG 9.0
    "If the ExternalID of the sender is filled: Call key mapping
    lv_sender_partner_id = i_internal_id.  <---------------!!!
    cl_mdg_ukm=>get_own_object_id(
      EXPORTING
        i_foreign_object_id = lv_sender_partner_id
        i_foreign_system_id = i_sender_system_id
        i_object_type_code  = cl_mdg_ukm=>c_type_code_bp
        i_ids_type_code     = cl_mdg_ukm=>c_ids_code_bp_ext_id " 988
      IMPORTING
        e_own_object_id     = lv_receiver_partner_id ).
    MOVE lv_receiver_partner_id TO e_bpartner.

i_internal_id is passed to lv_sender_partner_id. I would assume this is a bug.

Another possibility would be to pass the GUID to the RECEIVER_UUID expecting that the BP would be created with this GUID in MDG. But then the same error message will be raised:

First the receiver uuid is converted:

        cl_gdt_conversion=>guid_inbound(
          EXPORTING
            im_value  = i_receiver_uuid
          IMPORTING
            ex_guid_c = lv_receiver_uuid_c
            ex_guid_x = lv_receiver_uuid_x ).

Afterwards it is tried to determine a corresponding BP ID which again is not available and leads to error "Business partner with GUID ... does not exist":

...
  ELSEIF NOT lv_receiver_uuid_x IS INITIAL.
    "If the UUID of the receiver is filled: Determine InternalID
    CALL FUNCTION 'BUPA_NUMBERS_GET'
      EXPORTING
        iv_partner_guid = lv_receiver_uuid_x
      IMPORTING
        ev_partner      = e_bpartner
      TABLES
        et_return       = lt_messages.

    IF NOT lt_messages[] IS INITIAL.
      cl_mdg_fnd_smt_transformation=>add_messages_to_protocol(
        EXPORTING
          it_messages = lt_messages
        IMPORTING
          eo_protocol = lo_protocol ).
    ENDIF.

Any ideas how this dilemma can be solved?

Best regards,
Markus

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Mar 24, 2017 at 12:27 PM

    Hi Markus,

    I have doubt . Why are you replicating even before governance process is complete.

    Thanking you

    Vengaiah

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Vengaiah,

      sorry for the confusing description. The replication MDG -> 3rd Party System is triggered after the governance process. The problem is before the way 3rd Party System -> MDG.

      What I mean is: 3rd Party System wants to create a Change Request for a new Customer in MDG. But the Customer is not yet created in the 3rd Party System. So I don't have any GUID or Customer ID in the 3rd Party System to fill in the WebService.

      The mentioned error "Specify at least one number for the business partner" occurs during the inbound processing of the message in MDG if I provide no ID at all.

  • Mar 24, 2017 at 01:46 PM

    In my initial post I mentioned the problem with the EXERNAL_ID.

    This is solved with note 2372070:

    note2372070.jpg

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 24, 2017 at 06:58 PM

    Using the External ID works more or less. The Change Request is created.

    BUT: When I send the next Customer I get the error that there is already a CR for BP 000000000000000...

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 27, 2017 at 01:49 PM

    I can use BAdI MDG_SE_BP_BULK_REPLRQ_IN to Map the External ID to PARTNER-HEADER-OBJECT_INSTANCE-BPARTNERGUID.

    Then the Change Request is created without further problems.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 28, 2017 at 07:16 AM

    Hi Markus,

    your scenario is invalid. If you send a BP to MDG via the web service, it's mandatory that the sender provides the object IDs of the sending system. W/o this information, it is impossible to create valid key mapping. You scenario can run into severe issues as soon as you try to send data back to the original system.

    Best regards

    Michael

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Markus,

      we offer a standard scenario for integrating a SAP ERP system SAP MDG . The easiest way is following the standard approach. There's no need for implementing anything new. You can extract existing master data from SAP ERP (no matter if BPs only, Customers only, or BPs being linked to Customers) and import this data into SAP MDG. In MDG you do have the choice to process this data first within a CR; or alternatively take over everything directly into the active area.

      Kind regards

      Michael