Hi Experts:
I am getting data from External Source (DBConnect MSSQL) where the DataSource field name is WORK and in BI the filed is mapped to InfoObject Z_WORK which is 40 in Length. These fields has Specials charas like ' # - etc. I want to replace the Speicals chars with Space = ' '
In Transformation for InfoObject Z_WORK, I wrote this Routine but getting error:
<b>E:The data object "SOURCE_FIELDS" does not have a component called
"/BIC/Z_WORK".</b>
*******************************************************
DATA: l_d_offset LIKE sy-index. CONSTANTS: c_allowed(40) type c value 'ABCDEFGHJKLMNOPQRSTUVWXYZ1234567890_'. RESULT = SOURCE_FIELDS-/BIC/Z_WORK. *Only Capitals are permited, hence convert to Capitals. TRANSLATE RESULT TO UPPER CASE. DO 60 TIMES. l_d_offset = sy-index - 1. IF RESULT+l_d_offset(1) CO c_allowed. * Character allowed, don't do anything ELSE. * Character not allowed, replace with blank space RESULT+l_d_offset(1) = ' '. ENDIF. ENDDO
Add a comment