Skip to Content

how do we write RETUNRCODE in BI transformations

Hi all,

please let me know wht is the syntax for RETURNCODE.

CODE SAMPLE:

if SOURCE_FIELDS-item_del eq 'X'.

RESULT = 0.

RETURNCODE = 4.

else.

RETURNCODE = 0.

the error is:

Field "RETURNCODE" is unknown. It is neither in one of the specified

tables nor defined by a "DATA" statement. "DATA" statement. "DATA"

statement.

How can i solve this problem...

thanks in advance..

Venkatesh

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 09:05 AM

    Hi,

    as Jorge mentioned, here additonally the comments from the routine:

    ... "to cancel the update process

    • raise exception type CX_RSROUT_ABORT.

    ... "to skip a record

    • raise exception type CX_RSROUT_SKIP_RECORD.

    ... "to clear target fields

    • raise exception type CX_RSROUT_SKIP_VAL.

    That means, if you want to cancel the complete update process

    raise cx_rsrout_abort.

    to just skip a record

    raise cs_rsrout_skip_record.

    and to clear the target fields

    raise cx_rsrout_skip_val.

    kind regards

    Siggi

    PS: just take out the statement returncode = 0. and replace returncode = 4 with one of the raise cx_rsrout_* statements depending on your needs.

    Edited by: Siegfried Szameitat on Jun 17, 2008 11:06 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 09:09 AM

    Hi,

    go through this NOTE 567372

    [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bw_whm/~form/handler]

    A syntax error is issued for routines for data fields that are updated with the update types 'Overwrite', 'Minimum' or 'Maximum'.

    Using the correction in this note, the definition of the 'RETURN CODE' variable is imported for the corresponding routines again. However, the variable for routines for updating data fields, which are updated using 'Overwrite', 'Minimum' or 'Maximum', should not be used or should not be occupied with values unequal to 0.

    If the RETURNCODE variable is set to a value unequal to 0 for data fields, then the calculation is interrupted for the corresponding data field; that is, the variable is filled with the 'initial' value. This causes an existing value to be overwritten with 'initial' when the 'Overwrite' update type is used. currently, a conditional update is not possible.

    A similar situation occurs for the 'Minimum' and 'Maximum' update types.

    hope it helps...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 08:46 AM

    Hello,

    What are you trying to do, ignore the record? If so, that is not the right syntax.

    To skip the record, if you are in BW3.X

    raise CX_RSROUT_SKIP_RECORD.

    Or BI7

    raise exception type CX_RSROUT_SKIP_RECORD.

    Assign points if this helps

    Regards,

    Jorge Diogo

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.