Routine to filter on account for ODS to ODS data load
I am not an ABAP programmer, so I need your help writing a routine to filter an ODS1 to ODS2 data load. I just need to select and load records containing two specified GL accounts.
I thought it best to code a "start routine" in the target ODS2. Is this the place for the code? The editor is complaining that it cannot find the account, so this looks like a problem. (I am not sure COMM_STRUCTURE can be used in a start routine and if so, how should I handle this?) There may be other problems, so please take a look and send your recommendations.
$$ begin of global - insert your declaration only below this line -
DATA: n type i.
DATA: l_tabix like sy-tabix.
DATA: account like COMM_STRUCTURE-0GL_ACCOUNT.
$$ end of global - insert your declaration only before this line -
The follow definition is new in the BW3.x
BEGIN OF DATA_PACKAGE_STRUCTURE.
INCLUDE STRUCTURE /BIC/CS8ZD_BAKGL.
RECNO LIKE sy-tabix,
END OF DATA_PACKAGE_STRUCTURE.
DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
WITH HEADER LINE
WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
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 -
Loop AT DATA_PACKAGE.
l_tabix = sy-tabix.
select * from /BIC/AZD_BAKGL00.
If COMM_STRUCTURE-account = "0000158110".
If COMM_STRUCTURE-account = "00002158110".
select DATA_PACKAGE index l_tabix.
if sy-subrc NE 0.
delete DATA_PACKAGE index l_tabix.
fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
to make monitor entries
if abort is not equal zero, the update process will be canceled
ABORT = 0.
$$ end of routine - insert your code only before this line -
not sure understand your question correctly.
we are going to get data with GL_account '158110'
and '2158110' only ? how many records with the same gl account in the other infoprovider ? they should match.
hope this helps.