Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Update rules overwriting with blanks

Hello all

I have a problem with ODS to ODS update. I have a status ODS and a message ODS, and would like to update two fields in the message ODS with data from the status ODS. I am using the following code in the update rules:

====================

IF COMM_STRUCTURE-/BIC/CHSTATUS(1) EQ 'E'.

RESULT = COMM_STRUCTURE-/BIC/CHSTATUS.

ELSE.

RETURNCODE = 1.

ENDIF.

ABORT = 0.

-


IF COMM_STRUCTURE-/BIC/CHSTATUS EQ 'I0156'.

RESULT = 1.

ELSE.

RESULT = 0.

ENDIF.

ABORT = 0.

=======================

The first one is updating a characteristic, the second a key field. As you can see, different statuses are supposed to update different fields. However, When a status is 'I0156', the first program (which should write nothing) produces a blank, and overwrites the previous value!!! How do I get around this? I have tried RETURNCODE=1, ABORT, but no success. Please Help!!

Regards,

Tobias

replied

Hello Tobias,

you can do a look up at the active table of your target ODS. When you want to retain the same value, use that. otherwise update with the new value according to the logic.

Regards,

Praveen

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question