Showing results for 
Search instead for 
Did you mean: 

ERMS: Issue with BP creation

0 Kudos

Hello all,

We have the ERMS setup to create the service requests. We are facing an issue with the functionality.

In the invoking class, first it will check if the sender has a BP number corresponding to the email address. If there is no BP number, it will not create the service request. This is working fine.

Now, we want to create the BP number automatically when there is no BP number. So, that we will have the service request created. So, we created a function module to create the BP.

bp_number = service_manager->get_bp_number( ).
  IF bp_number IS INITIAL.
* RETURN.       
        iv_email        = lv_email
        ev_partner      = lv_partner
        not_same_domain = 1
        error_occured   = 2
        OTHERS          = 3.

In FM, we have the following steps.

1. Call FM 'BUPA_SEARCH_2' and check if there is any BP number associated with email address.

2. If not found, then create the BP using FM 'BAPI_BUPA_CREATE_FROM_DATA'

3. Pass the BP number to the class.

This is working fine if the user sends only one email.

But, if the user sends 3 emails in a row, then it's creating 3 BP numbers as it is not finding the previously created BP.

Anybody has any idea to resolve this?

Thanks a lot!


Accepted Solutions (0)

Answers (0)