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