on 08-01-2009 10:32 AM
Hello,
We are loading data into BI via a flat file (~ separated .txt). This file is created by a different system. A special character is inserted by the system as the end of file character while creating the flat file. When we are loading the file in BI, the data load fails due to this character. Is there some way we can skip reading this character (something like ignore last row)?
Hi,
That charecter comes in the last field in the file as it is the end , so write a code in transformations from PSA to DSO of the last field.
Here i am giving the code that needs to be included in the field routine.
DATA : INT_VAR TYPE /BI0/OIMATERIAL. (give your field insted of material)
DATA : STR_VAR1(20) TYPE C. (give your field type here)
DATA : VAR2 TYPE I.
DATA : VAR3 TYPE I.
DATA : VAR4 TYPE I.
DATA : STR_VAR6(20) TYPE C.
MOVE SOURCE_FIELDS-MATERIAL TO INT_VAR.
TRANSLATE INT_VAR TO UPPER CASE .
IF INT_VAR CN
',<>?/\:;"''ABCDEFGHI JKLMNOPQRSTUVWXYZ!%^&*()__+=1234567890' .
STR_VAR1 = INT_VAR+0(SY-FDPOS).
VAR2 = STRLEN( INT_VAR ).
VAR3 = SY-FDPOS + 1.
VAR4 = VAR2 - VAR3.
STR_VAR6 = INT_VAR+VAR3(VAR4).
CONCATENATE STR_VAR1 STR_VAR6 INTO RESULT.
ELSE.
RESULT = INT_VAR.
ENDIF.
Hope this works good in your case
Cheers,
Srinath.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Go to RSKC (t.code) and enter the character there. this way, you are permitting that character and you will not find any issue.
check this way.
but still i would suggest you to delete this character using code in the routine.
please let me know if the problem got solved
Cheers,
Srinath.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.