cancel
Showing results for 
Search instead for 
Did you mean: 

Error Handling in ELM ( External List Management )

dhruv_mehta
Active Contributor
0 Kudos

Hi Experts,

I have a requirment of creation of Business partner and Business Transaction from flat file. I am using ELM for that functionality using BADI CRM_MKTLIST_BADI and method CREATE_BUSINESS_PARTNERS and CREATE_BUSINESS_TRANSACTIONS.

If in case data in flat file is not mantained properly or has some error some data i am giving error message in methods Exporting parameter ET_MESSAGE.

Code is below :

    IF ( SY-SUBRC = 0 AND
       LS_MKTLIST_PER-PERS_TELEPHON  IS INITIAL AND
        LS_MKTLIST_PER-PERS_E_MAIL IS INITIAL ).
    EV_ERROR = 'X'.
    ES_ERROR-TYPE = 'E'.
*    ES_ERROR-MESSAGE = 'Error in data'.
    ES_ERROR-ID = 'ZM'.
    ES_ERROR-NUMBER = '030'.
    APPEND ES_ERROR TO ET_MESSAGE.
    EXIT.
  ENDIF.


but i am not getting MY error message i am getting like this as below :


when i click on error there is nothing to display.

in Messages for process step assignment block ,it shows 1 Error while maintaining BP. but i want user to see what exactly is the error not this genric statement.

please tell me how do i handle error in ELM. Help is appriciated.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Dhruvin,

Add below statement before appending error into ET_MESSAGE.

ES_ERROR-PARAMETER = IV_C_HEAD_GUID.

If you are creating multiple business partners by looping the internal table IT_MKTLIST_PER then

add the below parameter:

ES_ERROR-PARAMETER = WA_MKTLIST_PER-C_HEAD_GUID.

Hope this helps.

Regards,

Naresh

dhruv_mehta
Active Contributor
0 Kudos

Hi NareshKumar Patel,

Thanks a lot for the info. Passing C head guid actually solved my issue.

giving you highest points for the info.

although could you please tell if Sap genrated C head guid for every line we upload?

Thanks a lot,

Dhruvin.

Former Member
0 Kudos

Hi Dhruvin,

Yes C_HEAD_GUID should be different for each business partner.

Regards,

Naresh

dhruv_mehta
Active Contributor
0 Kudos

Hi Nareshkumar Patel,

thanks a lot for the info.

Thanks,

Dhruvin.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Dhruvin,

Did you checked Errors in tables also ?

Please use the following approach to see the messages:

Pass your ELM ID into table field LIST_ID of table  CRMD_MKTLIST_H  and get LIST_GUID . After getting the LIST_GUID pass it to table CRMD_MKTLIST_E to get error message details.

If it is not there then create implementation class of BADI CRM_MKTLIST_BADI by using Default implementation class CL_DEF_IM_CRM_MKTLIST_BADI and do coding in Create_Person or create_organization method based on your requirement.

Regards,

Mukesh