Sap source field in <Blank>. Is it blank,Null,space ??

Hi,

My Sap source field in . I have to load to Teradata. So in my mapping what should I do? I tried with ifthenelse (table.col is null then ‘A’ ,‘B’) and then with ‘’ Still the records get rejected. CAN ANYONE HELP ME?

Thanks and regards,
Raja


rkhongth (BOB member since 2010-08-12)

Have you tried using the nvl function?

nvl([in]InputExpression, [in]ReplacementExpression)

This function replaces the InputExpression with the ReplacementExpression if the InputExpression evaluates to NULL.


Nemesis :australia: (BOB member since 2004-06-09)

Hi,

Tried but not working.The rejects still happen.

Rgds,
Raja


rkhongth (BOB member since 2010-08-12)

Okay, so why is Teradata rejecting the value? If it can’t handle a NULL or blanks you should change the value to ‘XXXX’ or similar using ifthenelse or nvl.

Can you detail your script on BOB? I’d like to have a look at what you’re trying to do.


Nemesis :australia: (BOB member since 2004-06-09)

Hi,

My data isn SAP table is as below:

Column Distincts Min Max
ABC 0
DEF 0

and so on.

I have 66 rows from source and when it loaded to Teradata is is only 22. Those records loaded are because either ABC or DEF or both are not having as the records. Rejected records are 44 and they are because either ABC or DEF or both are having as the records.

My logic is simple. Take the fields from source SAP thru data transport and then put a mapping transform for target Teradata. My Teradata table structure is simple and not null only on UPI and the above two fields are not at all UPI.

Rgds,
Raja


rkhongth (BOB member since 2010-08-12)

So are you saying that rows where the MAX and MIN columns are BOTH are loading? In that case why not just leave the MAX and MIN columns out of the query transform and just load the ‘Column’ and ‘Distincts’ columns?


Nemesis :australia: (BOB member since 2004-06-09)

Hi,

To put it in simple term. I have 4 fields. Field 1 has all values. Fields 2 and 3 some have data as or both are blank. Field 4 has data.
So all rows which have blanks as field(s) are rejected.

Only those rows where blanks are not there are loaded. I need to map those records in whcih I find blank and load to teradata correspondingly.

Thanks,
Raja


rkhongth (BOB member since 2010-08-12)

If you do not change the default behavior in dsconfig, the data returned from SAP into the dataflow is a single character of type blank. So the condition would be ifthenelse(col=’ ', x, y).

Inside the ABAP dataflow a nvl() function works too.

Point simply is, in ABAP the null value is a single blank, in dataflows obviously not.


Werner Daehn :de: (BOB member since 2004-12-17)

Hi,

I tried nvl in ABAP flow, but still it rejects the records. Those fields are nullable in teradata. Data is expected to sit at teradata side.

Thanks and regards,
Raja


rkhongth (BOB member since 2010-08-12)

Well, if the field is nullable it can contain any value and hence cannot be the root cause of your problem. Can you summarize what errors you get, what values you insert, why you came to the conclusion it would be that field/value?


Werner Daehn :de: (BOB member since 2004-12-17)

On this same topic; is it possible to check for both NULLs and Blanks within a Query ?
Shouldn’t the line table.date = ’ ’ be correct ?


di652 (BOB member since 2005-02-24)