Skip to Content
0
Former Member
Jan 13, 2006 at 03:57 PM

Start Routine. General Information/What would this simple one do?

14 Views

Hello,

I have the following start routine in Update rules for InfoCube Z_COPA. I was hoping to get some information on what is occurring within the code.

Also just some general information on how Start Routines in Update rules are processed would be helpful!

Thanks A lot!

Nick

PROGRAM UPDATE_ROUTINE.

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

  • TABLES: ...

TYPES: BEGIN OF wa_stru,

material LIKE /bic/azcopc_0500-material,

plant LIKE /bic/azcopc_0500-plant,

fiscper LIKE /bic/azcopc_0500-fiscper,

fiscvarnt LIKE /bic/azcopc_0500-fiscvarnt,

zadjvr LIKE /bic/azcopc_0500-/bic/zadjvr,

amountvr LIKE /bic/azcopc_0500-amountvr,

END OF wa_stru.

DATA: wa TYPE TABLE OF wa_stru WITH HEADER LINE.

  • data: wa type hashed table of wa_stru with unique key

  • material plant fiscper fiscvarnt

  • with header 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/CS1_CO_PA2900010_DS.

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 tables "MONITOR" and/or "MONITOR_RECNO",

  • to make monitor entries

if wa is initial. "load lookup table from /bic/azcopc_0500

select material

plant

fiscper

fiscvarnt

/bic/zadjvr

amountvr

into table wa

from /bic/azcopc_0500.

sort wa by material plant fiscper descending fiscvarnt.

endif.

  • 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.