cancel
Showing results for 
Search instead for 
Did you mean: 

The return statement is expected to return a conditional value: found type<VARCHAR>. (COR-10622)

Former Member
0 Kudos

Hi Gurus,

As I am totally new to the SAP Information Steward, Please help me in the below if condition:

BEGIN

IF($Rule_CHAR_REM LIKE ('.%')) RETURN replace_substr($Rule_CHAR_REM, '.', '', 1, 1);

END

$Rule_CHAR_REM is the parameter which i created and I need to search if the field record is starting from '.' and if it is present than remove the '.'.

Regards,

DJ

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Deepak,

First of all, the validation Rule in Information Steward - Data Insight module is, to validate the data, so based on what you want to validate, put this logic in the from of code, then system will validates the data according to code and returns True or False (Passed / Failed).

This tool is not used to perform the data integration activities like we do in Data Services. In your example, if you want to check whether the values in $Rule_CHAR_REM start with "." or not, that you can check but you can't use this tool to modify the values.

Thanks,

Ramakrishna Kamurthy

Former Member
0 Kudos

dear dj

Try this

data nPos type i.

SEARCH $Rule_CHAR_REM FOR '.'.

  IF SY-SUBRC = 0 .

      nPos = SY-FDPOS .

       if nPos = 0 .  

           REPLACE FIRST OCCURRENCES OF '.' IN

             $Rule_CHAR_REM WITH ''.

       endif.

  ENDIF.

Regards

Parveen

Former Member
0 Kudos

Hi Parveen,

Thanks A lot for a super Quick reply i will try this and let you know.

Regards,

DJ

Former Member
0 Kudos

Hi Parveen,

Can you send me this logic with the correct syntax as I am totally new to this tool and not aware of the syntax's

Please help me.

Thanks in Advance,

Regards,

DJ