Skip to Content

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

VAITM UR SR to 0SD_O01

Hello,

I have the following start routine in update rules. The infosource is 2LIS_11_VAITM, the data target is 0SD_O01. This update rule start routine references both STORNO, and RECORDMODE. I am wondering if that makes any sense?

In my scenario, please consider the fact that in the Infosource 2LIS_11_VAITM, under the transfer rules, there is a red X in the 0RECORDMODE TP column. It looks as though ROCANCEL is assigned to 0STORNO.

Because of the above, I think that the 'ELSEIF' will never be satisfied, since I am guessing RECORDMODE, will never be populated.

Any thoughts or advice is appreciated.

Thanks,

Nick

PROGRAM UPDATE_ROUTINE.

$$ begin of global - insert your declaration only below this line -

$$ end of global - insert your declaration only before this line -

  • The follow definition is new in the BW3.x

TYPES:

BEGIN OF DATA_PACKAGE_STRUCTURE.

INCLUDE STRUCTURE /BIC/CS2LIS_11_VAITM.

TYPES:

RECNO LIKE sy-tabix,

END OF DATA_PACKAGE_STRUCTURE.

DATA:

DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE

WITH HEADER LINE

WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.

FORM startup

TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring

MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n

DATA_PACKAGE STRUCTURE DATA_PACKAGE

USING RECORD_ALL LIKE SY-TABIX

SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS

CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update

*

$$ begin of routine - insert your code only below this line -

  • fill the internal table "MONITOR", to make monitor entries

LOOP AT DATA_PACKAGE.

IF DATA_PACKAGE-doc_categ NE 'C' AND

DATA_PACKAGE-doc_categ NE 'I'.

DELETE DATA_PACKAGE.

elseif DATA_PACKAGE-recordmode eq 'R'.

DATA_PACKAGE-recordmode = ' '.

DATA_PACKAGE-storno = 'X'.

modify DATA_PACKAGE.

ENDIF.

ENDLOOP.

  • if abort is not equal zero, the update process will be canceled

ABORT = 0.

$$ end of routine - insert your code only before this line -

*

ENDFORM.

replied

you need to assign ROCANCEL TO 0RECORDMODE AND 0STORNO.

0RECORDMODE will get the values from ROCANCEL. based on this ODS will get the Delta Image types.

all the best.

regards,

Nagesh.

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