on 2018 Jan 25 10:40 AM
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.
CALL FUNCTION 'ZBP_CREATION'
EXPORTING
iv_email = lv_email
IMPORTING
ev_partner = lv_partner
EXCEPTIONS
not_same_domain = 1
error_occured = 2
OTHERS = 3.
ENDIF.
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!
-Ricky.
Request clarification before answering.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.