cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot load data to PSA if it contains '##'

Former Member
0 Kudos
66

Hi All,

I have a flat file, for example with 5 fields arrange respectively:

Company Code: CAT

GL Account: 26309

Text: CTS curve track switch 323##For CTS chai

Local Amount: 540.00

Cost Center: 12345

The escape character of my infoPackage is ~.

My data loading stops, before encountering the '##', so the data loaded to my PSA is:

Company Code: CAT

GL Account: 26309

Text: CTS curve track switch 323

Local Amount:

Cost Center: 

RSKC Value:

'~`!@#$%^&*()_+-={}[]|\:;"<,>.? /1234567890 ALL_CAPITAL_PLUS_HEX

Any advice please?

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi Jun C...

    try routine at tranfermation level

regards

subbu

Former Member
0 Kudos

Hi Jun,

Do you need the text with special characters in your report?

If not, you can write a simple routine to remove these special characters while loading.

Br,

H

Former Member
0 Kudos

Hi,

Try to add this code at field level routine to field which causing error.

DATA A TYPE /BIC/OIA_ADDLINE.

DATA: L_LEN TYPE I,

      L_TIME TYPE I.

MOVE SOURCE_FIELDS-LOCAT TO A.

TRANSLATE A TO UPPER CASE.

L_LEN = STRLEN( A ).

DO L_LEN TIMES.

  IF  A+L_TIME(1) CN

    ',<>?/\:;"''ABCDEFGHI JKLMNOPQRSTUVWXYZ!%^&*()__+=1234567890'.

    A+L_TIME(1) = '~'.

    ENDIF.

     L_TIME =  L_TIME + 1.

     ENDDO.

     REPLACE ALL OCCURRENCES OF '~' IN A WITH SPACE.

     CONDENSE A.

     RESULT = A.

Regards,

Subba Reddy.

Former Member
0 Kudos

Hi Itachi/Harish,

My Source System is a PC file, so this flat file is being loaded to BW.

If my dataSource is a customize structure via custom FM then I can do internal replacement of '##' with spaces.

When you say field routine, this can be done at transformation level right? (PSA to DSO).

Since my source system is flat file, it is one is to one mapping with structure of my datasource only. How can I create a routine then at that level?

If the character is '#' only, the data can be loaded successfully, if it's '##', the data is loaded partially as shown in my example.

Thanks,

Jun

P.S. I just started BW this June, doing ABAP before.

Former Member
0 Kudos

Hi Subba,

When you say at field level routine, is it DataSource level or you mean at transformation level?

Thanks

Former Member
0 Kudos

Hi Jun,

Despite it's one to one mapping, you can write a field level routine or a start/end routine in your transformation to accomplish what you really want.

Br,

H

Former Member
0 Kudos

Hi,

In my dataSource, I haven't specified any InfoObject, so in BW, how do I create the field conversion routine?

Do I need to create a custom infoObject first, then inside that infoObject, declare the Routine Conversion?

Thanks

Former Member
0 Kudos

Hi Jun,

There's no need to specify the infoobject in your data source.

I believe you mapped a field in your data source to a infoobject in BW.

In that, you can write an end routine.

Br,

H

Former Member
0 Kudos

Hi Jun,

   There is no need for field conversion routine. Just try the subba reddy code in end routine in the transformation.Surely u might be having the field 'TEXT" in the transformation at the target side.

Same code of subba reddy with little modfication.

DATA A TYPE /BIC/OIA_ADDLINE.

DATA: L_LEN TYPE I,

      L_TIME TYPE I.

LOOP AT RESULT_PACKAGE ASSIGNING <RESULT_FIELDS>.

MOVE RESULT_FIELDS>-LOCAT TO A.

TRANSLATE A TO UPPER CASE.

L_LEN = STRLEN( A ).

DO L_LEN TIMES.

  IF  A+L_TIME(1) CN

    ',<>?/\:;"''ABCDEFGHI JKLMNOPQRSTUVWXYZ!%^&*()__+=1234567890'.

    A+L_TIME(1) = '~'.

    ENDIF.

     L_TIME =  L_TIME + 1.

     ENDDO.

     REPLACE ALL OCCURRENCES OF '~' IN A WITH SPACE.

     CONDENSE A.

     RESULT_FIELDS>-LOCAT = A.

ENDLOOP.

Thanks,

Umashankar