cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

DTP error with argument NaN cannot be interpreted as number

0 Likes
1,073

Hi friends ,

I am new sap world am getting the error daily in dtp step. i am using the step that i will delete the error record in administration target and editing in psa . but I need permanent solution for this please help.

thanks,

Accepted Solutions (1)

Accepted Solutions (1)

Abhishek_Hazra
Active Contributor

Hi Gowtham,

You can simply write a start routine (preferably if you have some calculations with the keyfigure in the transformation) or end routine to modify the value to 0 for erroneous records as you do that manually today. You can also do that in a field routine if you aren't doing any calculations with the keyfigure prior to that.

If you are on HANA, you can achieve it by using LIKE_REGEXPR function. If you want the same in ABAP, you can use CO (contains only predicate), just check for only numbers like below :

IF SOURCE_FIELDS-AMOUNT CO ' 0123456789.'
RESULT = SOURCE_FIELDS-AMOUNT.
ELSE.
RESULT = 0.
ENDIF.<br>

The last '.' in CO parameter is for decimals to be considered, if you have ',' as decimal separator replace the '.' with ','.

Note : You can enhance the routine even further to count the number of decimals not to exceed 1, in that case it's an invalid entry.

Hope this helps.

Best Regards,
Abhi

Answers (1)

Answers (1)

former_member600441
Participant
0 Likes

Hi Gowtham,

In PSA, check for keyfigure having value 'NaN'. Correct the record and reload the request. Alternatively you can write Transformation Routine to handle unwanted value.

Regards,
Pradeep Jaiswar

0 Likes

Hi Pradeep,

I have done changes in psa but the record is coming daily.

can you please help me to write routine.

thanks