Skip to Content

One of the most common reasons for data load failure in SAP BW is invalid characters present in the data records. The system doesn’t permit certain characters to be loaded into BW.

Data load for char type infoobjects can fail due to small case letters. This can be avoided by checking the Lower Case letter box in the General tab of infoobject maintenance.

 

The values of characters that are permitted to be loaded in BW system can be maintained in RSKC transaction. The value of ALL_CAPITAL in RSKC includes the wider range of permitted characters.

 

Even after selecting ALL_CAPITAL in RSKC transaction, the data can fail in the following scenarios.

1. Single character #

2. String starting with !

3. Characters with hexadecimal values in the range of 00 to 1F. These are values like tab, enter etc. entered by users while creating records. SAP is not able to display these values and hence it displays a # instead. This # has hexadecimal value 23.

 

The following ABAP routine can be used in the update rule as field routine for the concerned Infoobject for which invalid records are fetched. This routine can remove invalid characters as given in the above 3 case.

 

——————————————————————————————–

DATA Z_TXT TYPE RSTXTLG.

DATA: Z_LEN TYPE I,

        Z_TIME TYPE I,

        Z_FLG(1) TYPE C.

DATA: Z_C TYPE STRING.

DATA: Z_X TYPE XSTRING.

 

 CLEAR: Z_TXT, Z_FLG, Z_TIME, Z_C, Z_X.

 Z_TXT = COMM_STRUCTURE-TXTLG.

 Z_LEN = STRLEN( Z_TXT ).

 

IF Z_LEN = 1.

    if Z_LEN(1) = ‘#’ OR Z_TXT(1) = ‘!’.

      RESULT = ‘ ‘.

    else.

      RESULT = Z_TXT.

    endif.

 

ELSEIF  Z_TXT(1) = ‘!’ AND Z_LEN GT 1.

    Z_TXT(1) = ‘ ‘.

ELSEIF Z_LEN GT 1.

     DO Z_LEN TIMES.

        Z_C = Z_TXT+Z_TIME(1).

        CALL FUNCTION ‘NLS_STRING_CONVERT_FROM_SYS’

        EXPORTING

           LANG_USED = ‘E’

           SOURCE    = W_C

           TO_FE     = ‘MS ‘

        IMPORTING

           RESULT    = Z_X.

       IF SY-SUBRC <> 0.

       ENDIF.

      if W_X EQ ’23’.

         W_FLG = ‘Y’.

         W_TXT+W_TIME(1) = ‘#’.

      endif.

       W_TIME = W_TIME + 1.

   ENDDO.

     REPLACE ALL OCCURRENCES OF ‘#’ in Z_TXT WITH space.

     CONDENSE Z_TXT.

     RESULT = Z_TXT.

ENDIF.

 

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply