Skip to Content
avatar image
Former Member

ICR - Validation Checks when importing file


Hello ICR colleagues,

We have an issue regarding the import of the file into the ICR module.

We would like to include some checks to make sure the file that gets imported is correct.

For example: . Check that all the mandatory fields are populated in the file, that the date and the amounts have the correct format, etc...

We haven't found a place to add these checks, any ideas?

And on top of that, it would be great if a log report could be generated with information about why the import didn't succeed and what was the reason for it.

Thanks in advance

Regards

Isabel

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Sep 11, 2014 at 09:48 AM

    Hello Isabel,

    #1 Some basic checks are already performed as part of the standard logic with function module FB_ICRC_BADI_DATA_CHECK.

    #2 If these checks are not sufficient for you, you can implement BADI method CHANGE_DATA_TABLE for EVENT 8 (prerequisite notes 1475612 and 1749312). Here you can implement any check you want.


    If you want to add messages to the log of ICR Data Selection, you can find the current log with the following code:

    *----------------------------------------------------------------------*

    DATA ld_log_handle TYPE balloghndl.

    DATA ls_ra_bal_obj TYPE bal_s_obj.

    DATA ls_log TYPE bal_s_log.

    DATA ld_repid TYPE syrepid.

    DATA ld_tcode TYPE sytcode.

    *----------------------------------------------------------------------*

    ls_log-object = fbicc_log-object.

    ls_log-aldate = sy-datum.

    ls_log-altime = sy-uzeit.

    ls_log-aluser = sy-uname.

    ls_ra_bal_obj-sign = fbicc_range-sign_incl.

    ls_ra_bal_obj-option = fbicc_range-option_eq.

    ls_ra_bal_obj-low = fbicc_log-object.

    APPEND ls_ra_bal_obj

    TO lsx_bal_filter-object.

    ls_ra_bal_user-sign = fbicc_range-sign_incl.

    ls_ra_bal_user-option = fbicc_range-option_eq.

    ls_ra_bal_user-low = ls_log-aluser.

    APPEND ls_ra_bal_user

    TO lsx_bal_filter-aluser.

    CALL FUNCTION 'BAL_GLB_SEARCH_LOG'

    EXPORTING

    i_s_log_filter = lsx_bal_filter

    IMPORTING

    e_t_log_handle = lt_log_handle

    EXCEPTIONS

    OTHERS = 1.

    IF sy-subrc <> 0.

    CALL FUNCTION 'BAL_LOG_CREATE'

    EXPORTING

    i_s_log = ls_log

    IMPORTING

    e_log_handle = ld_log_handle

    EXCEPTIONS

    OTHERS = 0.

    ELSE.

    READ TABLE lt_log_handle

    INDEX 1

    INTO ld_log_handle.

    ENDIF.

    *----------------------------------------------------------------------*

    HTH,

    Ralph

    Add comment
    10|10000 characters needed characters exceeded