Regarding Transfer Routine at InfoObject Level(in Maiantance Screen Of In
hai
i have some bad characters from the oracle source system .
So im writing the following Transfer Routine in the transfer rule for all infoobjects .
RESULT = TRAN_STRUCTURE-PRENBT.
call function 'ZTHW_REMOVE_BAD_CHARACTERS'
changing
string = RESULT.
translate RESULT to upper case.
But i want to write this code at InfoObject Level in the Maintanence Screen (Create Transfer Routine)
So how can i write this code in Maintanence Screen of each InfoObject instead of writitng in the transfer rules.
Pls give the ABAP CODE at InfoObject Levele
pls tell me
i ll assing the points
rizwan
hi rizwan
there is a result value for the conversion routine at iobj level also .Please see below :
PROGRAM CONVERSION_ROUTINE.
Type pools used by conversion program
TYPE-POOLS: RSD, RSARC, RSARR.
TYPES: DE_YA_M_IND(000006) TYPE C.
Conversion rule for InfoObject YA_M_IND
Data type = CHAR
ABAP type = C
ABAP length = 000006
FORM CONVERT_YA_M_IND
USING RECORD_NO LIKE SY-TABIX
SOURCE_SYSTEM TYPE RSA_LOGSYS
IOBJ_NAME TYPE RSIOBJNM
CHANGING RESULT TYPE DE_YA_M_IND " InfoObject value
RETURNCODE LIKE SY-SUBRC.
$$ begin of routine - insert your code only below this line -
<b>RESULT = .
RETURNCODE = 0.</b>$$ end of routine - insert your code only before this line -
ENDFORM.
Similar Messages
-
Create Transfer Routine fo infoobject
Hi,
How to Create Transfer Routine fo infoobject.
Thanks,
Medha.Goto your Transformation rule and map the info object with corresponding source field. Right click on info object ---> Rule detail ---> then select Rule type as routine that will take you to the editor where you can write your transfer routine.
Jagadeesh. -
routine infoobject level
Posted: Aug 24, 2007 5:23 PM Reply E-mail this post
Hi all,
In Transfer rule 0prodh2 is infoobject i can write routine
prodh2 is heirarchy this filed come to data source level.
in this 0prodh2 filed mappin to material value.
i write routine in 0prodh2....
TABLES: /BI0/PMATERIAL, /bic/azplan00.
DATA: begin of itab2 occurs 0.
include structure /bic/azplan00.
DATA: end of itab2.
DATA: begin of itab occurs 0.
include structure /BI0/PMATERIAL.
DATA: end of itab.
$$ end of global - insert your declaration only before this line -
FORM COMPUTE_PRODH2
Compute value of InfoObject 0PRODH2
in communication structure /BIC/CSZBWPLAN
Technical properties:
field name = PRODH2
data element = /BI0/OIPRODH2
data type = CHAR
length = 000018
decimals = 000000
ABAP type = C
ABAP length = 000036
reference field =
Parameters:
--> RECORD_NO Record number
--> TRAN_STRUCTURE Transfer structure
<-- RESULT Return value of InfoObject
<-> G_T_ERRORLOG Error log
<-- RETURNCODE Return code (to skip one record)
<-- ABORT Abort code (to skip whole data package)
FORM COMPUTE_PRODH2
USING RECORD_NO LIKE SY-TABIX
TRAN_STRUCTURE TYPE TRANSFER_STRUCTURE
G_S_MINFO TYPE RSSM_S_MINFO
CHANGING RESULT TYPE /BI0/OIPRODH2
G_T_ERRORLOG TYPE rssm_t_errorlog_int
RETURNCODE LIKE SY-SUBRC
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel datapackage
$$ begin of routine - insert your code only below this line -
DATA: l_s_errorlog TYPE rssm_s_errorlog_int.
select * from /BI0/PMATERIAL into itab
where material = /BI0/PMATERIAL-prodh2
and objvers = 'a'.
endselect.
RESULT = 0.
returncode <> 0 means skip this record
RETURNCODE = 0.
abort <> 0 means skip whole data package !!!
ABORT = 0.
can any body give me solution.. or else give me sampl code..
nagHi Nag,
you can change only RESULT
Write code like this
select * from /bi0/pmaterial into itab
where objevers = 'a' and prodh2 = tran_strucutre-pordh2.
result = itab-material
hope thIs help -
Transfer routine in InfoObject
I have an InfoObject 0Batch which in some cases has a special character which it will not permit. I only have the hexidecimal value for the character. Does anyone know of any function that I can use when I am defining a transfer routine which will take hexidecimal inputs? Thanks
Hi Niten,
You can try function module <b>CHAR_HEX_CONVERSION</b> and compare your hexa decmial character.
I havent tested these..but you can try..
There is another function module
<b>SF_HEXA_CHECK - Comparison of hexadecimal numbers .</b>
Regards
Manga -
Syntax error during transport on valid transfer routines
Dear All,
We have some routines in a tranfer structure that are valid and working just fine in DEV. But when we transport them to QA we get the following error message :-
Start of the after-import method for object type R3TR ISTS (Activation Mode)
Transfer structure 6DB_V_BW_EPISODE_AD activated under the name 6DB_V_BW_EPISODE_AD
It is not necessary to copy dependent objects for transfer structure 6DB_V_BW_EPISODE_AD
Syntax error in transfer routine for InfoObject OPEN_DAT
Activating Transfer Rules 6DB_V_BW_EPISODE_AD ...
47 Transfer Rule(s) of the transfer structure 6DB_V_BW_EPISODE_AD removed from control table
53 InfoObject(s) of the transfer structure 6DB_V_BW_EPISODE_AD removed from control table
Formulas have been saved
Syntax error in transfer routine for InfoObject OPEN_DAT
If we remove all the routines the activation works just fine even though our routines are valid and working just fine in DEV.
Can anyone explain this as this is becoming quite urgent now ?
Thanks in advance.
CraigHi Oliver
I work with Craig. In response to your question, what he means is that all objects independantly have been transported ok, apart from the transfer rules. If you look at the table RSTSRULES you will see a column called CONVROUT_L.
In our Dev system this field contains the BW generated rule code. Eg.
45GEGC5I66GA9Z5G4KFDDRIK4 against the Transfer structure. When the after import process runs, it uses the contents of this table together with the contents of the RSAABAP table which contains the code and creates the transfer rule program.
In RSAABAP we have the following code for CODEID '45GEGC5I66GA9Z5G4KFDDRIK4'
DATA: l_s_errorlog TYPE rssm_s_errorlog_int.
CHECK NOT &TS&-opened_date IS INITIAL.
IF &TS&-opened_date < '19000101'.
&RS& = '19900101'.
ELSEIF &TS&-opened_date > '29990101'.
&RS& = '19900101'.
ELSE.
&RS& = &TS&-opened_date.
ENDIF.
returncode <> 0 means skip this record
&RE& = 0.
abort <> 0 means skip whole data package !!!
&AB& = 0.
In our QA system the column is blank because of the wierd Syntax problem when generating the program, therefore the transfer rules dont get activated.
As you can see there is no problem with the ABAP.
Regards
Mark -
0LOGSYS transfer routine error transporting DEV- QA
Hello!
I need to transport several business content infocubes and loading flow(migrated from 3x to in 7.0) from DEV to QA.
In QA I've imported also infoobject 0LOGSYS and his transfer routine. But it appears iinactive. When I display the transfer routine from characteristic 0LOGSYS, is missing this part of code::
IF RESULT IS INITIAL and
IOBJ_NAME = '0LOGSYS'.
fill source system
RESULT = SOURCE_SYSTEM.
What can I do ? In DEV, the code is ok. Can I modify it manually ? Other what must I do in DEV to repair it?
Thanks a lot !I need to activate the object 0LOGSYS from Business Content again ? or manually with change and also change and save the routine?
In STMS I have:
Start of the after-import method RS_IOBJ AFTERIMPORT for object type IOBJ
Syntax error Incorrect statement :Expression missing . in row 20 position 0
Characteristic 0LOGSYS: Error when activating or checking the transfer routine
This infoobject, 0LOGSYS is also attribute for others infoobjects and I have also errors like:
Attribute 0LOGSYS from characteristic 0BUS_AREA is not actively available.
I've imported also a data source 3x migrated to 7.0 with the transformation and an infocube, and I have error:
Start of the after-import method RS_RSDS AFTERIIMPORT for object type RSDS
Soource system DEV does not exist
Start of the after-import method RS_TRFN_AFTER_IMPORT fot object type TRFN
No rule exists.
Source RSDS mysource DEV does not exist
AND SUMMARy:
Object IOBJ 0logsys imported with errors
Thanks! -
List of infoobjects with transfer routines
Hi,
I want to get the list of all the infoobjects for which the transfer routines are existing.Is ther any table r transaction from where we can get this information?
can anyone give me quick answer pls.
thank you
venku
Message was edited by:
venku chittidiHi,
if you create a routine in TR for an info object, system generates an ID.
This ID is stored in the table. In my last answer I assumed, that you want to
determine <b>all</b> info objects with a routine in TR and the way to do this is to
identify all info objects with such an ID (value ne blank).
Regards
Joe -
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
rizwanHi,
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 -
Hi,
Suppose we have start routine, transformation routines and end routine defined between datasource and data target, and also we have a global transfer routine created on an infoobject.
What is the order of execution of routines in this scenerio?
Also if conversion routine like ALPHA is defined for an Infoobject, when does this come into flow.?
Please enlighten me.
Thanks,
AksharaHello Akshara ,
The sequence of routines are as
1. Start Routine
2. Master Data Look Up or
3. Field Level Routine
4. End Rountine
Apart from this , there is Expert routine, which is used in special cases, when there are not the sufficient functions to perform a transformation. It can be used as a interim solution , and it performs all the functions of Start routine, end routine , field routine.
Note : if you have created transformation, and then created Expert routine, then system will delete all the existing transformations.
Further to this, you can explore more, by debug the transformation as suggested by Vijay Kumar.
Hope this helps !
Regards
YN -
Why do u need conversion routine at object level?
hi friends,
what scenerio we use conversion routine at object level, while creating my character , there is option conversion routine, when we use, please give me 1 scenerio with sample code?
regards
ssSuneel,
You can make transformation to the data for specific InfoObjects in the Transfer Rules and / or Update Rules.
Now, when you do that, it will only affect that InfoObject in that particular set of rules.
If you want to process o transform the data for this InfoObject ANYWHERE it is used, without the need of repeating it over and over in the Transfer or Update Rules where it is present, you just do it once, at the Object level.
That's the main purpose.
Sorry, I don't have a sample code.
Regards,
Luis -
Hi,
i had infoobject ZEBAY01 and need to write global transfer routine for this infoobject. Now the infoobject value is comming 0000999999 but the business wants the output value as 009999. They want to see output value as 6digit like (009999).can someone help me how to write code here
ROGRAM CONVERSION_ROUTINE.
Type pools used by conversion program
TYPE-POOLS: RSD, RSARC, RSARR.
TYPES: DE_ZEBAY01(000015) TYPE C.
Conversion rule for InfoObject ZEBAY01
Data type = CHAR
ABAP type = C
ABAP length = 000015
FORM CONVERT_ZEBAY01
USING RECORD_NO LIKE SY-TABIX
SOURCE_SYSTEM TYPE RSA_LOGSYS
IOBJ_NAME TYPE RSIOBJNM
CHANGING RESULT TYPE DE_ZEBAY01 " InfoObject value
RETURNCODE LIKE SY-SUBRC.
$$ begin of routine - insert your code only below this lineHi Laxmi
Use the below code.
RESULT = RESULT+2(8).
RESULT = RESULT(6).
RETURNCODE = 0.
First Result will take from 8 characters starting from first position. So you get rid of first two leading zeroes.
Then take first 6 character from the result of above operation from the first character. You get rid off last 2 digits.
Regards
Anindya -
Transformation routine for Infoobject lookup
Hey guys,
I am aware of Update rule routines but never done Transformation routine before. I didnt get any related post for my req.
My requirement is on WBS element I have some attributes which is coming from std WBS Attr extractor but I have one custom attribute infooject which I want to populate through an Infoobject which is also a master data Infoprovider. For this I have to write a Tranfer rule routine.
Please note these are transfer rules in BW 3.5 not BI 7. Please provide exact code. Appreciate your help.
Thanks.
BMW M///Declaration of Types table for your master data object in the declaration area....
Replace your attributes in place of plant, GSRCSYS and CALMONTH
TYPES: BEGIN OF TY_WBS,
/BIC/GPLANT TYPE /BIC/OIGPLANT,
/BIC/GSRCSYS TYPE /BIC/OIGSRCSYS,
CALMONTH TYPE /BI0/OICALMONTH,
END OF TY_WBS.
DATA: IT_WBS TYPE TABLE OF TY_WBS,
WA_WBS TYPE TY_WBS.
/BIC/AWBS = your master data table name
SELECT * FROM /BIC/AWBS INTO WA_WBS
WHERE OBJVERS = 'A'.
THen in the transformation Routine on field level use the below code to populate the value
" /BIC/GPLANT = L_SOURCE_PACKAGE-/BIC/GPLANT.
substitute your objects here to query the master data object to get values.
READ TABLE IT_WBS INTO WA_WBS WITH KEY
/BIC/GPLANT = L_SOURCE_PACKAGE-/BIC/GPLANT.
RESULT = WA_WBS-Your object name.
Hope this will help you... -
Need help with transfer routine.
I am doing this enhancement in BW 3.5 version.
There is an object in ODS - > ZPATHNM (Pathname)
It gets data from ZPTDIR object.
Now, 0MATERIAL infoobject has text data. For PATH type materials it has descriptions like pt/dat/fafg.2.0 , pt/dat/ovg.2c ... so on.
The content after pt/dat/ for example fafq.2.0, ovg.2c is available in ODS object ZPATHNM (Pathname)
Since I have to extract PATH material numbers. So I created another object ZPATHMAT and mapping it to ZPTDIR.
I have to write a transfer routine when the 0MATERIAL text description had description beginning with pt/dat/ and the text after pt/dat/ is equal to data in ZPATHNM. i should get material number in ZPATHMAT.
This is the transfer routine, I have written between ZPATHMAT and ZPTDIR . This is working fine.
Data : ZDIRNAM type String,
ZCONT1 type string,
ZCONT2 type string,
ZMATERIAL(18) type C.
ZDIRNAM = TRAN_STRUCTURE-ZPTDIR.
IF ZDIRNAM is not Initial.
Concatenate 'pt/dat/' ZDIRNAM into ZCONT1.
Select single MATERIAL
into ZMATERIAL from /BI0/TMATERIAL
where TXTMD = ZCONT1.
RESULT = ZMATERIAL.
ENDIF.
Now there is another requirement, where I have to create one more object, ZPATHDES. This object should get Material description for path type materials from 0PROD_HIER text table.
This object, 0PROD_HIER is an attribute of 0MATERIAL.
So the logic to get the material description into ZPATHDES, is when the material number in 0MATERIAL is equal to material number in ZPATHMAT (generated from above routine), I should get description (TXTMD) from text table of 0PROD_HIER (/BI0/TPROD_HIER) into this ZPATHDES object.
I able not to connect this logic in the code and it is throwing errors.
I need help in coding.
Thanks.Very hard to understand the logic in a thread. Can you please write your code, which is throwing errors? May be that will help us.
Regards
amandeep sharma -
Which is better transfer routine or update routine???
HI ALL,
I have read some documents, but I didnt get the real concept.
Can any one explain in detail as to how do we decide where to write the code i.e a start routine or transfer routine or update routine...and which one is better for a given scenario..
with example?My scenario is like this:
master data InfoObject for e.g. Z_MATERIAL1 with 10 fields as attributes. It has two Source Systems feeding it; SAP and a flat file from a system called Product Catalog (PCAT).
The PCAT data is generally more reliable, hence, if a material XYZ comes from PCAT then PCAT is the owner of the material. SAP should not be able to update five critical fields of that material if PCAT owns the material.
For e.g. the below values comes from PCAT and Master data is updated.
PCAT
Material Group Type Price Curr Unit Prod Desc. Lang Class
XYZ ABC BRU 10.00 USD PC Inh To EN 001
When the data comes from SAP R/3, it should not update anything other than the last 4 fields.
SAP
Material Group Type Price Curr Unit Prod Desc. Lang Class
XYZ ABC BRU 20.00 USD BOX In The DE 003
Finally the data in the Master Data Object should be as below.
Material Group Type Price Curr Unit Prod Desc. Lang Class
XYZ ABC BRU 10.00 USD PC In The DE 003
where do i write the code...i have written this in start routine of transfer rules...i want to know the performance issues... -
Hi,
I am getting the Alpha Numeric (for example:150DD say)data for the field 0SALESEMPLY into the infosource 2LIS_11_VAHDR, but the data type for 0salesemply is NUMC in the info source.
Because of this data type(NUMC) the data for this filed is loading only the numeric value i.e.,150 only, but not as 150DD into the infocube.
In order to load load as alpha numeric value, i think i need to write Transfer Routine for the 0SALESEMPLY info object in the Transfer rules (in 2LIS_11_VAHDR), there by it can load alpha numeric values for this info object.
So please provide me the <b>Routine</b> which can transfer the alpha numeric data for the existing Data type(NUMC) for the info oblect in the infosource 2LIS_11_VAHDR.
Thanks & Regards,
KishoreHi Anil,
<b>I am loading the data from a Flat file where the data</b> , that contributes to the info object 0SALESEMPLY in the the info source 2lis_11_vahdr, <b>in the flat file for the respective field is Alpha Numeric values.</b>
But we have the 0SALESEMPLY (BW) info object with data type Numc which accepts only numeric values.
so it is loading only the numeric values(ex: 150 say) of that field but not the entire alpha numeric value(ex: 150AR, say).
so in this situation how can i proceed.
Please respond asap......
Regards,
Kishore
Maybe you are looking for
-
An investigation of times required to burn DVD during 'audio' phase.
These figures are for a 1 hour 40 minutes movie, with 3 tracks of Audio, trying to save to disk image on desktop. 80 Gig of HD free. When iDVD appears ‘hung’ it is actually saving to a file, called ‘tempmovie.mov’, in the iDVD project, which in turn
-
Does anyone know of an app like this....
Hello All: I am looking for an app that will track how much time I spend in each application. Then possibly tell me in a report what time is being spent where. Not a manual one where I have to activate or tell it when I switch to a program but someth
-
Windows vista boot disc won't come out without booting on my macbook
how would i get the boot disc out with out it booting the installer for windows. and i just got this macbook yesterday bexause my other one didn't have a working optical drive it was doa. can some one help me?
-
Flash sites won't run...
For about the last 3 months or so I've been unable to view any Flash on websites - I just get the message telling me to install it. I've tried uninstalling and reinstalling - that made no difference however after reinstalling the Abobe Flash page run
-
What is the maximum capacity GE40 can support in mSata raid 0 ?
Two 256GB mSATA SSD supported ? Or just 128*2