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

DTP error with invalid char in field of amount

0 Kudos
339

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 (0)

Answers (1)

Answers (1)

Abhishek_Hazra
Active Contributor

Hi Gowtham,

I think this question quite resembles to the other question you have posted. However, as mentioned there, 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.

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