on 04-25-2007 3:13 PM
HI,
Please any body help me to understand this code
LOOP AT DATA_PACKAGE ASSIGNING <f>.
Read table itab_cc with key
FISCVARNT = <f>-FISCVARNT
FISCPER = <f>-ZZFISPER
RTOCC = <f>-/BIC/ZI_RTOCC
binary search.
If sy-subrc ne 0.
CLEAR AZRTOERR100. " Initialize Error ODS
MOVE-CORRESPONDING <f> TO AZRTOERR100.
CALL FUNCTION 'CHANGEDOCU_GUID_CREATE'
IMPORTING
EV_GUID = AZRTOERR100-BBP_DOGUID.
INSERT /BIC/AZRTOERR100 from AZRTOERR100.
DELETE DATA_PACKAGE.
CONTINUE.
ENDIF.
Thanks
Hi,
this is a start routine looping through your data packet record by record.
<f> get populated with a record.
itab_cc is an internal sorted table populated before (code not here...)
If a record is found (READ itab_cc) with same fiscal variant, fiscal period and ZI_RTOCC values than the current data record <f> then
the structure AZRTOERR100 (looks like the same structure than the active table of ODS ZTROERR) is cleared.
AZRTOERR100 gets populated by your data record.
Function call 'CHANGEDOCU_GUID_CREATE' with BBP_DOGUID value (I don't know what this FM does...)
the data record is inserted directly in the ODS active table
and the loop continues.
This looks to me like a loopback scenario where your ODS is loaded into itself or from one ODS to another ODS.
hope this helps...
Olivier.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Olivier,
Thanks you so much, your information is very help full for me, could you please explaine me about this
If sy-subrc ne 0.
CLEAR AZRTOERR100. " Initialize Error ODS
MOVE-CORRESPONDING <f> TO AZRTOERR100.
CALL FUNCTION 'CHANGEDOCU_GUID_CREATE'
IMPORTING
EV_GUID = AZRTOERR100-BBP_DOGUID.
INSERT /BIC/AZRTOERR100 from AZRTOERR100.
DELETE DATA_PACKAGE.
CONTINUE.
ENDIF.
Hi Rob,
please find below:
"reset the structure AZRTOERR100 values
CLEAR AZRTOERR100. " Initialize Error ODS
"populating structure AZRTOERR100 with data record
MOVE-CORRESPONDING <f> TO AZRTOERR100.
"calling a FM (don't know what is this for)
CALL FUNCTION 'CHANGEDOCU_GUID_CREATE'
IMPORTING
EV_GUID = AZRTOERR100-BBP_DOGUID.
"inserting this error record into the active table of your error ODS
INSERT /BIC/AZRTOERR100 from AZRTOERR100.
"deteting the current record from the data_package (will not be posted to the
"target of this load)
DELETE DATA_PACKAGE.
"continue looping
CONTINUE.
ENDIF.
hope this heps,
Olivier.
Hi Oliiver,
Thanks you very much, you are very help full
could you explain me this one in the same way.
TYPES:
BEGIN OF DATA_PACKAGE_STRUCTURE.
INCLUDE STRUCTURE /BIC/CS0000000082.
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
DATA:
DATA_PACKAGE1 TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
WITH HEADER LINE
WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
Rob
Message was edited by:
Rob
[code]
"the start routine declarations
"this is defining an ABAP type
"this type includes a structure /BIC/CS0000000082 (comm structure)
"and RECNO ( the record number)
TYPES: BEGIN OF DATA_PACKAGE_STRUCTURE.
INCLUDE STRUCTURE /BIC/CS0000000082.
TYPES: RECNO LIKE sy-tabix,
END OF DATA_PACKAGE_STRUCTURE.
"defining an internal table based upon the the type defined above
DATA: DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE WITH HEADER LINE
WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
"defining a form (local routine which could be called here)
FORM startup
"local objects declarations for this form
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
" the form could change the var ABORT which is availalable in the caller program of this form (this update start routine)
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
"the start routine code which just includes a declaration
" there is no processing of data here...
"declaring an internal table exactly the same than DATA_PACKAGE.
DATA: DATA_PACKAGE1 TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
WITH HEADER LINE
WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
[/code]
Since it looks like you try to understand ABAP you can put your cursor within a key word in your start routine and press F1; the ABAP help will open and guide you (I learned eveything from the system help...)
hope this helps...
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.