Regarding start routine in transfer strucutre.
hai
I need to remove bad characters from source system . For that im using client standard 'function module' and then im calling this funcation module at each Infoobject's transfer routine.
1)Function module is
FUNCTION zbw_remove_bad_characters .
""Local interface:
*" CHANGING
*" REFERENCE(STRING)
Program Name: zbw_remove_bad_characters Create Date:06/12/2000
Author#s Name:Rohan Williams Last Update:
Program Title: Convert non-permittired BW chars to a '.'.
Development Request #: *
DATA: l_allowed_char LIKE rsallowedchar-allowchar.
DATA: wf_badchars TYPE i VALUE 1,
wa_strlen TYPE i,
wa_chklastchar.
DATA: l_bad_char_flag.
wa_strlen = strlen( string ).
CALL FUNCTION 'RSKC_ALLOWED_CHAR_GET'
IMPORTING
e_allowed_char = l_allowed_char.
*--- added 03/09/2004 Olu takes care of only one unallowed
*... char at first position.
if wa_strlen = 1.
wa_strlen = 2.
endif.
*...end.
WHILE wf_badchars NE wa_strlen.
IF string CN l_allowed_char.
IF sy-fdpos < wa_strlen.
MOVE '.' TO string+sy-fdpos(1).
wf_badchars = sy-fdpos.
ELSE.
wa_chklastchar = string+sy-fdpos.
IF wa_chklastchar CN l_allowed_char.
MOVE '.' TO string+sy-fdpos(1).
wf_badchars = sy-fdpos.
ENDIF.
ENDIF.
ELSE.
wf_badchars = wa_strlen.
ENDIF.
ENDWHILE.
replace bad character '#' with 'X'
CLEAR l_bad_char_flag.
WHILE l_bad_char_flag NE 'X'.
SEARCH string FOR '#'.
IF sy-subrc EQ 0.
REPLACE '#' WITH 'X' INTO string.
ELSE.
l_bad_char_flag = 'X'.
ENDIF.
ENDWHILE.
replace bad character '!' with 'X'
CLEAR l_bad_char_flag.
WHILE l_bad_char_flag NE 'X'.
SEARCH string FOR '!'.
IF sy-subrc EQ 0.
REPLACE '!' WITH 'X' INTO string.
ELSE.
l_bad_char_flag = 'X'.
ENDIF.
ENDWHILE.
*---- ??1234112AR
CLEAR l_bad_char_flag.
WHILE l_bad_char_flag NE '·'.
SEARCH string FOR '·'.
IF sy-subrc EQ 0.
REPLACE '·' WITH '.' INTO string.
ELSE.
l_bad_char_flag = 'X'.
ENDIF.
ENDWHILE.
translate string to upper case.
ENDFUNCTION.
2)Funcation module calling routine at each Infoobject of Transfer Routine ...
RESULT = TRAN_STRUCTURE-
zzinputcal(source filed).
translate RESULT to upper case.
call function 'ZBW_REMOVE_BAD_CHARACTERS'
changing
string = RESULT.
So i have 25-infoobjects in transfer structure .So i need to call 25 times above function module . It is very length process.
I think we can write in Start Routine of transfer structure .
Is it possible to write in start rouinte.If possible pls given the code ..............
i ll assing the points
bye
rizwan
Hi,
that was the code:
<b>data: idx like sy-tabix.
LOOP AT DATA_PACKAGE.
idx = sy-tabix.
1.call infoobject 1
call function 'ZBW_REMOVE_BAD_CHARACTERS'
changing
string = DATA_PACKAGE-iobjnr1.
2.call infoobject 1
call function 'ZBW_REMOVE_BAD_CHARACTERS'
changing
string = DATA_PACKAGE-iobjnr2.
. + next 23 calls for your infoobjects.
modify DATA_PACKAGE index idx.
endloop.</b>
/manfred
Similar Messages
-
Clarification regarding start routines!
Dear all,
I would like to know what exactly the start routines are and how they can be used to manipulate the data coming into the BW system from the R/3 system. If anybody can explain it with an example I would be very greateful. Thanks.
Regards,
Sumithi Sumit,
take a look
http://help.sap.com/saphelp_nw2004s/helpdata/en/21/894eeee0b911d4b2d90050da4c74dc/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/c3963dfbde4dede10000000a422035/frameset.htm
other samples
start routine in transfer rules
Look up to load master data
excluding
Start Routine in Transfer Rules
Sample code in Update Rule to restrict data selection?
Append Datapak - transfer start routine
Excluding Blank field in Infopackage Filter
Trans Routine ABAP help ..
start routine in update rules
Is it possible to read a third ODS in update rules between two ODS?
update rule coding while loading data from ODS to CUBE
Start Routine in Update Rules to populate additional fields from ODS
Coding in Update Rules accessing a Z-Table
Start routine
hope this helps. -
Help on Start Routine at Transfer Rule.
Hi guys,
We r extracting data from generic extractor into BW.My target is to fill Attributes of 0Customer(Infoprovider) Infoobject.
We have added two navigational attributes to it CLASS A and CLASS B.
Data coming from R/3 has three fields Customer,Class,n field called as ATWRT.
For each customer there are two records .
For Ex
Customer Class ATWRT
001 A FOOD
001 B Supermarket
002 A Chain
003 B Magnum
In the target customer is key
Now the TASK is that in the target the definition for class A which is present in ATWRT should go to navigational attribute ClassA
n Defination for B should go in NAV Attribute CLASS B . that means there should be single record in the target comprising both value in NAV attribute.
For Ex
Customer Class A Class B
001 FOOD Supermarket
002 Chain Magnum
i want to write program in start routine of transfer rules. If u can suggest any other method also it will good to me to sort this issue. Suggestions are expected.
Points will be awarded for the write suggestion.
Pls help me out.Dennis,
Thank you so much for the quick response.
I think it is working. I only have one concern!!!!.
I feel like during the testing I found something weird that eventhough there are only 8 records in the psa and four records only have the value ('status') that we need from customer master data-field1, it is still picking the 5th record, not sure why. I see that once it is written in to the data target then the value is showing it as 'status' and in psa it is different.
So I wonder if it is converting that field in the routine based on our constant! Please let me know your input.
p.s data target does not have the field1 available. So just like you corrected my code it has to bring it from customer master data and join customer to with the customer-field1 =' status', then pick else delete other records.
Regards,
Su -
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 -
How to find the existing START ROUTINEs in Transfer Rules in whole system ?
Hi all,
How to find the existing Start Routines in Transfer Rules in BW System, please ?
I know that we could find from the Transfer Rules.
Is there any way to find instead of looking at Transfer Rules for <b>each</b> InfoSource?
Thanks,
Venkat.Hi Venkat
You can find it in these tables
RSTRAN
RSUPDROUT
RSAROUT
RSAABAP
RSAABAPINV
Thanks
Tripple k -
Debugging: start routine in transfer rules
Hi !
can you please tell me how to debug start routines and field routines in transfer rules?
If possible please tell me too debugging of update rules.Hi Rajib,
Go to the monitor -> Details tab -> Processing -> Choose the datapackage you want to debug -> Right click -> Simulate update -> Choose eather activate debugging in transfer rules (to debug in transfer rules) or debugging in update rules(for start routine and update rules).
You can mention the number records you want to debug also, if you have an idea of which records you want to debug you can give the number of that record.
Once the debug screen comes up, press F8...the control stops at first break point...from there you can do a step by step debugging (F5).
Hope this helps...
Regards,
Kalyan -
Regarding start routine used for lookups
Hi All,
I am doing a lookup whose logic is being defined in start routine. My requirment is like this.
I am having an infoobject(1) having a master data and it also have an attribute having the master data too.
Now I am having one more object(2) having the masterdata and an attribute with out data.
In my routine I have defined a logic to compare two infoobjects. If they are equal then load the data of the attribute of first infoobject into the second infoobject.
I have defined the logic like this in routine.
SELECT /BIC/Z_LOOKUP2
FROM /BIC/Z_LOOKUP1
INTO /BIC/Z_LOOKUP4
FOR ALL ENTRIES IN SOURE_PACKAGE[]
WHERE /BIC/Z_LOOKUP3 = SOURCE_FIELDS-/BIC/Z_LOOKUP1
END SELECT.
I am geeting an error as /BIC/Z_LLOKUP1 IS NOT defined in ABAP dictionary as a table,.
How can I resolve this.
Please help me.
Z_LOOKUP1 is having Z_LOOKUP2 as an attribute and,
Z_LLOKUP3 is having Z_LLOKUP4 as an attribute.
Thanks.
Vinay,Hi,
Just check the master data table created for your infoObject Z_LOOKUP1. It would be something like /BIC/PZ_LOOKUP100.
If you are still getting the error, post your exact code here and we can take a look.
Hope this helps!
Regards,
Saurabh -
Start Routine for transfer rules
Hello experts,
I want to use the SQL DISTINCT keyword to return non-duplicate results from a table in a DataSource (data base) in a the start routine for the transfer rules.
How do I address that table in the start routine of the TR?
I thought about something like that.
TABLES: mytable
DATA: itab_mytable type table of mytable
SELECT DISTINCT CUSTID, etc.
FROM mytable into table i_tab.
I am new to ABAP so I would be happy to get some suggestions!
thanx in advance
AxelHello Oscar,
as fa as I understood the entire data package in the transfer structure format is used as parameter (DATAPAK) for the routine.
so I want to perform a SQL statement on DATAPAK!
But it sais it can't find DATAPAK in ABAP-Dictionary as a table!
can I actually perform SQL statements on DATAPAK?
Thanx
Axel -
Start routine in Transfer Rules for Data Mart update
Hi,
Is it possible to create a start routine in a transfer rule of a Datamart update (from ODS to Cube)?
Thxs.
LauQRoberto,
If I read well the content of note 499404 - referred to in 630854 - I conclude that it is recommended to use update rules rather than transfer rules in the case of ODS objects when one wishes to modify data records up to the eventual data target.
Do you agree?
Thxs.
LauQ -
Start Routine in Transfer Rules
Hi all ,
I am trying to write a start routine in the Transfer rules ....I just want to know which is package that i have to loop to get mt records ....
id it LOOP at DATAPAK ....
My records ...
ENDLOOP
This is where i need to put the logic or else where ..please let me knowhi,
check if sample code helps
DATA: l_s_datapak_line type TRANSFER_STRUCTURE,
l_s_errorlog TYPE rssm_s_errorlog_int.
tables : table1.
data : l_field1 liek table1-field1,
l_tabix like sy-tabix.
loop at datapak into l_s_datapak_line.
l_tabix = sy-tabix.
fill field1 with data
select single field1 into l_field1
from table1 where fieldintable1 = l_s_datapak_line-[fieldname]
if sy-subrc = 0.
l_s_datapak_line-field1 = l_field1.
modify datapak from l_s_datapak_line index l_tabix.
endif.
endloop. -
Can any one explain me abt start routine and transfer routine with example?
Hi all,
Can anyone explaing me the use of start routine and update routines with an real time example.
regds
hariHi
Start routine is at a datapackage level and u generally use select statement and delete state ment
transfer routine is at a data source level.
for ex i have an 3 ODS (X,Y,Z) and one DS D and one Infosoure I and a cube C
flow is DS -
>IS-->ODS's(X,Y,Z)---> and cube C from ODS X, ODS Y,ODS Z
Transfer Routine:If u write any routine in IS it will be applicable to all the the ODS's when u load data becuase it is at the DS level
start routine: now if u write a start routine betwn ODS X and a cube it will be applicable only for the Update rule betwn ODS X and a cube it wont affect the Update rules betwn OD Y and cube or ODS Z and the cube becuase start routine is at a datapackage level
Transfer routine is in the IS
hope this is helpful asssingn points if applicable
thanks
puneet -
Creating a start routine in the transfer rule
I'VE CREATE a start routine, seel bleow. Now I want to get at one of the fieds for a Key figure. How do i do that? do I need to add it to the transfer structure
LOOP AT ROUTEDAY INTO WA_ROUTEDAY.
CALL FUNCTION 'CONVERSION_EXIT_TSTRG_OUTPUT'
EXPORTING
input = ROUTEDAY-ROUTE_DAYS
IMPORTING
output = WA_DAYS_OUT.
WA_ROUTEDAY-ROUTE_DAYS_CONV = WA_DAYS_OUT.
APPEND WA_ROUTEDAY.
ENDLOOP.Hi Mick,
check these links
start routine in transfer rules
Look up to load master data
excluding
Start Routine in Transfer Rules
Sample code in Update Rule to restrict data selection?
Append Datapak - transfer start routine
Excluding Blank field in Infopackage Filter
Trans Routine ABAP help ..
Hope this might help you.
****Assign Points If Helpful****
Regards,
Ravikanth -
Filter data in transfer rules using start routine
Hi all!
I am an absolute newbie here, but I have a question regarding start routines and I noticed many questions get solved around here. My situation is the following: I have to create a start routine where the data to be transferred is filtered on an attribute "DESTINAT" in info object "0BILL_TYPE". DESTINAT can be 'M' or 'D' and depending on that letter, data must flow to a separate ODS.
Well,I came up with the following:
somewhere in my start routing I guess I'll have to put:
loop at data_pak.
DELETE DATAPAK Where DESTINAT = 'D'
endloop.
When I place this in my start routine of my transfer rules leading to the ODS where data must be of DESTINAT type 'M', will this do the trick?
I want to put the following code in the transfer rules leading to my other ODS, where data must be of type DESTINAT = 'D':
loop at data_pak.
DELETE DATAPAK Where DESTINAT = 'M'
endloop.
I'm sorry that this is a very basic question, but like I said: I'm a newbie in SAP...hi Joris,
have a lok at the foll help docs.:
http://help.sap.com/saphelp_nw04/helpdata/en/b3/0ef3e8396111d5b2e80050da4c74dc/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/21/894eeee0b911d4b2d90050da4c74dc/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/80/1a62bfe07211d2acb80000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/e3/732c42be6fde2ce10000000a1550b0/content.htm
cheers
shameem -
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
-
Dear All, We are facing production server stability issue. From this Friday in morning almost each 30 min WebIntelligence Service is crash. When users are trying to refresh report it give following error The Web Intelligence Server could not be reach
-
Change Default GR Processing Time
Hello, In material master, MRP2 Tab: In SPRO, is it possible to change the default Goods Receipts Processing Time (WEBAZ) for every material? If not, I may run a mass update for every existing materials. But would it be possible to make a GRP time 3
-
Hi, When i am trying to parse the xml document using XDB API. I passed the XML file path to the parse function and making use of that at below lines of code. xmlparser.setBaseDir(prsr, dir); xmlparser.parse (prsr, dir || '/' || file_in); In thsi scen
-
NEF files will not download into PSE 9.
Just bought a Nikon D7000 but the NEF files are not compatible with PSE 9. I downloaded Camera Raw 6.4, which took a long time due to interuptions so am not sure it loaded properly. Any other ideas out there to make this work? Nikon admits they ch
-
I created a great keynote presentation and converted it to a highest quality Quicktime movie. It looks great, but when I import it to iMovie in order to add audio, the video quality stinks. Am I doing something wrong as I export it out of Keynote? I