ABAP routine - Transfer rules Start routine
hello everyone,
i need some help in writin an ABAP code. Well the logic is say i have a table which sends data to BW. the data comes like :-
Order Q1
101 50
101 20
102 10
101 60
But i want to store only 1 value for each order , i.e summarize the value so in when the data package comes , i want to check all records for one order and add the qty value for each order and store it in the ODS.
so ODS for above eg should look like
Order qty
101 130
102 10
Thanks,
Will assign points to all helpful answers.
Laura.
Hi:
If you add Order as the only Key FIELD in ODS and set the Key-figure Q1 to Aggregation, it will solve your problem. You don;t need additional code.
NOTE: If this is not the case, its not easy to write this in ABAP. because, you don't know whether all Orders (e.g., Order #101) will come in the same DATA PACKAGE. They might be split into two different DATA PACKAGES and your Start Routine will Execute ONLT ONE DATAPACKAGE at a time.
Chamarthy
Message was edited by:
Chamarthy
Similar Messages
-
How to determine InfoCube name within the update rule start routine?
We are attempting to delete all the records where all key figure values are zeroes. We have about 15% of such records and we really don't need them.
We have yearly InfoCubes. We copy the InfoCube and update rules at the end of every year. So, we don't want to hard code any field names within the update rules.
If I could determine the target InfoCube name within the update rule start routine, I can find out all the key figures dynamically. But, I don't see a way of finding out the InfoCube name.
If you would share any ideas, I would really appreciate.
Thanks.
Sudhi Karkada.Hi Sudhi,
I dont know if this is what you are looking for.
if you want to delete a record from being inserted when all the Key figure values are ZERO then you can use a Update Routine for some characteristic in the below way
If looking for the InfoCube:
if COMM_STRUCTURE-KF1 = 0 and COMM_STRUCTURE-KF2 AND....
RETURNCODE = 4.
else
RESULT = COMM_STRUCTURE-ChanracteristicObject.
endif.
If it is to an ODS / InfoCube in the start routine.
DELETE DATAPACKAGE where KF1=0 and kf2=0 and .....
Hope it helps.
Regards,
Praveen.
ENDLOOP.
Message was edited by: Praveen -
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. -
Calculations in Update rules/Start routine/End Routine
Hi Friends,
I have loaded data to a DSO and i have three fields in to it. Lets say Filed1, Filed2 and Field3. Field1 and Field2 are being populated through an update rule in transformation. Aggregation type for these two fields are "Summation".
Now, after the transformation executed, the Field1 and Field2 are filled with values. I want to calculate the value of Field3 as follows:
Field3 = Field1 - Field2
Can anyone tell me where can i do this calculation? I know we can do this in End routine and in Query but i want to know if there is any other place i can do this calculation in transformation? In try to do this calculation in the update rule for Field3 in transformation, i dont see Field1 and Field2 as these are not source fields. I can not write formula also because we can write formula only on source fields not the data target fields.
Your help will be appreciated in terms of points.
Thanks,
manmitHi,
in the start routine in the global section define the two fields:
data: g_amount1 type /bic/oi<your keyfigure name>,
g_amount2 type /bic/oi<your keyfigure name>.
in the routines to your 2 keyfigures store the result in that fields too.
routine for field1.
g_amount1 = result.
routine for field2.
g_amount2 = result.
and in the routine to field3
result = g_amount1 - g_amount2." or whatever calculation/derivation has to be done.
kind regards
Siggi
Message was edited by:
Siegfried Szameitat -
Hi
i need to reload the master data with out FM, i putted the comment on fm and relaod the data, now i having a problem, loading process is slow now as compair to before, when i was using with FM.
i checked the mange on data target, it is show 1123455 in transfer column and 0 in added column below is the start routine,
Please help me to fix that problem
IF NOT DATAPAK[] IS INITIAL.
LOOP AT DATAPAK INTO S_DATAPAK.
CLEAR V_INDEX.
V_INDEX = SY-TABIX.
IF S_DATAPAK-/BIC/ABRETPRI CO ' 0123456789.'.
CLEAR: V_AMOUNT, V_PRC.
V_AMOUNT = S_DATAPAK-/BIC/ABRETPRI.
CALL FUNCTION 'RSAR_CURRENCY_CONVERT'
EXPORTING
I_CURRENCY = S_DATAPAK-CURRENCY
CHANGING
C_AMOUNT = V_AMOUNT.
V_PRC = V_AMOUNT.
S_DATAPAK-/BIC/ABRETPRI = V_PRC.
ENDIF.
IF S_DATAPAK-/BIC/ABBLNKFLG IS INITIAL.
S_DATAPAK-/BIC/ABBLNKFLG = 'N'.
ENDIF.
TRANSLATE S_DATAPAK-/BIC/ABSZRANGE TO UPPER CASE
IF S_DATAPAK-CURRENCY IS INITIAL.
S_DATAPAK-CURRENCY = S_DATAPAK-WHLPRCCURR.
MODIFY DATAPAK FROM S_DATAPAK INDEX V_INDEX TRANSPORTING
/BIC/ABRETPRI /BIC/ABWHLPRCE /BIC/ABBLNKFLG
ENDIF.
*ENDLOOP.
ENDIF
ThanksHi Rob,
Requirement is not clear. please let us know which FM you are commented and why you are using that FM and what is your exact requirement.
Regards,
Ramakrishna kotha. -
Is difference between update routine,start routine and transfer routine
Hi All,
What is difference between transfer routine and update routine.Hi Venkat,
Routine is a set of ABAP code which is used to select a record or transform the field value at the time of loading the data.
Types of routines:
Tranfer Routines in Transfer Rules:
Start Routines in Transfer Rules:
Update Routines in Update Rules:
Start Routines in Update Rules:
Transfer/Update routine:
It's the set of ABAP code used in Transfer/Update rules. Transfer/Update routine is used to change the value of a particular field/object at the time of loading data.
Ex: Populate the amount/discount field by using Price and Quantity based on the given conditions.
Start Routine:
Start routine can be used in both Transfer Rules and Update Rules. Start routine is used to determine whether to load a particular record or not.
Ex: From the data related to the year 2005, we can select only the records which belong to a particular month or fiscal period.
Ultimately Transfer/Update routines are to update the value of a particular field. Start routines are used to select entire record.
You can get more details about routines at :
Routines
ROUTINES
Routines and Examples
Start Routines
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/60cecb1d-0a01-0010-8289-b14fd99062fa
take a look this doc for abap used in bw
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4493c4a6-0301-0010-62a2-efd6ded61e04
ABAP book that always mentioned :
http://cma.zdnet.com/book/abap/
assign points if useful ***
Regards
CSM Reddy -
Strat routine code in transfer rules for the Extractor - 0CO_OM_CCA_1
Dear SDNers,
I have a scenario to implement a start rouine code in the transfer rulesfor the Extractor - 0CO_OM_CCA_1 , please give a light on this.
Scenario:
The extractor 0C0_OM_CCA_1 brings in Cost Center transactional data for costs and allocation into the SAP BI data warehouse. A cross reference table will be created in SAP BI for Profit Center. These tables will have CRM (CARDIAC RHYTHM MANAGEMENT) Profit Centers stored in them.
In the transfer rules for 0CO_OM_CCA_1, add ABAP code in the start routine to block CRM (CARDIAC RHYTHM MANAGEMENT) data. The code will have the following logic:
Check Cost center master data table u2018/BI0/QCOSTCENTERu2019
This table u2018/BI0/QCOSTCENTERu2019 being time dependent, use the last day of the fiscal period from transactional data as the date to select from u2018/BI0/QCOSTCENTERu2019.
Go to the Profit center reference table and identify if the data belongs to BSC Boston Scientific/CRM (CARDIAC RHYTHM MANAGEMENT).
Block CRM (CARDIAC RHYTHM MANAGEMENT) data.
Best Regards,
Satya
Edited by: satya prasad on Sep 8, 2009 8:16 AMYou could give this a try:
DATA: wa_qcostcenter TYPE /bi0/qcostcenter,
wa_ppcxref TYPE /bic/ppcxref, "Custom Profit Center Cross-Reference table
l_tabix TYPE sy-tabix,
l_last_date TYPE d.
LOOP AT data_package.
l_tabix = sy-tabix.
CALL FUNCTION
'LAST_DAY_IN_PERIOD_GET'
EXPORTING
i_gjahr = data_package-fiscper+0(4)
i_periv = data_package-fiscvarnt
i_poper = data_package-fiscper+4(3)
IMPORTING
e_date = l_last_date.
SELECT SINGLE
FROM
/bi0/qcostcenter
INTO
wa_qcostcenter
WHERE
costcenter = data_package-kostl
AND dateto <= l_last_date
AND datefrom >= l_last_date.
IF sy-subrc EQ 0.
SELECT
FROM
/bic/ppcxref
INTO
wa_ppcxref
WHERE
profit_ctr = wa_qcostcenter-profit_ctr.
IF sy-subrc EQ 0.
IF wa_ppcxref-data = 'CRM'.
DELETE
data_package
INDEX
l_tabix.
ENDIF.
ENDIF.
ENDLOOP.
Edited by: Dennis Scoville on Sep 8, 2009 4:32 PM -
Diff between the Start routine and Update rules?
Hi Gurus
Diff between the Start routine and Update rules?
Thanks in advance
RajHi,
Routines are like conditions or business rules that could be applied to filter the data while entering the BW system or could be used to apply certain conditions on the info objects itself.Update rule level you manipulate your data and write your start routine.
There are 4 types of routines
1. Start routine- Could be used at two levels (transfer rule level and the Update rule level)
This Start routine written at the transfer rule level helps filter the necessary data coming from the source system.
For Example: If you decide to extract data that contain only quantity greater than 500 , then you could specify the Start rouitne to achieve this.
The Start routine at the Update rule level provides similar functionality but at this point it helps direct specific data to
different data targets. For Example: If there 3 data targets being fed from the Infosource, you may want to apply some condition to each data target, like send year 2000 data ti Data target1, 2001 to data target 2 and so on. This can be achieved by using Start routine at the Update rule level
2. Transfer Routine: This feature is available at the transfer rule levels
While performing the transfer rules operation, there are 4 features available to the developers to create business rules on top pf the Infoobjects.
1. You could do a one to one mappping of the Infoobject
2. Provide a constant value
3. Include a formula
4. Write an ABAP routine.
These 4 options refers to the transfer routine
3. Update Routine:
The limitations of just having 4 options in the transfer routine is overcome at the update rule level. There are various other
sophisticated features avaialable apart from the 4 options mentioned above. These business rules could be specified pertaining to each data target.
4. Conversion Routine: It provides functionality to do Currency and unit conversion.
Regards. -
Enhancing 0MATERIAL_ATTR?Writing Start routine in Transfr rules in BW side?
Hi All,
I got a requirement of enhancing the 0MATERIAL_ATTR extract structure with 10 fields.
The logic is written in R3 extraction User exit ZXRSAU02 for populating the data from MARA table.
In the BW side also, the corresponding objects created & mapped in Communication & Transfer structure, the update rules also activated for 0MATERIAL_ATTR.
Details:
The DS is: 0MATERIAL_ATTR
ES is: BIW_MARA_S
Table is: MARA
Enhanced fields in ES are: like ZR, ZR1, ZR2 to ZR9.
BW Objects created are: like ZB, ZB1, ZB2 to ZB9.
I need help in writing start routine in transfer rules:
The below logic needs to be included in the start routine -
--->" If the following fields in extractor are all blank then populate them all with the value in ZR, ZR1, ZR2 to ZR9.
---> If the above are not all blank then don't modify. These will update as per the Transfer rules."
Please help in writing the code for the Logic mentioned above.
Thanks in Advance.Hi,
as suggested you can do this in ZXRSAU02 or in the start routine
In the start routine
data wa_datapak type TRANSFER_STRUCTURE .
data l_tabix like sy-tabix.
loop at datapak into wa_datapak .
l_tabix = sy-tabix .
if wa_datapak-zr is initial or wa_datapak-zr1 is initial -
wa_datapak-zr9 is initial .
clear : wa_datapak-zr. -- clear : wa_datapak-zr9 .
modify datapack from wa_datapack index l_tabix.
endloop.
hope this helps
PV -
BW 3.5 Update rule routine and start routine convert to BI 7.0 Endroutine.
I have bw 3.5 update routine and update rules start routine( r/3 to ODS). i need to replicate that routine into BI 7.0 endroutine with the same logic with some minor changes(DSO to DSO).
IN BW 3.5 the data is getting from r/3 where as in BI7.0 the data fetching from DSO itself but the logic is same as bw 3.5.
following is the start routine:
DATA: G_FISCPER_TO TYPE /BI0/OIFISCPER,
G_CALMONTH LIKE /BI0/PCALMONTH-CALMONTH,
G_MONAT TYPE /BIC/OIYRDFMONAT.
ABORT = 0.
------ Globale Variable füllen --------------------------------------*
CALL FUNCTION 'Y_RDF_FISCPER_FOR_INFOPACKAGE'
EXPORTING
I_ISOURCE = '0FI_AA_001' (*** this is infosurce getting from r/3, in 7.0 this one is DSO 'B")
IMPORTING
E_FISCPER_TO = G_FISCPER_TO
E_MONAT = G_MONAT
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC = 0.
CALL FUNCTION 'Y_RDE_FISCPER_TO_CALMONTH'
EXPORTING
I_PERIV = 'K4'
I_BDATJ = G_FISCPER_TO(4)
I_POPER = G_FISCPER_TO+4(3)
IMPORTING
E_CALMONTH = G_CALMONTH
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC NE 0 OR G_CALMONTH IS INITIAL.
CALL FUNCTION 'Y_RDN_MONITOR_SET'
EXPORTING
I_MSGID = 'YRDFBW'
I_MSGNO = '027'
I_MSGV1 = '0FI_AA_001'
I_MSGV2 = 'YRDF_FIAA_PERIOD'
TABLES
T_MONITOR = MONITOR.
ABORT = 1.
ENDIF.
ELSE.
CALL FUNCTION 'Y_RDN_MONITOR_SET'
EXPORTING
I_MSGID = 'YRDFBW'
I_MSGNO = '027'
I_MSGV1 = '0FI_AA_001'
I_MSGV2 = 'YRDF_FIAA_PERIOD'
TABLES
T_MONITOR = MONITOR.
ABORT = 1.
ENDIF.
Update routine:
RETURNCODE = 0.
ABORT = 0.
CLEAR RESULT.
IF NOT COMM_STRUCTURE-ASSET_MAIN BETWEEN '000000200000' AND
'000000299999'.
CALL FUNCTION 'Y_RDF_GET_CCTR_0ASSET'
EXPORTING
I_COMP_CODE = COMM_STRUCTURE-COMP_CODE
I_ASSET = COMM_STRUCTURE-ASSET
I_ASSET_MAIN = COMM_STRUCTURE-ASSET_MAIN
IMPORTING
E_COSTCENTER = RESULT
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC NE 0 OR RESULT IS INITIAL.
CALL FUNCTION 'Y_RDN_MONITOR_SET'
EXPORTING
I_MSGID = 'YRDFBW'
I_MSGTY = 'E'
I_MSGNO = '061'
I_MSGV1 = COMM_STRUCTURE-COMP_CODE
I_MSGV2 = COMM_STRUCTURE-ASSET
I_MSGV3 = COMM_STRUCTURE-ASSET_MAIN
TABLES
T_MONITOR = MONITOR.
RETURNCODE = 1.
ENDIF.
ENDIF.
How can i write this in BI7.0?
ThanksHi ,
solved on my own. Thankyou very much..
thanks & regards,
M.S
Edited by: M.S on Oct 27, 2009 6:57 AM
Edited by: M.S on Oct 27, 2009 6:59 AM -
Execute ABAP code in Start Routine only once
I have ABAP code in a start routine that I only want to execute once. Is there a way to tell this is first execution of the start routine?
Also can I find out these value in the start routine ABAP:
1. How many data packets there are?
2. What data packet I am processing?
Regards,
Mike...Hi,
I've just setup a little test:
TRules, Start Routine Global Decl:
DATA: GVI TYPE I, GVN(5) TYPE N.
Start Routine:
IF GVI IS INITIAL.
GVI = 1.
ELSE.
ADD 1 TO GVI.
ENDIF.
MOVE GVI TO GVN.
This is basically counting the times the start routine is executed and populating the var GVN; I am posting GVN in a char ZTESTGV in the target cube. I am posting as well the datapakID in my cube.
I have loaded two requests (each 4 packets)
the first one first to PSA and then from the PSA to the target: this is Serially using one single process. Here's the result in the cube:
Request________________________________DATAPAKID_____ZTESTGV
REQU_8B5ASGQNYYNIV1OJN68HFH1SR____________1____________1
REQU_8B5ASGQNYYNIV1OJN68HFH1SR____________2____________2
REQU_8B5ASGQNYYNIV1OJN68HFH1SR____________3____________3
REQU_8B5ASGQNYYNIV1OJN68HFH1SR____________4____________4
In this case the global variable is persistent accross packets.
the second request is loaded in paralell: this is, multiple processes are executed at the time. Here's the result in the cube:
Request________________________________DATAPAKID_____ZTESTGV
REQU_14QVH21BSVH44FAJW94BD7N2H____________1____________1
REQU_14QVH21BSVH44FAJW94BD7N2H____________2____________1
REQU_14QVH21BSVH44FAJW94BD7N2H____________3____________1
REQU_14QVH21BSVH44FAJW94BD7N2H____________4____________1
In this case the global variable is always1 !!
This is logic since several a process cannot access the internal memory used by another one...
Conclusion; the global variable will work only if the load is serial...
hope this helps...
Olivier. -
Append Duplicate entries in Start Routine through ABAP code
Hi Experts,
I need to write an ABAP code in the start routine for the following conditions.
For every record in fiscal period (FISCPER) which has non u2013quarter months eg if Jan/Feb ie (001.2007 or 002.2007) I need to create an additional duplicate record which keeps all the other values same but negates the key figures and replaces the month by a quarter ending month
Eg: if my records are
FISCPER COMP_CODE GLACCT BALANCE
001.2007 1000 6789090 70
002.2007 1000 6789090 80
I need to create/append duplicate entries by negating the Balance value and replacing the Fiscper with 003.2007
FISCPER COMP_CODE GLACCT BALANCE
003.2007 1000 6789090 -70
003.2007 1000 6789090 - 80
Hence the entire structure should now look like:
001.2007 1000 6789090 70
002.2007 1000 6789090 80
003.2007 1000 6789090 -70
003.2007 1000 6789090 - 80
Similarly, I need to append duplicate entries for all non quarter ending months and replacing the Fiscper with the quarter ending month and also negate the Key figure value.
Hence, similarly,
001.2007 1000 6789090 70
002.2007 1000 6789090 80
003.2007 1000 6789090 -70
003.2007 1000 6789090 - 80
004.2007 1000 6789090 30
005.2007 1000 6789090 90
006.2007 1000 6789090 -30
006.2007 1000 6789090 -90
I am very new to ABAP, can someone please provide the ABAP start routine code for this..
Regards,
DipaliHi,
Check the below code. Paste it in yr Start Routine.
'*'Begin of code
DATA : wa_Data_Package LIKE Data_Package.
DATA : t_Data_Package LIKE Data_Package.
DATA : wa_temp LIKE Data_Package-BALANCE.
Loop at Data_Package into wa_Data_Package.
IF ( wa_Data_Package-FISCPER EQ 001/2007 ) or
( wa_Data_Package-FISCPER EQ 002/2007 ).
wa_temp = wa_Data_Package-BALANCE.
t_Data_Package-FISCPER = 003/2007.
t_Data_Package-BALANCE = -wa_temp.
Clear : wa_temp.
ELSEIF ( wa_Data_Package-FISCPER EQ 004/2007 ) or
( wa_Data_Package-FISCPER EQ 005/2007 ).
wa_temp = wa_Data_Package-BALANCE.
t_Data_Package-FISCPER = 006/2007.
t_Data_Package-BALANCE = -wa_temp.
Clear : wa_temp.
ELSEIF ( wa_Data_Package-FISCPER EQ 007/2007 ) or
( wa_Data_Package-FISCPER EQ 008/2007 ).
wa_temp = wa_Data_Package-BALANCE.
t_Data_Package-FISCPER = 009/2007.
t_Data_Package-BALANCE = -wa_temp.
Clear : wa_temp.
ELSEIF ( wa_Data_Package-FISCPER EQ 010/2007 ) or
( wa_Data_Package-FISCPER EQ 011/2007 ).
wa_temp = wa_Data_Package-BALANCE.
t_Data_Package-FISCPER = 012/2007.
t_Data_Package-BALANCE = -wa_temp.
Clear : wa_temp.
ENDIF.
APPEND t_Data_Package to Data_Package
Endloop.
'*'End of code
Regards,
Balaji V -
Start Routine or Update Rule Routine
Hello Dear Friends
I have a requirement here to create an object lets call it TYPE and i am using another infoobject called movement type.
My requirement in the cube is that TYPE should indicate A if movment type is 123 or 456 and B if movment type is 789.Anything else other than these numbers dont need to make it in the cube either for Movement type or for TYPE and needs to be deleted.I believe this will be a routine in the Start Routine.If not please let me know.Also if someone can give me the code on how to write the routine will be really appreciated.
Thanks again.hi,
Go for an Update routine as you do not have the TYPE in the Data source.
if ( comm_structure-momenttype = '123' or
comm_structure-momenttype = '456' ).
comm_structure-type = 'A'.
elseif comm_structure-momenttype = '789' .
comm_structure-type = 'B'.
endif.
Adn in the start routine :
delete data_package where momenttype ne '123' and
momenttype ne '456' and
momenttype ne '789' .
If you can add the type in the data source then write the below code.
delete data_package where momenttype ne '123' and
momenttype ne '456' and
momenttype ne '789' .
loop at data_package.
if ( data_package-momenttype = '123' or
data_package-momenttype = '456' ).
data_package-type = 'A'.
elseif data_package-momenttype = '789' .
data_package-type = 'B'.
endif.
modify data_package.
endloop.
good luck -
Syntax error in Start Routine routine 9998 in transformation
Hi Guyz,
I am getting the below error while doinf the syntax check in start routine in one of the transformation in BW production after the failed TR movement
E:In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter
"SOURCE_PACKAGE" is incompatible with the formal parameter
"DATA_PACKAGE".
but for the same transformation in quality its showing no syntax errors found.
its an odd behaviour.
please guide with ur expertise.
cheerz,
raps.Hi,
Check the note 1052648. it says that:
Start routine:
In the start routine, all the fields from the source are always available.
During the migration, a type '_ty_t_SC_1_full' is generated in '2nd part global'. Since Note 1325124, this type has been adjusted when the field list is changed. In the past, a change to the field list caused syntax errors of the type:
For update rules:
E: For PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter "SOURCE_PACKAGE" is not compatible with the formal parameter "DATA_PACKAGE".
For transfer rules:
E:For PERFORM or CALL FUNCTION "STARTROUTINE", the actual parameter "SOURCE_PACKAGE" is not compatible with the formal parameter "DATAPAK".
If this error continues to occur, go to the solution section to correct it.
Solution:
This error should now be automatically corrected with Note 1325124. Access the incorrect start routine in change mode. The type '_ty_s_SC_1_full' is then automatically adjusted to the source structure. If this does not work, you should use the tool 'RSTRAN_MIGRATION_CHECK' (described in Note 1369395) to check and possibly repair the transformation in question.
If this error still occurs, you can correct it manually as follows:
Copy the field list of the type '_ty_s_SC_1' from the 'private section' of the CLASS lcl_transform DEFINITION (you can find this when you scroll up in the routine editor of the start routine) to the type '_ty_s_SC_1_full' of '2nd part global'.
Regards,
Anil Kumar Sharma .P -
Start routine to update some fields of a ODS based on the another ODS
Hi I know i have to do abap coding at the start routine to update a ODS based on another ODS. I have tried doing the code for quite some time now and i have not been successful. I think I havenu2019t followed the definition required for this routine.
I have 2 ODS, ODS1 has 3 key fields and ODS2 has 1 key field
I have to map the ODS based on a 1:3 relation.
I am writing this start routine for the update rules from ODS2 to ODS1.
The logic is if the key field of ODS2 is equal to either Key field 1 or Key field 2 or Key field 3 of ODS1 then that record from ODS2 has to be updated to the corresponding matching record of ODS1, else no update. The 3 key fields of ODS1 have different character length and character types and the key field of ODS2 has a different character length and type when compared to the any of the key fields of ODS2 can match any of those.
Like key field 1 of ODS1 has length 10. Key field 2 of ODS1 has length 10 and key field 3 of ODS1 has length 20 and all these fields are not alpha converted, but the key field of ODS2 has length 60 and it is alpha converted.
Can anyone please help me in this code.
My Code is as below.
ITAB1-T_BOL = DATA_PACKAGE-/BIC/ZLBOL.
***********NISTEVO SELECT******************************
SELECT /BIC/ZLBOL FROM /BIC/AWLONST0100 INTO ITAB1-T_BOL
WHERE /BIC/ZLBOL = ITAB1-T_BOL .
**************R/3 SELECT*******************************
SELECT /BIC/ZLRDELNU /BIC/ZLRSHIPNU /BIC/ZLREXTID
FROM /BIC/AWLOR3O0400
INTO CORRESPONDING FIELDS OF ITAB1
WHERE
/BIC/ZLRDELNU = ITAB1-T_BOL OR
/BIC/ZLRSHIPNU = ITAB1-T_BOL OR
/BIC/ZLREXTID = ITAB1-T_BOL .
SORT ITAB1 BY T_DELNU T_SHIPNU T_EXTID .
LOOP AT DATA_PACKAGE.
READ TABLE ITAB1 WITH KEY T_DELNU = DATA_PACKAGE-/BIC/ZLBOL.
IF SY-SUBRC = 0.
EXIT.
ENDIF.
READ TABLE ITAB1 WITH KEY T_SHIPNU = DATA_PACKAGE-/BIC/ZLBOL.
IF SY-SUBRC = 0.
EXIT.
ENDIF.
READ TABLE ITAB1 WITH KEY T_EXTID = DATA_PACKAGE-/BIC/ZLBOL.
IF SY-SUBRC = 0.
EXIT.
ENDIF.
DELETE DATA_PACKAGE .
ENDLOOP.
ENDSELECT.
ENDSELECT.
Points will be awarded.
Edited by: satish rajaram on Nov 6, 2008 4:51 PM
Edited by: satish rajaram on Nov 7, 2008 11:40 AM
Edited by: satish rajaram on Nov 7, 2008 11:43 AMThe logic is if the key field of ODS2 is equal to either Key field 1 or Key field 2 or Key field 3 of ODS1 then that record from ODS2 has to be updated to the corresponding matching record of ODS1, else no update. The 3 key fields of ODS1 have different character length and character types and the key field of ODS2 has a different character length and type when compared to the any of the key fields of ODS2 can match any of those.
Can you try below logic :
Below is not code it needs to be manipulated as per requirement.
ODS2 ---> ODS1
SELECT <key fields of ODS1>
FROM /BIC/A<ODS1>00
INTO ITAB
FOR ALL ENTRIES IN DATA_PACKAGE
WHERE
keyfield1 = data_package-key1
or
keyfield2 = data_package-key2
or
keyfield3 = data_package-key3
**Now itab has all entries which neednot be deleted from data_package.****
if sy-subrc=0.
***Check Itab and delete only those records not present in itab from data_package****
endif.
Hope this helps.
Maybe you are looking for
-
Smart View error logging in to an application
Hello, I successfully installed Smart View on a computer with Windows XP SP3. I can connect to the data source, but when I try to connect to an application, after entering the username and password, an error pops up: "Requested operation failed. Erro
-
I am developing a multiuser application in flash, using smartfox server and as 2.0, but i am having an issue with defining/declaring a variable/object/array, and then accessing it. I am attempting to define "curMap" (whether it be a variable, array,
-
Oracle 10gr2 upgrade to Version 10.2.0.3.0
dear gurus i install new window 2003 machine oracle 10gr2, where i upgrade Version 10.2.0.3.0 after this. now sqlplus, lisenter shows correct version however when i connect to emctl enterprise manger over web it shows wrong database version Version 1
-
Business Component and Task flow learning
Hi everyone, can anyone suggest me how and from where I need to start learning Oracle BC ,Entity objects,View object and task flows concept . I am familier with Oracle ADF but never used this components. so Please help me to learn the thing quickly.
-
When will nokia be updating the firmware on the 58...
just wondering when the next firmware uodate will be released for the 5800. the rumours going around saying there is a new homescreen and kinetic scrolling coming with the next firmware update. its hard to use the fone when u got loads of apps. some