Hi,
I need to conver 3.x Start routine into Bi 7. Wehn ever i try system given me errors specially INCLUDE Structure.
Please help me to fix this problem.
Thanks
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
$$ 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/CS0IM_FA_IP_2.
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
if abort is not equal zero, the update process will be canceled
type-pools: imbw1.
data:
lS_TABNAMEs TYPE IMBW1_TYPE_S_TABNAME,
ls_prefetch_of type imbw1_type_s_prefetch_of,
lt_ip_attr type imbw1_type_t_sor_ip_attr.
*----
Get the pramameters for IM-Prefetch - Logic.
CALL FUNCTION 'AIB5_DATABASIS_START_GET_PARA'
EXPORTING
I_OBJECT = imbw1_con_object-ip
I_LOGSYST = SOURCE_SYSTEM
IMPORTING
ES_PREFETCH_OF = ls_prefetch_of
ES_TABNAMES = ls_tabnames
E_ABORT = ABORT
TABLES
ET_MONITOR = MONITOR[].
EXCEPTIONS
UNKNOWN_OBJECT = 1.
.
check ABORT is initial.
*----
Select the necessary data.
if ls_tabnames-ip_attr_block is initial and not
ls_prefetch_of-ip_attr is initial.
IP_ATTR.
select * from (ls_tabnames-IP_attr)
into corresponding fields of table
lt_ip_attr[]
for all entries in
DATA_PACKAGE[]
where
prog_def_s eq DATA_PACKAGE-prog_def_s and
appr_year eq DATA_PACKAGE-appr_year and
prog_pos eq DATA_PACKAGE-prog_pos and
objvers eq 'A'.
endif.
*----
Push back the data to the IM-Prefetch Buffer.
CALL FUNCTION 'AIB5_DATABASIS_START_PUT_TABL'
EXPORTING
I_OBJECT = imbw1_con_object-ip
IT_ip_attr = lt_ip_attr[]
IMPORTING
E_ABORT = ABORT.
$$ end of routine - insert your code only before this line -
*
ENDFORM.