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.
Similar Messages
-
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. -
The field "SOURCE_PACKAGE" is unknown IN THE START ROUTINE?
Hi all,
i am trying to create a start routine in the DTP FROM THE CUBE TO THE OPEN HUB.
But when i check the syntax : it throws me an error message stating.
The field "SOURCE_PACKAGE" is unknown IN THE START ROUTINE?
how come the source package is unknow in the start routine can anyone pls advise me on this!!
DATA: l_tabix TYPE sy-tabix, wa_source_package TYPE tys_sc_1.
LOOP AT SOURCE_PACKAGE INTO wa_source_package.
l_tabix = sy-tabix.
IF wa_source_package-SALES EMP EQ ' '.
DELETE SOURCE_PACKAGE
WHERE SALESEMP EQ ' '.
INDEX l_tabix.
ENDIF.
ENDLOOP.Hi Pooja,
I think that the error comes from the delete statement.
As you already said, the SOURCE_PACKAGE is from BI7.0. That means that the LOOP AT statement cannot be wrong (although I prefer field-symbols)
I would restate you code like below:
DATA: l_tabix TYPE sy-tabix,
wa_source_package TYPE _ty_s_sc_1.
LOOP AT SOURCE_PACKAGE ASSIGNING <source_fields>. "<source_fields> is declared as line from source_package
* l_tabix = sy-tabix.
IF <source_fields>-SALES_EMP IS INITIAL.
DELETE <source_fields> FROM SOURCE_PACKAGE.
* If this line does not work, try to add TABLE after the FROM-statement
*WHERE SALESEMP EQ ' '.
*INDEX l_tabix.
ENDIF.
ENDLOOP.
Hopefully this will help.
Alternatively you can try a single statement, because it is not necessary to do a loop.
DELETE SOURCE_PACKAGE WHERE sales_emp IS INITIAL.
Good luck!
Steven Groot
Edited by: S. Groot on Aug 11, 2010 7:50 AM -
DTP selection criteria in start routine
Hi,
I have a code in the start routine where a variable lv_date gets the date from the DTP selections...
DATA : i_filter TYPE rsbk_th_range,
wa_filter TYPE rsbk_s_range.
READ TABLE i_filter INTO wa_filter WITH KEY
fieldnm = 'ACT_GI_DTE '.
IF sy-subrc EQ 0.
lv_date = wa_filter-low.
ELSE.
But now my problem is that we are no more giving the range, instead we are giving the single value. so now my code should read the single value ( lv_date = wa_filter-low) instead of the low value of the range. So how can I achieve this?
I mean my lv_date should get the single value populated in the DTP selections instead of the low value of the range values.
How can i achieve this??
Regards,
Shreesh.Hi,
When you give range in any variable, it lower value is captured in low whereas upper value is captured in high of the variable.
Now that you are no more giving range but only single values, it would be enough if your code reads the data from low of the variable. -
Hi Friends !
Facing a bit strange issue. When I run the DTP with selection for all AC_DOC_NO, start routine works fine & I am getting the expected result. But when I run the DTP without selection, result is not as expected. During debugging also I can see the correct records. Please advise.
With Regards
RekhaHi,
If you are loading to DSO, I am sure there could be some overwrite is happening where u r missing the expected records.
if this is the scenario then try to add keyfield in DSO to overcome from overwrite. -
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. -
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 -
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 -
Problem with Transformation Routine
Hi all
I am using a DSO 0FIGL_O02 taking data from the DataSource 0FI_GL_4 . I have a field 0Customer to the DSO & for that i´m taking data from the another DSO ZPCA_EC3 .
The folllowing is the Tranformation Routine i have tried
Routine 1,
Data : zcustomer type /BIC/AZPCA_EC300-CUSTOMER.
select single customer
from /BIC/AZPCA_EC300
into ZCUSTOMER
where AC_DOC_NO = SOURCE_FIELDS-BELNR.
RESULT = zcustomer.
Routine 2.
Data : zcustomer type /BIC/AZPCA_EC300-CUSTOMER.
select single customer
from /BIC/AZPCA_EC300
into ZCUSTOMER
where AC_DOC_NO = SOURCE_FIELDS-BELNR
and COMP_CODE = SOURCE_FIELDS-bukrs
and FISCYEAR = SOURCE_FIELDS-gjahr.
RESULT = zcustomer.
I dont get any errors for this Routine , But when i run the DTP it is going on Running & Running for hours, with no results , But again no errors also.
What could be the problem ?
Could anyone help me write a better routine .here is my requirement
I want to pick up 0Customer field data from ZPCA_EC3 based on 0AC_DOC_NO in both ZPCA_EC3 & 0FI_GL_4 DataSource.
Regards
RameshHi,
well I don't know the key of your ods. But the first check would be to use fields in the where clause which are in the key or a additional index. Another option might be to select the data for the complete data package at once into a internal table and access the internal table in the routine. May be you can also do the whole thing in the start routine.
regards
Siggi -
Hii All
A couple of questions for you gurus.
a) Am I right in thinking that the start routine is called once for each data package (BI 7).
b) Is it also truethat all variables including globals and internal tables are re-initialised for each data package ?
Thanx
AsifHi Guys,
It is right that start routine is called once for each data package.
But variables and interal tables are not re-initialized for each data package.
Value in variable is retained and can be used for further data packages.
For that you can use a counter. Usage will be like this
IF counter is INITIAL.
Put your logic.
Counter = 1.
ENDIF.
In this way, you can do the calculation common for all data packages.
The only problem with this is when packages are loaded in parallel.
To avoid this, do the serial processing. To achieve that, In DTP
Goto > Settings for Batch Manager > Number of Processes 1
I hope the given information is helpful.
Regards,
Gaurav -
How to add new records in Start routine or end routine.
Hi All,
My requirement is to transfer data from one DSO to anothe DSO. But while transfering a single record frorm DSO1 i want to add 7 records to DSO2 for each record in DSO1 with slight change in data( with a different key). I want to do it in start routine or end routine. How can i do it. If you have any ABAP code for this then please send.
Regards
Amlanyou can use this code, replace the fields where i have marked with <>.
DATA : WA_RESULT_PACKAGE TYPE DSO2,
WA_RESULT_PACKAGE1 LIKE WA_RESULT_PACKAGE.
DATA : IT_RESULT_PACKAGE LIKE TABLE OF WA_RESULT_PACKAGE.
DATA : DATE1 TYPE SY-DATUM.
DATA : DAYDIFF TYPE i.
DATA : RECORD_NO type rsarecord.
SORT RESULT_PACKAGE BY <KEY FIELDS> "specify the key fields here
RECORD_NO = 1.
LOOP AT RESULT_PACKAGE INTO WA_RESULT_PACKAGE.
IF WA_RESULT_PACKAGE_1-<KEYFIELDS> NE WA_RESULT_PACKAGE-<KEYFIELDS>.
WA_RESULT_PACKAGE_1 = WA_RESULT_PACKAGE.
DAYDIFF = WA_RESULT_PACKAGE-ENDDATE - WA_RESULT_PACKAGE-STARTDATE.
WHILE DAYDIFF NE 0.
DATE1 = WA_RESULT_PACKAGE-STARTDATE + DAYDIFF.
MOVE DATE1 TO WA_RESULT_PACKAGE-<KEYFIELDDATE>.
MOVE RECORD_NO TO WA_RESULT_PACKAGE-RECORD.
APPEND WA_RESULT_PACKAGE INTO IT_RESULT_PACKAGE.
DAYDIFF = DAYDIFF - 1.
RECORD_NO = RECORD_NO + 1.
CLEAR DATE1.
ENDWHILE.
CLEAR DAYDIFF.
ENDIF.
ENDLOOP.
DELETE RESULT_PACKAGE[].
RESULT_PACKAGE[] = IT_RESULT_PACKAGE[].
Reg Point 3.
The Key figures will then show up in the report aggregated.Hope that is fine with you.
Note:
Before loading data, in DTP set the semantic key with the key field of the DSO1.This brings all the similar data w.r.t the key fields from the PSA together in a single package.
rgds, Ghuru -
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. -
BI End Routine MONITOR entry overwrites Start Routine MONITOR entries
Hi Colleagues,
I'm using MONITOR TYPE rstr_ty_t_monitors in start routine as well as in end routine of transformations.
But DTP request monitor shows only my end routine monitor entries under "Start routine" and my start routine monitor entries are not shown.
msgid = RSM1
msgty = W or E
msgno = 799
Any suggestions?
Thanks and regards,
WolfgangFixed by SAP by means of support package.
-
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.
Maybe you are looking for
-
Mini-DV camcorder compatibility
Can someone tell me what this actually means: "This camera has a firewire port, but it does NOT work with a Mac for digitizing..." I read this while doing some research on JVC mini-dv camcorders. I'm looking to upgrade my old JVC which worked fine wh
-
TC not showing up in Disk Utility
The TC does not show up in the Disk Utility
-
Query on Integrated Windows Authentication....
Hi All, I have a scenario to implement Integrated Windows Authentication using SPNego. But the initial page has to be loaded as anonymous portal onclick of the Logon button/Link, it has to validate the user against Integrated windows authentication a
-
View point co-ordinate retrival
hey im doing a project and i was wondering if there is a way to get the view points current location co-ordinates in real time whiel the program is running ? and if so could some body help or point me in the right direction?
-
Automaticlly "Show Details" when connecting to Remote Dekstop Machine
here has been several occasions when I have waited for a remote window to connect to a machine until the MSTSC window disappears with no message. Each time, I find that it is due to a message that would have been easily rectified if I had noticed th