cancel
Showing results for 
Search instead for 
Did you mean: 

problem with junk characters in transaction ODS

Former Member
0 Kudos

hi all,

i am loading the data into Trasaction ods through BSP application. when i see the data in

Trasaction ods everything is perfect but there is a text field in trasaction ods which is

sometimes blank. when it is left blank some junk data like 'X########################################'

is getting populated. in debugging i tested all the internal tables and the Function module

RSDRI_ODSO_INSERT_RFC also for junk data.I think when data is being populated into the ODS

then only junk data is populated.

Due to this query is not being executed it is showing the error 'Value '' (hex. '') of characteristic contains invalid characters'

please tell me a way to remove junk data.

regards

satish

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Satish,

Place this code for related field in transfer rules.

Replace KNREF with your field.

DATA : I_KNREF LIKE TRAN_STRUCTURE-KNREF.

MOVE TRAN_STRUCTURE-KNREF TO I_KNREF.

IF I_KNREF0(1) = '#' or I_KNREF0(1) = '!'.

I_KNREF+0(1) = '?'.

ENDIF.

IF I_KNREF+0(1) = '{' .

I_KNREF+0(1) = ''.

ENDIF.

RESULT = I_KNREF.

  • Set Text To Upper case

TRANSLATE RESULT TO UPPER CASE.

  • Get Allowed Characters When Initial

  • And Store In Global Data Area For Subsequent Use

IF rsallowedchar-allowchar IS INITIAL.

SELECT SINGLE

allowchar

INTO (rsallowedchar-allowchar)

FROM rsallowedchar

WHERE allowkey = 'S'.

ENDIF.

  • Call Function To Convert Any Invalid Characters In RESULT

CALL FUNCTION 'Y_BIW_TEXT_CONVERT'

EXPORTING

allowchar = rsallowedchar-allowchar

CHANGING

RESULT = RESULT.

  • returncode <> 0 means skip this record

RETURNCODE = 0.

  • abort <> 0 means skip whole data package !!!

ABORT = 0.

Let me know if you need any further clarifications.

Thanks

Ram

Former Member
0 Kudos

Dear Satish,

Before inserting into ODS...i.e. before sending the data into 'RSDRI_ODSO_INSERT_RFC' can you clear the invalid character? ( Even though they appear 'blank' in debugger.. actually they carry some invalid characters)..

would you like to look at following posts?

/people/siegfried.szameitat/blog/2005/07/18/text-infoobjects-part-1

Example:

let us say..

!"%&''()*+,-./:;<=>?_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' are allowed characters in RSKC transaction then other than the above character is 'Invalid' including the smaller case letters and will throw the hex.. error.

regards,

Hari

Message was edited by: Hari Kiran Y