Problem in execution of start routine
Hi gurus,
I have written the following start routine in BW 3.5.
I want this code to be executed when i move data from ODS1: ZCC_LOAN to ODS2: ZCORPLNS.
The problem is that the start routine is not executed.
I used breakpoints (break-point.) both above and below the loop (loop at DATA_PACKAGE.) and scheduled the infopackage to do a transfer, but data was scheduled without entering the debug screen.
Do you think there might be wrong with the declarations of the DATA_PACKAGE? Any suggestions?
Thank you for your help,
Giorgos
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
TABLES: /BIC/AZCORPLNS00.
TABLES: /BIC/AZCC_LOAN00.
DATA: lrate like /BIC/AZCORPLNS00-/BIC/ZBASERATE.
DATA: lspread like /BIC/AZCORPLNS00-/BIC/ZREPRSPRD.
DATA: lmonth like /BIC/AZCORPLNS00-fiscper3.
DATA: basedays type i,
year(4) type c,
month(2) type c,
lrmonth(2) type c,
lmonthi type i,
monthi type i,
lyear(4) type c,
lyeari type i,
fileyearmonth(6) type c,
lrdyearmonth(6) type c,
yeari type i.
$$ 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/CS8ZCC_LOAN.
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
loop at DATA_PACKAGE.
fileyearmonth = DATA_PACKAGE-/BIC/ZFILEDATE(6).
lrdyearmonth = DATA_PACKAGE-/BIC/ZLASTREPR(6).
if fileyearmonth = lrdyearmonth.
month = DATA_PACKAGE-/BIC/ZFILEDATE+4(2).
monthi = month.
year = DATA_PACKAGE-/BIC/ZFILEDATE(4).
yeari = year.
if month = '01'.
lyeari = yeari - 1.
lmonthi = 12.
else.
lyeari = yeari.
lmonthi = monthi - 1.
endif.
lyear = lyeari.
lmonth = lmonthi.
clear lrate.
clear lspread.
select single /BIC/ZBASERATE /BIC/ZREPRSPRD
from /BIC/AZCORPLNS00 into (lrate, lspread)
where FISCPER3 = lmonth and FISCYEAR = lyear
and /BIC/ZACCNUMB = DATA_PACKAGE-/BIC/ZACCNUMB.
DATA_PACKAGE-/BIC/ZBASERATE = lrate.
DATA_PACKAGE-/BIC/ZREPRSPRD = lspread.
modify DATA_PACKAGE.
endif.
endloop.
Hi Giorgos
You need to use work area(l_s_datapak_line) of DATA_PACKAGE instead of DATA_PACKAGE.
Following are the changes should be required in your code
DATA: l_s_datapak_line TYPE DATA_PACKAGE_STRUCTURE.
loop at DATA_PACKAGE into l_s_datapak_line.
fileyearmonth = l_s_datapak_line-/BIC/ZFILEDATE(6).
lrdyearmonth = l_s_datapak_line-/BIC/ZLASTREPR(6).
if fileyearmonth = lrdyearmonth.
month = l_s_datapak_line-/BIC/ZFILEDATE+4(2).
monthi = month.
year = l_s_datapak_line-/BIC/ZFILEDATE(4).
yeari = year.
if month = '01'.
lyeari = yeari - 1.
lmonthi = 12.
else.
lyeari = yeari.
lmonthi = monthi - 1.
endif.
lyear = lyeari.
lmonth = lmonthi.
clear lrate.
clear lspread.
select single /BIC/ZBASERATE /BIC/ZREPRSPRD
from /BIC/AZCORPLNS00 into (lrate, lspread)
where FISCPER3 = lmonth and FISCYEAR = lyear
and /BIC/ZACCNUMB = l_s_datapak_line-/BIC/ZACCNUMB.
l_s_datapak_line-/BIC/ZBASERATE = lrate.
l_s_datapak_line-/BIC/ZREPRSPRD = lspread.
MODIFY DATA_PACKAGE FROM l_s_datapak_line.
endif.
endloop.
Similar Messages
-
Problems in Start Routine of Transfermations (DTP)
Hi Abap OO Gurus,
I am migrating the 3.x data source to BI 7.0 ,here I am getting problems in DTP especially in the start routine . we are using the SP10, pls see the below code . I have fixed some code still I am getting problems at the below loop statement .
PROGRAM trans_routine.
CLASS routine DEFINITION
CLASS lcl_transform DEFINITION.
PUBLIC SECTION.
TYPES:
BEGIN OF tys_SC_1,
InfoObject: 0MPOINT Measuring point.
MPOINT TYPE /BI0/OIMPOINT,
InfoObject: 0MDOC Measurement Document.
MDOC TYPE /BI0/OIMDOC,
InfoObject: 0MPOBJ Object Number of Measuring Point Object.
MPOBJ TYPE /BI0/OIMPOBJ,
InfoObject: 0MPTYP Type of Measuring Point.
MPTYP TYPE /BI0/OIMPTYP,
InfoObject: 0PSORT Position Number of Measuring Point in Object (
*Sort Field).
PSORT TYPE /BI0/OIPSORT,
InfoObject: 0ASSEMBLY Assembly.
ASSEMBLY TYPE /BI0/OIASSEMBLY,
InfoObject: 0ATINN Internal Characteristic Number.
ATINN TYPE /BI0/OIATINN,
InfoObject: 0MDATE Date of Measurement.
MDATE TYPE /BI0/OIMDATE,
InfoObject: 0TIME Time.
TIME TYPE /BI0/OITIME,
InfoObject: 0DESIRSI Target Value for Measuring Point in SI Unit.
DESIRSI TYPE /BI0/OIDESIRSI,
InfoObject: 0TVIND Target Value for Measuring Point Is Defined.
TVIND TYPE /BI0/OITVIND,
InfoObject: 0MRMINI Lower Measurement Area Limit Is Defined.
MRMINI TYPE /BI0/OIMRMINI,
InfoObject: 0MRMINSI Lower Meas. Limit or Min. Total Counter Read
*ing in SI Unit.
MRMINSI TYPE /BI0/OIMRMINSI,
InfoObject: 0MRMAXI Upper Measurement Area Limit Is Defined.
MRMAXI TYPE /BI0/OIMRMAXI,
InfoObject: 0SIUNIT SI unit.
SIUNIT TYPE /BI0/OISIUNIT,
InfoObject: 0CJUMPSI Counter Overflow Reading in SI Unit.
CJUMPSI TYPE /BI0/OICJUMPSI,
InfoObject: 0PYEARSI Annual Performance in SI Unit.
PYEARSI TYPE /BI0/OIPYEARSI,
InfoObject: 0CREATED_BY Created By.
CREATED_BY TYPE /BI0/OICREATED_BY,
InfoObject: 0READSI Measured Value/Total Counter Reading in SI Un
*it.
READSI TYPE /BI0/OIREADSI,
InfoObject: 0READEU Measured Value in Document Entry Unit.
READEU TYPE /BI0/OIREADEU,
InfoObject: 0RECDU Unit of Measurement for Document Entry.
RECDU TYPE /BI0/OIRECDU,
InfoObject: 0CNTRRSI Counter Reading in SI Unit.
CNTRRSI TYPE /BI0/OICNTRRSI,
InfoObject: 0CDIFFSI Counter Reading Difference in SI Unit.
CDIFFSI TYPE /BI0/OICDIFFSI,
InfoObject: 0CAT_TYPE Catalog.
CAT_TYPE TYPE /BI0/OICAT_TYPE,
InfoObject: 0CAT_GROUP Code group.
CAT_GROUP TYPE /BI0/OICAT_GROUP,
InfoObject: 0FI_STATUS Processing Status.
FI_STATUS TYPE /BI0/OIFI_STATUS,
InfoObject: 0DIM_ID Dimension Key.
DIM_ID TYPE /BI0/OIDIM_ID,
InfoObject: 0CNTIND Measuring Point is Counter.
CNTIND TYPE /BI0/OICNTIND,
InfoObject: 0EQUIPMENT Equipment Number.
EQUIPMENT TYPE /BI0/OIEQUIPMENT,
InfoObject: 0FUNCT_LOC Functional Location.
FUNCT_LOC TYPE /BI0/OIFUNCT_LOC,
InfoObject: 0CAT_CODE Code.
CAT_CODE TYPE /BI0/OICAT_CODE,
InfoObject: 0MRMAXSI Upper Meas. Limit or Max. Total Counter Read
*ing in SI Unit.
MRMAXSI TYPE /BI0/OIMRMAXSI,
InfoObject: 0DOCAF Measurement Document Included for Associated T
*ask.
DOCAF TYPE /BI0/OIDOCAF,
InfoObject: 0RECORDMODE BW Delta Process: Update Mode.
RECORDMODE TYPE RODMUPDMOD,
Field: RECORD.
RECORD TYPE RSARECORD,
END OF tys_SC_1.
TYPES:
tyt_SC_1 TYPE STANDARD TABLE OF tys_SC_1
WITH NON-UNIQUE DEFAULT KEY.
DATA:
p_check_master_data_exist
TYPE RSODSOCHECKONLY READ-ONLY,
*- Instance for getting request runtime attributs;
Available information: Refer to methods of
interface 'if_rsbk_request_admintab_view'
p_r_request
TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.
PRIVATE SECTION.
TYPE-POOLS: rsd, rstr.
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
*constants: c_tabname type rstlogotab value '/BI0/MEQUIPMENT'.
$$ end of global - insert your declaration only before this line -
METHODS
start_routine
IMPORTING
request type rsrequest
datapackid type rsdatapid
EXPORTING
monitor type rstr_ty_t_monitors
CHANGING
SOURCE_PACKAGE type tyt_SC_1
RAISING
cx_rsrout_abort.
METHODS
inverse_start_routine
IMPORTING
i_th_fields_outbound TYPE rstran_t_field_inv
i_r_selset_outbound TYPE REF TO cl_rsmds_set
i_is_main_selection TYPE rs_bool
i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set
i_r_universe_inbound TYPE REF TO cl_rsmds_universe
CHANGING
c_th_fields_inbound TYPE rstran_t_field_inv
c_r_selset_inbound TYPE REF TO cl_rsmds_set
c_exact TYPE rs_bool.
ENDCLASS. "routine DEFINITION
$$ begin of 2nd part global - insert your code only below this line *
... "insert your code here
data: lt_data type ref to data.
data: ls_data type ref to data.
field-symbols: <G_T_0EQUIPMENT> type standard table.
field-symbols: <G_S_0EQUIPMENT> type any.
field-symbols: <FUNCT_LOC> type any.
field-symbols: <DATEFROM> type any.
field-symbols: <DATETO> type any.
constants: c_tabname type rstlogotab value '/BI0/MEQUIPMENT'.
$$ end of 2nd part global - insert your code only before this line *
CLASS routine IMPLEMENTATION
CLASS lcl_transform IMPLEMENTATION.
Method start_routine
Calculation of source package via start routine
<-> source package
METHOD start_routine.
*=== Segments ===
FIELD-SYMBOLS:
<SOURCE_FIELDS> TYPE tys_SC_1.
DATA:
MONITOR_REC TYPE rstmonitor.
$$ begin of routine - insert your code only below this line -
fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
to make monitor entries
In this start routine missing functional location for
an equipment is added to a Data Package record, if it is available
create data lt_data type table of (c_tabname).
assign lt_data->* to <G_T_0EQUIPMENT>.
create data ls_data type (c_tabname).
assign ls_data->* to <G_S_0EQUIPMENT>.
assign component 'FUNCT_LOC' of structure <G_S_0EQUIPMENT> to
<FUNCT_LOC>.
assign component 'DATE_FROM' of structure <G_S_0EQUIPMENT> to
<DATEFROM>.
assign component 'DATE_TO' of structure <G_S_0EQUIPMENT> to
<DATETO>.
CALL FUNCTION 'RSAU_READ_MASTER_DATA'
EXPORTING
I_IOBJNM = '0EQUIPMENT'
I_FLG_WHOLE_TABLE = 'X'
IMPORTING
E_TABLE = <G_T_0EQUIPMENT>
EXCEPTIONS
READ_ERROR = 1
NO_SUCH_ATTRIBUTE = 2
WRONG_IMPORT_PARAMETERS = 3
CHAVL_NOT_FOUND = 4
OTHERS = 5.
CASE SY-SUBRC.
WHEN 0.
LOOP AT <G_T_0EQUIPMENT> INTO <G_S_0EQUIPMENT>.
IF <FUNCT_LOC> IS INITIAL.
DELETE <G_T_0EQUIPMENT>.
ENDIF.
master data collected and condensed
ENDLOOP.
<b>LOOP AT SOURCE_PACKAGE ASSIGNING <SOURCE_FIELDS>.
IF ( SOURCE_PACKAGE-FUNCT_LOC IS INITIAL ) AND
( SOURCE_PACKAGE-EQUIPMENT IS NOT INITIAL ).
READ TABLE <G_T_0EQUIPMENT> WITH KEY
('EQUIPMENT') = SOURCE_PACKAGE-EQUIPMENT INTO <G_S_0EQUIPMENT>
IF SY-SUBRC = 0.
IF ( SOURCE_PACKAGE-MDATE >= <DATEFROM> )
AND ( SOURCE_PACKAGE-MDATE <= <DATETO> ).</b>* record for equipment exists and valid
SOURCE_PACKAGE-FUNCT_LOC = <FUNCT_LOC>. MODIFY SOURCE_PACKAGE.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
WHEN 4.
master data is not (yet) loaded
WHEN OTHERS.
problem occured, output as warning
MONITOR-MSGID = SY-MSGID.
MONITOR-MSGTY = 'W'.
MONITOR-MSGNO = SY-MSGNO.
MONITOR-MSGV1 = SY-MSGV1.
MONITOR-MSGV2 = SY-MSGV2.
MONITOR-MSGV3 = SY-MSGV3.
MONITOR-MSGV4 = SY-MSGV4.
APPEND MONITOR.
ENDCASE.
if abort is not equal zero, the update process will be canceled
DEL :ABORT = 0.
Please adjust the syntax manually.
- Automatically replaced: COMM_STRUCTURE with SOURCE_FIELDS
- Included the new Exception Handling (instead of ABORT)
$$ end of routine - insert your code only before this line -
ENDMETHOD. "start_routine
Method inverse_start_routine
This subroutine needs to be implemented only for direct access
(for better performance) and for the Report/Report Interface
(drill through).
The inverse routine should transform a projection and
a selection for the target to a projection and a selection
for the source, respectively.
If the implementation remains empty all fields are filled and
all values are selected.
METHOD inverse_start_routine.
$$ begin of inverse routine - insert your code only below this line-
... "insert your code here
$$ end of inverse routine - insert your code only before this line -
ENDMETHOD. "inverse_start_routine
ENDCLASS. "routine IMPLEMENTATION
here I am getting the error like ""SOURCE_PACKAGE" is a table without a header line and therefore has no component called "FUNCT_LOC". I tried many ways to fix this problem.
Could you some kind soul educate how to fix the problem .
Thanks in advacne ,RP.Since the MONITOR is a table without header-line, u can no longer use it as a workarea for record entry. You can use MONITOR_REC defined in the data-section of this method to fill in the record and then append it to the table.
MONITOR-MSGID = SY-MSGID.
MONITOR-MSGTY = 'W'.
MONITOR-MSGNO = SY-MSGNO.
MONITOR-MSGV1 = SY-MSGV1.
MONITOR-MSGV2 = SY-MSGV2.
MONITOR-MSGV3 = SY-MSGV3.
MONITOR-MSGV4 = SY-MSGV4.
APPEND MONITOR.
has to be replaced with
clear MONITOR_REC.
MONITOR_REC-MSGID = SY-MSGID.
MONITOR_REC-MSGTY = 'W'.
MONITOR_REC-MSGNO = SY-MSGNO.
MONITOR_REC-MSGV1 = SY-MSGV1.
MONITOR_REC-MSGV2 = SY-MSGV2.
MONITOR_REC-MSGV3 = SY-MSGV3.
MONITOR_REC-MSGV4 = SY-MSGV4.
APPEND MONITOR_REC to MONITOR. -
ABAP Code Problem in Start Routine to Fill the value from Look-up Table ???
Hi all,
I am trying to fill the values of DOC_NUMBER & PLANT from look-up table /BIC/AZSD_O0700 (Billing Item ODS) for each BILL_NUM in Start Routine for Update Rules of Billing Header ODS and modify the data_package.
What is wrong with the below ABAP code, PLEASE ???
data: it_data type standard table of data_package_structure
with header line
with non-unique default key initial size 0.
types: begin of billing_item_type,
BILL_NUM like /BIC/AZSD_O0700-BILL_NUM,
DOC_NUMBER like /BIC/AZSD_O0700-DOC_NUMBER,
PLANT like /BIC/AZSD_O0700-PLANT,
end of billing_item_type.
refresh it_data.
clear it_data.
it_data[] = DATA_PACKAGE[].
refresh DATA_PACKAGE.
clear DATA_PACKAGE.
loop at it_data.
select DOC_NUMBER PLANT into (it_data-DOC_NUMBER, it_data-PLANT)
from /BIC/AZSD_O0700
where BILL_NUM = it_data-BILL_NUM
and FISCVARNT = it_data-fiscvarnt.
endselect.
if sy-subrc = 0.
move-corresponding it_data to DATA_PACKAGE.
endif.
endloop.
modify DATA_PACKAGE.
Thanks,
Venkat.Hi Venkat,
Two things -One is the performance and the other ... there is no Append within the loop.
Try moving the select statement ousdie the loop to improve performance and move the modify statement into the loop ... change modify to append. Code below.
Let me know if you need more help.
Best regards,
Kazmi
data: it_data type standard table of data_package_structure
with header line
with non-unique default key initial size 0.
types: begin of billing_item_type,
BILL_NUM like /BIC/AZSD_O0700-BILL_NUM,
DOC_NUMBER like /BIC/AZSD_O0700-DOC_NUMBER,
PLANT like /BIC/AZSD_O0700-PLANT,
end of billing_item_type.
refresh it_data.
clear it_data.
it_data] = DATA_PACKAGE[.
refresh DATA_PACKAGE.
clear DATA_PACKAGE.
loop at it_data.
select DOC_NUMBER PLANT into (it_data-DOC_NUMBER, it_data-PLANT)
from /BIC/AZSD_O0700
where BILL_NUM = it_data-BILL_NUM
and FISCVARNT = it_data-fiscvarnt.
endselect.
if sy-subrc = 0.
move-corresponding it_data to DATA_PACKAGE.
Append DATA_PACKAGE.
endif.
endloop. -
Start Routine logic problem !
Experts ,
in my start routine,
my Source-field-fieldname has value "ABC123"
and i need to assing this value in reverse order like "123ABC" to the Infoobject.
How do i get this output ?
thankssHi Honar ,
Please use this code to reverse the strings.I think you want it like
Input : "ABA123"
Output : "321CBA"
for this use below code
data : v_Input (20) type c .
data : v_Output(20) type c.
LOOP AT SOURCE_PACKAGE ASSIGNING <SOURCE_FIELDS> .
v_Input = <SOURCE_FIELDS>-FIELDNAME .
CALL FUNCTION 'STRING_REVERSE'
EXPORTING
string =v_Input
lang = 'E'
IMPORTING
RSTRING = v_Output
EXCEPTIONS
TOO_SMALL = 1
OTHERS = 2
<SOURCE_FIELDS>-FIELDNAME = v_Output .
ENDLOOP .
This will work .
If you have different requirement then please tell me .
Regards,
Jaya -
Index used or not for selecting data from ODS in a start routine
Dear friends,
In the start routine of the update rules to a cube, I am reading some data of an ODS in to an internal table .
The ODS is indexed. But, I am not sure if the index is at all used in the Select statement (that gets the data from ODS to the internal table in the start routine) while loading data to the cube.
Any help is highly appreciated.
regards,
atlajHi Atlaj
You can findout this is display execution plan for SQL statement in DB02.
Goto DB02. and under diagnostic, you find explain. Select that and enter your query. Make sure that everything here is in capital format. Below is a sample query which I have entered.
SELECT "CRM_SALORG" "SALESORG" FROM "/BI0/QORGUNIT"
WHERE "SALESORG" = ? AND "OBJVERS" = ? AND "DATETO" >= ?
AND "DATEFROM" <= ?
The select parameters should be inside qoutes and in caps and even the from table. Once you enter your query in this format, click on explain. It will show the index scan if the index is present. the output for my query will be something like
0 SELECT STATEMENT ( Estimated Costs = 1,348E+01 [timerons] )
1 (COOR) RETURN
2 ( 0) TQ
3 ( 0) FETCH /BI0/QORGUNIT
4 ( 0) IXSCAN /BI0/QORGUNIT~Z1
Where my last statement (line 4) is showing index scan and the name of index read is Z1.
Hope this helps.
Please let me know if you have any problems entering the query in the specified format and u get any error.
Regards
Sriram -
Hi,
I have installed the infocubes (0PS_C08, 0PS_C081) from the Business content but I can't activate any of the transformations because of a problem in the start routine.
the message of the error:
----> E:A line of "GT_SOURCE" and "<SOURCE_FIELDS>" are not mutually
convertible. In a Unicode program, "GT_SOURCE" must have the same
structure layout as "<SOURCE_FIELDS>", irrespective of the length of a.
Does anyone have any idea how to solve the problem?
Best Regards,Hi,
In fact generally this error should occur when you migrate a flow from 3.x to 7.x, but in my case this problem showed just after the business content installation ( I didn't migrate the flow it is a 7.X standard flow).
I have checked the start routine, and no field is missing. <Source_Fields> and GT_SOURCE did have the same structure but their fields weren't put in the same order, so when I used the APPEND command it generated this error.
I've put the fields in the same order and the transformation could be activated which resolved the problem.
Thank you. -
Start Routine on Transformations
Hi Friends
I've Start routine on transfer rules with internal table and it was working fine.
Now I'm trying to define the internal table with occurs 0 but it's throwing error saying occurs not support in new version.
How can we define an internal table in start routine of transformations in BI7?
The code as follows for internal table.
data: begin of it_ord occurs 0,
AUFNR(000012) TYPE C,
ZZARBPL(000008) TYPE C,
WERKS(000004) TYPE C,
end of it_ord.
Regards,
Chandu.Hi
I've defined as follows
types: begin of it_ord ,
AUFNR(000012) TYPE C,
ARBPL(000008) TYPE C,
WERKS(000004) TYPE C,
end of it_ord.
data: temp_tabix like sy-tabix,
is_datapak type tys_SC_1.
data it_ordt type table of it_ord .
It's throwing error saying it_ort is a table with no header line and therefore has no component called aufnr.
If I define with header line then header line not supported.
What could be the problem?
I've changed like you said but it's giving the following error.
E:"IT_WA" is not a table with header line.
Regards,
Chandu.
Edited by: Chandu on Feb 18, 2009 8:44 AM -
Hi Friends
I've Start routine on transfer rules with internal table and it was working fine.
Now I'm trying to define the internal table with occurs 0 but it's throwing error saying occurs not support in new version.
How can we define an internal table in start routine of transformations in BI7?
The code as follows for internal table.
data: begin of it_ord occurs 0,
AUFNR(000012) TYPE C,
ZZARBPL(000008) TYPE C,
WERKS(000004) TYPE C,
end of it_ord.
Regards,
Chandu.Change your code like the one below
TYPES : begin of it_ord ,
AUFNR(000012) TYPE C,
ARBPL(000008) TYPE C,
WERKS(000004) TYPE C,
end of it_ord.
DATA : temp_tabix TYPE sy-tabix,
is_datapak TYPE tys_SC_1.
DATA : it_ordt TYPE STANDARD TABLE of it_ord ,
it_ordtt_wa TYPE it_ord.
This should solve your problem. -
Error while transporting Transformation: Syntax error in Start Routine
Hi Everyone,
I'm facing a strange problem during transporting one of the Business Content cubes from Dev. to Quality.
I'd activated the DSO 'Purchase Order Items (0PUR_O01)' and its entire data flow from the 4 datasources 2LIS_02_CGR, 2LIS_02_SCN, 2LIS_02_SGR, and 2LIS_02_ITM from BC. Then I migrated the Transfer/Update rules to transformations and the DataSources to BI7 DataSource. So far so good. The migration was successful and all the objects were activated.
Now when I transport the same to Quality, the import fails with return code 8 and the error message says:
'Start of the after-import method RS_TRFN_AFTER_IMPORT for object type(s) TRFN (Activation Mode)'
'Start Routine: Syntax error in routine'
I verified that the transformation where the error orrured was the one from InfoSource Z2LIS_02_ITM to DSO 0PUR_O01. I went and checked the start routine and it did indeed have a syntax error:
'In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter SOURCE_PACKAGE" is incompatible with the formal parameter DATA_PACKAGE". '
But when I check in the Dev. system, there is no syntax error for the same routine. Later, I tried to transport only the said transformation by re-activating it in Dev, and again I got the same error.
I have no idea why I'm getting a syntax error in the start routine when there are non in the Dev. system. Also none of the coding is customised, it was only the BC code, migrated to a transformation.
Any suggestions on the steps I could take to transport the transformation to my quality system?
Thanks,
RamHi Ajay, Shanthi, svu and Ray
I do indeed have a start routine in my transformation and it was migrated from a 3.x update rule to a BI 7 transformation routine.
The migration was successful and the Start Routine has NO syntax errors in the start routine in the Dev. system. I only encounter the error while transporting it to the Quality system. I cannot modify the code in the Quality system because it is non-changelable and there is no point in trying to change the code in Dev. because there are no errors over there.
I've also made sure that I've transported all the necessary objects required by the transformations to quality. The routine does not perform a lookup, it simply deletes some records from the data package based on the processkey value (which is itself present in the data package). -
Start routine error - infosource 2LIS_13_VDITM
Hello,
During the activation of the standard InfoCube 0SD_C03 (Sales: Overview), I have encountered a problem in a transformation between the infosource 2LIS_13_VDITM and the afrementioned Cube (this transformation has been transferred during the activation of Business Content).
The transformation is inactive after the installation (other dataflow structures, for other datasources attached to this Cube have been automatically activated). When I try to active it, an error message appers, informing that:
a) Initial update has been set for some of the key rules (e.g. for target field 0VERSION) - but that is a minor obstacle; the bigger problem is that
b) there is a syntax error in the start routine for this transformation
Checking that start routine results with the following error:
E:In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter
"SOURCE_PACKAGE" is incompatible with the formal parameter
"DATA_PACKAGE".
Since I'm not an ABAPer, that info is a bit vague to me.
I have tried to find an answer in the forums but with no success. So if anyone could provide a solution this problem or point me to a thread where it has been answered, I would be very grateful.
I can provide more details should those be needed.
Best Regards,
AlekThanks for the info Umesh,
Just to be sure - I should simply change "SOURCE_PACKAGE" to "DATA_PACKAGE" in the code of the start routine? "Source_Package" is present in two places in that code:
METHODS
start_routine
IMPORTING
request type rsrequest
datapackid type rsdatapid
EXPORTING
monitor type rstr_ty_t_monitors
CHANGING
SOURCE_PACKAGE type tyt_SC_1
RAISING
cx_rsrout_abort.
and then after that in:
Migrated update rule call
Perform routine_9998
TABLES
SOURCE_PACKAGE
CHANGING
l_abort.
Or should I revert to the 3.5 version? (as a side note, that Data Source (2LIS_13_VDITM) has been activated in 7.0 version by default, when I replicated data sources in BW).
Praveen, as to your remarks, I have the datasource 2LIS_13_VDITM (in version 7.0) active, along with the appropriate Infosource. Transformation between the DataSource and InfoSource is active, and only the transformation between the InforSource and the Cube poses problems.
BR,
Alek -
BW7.3 SOURCE_PACKAGE and DATA_PACKAGE are incompatible in the Start Routine
Hi Gurus,
a face a strange behavior with BW7.3 and the Inventory Cube 0IC_C03:
the standard scenario works well when I activate the cube and its transformations ..bx, bf and um. Then I have modified the InfoCube 0IC_C03 and added some field like 0customer or 0doc_number etc. I also added the fields to the InfoSource 2LIS_03_BF_TR and everything was as usual.
Then I wanted to activate the transformation TRCS 2LIS_03_BF_TR -> CUBE 0IC_C03 when I had the error
"E:In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter "SOURCE_PACKAGE" is incompatible with the formal parameter "DATA_PACKAGE".
I already tried to copy and paste the structure of tys_SC_1 to tys_SC_1_full but whenever I activate the transformation my changes are dropped while the error remains. I assume, that the problem is due the compilation process.
Any hints to solve the problem? Thank you in advance.Hi Cemal,
When we do the modifications at times the field structures inside the start routine are not update so that updation is required to be done manually. Copy the field list of structure (inside the start routine) tys_SC_1 (this is gryed out i.e. change disabled) and paste the same structure to tys_SC_1_full & tys_TG_1_full.
Check the routine and save it.
Hopefully it will solve your problem.
Regards,
Dipika -
Dear All,
I have activated the infocube 0sd_c03 with grouping "in data flow before" and the infocube is activated with datasources
2LIS_11_VAITM
2LIS_11_VAHDR
2LIS_12_VCITM
2LIS_12_VCHDR
2LIS_13_VDITM
2LIS_13_VDHDR in 3.x where as
TRCS 2LIS_13_VDITM -> CUBE 0SD_C03 in transformation with DTP.
when I activate the transformation I get error as mentioned below:
Start Routine: Syntax error in routine and in the start routine when I check the details of the error is
E:In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter
"SOURCE_PACKAGE" is incompatible with the formal parameter
"DATA_PACKAGE".
If source pakage is replaced by data package the system message is data_package is not available.
What do I do to resolve this issue.
KShi,
There is a structral diffrence between SOURCE_PACKAGE and DATA_PACKAGE
so you need to change tys_SC_1_full
go through the below links for similar problem
Re: 0IC_C03: 2LIS_03_BF Transformation Start Routine Activation error
Re: 2LIS_03_BF transformation problem -
Hello Everyone,
I have installed BI content cube, which is getting feeded from ODS. Now i have an issue withe the transformation, from ODS to Cube. I have checked the error in start routine, as shown below.
Error Message:
E:In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter "SOURCE_PACKAGE" is incompatible with the formal parameter "DATA_PACKAGE".
Its a syntax error. Did anyone come across with this type of error.
Your inputs are valuable.
Thanks,
Lasya.Hi Lesya,
Problem is difference between type definition "_ty_s_SC_1" and "_ty_s_SC_1_full" on start routine
data package type: tyt_SC_1_full ( derived with tys_SC_1_full )
source package type: tyt_SC_1 ( derived with tys_SC_1 )
Eliminate differences adding and commenting lines
only on tys_SC_1_full.
my example
comment line
recno ...
insert lines
logsys type rsdlogsys ,
record type rsarecord ,
Thx. -
0IC_C03 Error in start routine when activating
Hi gurus!
I have a SAP NetWeaver BI 7.0 patch level 14 installation with business content SAPKIBIIP6 and BASIS patch level 12
When activating infocube 0IC_C03, the transformation have a start routine that throws the following error:
E:In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter "SOURCE_PACKAGE" is incompatible with the formal parameter "DATA_PACKAGE".
The transformation is TRCS 2LIS_03_BF_TR -> CUBE 0IC_C03
What could be the problem?
ThanksProblem solved!!!
Verify if the type tys_SC_1_full have exactly the same fields as the type tys_SC_1; if not, copy the tys_SC_1 fields to tys_SC_1_full.
Regards!! -
Start Routine code error of Perform routine 9998
Hi,
I have install standard and then migrate to 7.0 all the flow of modeling.
but after loading data in PSA, while activation i will found following problem (error in routine).
In PERFORM or CALL FUNCTION ROUTINE_9998, the actual parameter SOURCE_PACKAGE is incompatible with the formal parameter DATA_PACKAGE.
please suggest me.PROGRAM trans_routine.
CLASS routine DEFINITION
CLASS lcl_transform DEFINITION.
PUBLIC SECTION.
Attributs
DATA:
p_check_master_data_exist
TYPE RSODSOCHECKONLY READ-ONLY,
*- Instance for getting request runtime attributs;
Available information: Refer to methods of
interface 'if_rsbk_request_admintab_view'
p_r_request
TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.
PRIVATE SECTION.
TYPE-POOLS: rsd, rstr.
Rule specific types
TYPES:
BEGIN OF tys_SC_1,
InfoObject: 0MPOINT Measuring point.
MPOINT TYPE /BI0/OIMPOINT,
InfoObject: 0MDOC Measurement Document.
MDOC TYPE /BI0/OIMDOC,
InfoObject: 0MPOBJ Object Number of Measuring Point Object.
MPOBJ TYPE /BI0/OIMPOBJ,
InfoObject: 0MPTYP Type of Measuring Point.
MPTYP TYPE /BI0/OIMPTYP,
InfoObject: 0PSORT Position Number of Measuring Point in Object (
*Sort Field).
PSORT TYPE /BI0/OIPSORT,
InfoObject: 0ASSEMBLY Assembly.
ASSEMBLY TYPE /BI0/OIASSEMBLY,
InfoObject: 0ATINN Internal Characteristic Number.
ATINN TYPE /BI0/OIATINN,
InfoObject: 0MDATE Date of Measurement.
MDATE TYPE /BI0/OIMDATE,
InfoObject: 0TIME Time.
TIME TYPE /BI0/OITIME,
InfoObject: 0DESIRSI Target Value for Measuring Point in SI Unit.
DESIRSI TYPE /BI0/OIDESIRSI,
InfoObject: 0TVIND Target Value for Measuring Point Is Defined.
TVIND TYPE /BI0/OITVIND,
InfoObject: 0MRMINI Lower Measurement Area Limit Is Defined.
MRMINI TYPE /BI0/OIMRMINI,
InfoObject: 0MRMINSI Lower Meas. Limit or Min. Total Counter Read
*ing in SI Unit.
MRMINSI TYPE /BI0/OIMRMINSI,
InfoObject: 0MRMAXI Upper Measurement Area Limit Is Defined.
MRMAXI TYPE /BI0/OIMRMAXI,
InfoObject: 0SIUNIT SI unit.
SIUNIT TYPE /BI0/OISIUNIT,
InfoObject: 0CJUMPSI Counter Overflow Reading in SI Unit.
CJUMPSI TYPE /BI0/OICJUMPSI,
InfoObject: 0PYEARSI Annual Performance in SI Unit.
PYEARSI TYPE /BI0/OIPYEARSI,
InfoObject: 0CREATED_BY Created By.
CREATED_BY TYPE /BI0/OICREATED_BY,
InfoObject: 0READSI Measured Value/Total Counter Reading in SI Un
*it.
READSI TYPE /BI0/OIREADSI,
InfoObject: 0READEU Measured Value in Document Entry Unit.
READEU TYPE /BI0/OIREADEU,
InfoObject: 0RECDU Unit of Measurement for Document Entry.
RECDU TYPE /BI0/OIRECDU,
InfoObject: 0CNTRRSI Counter Reading in SI Unit.
CNTRRSI TYPE /BI0/OICNTRRSI,
InfoObject: 0CDIFFSI Counter Reading Difference in SI Unit.
CDIFFSI TYPE /BI0/OICDIFFSI,
InfoObject: 0CAT_TYPE Catalog.
CAT_TYPE TYPE /BI0/OICAT_TYPE,
InfoObject: 0CAT_GROUP Code group.
CAT_GROUP TYPE /BI0/OICAT_GROUP,
InfoObject: 0FI_STATUS Processing Status.
FI_STATUS TYPE /BI0/OIFI_STATUS,
InfoObject: 0DIM_ID Dimension Key.
DIM_ID TYPE /BI0/OIDIM_ID,
InfoObject: 0CNTIND Measuring Point is Counter.
CNTIND TYPE /BI0/OICNTIND,
InfoObject: 0EQUIPMENT Equipment Number.
EQUIPMENT TYPE /BI0/OIEQUIPMENT,
InfoObject: 0FUNCT_LOC Functional Location.
FUNCT_LOC TYPE /BI0/OIFUNCT_LOC,
InfoObject: 0CAT_CODE Code.
CAT_CODE TYPE /BI0/OICAT_CODE,
InfoObject: 0MRMAXSI Upper Meas. Limit or Max. Total Counter Read
*ing in SI Unit.
MRMAXSI TYPE /BI0/OIMRMAXSI,
InfoObject: 0DOCAF Measurement Document Included for Associated T
*ask.
DOCAF TYPE /BI0/OIDOCAF,
InfoObject: 0RECORDMODE BW Delta Process: Update Mode.
RECORDMODE TYPE RODMUPDMOD,
InfoObject: ZSTEXT Object Number Text.
/BIC/ZSTEXT TYPE /BIC/OIZSTEXT,
Field: RECORD.
RECORD TYPE RSARECORD,
END OF tys_SC_1.
TYPES:
tyt_SC_1 TYPE STANDARD TABLE OF tys_SC_1
WITH NON-UNIQUE DEFAULT KEY.
$$ begin of global - insert your declaration only below this line -
... "insert your code here
$$ end of global - insert your declaration only before this line -
METHODS
start_routine
IMPORTING
request type rsrequest
datapackid type rsdatapid
EXPORTING
monitor type rstr_ty_t_monitors
CHANGING
SOURCE_PACKAGE type tyt_SC_1
RAISING
cx_rsrout_abort.
METHODS
inverse_start_routine
IMPORTING
i_th_fields_outbound TYPE rstran_t_field_inv
i_r_selset_outbound TYPE REF TO cl_rsmds_set
i_is_main_selection TYPE rs_bool
i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set
i_r_universe_inbound TYPE REF TO cl_rsmds_universe
CHANGING
c_th_fields_inbound TYPE rstran_t_field_inv
c_r_selset_inbound TYPE REF TO cl_rsmds_set
c_exact TYPE rs_bool.
ENDCLASS. "routine DEFINITION
$$ begin of 2nd part global - insert your code only below this line *
TYPES:
BEGIN OF tys_SC_1_full,
InfoObject: 0MPOINT Measuring point.
MPOINT TYPE /BI0/OIMPOINT,
InfoObject: 0MDOC Measurement Document.
MDOC TYPE /BI0/OIMDOC,
InfoObject: 0MPOBJ Object Number of Measuring Point Object.
MPOBJ TYPE /BI0/OIMPOBJ,
InfoObject: 0MPTYP Type of Measuring Point.
MPTYP TYPE /BI0/OIMPTYP,
InfoObject: 0PSORT Position Number of Measuring Point in Object (
*Sort Field).
PSORT TYPE /BI0/OIPSORT,
InfoObject: 0ASSEMBLY Assembly.
ASSEMBLY TYPE /BI0/OIASSEMBLY,
InfoObject: 0ATINN Internal Characteristic Number.
ATINN TYPE /BI0/OIATINN,
InfoObject: 0MDATE Date of Measurement.
MDATE TYPE /BI0/OIMDATE,
InfoObject: 0TIME Time.
TIME TYPE /BI0/OITIME,
InfoObject: 0DESIRSI Target Value for Measuring Point in SI Unit.
DESIRSI TYPE /BI0/OIDESIRSI,
InfoObject: 0TVIND Target Value for Measuring Point Is Defined.
TVIND TYPE /BI0/OITVIND,
InfoObject: 0MRMINI Lower Measurement Area Limit Is Defined.
MRMINI TYPE /BI0/OIMRMINI,
InfoObject: 0MRMINSI Lower Meas. Limit or Min. Total Counter Read
*ing in SI Unit.
MRMINSI TYPE /BI0/OIMRMINSI,
InfoObject: 0MRMAXI Upper Measurement Area Limit Is Defined.
MRMAXI TYPE /BI0/OIMRMAXI,
InfoObject: 0SIUNIT SI unit.
SIUNIT TYPE /BI0/OISIUNIT,
InfoObject: 0CJUMPSI Counter Overflow Reading in SI Unit.
CJUMPSI TYPE /BI0/OICJUMPSI,
InfoObject: 0PYEARSI Annual Performance in SI Unit.
PYEARSI TYPE /BI0/OIPYEARSI,
InfoObject: 0CREATED_BY Created By.
CREATED_BY TYPE /BI0/OICREATED_BY,
InfoObject: 0READSI Measured Value/Total Counter Reading in SI Un
*it.
READSI TYPE /BI0/OIREADSI,
InfoObject: 0READEU Measured Value in Document Entry Unit.
READEU TYPE /BI0/OIREADEU,
InfoObject: 0RECDU Unit of Measurement for Document Entry.
RECDU TYPE /BI0/OIRECDU,
InfoObject: 0CNTRRSI Counter Reading in SI Unit.
CNTRRSI TYPE /BI0/OICNTRRSI,
InfoObject: 0CDIFFSI Counter Reading Difference in SI Unit.
CDIFFSI TYPE /BI0/OICDIFFSI,
InfoObject: 0CAT_TYPE Catalog.
CAT_TYPE TYPE /BI0/OICAT_TYPE,
InfoObject: 0CAT_GROUP Code group.
CAT_GROUP TYPE /BI0/OICAT_GROUP,
InfoObject: 0FI_STATUS Processing Status.
FI_STATUS TYPE /BI0/OIFI_STATUS,
InfoObject: 0DIM_ID Dimension Key.
DIM_ID TYPE /BI0/OIDIM_ID,
InfoObject: 0CNTIND Measuring Point is Counter.
CNTIND TYPE /BI0/OICNTIND,
InfoObject: 0EQUIPMENT Equipment Number.
EQUIPMENT TYPE /BI0/OIEQUIPMENT,
InfoObject: 0FUNCT_LOC Functional Location.
FUNCT_LOC TYPE /BI0/OIFUNCT_LOC,
InfoObject: 0CAT_CODE Code.
CAT_CODE TYPE /BI0/OICAT_CODE,
InfoObject: 0MRMAXSI Upper Meas. Limit or Max. Total Counter Read
*ing in SI Unit.
MRMAXSI TYPE /BI0/OIMRMAXSI,
InfoObject: 0DOCAF Measurement Document Included for Associated T
*ask.
DOCAF TYPE /BI0/OIDOCAF,
InfoObject: 0RECORDMODE BW Delta Process: Record Mode.
RECORDMODE TYPE RODMUPDMOD,
Field: RECNO Data record number.
RECNO TYPE RSARECORD,
END OF tys_SC_1_full.
TYPES:
tyt_SC_1_full TYPE STANDARD TABLE OF tys_SC_1_full
WITH NON-UNIQUE DEFAULT KEY.
TYPES:
BEGIN OF tys_TG_1_full,
Field: SID Master data ID.
SID TYPE RSSID,
Field: DATAPAKID Data packet number.
DATAPAKID TYPE RSDATAPID,
Field: RECORD Data record number.
RECORD TYPE RSARECORD,
InfoObject: 0MPOINT Measuring point.
MPOINT TYPE /BI0/OIMPOINT,
InfoObject: 0MDOC Measurement Document.
MDOC TYPE /BI0/OIMDOC,
InfoObject: 0MRMINSI Lower Meas. Limit or Min. Total Counter Read
*ing in SI Unit.
MRMINSI TYPE /BI0/OIMRMINSI,
InfoObject: 0FI_STATUS Processing Status.
FI_STATUS TYPE /BI0/OIFI_STATUS,
InfoObject: 0DIM_ID Dimension Key.
DIM_ID TYPE /BI0/OIDIM_ID,
InfoObject: 0CNTIND Measuring Point is Counter.
CNTIND TYPE /BI0/OICNTIND,
InfoObject: 0EQUIPMENT Equipment Number.
EQUIPMENT TYPE /BI0/OIEQUIPMENT,
InfoObject: 0FUNCT_LOC Functional Location.
FUNCT_LOC TYPE /BI0/OIFUNCT_LOC,
InfoObject: 0CAT_CODE Code.
CAT_CODE TYPE /BI0/OICAT_CODE,
InfoObject: 0CAT_TYPE Catalog.
CAT_TYPE TYPE /BI0/OICAT_TYPE,
InfoObject: 0CAT_GROUP Code group.
CAT_GROUP TYPE /BI0/OICAT_GROUP,
InfoObject: 0CREATED_BY Created By.
CREATED_BY TYPE /BI0/OICREATED_BY,
InfoObject: 0MPOBJ Object Number of Measuring Point Object.
MPOBJ TYPE /BI0/OIMPOBJ,
InfoObject: 0READEU Measured Value in Document Entry Unit.
READEU TYPE /BI0/OIREADEU,
InfoObject: 0CJUMPSI Counter Overflow Reading in SI Unit.
CJUMPSI TYPE /BI0/OICJUMPSI,
InfoObject: 0PYEARSI Annual Performance in SI Unit.
PYEARSI TYPE /BI0/OIPYEARSI,
InfoObject: 0PSORT Position Number of Measuring Point in Object (
*Sort Field).
PSORT TYPE /BI0/OIPSORT,
InfoObject: 0ASSEMBLY Assembly.
ASSEMBLY TYPE /BI0/OIASSEMBLY,
InfoObject: 0ATINN Internal Characteristic Number.
ATINN TYPE /BI0/OIATINN,
InfoObject: 0MDATE Date of Measurement.
MDATE TYPE /BI0/OIMDATE,
InfoObject: 0TIME Time.
TIME TYPE /BI0/OITIME,
InfoObject: 0TVIND Target Value for Measuring Point Is Defined.
TVIND TYPE /BI0/OITVIND,
InfoObject: 0MRMINI Lower Measurement Area Limit Is Defined.
MRMINI TYPE /BI0/OIMRMINI,
InfoObject: 0DESIRSI Target Value for Measuring Point in SI Unit.
DESIRSI TYPE /BI0/OIDESIRSI,
InfoObject: 0SIUNIT SI unit.
SIUNIT TYPE /BI0/OISIUNIT,
InfoObject: 0DESIREU Target Value for Measuring Point in Document
Entry Unit.
DESIREU TYPE /BI0/OIDESIREU,
InfoObject: 0CNTRRSI Counter Reading in SI Unit.
CNTRRSI TYPE /BI0/OICNTRRSI,
InfoObject: 0CDIFFSI Counter Reading Difference in SI Unit.
CDIFFSI TYPE /BI0/OICDIFFSI,
InfoObject: 0RECDU Unit of Measurement for Document Entry.
RECDU TYPE /BI0/OIRECDU,
InfoObject: 0MRMINEU Lower Meas. Limit or Min. Total Counter Read
*ing Document UoM.
MRMINEU TYPE /BI0/OIMRMINEU,
InfoObject: 0MRMAXEU Upper Meas. Limit or Max. Total Counter Read
*ing in Doc. M.U..
MRMAXEU TYPE /BI0/OIMRMAXEU,
InfoObject: 0MRMAXI Upper Measurement Area Limit Is Defined.
MRMAXI TYPE /BI0/OIMRMAXI,
InfoObject: 0CNTRREU Counter Reading in Document Entry Unit.
CNTRREU TYPE /BI0/OICNTRREU,
InfoObject: 0CDIFFEU Counter Reading Difference in Document Entry
Unit.
CDIFFEU TYPE /BI0/OICDIFFEU,
InfoObject: 0RECORDMODE BW Delta Process: Record Mode.
RECORDMODE TYPE RODMUPDMOD,
InfoObject: 0MRMAXSI Upper Meas. Limit or Max. Total Counter Read
*ing in SI Unit.
MRMAXSI TYPE /BI0/OIMRMAXSI,
InfoObject: 0READSI Measured Value/Total Counter Reading in SI Un
*it.
READSI TYPE /BI0/OIREADSI,
END OF tys_TG_1_full.
TYPES:
BEGIN OF tys_SC_1__RULE_34,
InfoObject: 0DESIRSI Target Value for Measuring Point in SI Unit.
DESIRSI TYPE /BI0/OIDESIRSI,
InfoObject: 0TVIND Target Value for Measuring Point Is Defined.
TVIND TYPE /BI0/OITVIND,
InfoObject: 0SIUNIT SI unit.
SIUNIT TYPE /BI0/OISIUNIT,
InfoObject: 0RECDU Unit of Measurement for Document Entry.
RECDU TYPE /BI0/OIRECDU,
Field: RECORD.
RECORD TYPE RSARECORD,
END OF tys_SC_1__RULE_34.
TYPES:
BEGIN OF tys_SC_1__RULE_35,
InfoObject: 0MRMINI Lower Measurement Area Limit Is Defined.
MRMINI TYPE /BI0/OIMRMINI,
InfoObject: 0MRMINSI Lower Meas. Limit or Min. Total Counter Read
*ing in SI Unit.
MRMINSI TYPE /BI0/OIMRMINSI,
InfoObject: 0SIUNIT SI unit.
SIUNIT TYPE /BI0/OISIUNIT,
InfoObject: 0RECDU Unit of Measurement for Document Entry.
RECDU TYPE /BI0/OIRECDU,
Field: RECORD.
RECORD TYPE RSARECORD,
END OF tys_SC_1__RULE_35.
TYPES:
BEGIN OF tys_SC_1__RULE_36,
InfoObject: 0MRMAXI Upper Measurement Area Limit Is Defined.
MRMAXI TYPE /BI0/OIMRMAXI,
InfoObject: 0SIUNIT SI unit.
SIUNIT TYPE /BI0/OISIUNIT,
InfoObject: 0RECDU Unit of Measurement for Document Entry.
RECDU TYPE /BI0/OIRECDU,
InfoObject: 0MRMAXSI Upper Meas. Limit or Max. Total Counter Read
*ing in SI Unit.
MRMAXSI TYPE /BI0/OIMRMAXSI,
Field: RECORD.
RECORD TYPE RSARECORD,
END OF tys_SC_1__RULE_36.
TYPES:
BEGIN OF tys_SC_1__RULE_37,
InfoObject: 0SIUNIT SI unit.
SIUNIT TYPE /BI0/OISIUNIT,
InfoObject: 0RECDU Unit of Measurement for Document Entry.
RECDU TYPE /BI0/OIRECDU,
InfoObject: 0CNTRRSI Counter Reading in SI Unit.
CNTRRSI TYPE /BI0/OICNTRRSI,
InfoObject: 0CNTIND Measuring Point is Counter.
CNTIND TYPE /BI0/OICNTIND,
Field: RECORD.
RECORD TYPE RSARECORD,
END OF tys_SC_1__RULE_37.
TYPES:
BEGIN OF tys_SC_1__RULE_38,
InfoObject: 0SIUNIT SI unit.
SIUNIT TYPE /BI0/OISIUNIT,
InfoObject: 0RECDU Unit of Measurement for Document Entry.
RECDU TYPE /BI0/OIRECDU,
InfoObject: 0CDIFFSI Counter Reading Difference in SI Unit.
CDIFFSI TYPE /BI0/OICDIFFSI,
InfoObject: 0CNTIND Measuring Point is Counter.
CNTIND TYPE /BI0/OICNTIND,
Field: RECORD.
RECORD TYPE RSARECORD,
END OF tys_SC_1__RULE_38.
Additional types for start routine interface
TYPES:
data_package_structure type tys_SC_1_full.
Additional declaration for update rule interface
DATA:
MONITOR type standard table of rsmonitor WITH HEADER LINE,
MONITOR_RECNO type standard table of rsmonitors WITH HEADER LINE,
RECORD_NO LIKE SY-TABIX,
RECORD_ALL LIKE SY-TABIX,
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS.
global definitions from update rules
TABLES: ...
DATA: ...
*******DATA: G_T_0EQUIPMENT TYPE STANDARD TABLE OF /BI0/MEQUIPMENT.
data: lt_data type ref to data.
data: ls_data type ref to data.
field-symbols: <G_T_0EQUIPMENT> type standard table.
field-symbols: <G_S_0EQUIPMENT> type any.
field-symbols: <FUNCT_LOC> type any.
field-symbols: <DATEFROM> type any.
field-symbols: <DATETO> type any.
constants: c_tabname type rstlogotab value '/BI0/MEQUIPMENT'.
*& Form routine_9998
text
-->DATA_PACKAGE text
-->ABORT text
-->RAISING text
-->CX_SY_ARITHMETIC_ERROR text
-->CX_SY_CONVERSION_ERROR text
FORM routine_9998
TABLES DATA_PACKAGE TYPE tyt_SC_1_full
CHANGING
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.
init variables
fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
to make monitor entries
In this start routine missing functional location for
an equipment is added to a Data Package record, if it is available
in the master data of the equipment
create data lt_data type table of (c_tabname).
assign lt_data->* to <G_T_0EQUIPMENT>.
create data ls_data type (c_tabname).
assign ls_data->* to <G_S_0EQUIPMENT>.
assign component 'FUNCT_LOC' of structure <G_S_0EQUIPMENT> to
<FUNCT_LOC>.
assign component 'DATE_FROM' of structure <G_S_0EQUIPMENT> to
<DATEFROM>.
assign component 'DATE_TO' of structure <G_S_0EQUIPMENT> to
<DATETO>.
CALL FUNCTION 'RSAU_READ_MASTER_DATA'
EXPORTING
I_IOBJNM = '0EQUIPMENT'
I_FLG_WHOLE_TABLE = 'X'
IMPORTING
E_TABLE = <G_T_0EQUIPMENT>
EXCEPTIONS
READ_ERROR = 1
NO_SUCH_ATTRIBUTE = 2
WRONG_IMPORT_PARAMETERS = 3
CHAVL_NOT_FOUND = 4
OTHERS = 5.
CASE SY-SUBRC.
WHEN 0.
LOOP AT <G_T_0EQUIPMENT> INTO <G_S_0EQUIPMENT>.
IF <FUNCT_LOC> IS INITIAL.
DELETE <G_T_0EQUIPMENT>.
ENDIF.
master data collected and condensed
ENDLOOP.
LOOP AT DATA_PACKAGE.
IF ( DATA_PACKAGE-FUNCT_LOC IS INITIAL ) AND
( DATA_PACKAGE-EQUIPMENT IS NOT INITIAL ).
READ TABLE <G_T_0EQUIPMENT> WITH KEY
('EQUIPMENT') = DATA_PACKAGE-EQUIPMENT INTO <G_S_0EQUIPMENT>
IF SY-SUBRC = 0.
IF ( DATA_PACKAGE-MDATE >= <DATEFROM> )
AND ( DATA_PACKAGE-MDATE <= <DATETO> ).
record for equipment exists and valid
DATA_PACKAGE-FUNCT_LOC = <FUNCT_LOC>.
MODIFY DATA_PACKAGE.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
WHEN 4.
master data is not (yet) loaded
WHEN OTHERS.
problem occured, output as warning
MONITOR-MSGID = SY-MSGID.
MONITOR-MSGTY = 'W'.
MONITOR-MSGNO = SY-MSGNO.
MONITOR-MSGV1 = SY-MSGV1.
MONITOR-MSGV2 = SY-MSGV2.
MONITOR-MSGV3 = SY-MSGV3.
MONITOR-MSGV4 = SY-MSGV4.
APPEND MONITOR.
ENDCASE.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
ENDFORM. "routine_9998
*& Form routine_0001
text
-->COMM_STRUCTURE text
-->RESULT text
-->RETURNCODE text
-->ABORT text
-->RAISING text
-->CX_SY_ARITHMETIC_ERROR text
-->CX_SY_CONVERSION_ERROR text
FORM routine_0001
USING
COMM_STRUCTURE type tys_SC_1__RULE_34
CHANGING
RESULT TYPE tys_TG_1_full-DESIREU
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.
init variables
fill the internal table "MONITOR", to make monitor entries
CLEAR RESULT.
IF COMM_STRUCTURE-TVIND = 'X'.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = COMM_STRUCTURE-DESIRSI
NO_TYPE_CHECK = 'X'
ROUND_SIGN = ' '
UNIT_IN = COMM_STRUCTURE-SIUNIT
UNIT_OUT = COMM_STRUCTURE-RECDU
IMPORTING
ADD_CONST =
DECIMALS =
DENOMINATOR =
NUMERATOR =
OUTPUT = RESULT
EXCEPTIONS
CONVERSION_NOT_FOUND = 1
DIVISION_BY_ZERO = 2
INPUT_INVALID = 3
OUTPUT_INVALID = 4
OVERFLOW = 5
TYPE_INVALID = 6
UNITS_MISSING = 7
UNIT_IN_NOT_FOUND = 8
UNIT_OUT_NOT_FOUND = 9
OTHERS = 10
IF SY-SUBRC <> 0.
MONITOR-MSGID = SY-MSGID.
MONITOR-MSGTY = 'W'.
MONITOR-MSGNO = SY-MSGNO.
MONITOR-MSGV1 = SY-MSGV1.
MONITOR-MSGV2 = SY-MSGV2.
MONITOR-MSGV3 = SY-MSGV3.
MONITOR-MSGV4 = SY-MSGV4.
APPEND MONITOR.
ENDIF.
ENDIF.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
ENDFORM. "routine_0001
*& Form routine_0002
text
-->COMM_STRUCTURE text
-->RESULT text
-->RETURNCODE text
-->ABORT text
-->RAISING text
-->CX_SY_ARITHMETIC_ERROR text
-->CX_SY_CONVERSION_ERROR text
FORM routine_0002
USING
COMM_STRUCTURE type tys_SC_1__RULE_35
CHANGING
RESULT TYPE tys_TG_1_full-MRMINEU
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.
init variables
fill the internal table "MONITOR", to make monitor entries
CLEAR RESULT.
IF COMM_STRUCTURE-MRMINI = 'X'.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = COMM_STRUCTURE-MRMINSI
NO_TYPE_CHECK = 'X'
ROUND_SIGN = ' '
UNIT_IN = COMM_STRUCTURE-SIUNIT
UNIT_OUT = COMM_STRUCTURE-RECDU
IMPORTING
ADD_CONST =
DECIMALS =
DENOMINATOR =
NUMERATOR =
OUTPUT = RESULT
EXCEPTIONS
CONVERSION_NOT_FOUND = 1
DIVISION_BY_ZERO = 2
INPUT_INVALID = 3
OUTPUT_INVALID = 4
OVERFLOW = 5
TYPE_INVALID = 6
UNITS_MISSING = 7
UNIT_IN_NOT_FOUND = 8
UNIT_OUT_NOT_FOUND = 9
OTHERS = 10
IF SY-SUBRC <> 0.
MONITOR-MSGID = SY-MSGID.
MONITOR-MSGTY = 'W'.
MONITOR-MSGNO = SY-MSGNO.
MONITOR-MSGV1 = SY-MSGV1.
MONITOR-MSGV2 = SY-MSGV2.
MONITOR-MSGV3 = SY-MSGV3.
MONITOR-MSGV4 = SY-MSGV4.
APPEND MONITOR.
ENDIF.
ENDIF.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
ENDFORM. "routine_0002
*& Form routine_0003
text
-->COMM_STRUCTURE text
-->RESULT text
-->RETURNCODE text
-->ABORT text
-->RAISING text
-->CX_SY_ARITHMETIC_ERROR text
-->CX_SY_CONVERSION_ERROR text
FORM routine_0003
USING
COMM_STRUCTURE type tys_SC_1__RULE_36
CHANGING
RESULT TYPE tys_TG_1_full-MRMAXEU
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.
init variables
fill the internal table "MONITOR", to make monitor entries
CLEAR RESULT.
IF COMM_STRUCTURE-MRMAXI = 'X'.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = COMM_STRUCTURE-MRMAXSI
NO_TYPE_CHECK = 'X'
ROUND_SIGN = ' '
UNIT_IN = COMM_STRUCTURE-SIUNIT
UNIT_OUT = COMM_STRUCTURE-RECDU
IMPORTING
ADD_CONST =
DECIMALS =
DENOMINATOR =
NUMERATOR =
OUTPUT = RESULT
EXCEPTIONS
CONVERSION_NOT_FOUND = 1
DIVISION_BY_ZERO = 2
INPUT_INVALID = 3
OUTPUT_INVALID = 4
OVERFLOW = 5
TYPE_INVALID = 6
UNITS_MISSING = 7
UNIT_IN_NOT_FOUND = 8
UNIT_OUT_NOT_FOUND = 9
OTHERS = 10
IF SY-SUBRC <> 0.
MONITOR-MSGID = SY-MSGID.
MONITOR-MSGTY = 'W'.
MONITOR-MSGNO = SY-MSGNO.
MONITOR-MSGV1 = SY-MSGV1.
MONITOR-MSGV2 = SY-MSGV2.
MONITOR-MSGV3 = SY-MSGV3.
MONITOR-MSGV4 = SY-MSGV4.
APPEND MONITOR.
ENDIF.
ENDIF.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
ENDFORM. "routine_0003
*& Form routine_0004
text
-->COMM_STRUCTURE text
-->RESULT text
-->RETURNCODE text
-->ABORT text
-->RAISING text
-->CX_SY_ARITHMETIC_ERROR text
-->CX_SY_CONVERSION_ERROR text
FORM routine_0004
USING
COMM_STRUCTURE type tys_SC_1__RULE_37
CHANGING
RESULT TYPE tys_TG_1_full-CNTRREU
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.
init variables
fill the internal table "MONITOR", to make monitor entries
CLEAR RESULT.
IF COMM_STRUCTURE-CNTIND = 'X'.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = COMM_STRUCTURE-CNTRRSI
NO_TYPE_CHECK = 'X'
ROUND_SIGN = ' '
UNIT_IN = COMM_STRUCTURE-SIUNIT
UNIT_OUT = COMM_STRUCTURE-RECDU
IMPORTING
ADD_CONST =
DECIMALS =
DENOMINATOR =
NUMERATOR =
OUTPUT = RESULT
EXCEPTIONS
CONVERSION_NOT_FOUND = 1
DIVISION_BY_ZERO = 2
INPUT_INVALID = 3
OUTPUT_INVALID = 4
OVERFLOW = 5
TYPE_INVALID = 6
UNITS_MISSING = 7
UNIT_IN_NOT_FOUND = 8
UNIT_OUT_NOT_FOUND = 9
OTHERS = 10
IF SY-SUBRC <> 0.
MONITOR-MSGID = SY-MSGID.
MONITOR-MSGTY = 'W'.
MONITOR-MSGNO = SY-MSGNO.
MONITOR-MSGV1 = SY-MSGV1.
MONITOR-MSGV2 = SY-MSGV2.
MONITOR-MSGV3 = SY-MSGV3.
MONITOR-MSGV4 = SY-MSGV4.
APPEND MONITOR.
ENDIF.
ENDIF.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
ENDFORM. "routine_0004
*& Form routine_0005
text
-->COMM_STRUCTURE text
-->RESULT text
-->RETURNCODE text
-->ABORT text
-->RAISING text
-->CX_SY_ARITHMETIC_ERROR text
-->CX_SY_CONVERSION_ERROR text
FORM routine_0005
USING
COMM_STRUCTURE type tys_SC_1__RULE_38
CHANGING
RESULT TYPE tys_TG_1_full-CDIFFEU
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.
init variables
fill the internal table "MONITOR", to make monitor entries
CLEAR RESULT.
IF COMM_STRUCTURE-CNTIND = 'X'.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = COMM_STRUCTURE-CDIFFSI
NO_TYPE_CHECK = 'X'
ROUND_SIGN = ' '
UNIT_IN = COMM_STRUCTURE-SIUNIT
UNIT_OUT = COMM_STRUCTURE-RECDU
IMPORTING
ADD_CONST =
DECIMALS =
DENOMINATOR =
NUMERATOR =
OUTPUT = RESULT
EXCEPTIONS
CONVERSION_NOT_FOUND = 1
DIVISION_BY_ZERO = 2
INPUT_INVALID = 3
OUTPUT_INVALID = 4
OVERFLOW = 5
TYPE_INVALID = 6
UNITS_MISSING = 7
UNIT_IN_NOT_FOUND = 8
UNIT_OUT_NOT_FOUND = 9
OTHERS = 10
IF SY-SUBRC <> 0.
MONITOR-MSGID = SY-MSGID.
MONITOR-MSGTY = 'W'.
MONITOR-MSGNO = SY-MSGNO.
MONITOR-MSGV1 = SY-MSGV1.
MONITOR-MSGV2 = SY-MSGV2.
MONITOR-MSGV3 = SY-MSGV3.
MONITOR-MSGV4 = SY-MSGV4.
APPEND MONITOR.
ENDIF.
ENDIF.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
ENDFORM. "routine_0005
TYPES: BEGIN OF TY_/BI0/PMPOINT,
MPOINT TYPE /BI0/PMPOINT-MPOINT,
MRNGU TYPE /BI0/PMPOINT-MRNGU,
END of TY_/BI0/PMPOINT.
DATA: /BI0/PMPOINT_TEMP TYPE STANDARD TABLE OF
TY_/BI0/PMPOINT,
W_/BI0/PMPOINT_TEMP like line of /BI0/PMPOINT_TEMP.
$$ end of 2nd part global - insert your code only before this line *
CLASS routine IMPLEMENTATION
CLASS lcl_transform IMPLEMENTATION.
Method start_routine
Calculation of source package via start routine
<-> source package
METHOD start_routine.
*=== Segments ===
FIELD-SYMBOLS:
<SOURCE_FIELDS> TYPE tys_SC_1.
DATA:
MONITOR_REC TYPE rstmonitor.
*$*$ begin of routine - insert your code only below this line *-*
Data:
l_subrc type sy-tabix,
l_abort type sy-tabix,
ls_monitor TYPE rsmonitor,
ls_monitor_recno TYPE rsmonitors.
REFRESH:
MONITOR,
MONITOR_RECNO.
Runtime attributs
SOURCE_SYSTEM = p_r_request->get_logsys( ).
Migrated update rule call
Perform routine_9998
TABLES
SOURCE_PACKAGE
CHANGING
l_abort.
*-- Convert Messages in Transformation format
LOOP AT MONITOR_RECNO INTO ls_monitor_recno.
move-CORRESPONDING ls_monitor_recno to MONITOR_REC.
append monitor_rec to MONITOR.
ENDLOOP.
LOOP AT MONITOR INTO ls_monitor.
move-CORRESPONDING ls_monitor to MONITOR_REC.
append monitor_rec to MONITOR.
ENDLOOP.
IF l_abort <> 0.
RAISE EXCEPTION TYPE CX_RSROUT_ABORT.
ENDIF.
$$ end of routine - insert your code only before this line -
ENDMETHOD. "start_routine
Method inverse_start_routine
This subroutine needs to be implemented only for direct access
(for better performance) and for the Report/Report Interface
(drill through).
The inverse routine should transform a projection and
a selection for the target to a projection and a selection
for the source, respectively.
If the implementation remains empty all fields are filled and
all values are selected.
METHOD inverse_start_routine.
$$ begin of inverse routine - insert your code only below this line-
... "insert your code here
$$ end of inverse routine - insert your code only before this line -
ENDMETHOD. "inverse_start_routine
ENDCLASS. "routine IMPLEMENTATION
Maybe you are looking for
-
I am new to Flex web applications and I am doing research to see if functionality contained in an existing web application can be replicated in a Flex web app. We currently have a JSP / Struts based web application that creates a data entry web view
-
Hi I have this weird problem. I am trying to print this 2 page pdf back to back, however I am unable to do so. All my office printers are set by default to do back to back printing. My other word and txt documents all get printed back to back except
-
Hi I have a scenario. invoice coming from sap R/3 and get 10 fields from Sql Server depending on the soldto or billto. then it has to go to bpm depending on the business reles. please help me this one how can we do the synchronus from sql server and
-
Kiosk Mode in QT Not Working?
Hi Everyone, I've created a movie pop up page, with kioskmode enabled in the code, but in Windows XP, I can still access the save button at the bottom right - it shouldn't show. Test page: http://homepage.mac.com/badelstein/parti/port/splshscr/splshs
-
"Remote Apple Events" User Authentication failure
I will send some Remote Apple-Events from a local machine to a remote Mac Mini (OS X Server 10.5.4) with "eppc://admin:[email protected]". But i get the error message "User Authentication failure -927". Mounting the remote Volume is no problem with t