Skip to Content
0

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

Mar 24, 2017 at 12:00 PM

587

avatar image

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

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

5 Answers

Vengaiah Chowdary Pachava Chinna Mar 24, 2017 at 12:27 PM
0

Hi Markus,

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

Thanking you

Vengaiah

Show 1 Share
10 |10000 characters needed characters left 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.

0
Markus Greutter Mar 24, 2017 at 01:46 PM
0

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

This is solved with note 2372070:

note2372070.jpg


note2372070.jpg (84.2 kB)
Share
10 |10000 characters needed characters left characters exceeded
Markus Greutter Mar 24, 2017 at 06:58 PM
0

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...

Share
10 |10000 characters needed characters left characters exceeded
Markus Greutter Mar 27, 2017 at 01:49 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Michael Theis
Mar 28, 2017 at 07:16 AM
0

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

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hello Michael,

thank you for your answer.

What does "the sender provides the object IDs" exactly mean in a 'Create Customer' process?

Let's say there is one sender that only has a GUID as ID and a second sender, eg. an SAP ERP, with KUNNR as ID.

1. Sender only has GUID

  • Filling UUID leads to the error "Specify at least one number for the business partner".
  • Internal ID only has 10 characters
  • So External ID would be the field of choice for me
  • The Change Request would be created with BP_HEADER = $<tmp_id> and BP_GUID = External ID.
  • During the activation the Partner ID is determined and Partner ID and Partner GUID (formally known as External ID) are sent to the client system.
  • For changes afterwards the sender fills UUID and Internal ID.

2. Sender only has Partner ID (eg. a SAP ERP) but does not want to create the customer before the data went through the governance process in MDG.

  • As an Internal ID does not exist yet I would generate a GUID and pass it as External ID
  • After the Governance Process the customer is created in the sender system with the same KUNNR as in MDG.
  • For changes afterwards the sender can fill the Internal ID or the Reiceiver Internal ID.

Would this lead to problems in the key mapping?

Best regards,
Markus

0

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

0