Info object Global routine
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 line
Hi Sri,
This would be helpful to you.
Data: de_zebay(15) type c value '000099999911223', " here i have given default value as 15 digits: 000099999911223
de_zebay1(15),
de_zebay(15).
de_zebay1 = de_zebay3(6). "This will read 6 characters from 4th char onwards and place it to de_zebay1+
de_zebay2 = de_zebay12(3). "This will read 3 characters from 13th char onwards and place it to de_zebay2+
concatenate de_zebay1 de_zebay2 into de_zebay.
result = de_zebay.
Output: 099999223
Similar Messages
-
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 -
Info Object conversion routine
Hello,
I have a very simple question.
I have an infoObject which suppose to save texts. I dont care which kind of text is it. It can be anything. in the infoObject i removed the conversion routine and didnt put an X in the "lowercase letters" checkbox but still when i load data into the ODS the data cant be activated just because this infoObject have wrong charactaristics.
Please Advice,
DavidHi David,
allow lowercase letters or check out this one: /people/siegfried.szameitat/blog/2005/07/18/text-infoobjects-part-1
regards
Siggi -
BI end routine at transformation to populate info object by vlookup attribu
Hi ,
I am APO consultant working in Bi routines and I have the follwoing situation and need some guidance in ABAP code (routine) .
We sales info from markets as flat filea snd lod them into cubes. One of the filed is file is External sales Group: ZEXSGRP. This is an attribute or Sales Group info object ZSLSGRP.
We get external sales group populated in file when we upload the file into cube - I want to use end routine to vlook up the info infoobject table ZSLSGRP - all the external sales groups and use the matching value to write Sales Group (ZSLSGRP).Example if ZSLSGRP is NAM and it attribute is ZEXSGRP and has value N0000032. The file gets value N0000032 so the end routine should look all attribute of all infoobject ZSLSGRP and match the value and populate in example above it populates NAM.
Hope i am clear - can any help with this.
thaks
VarmaReplace your select statement ,
SELECT *
FROM /BIC/PZF31SALOFF
INTO CORRESPONDING FIELDS OF TABLE it_tab4.
instead of selecting all the fields , pick only the fields which are required.(one good performance improvement)
SELECT /BIC/PZF31SALOFF comp_code
FROM /BIC/PZF31SALOFF
INTO CORRESPONDING FIELDS OF TABLE it_tab4.
Remove the line below , this is not required
MODIFY it_tab4 FROM wa_tab4. -
List of Routines where info object is used
Hi all,
I would like to list all routines where a info object is used. Can anybody tell me how do I do it in BW.
Regards
NPRRSTSRULES & RSTRANROUTMAP in SE16
-
Accomodating date and time in a single Info object
Hi Gurus,
We are getting an R/3 field(2 fields) as "YYYY.MM.DD HH:MM:SS". And we have mapped that fields to a Two IO (CHAR).Data is getting loaded fine,but not getting it in the same format (with required DOTS and COLONS).Is there any routine that I can write for this IO.If any one have it ,please pass it on.
The two info objects are : ZCREATE & CHANGEDAT are mapped to "created_at" & "changed_at".
Please tell me step by step code.
Points wil be assured.
No idea on how to write a routine .
Urs,
Rakesh.Hi
i am getting an error after doing that.
E:Field "COMM_STRUCTURE-/BIC/ZCREATE" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement.
Below is my Code.
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
data l_ZCREATE LIKE COMM_STRUCTURE-/BIC/ZCREATE.
data l_ZCREATE1 LIKE COMM_STRUCTURE-/BIC/ZCREATE.
data : l_year(4) type c,
l_mon(2) type c,
l_day(2) type c,
l_hh(2) type c,
l_mm(2) type c,
l_ss(2) type c.
$$ end of global - insert your declaration only before this line
$$ begin of routine - insert your code only below this line -
IF NOT COMM_STRUCTURE-/BIC/ZCREATE IS INITIAL.
l_/bic/ZCREATE = COMM_STRUCTURE-/BIC/ZCREATE.
l_year = l_ZCREATE+0(4).
l_mon = l_ZCREATE+4(2).
l_day = l_ZCREATE+6(2).
l_hh = l_ZCREATE+8(2).
l_mm = l_ZCREATE+10(2).
l_ss = l_ZCREATE+12(2).
concatenate l_year '.' l_mon '.' l_day ' ' l_hh ':' l_mm ':' l_ss
into l_ZCREATE1.
RESULT = l_ZCREATE1.
ELSE.
RESULT = COMM_STRUCTURE-/BIC/ZCREATE.
ENDIF.
RETURNCODE = 0.
Please Correct me where its wrong.
Urs,
Rakesh.
null -
Hi All,
We are implementing BW. The Vendor and Document date info objects are not mapped directly to SAP R/3. Hence the data is not updating directly fromR/3 for these info objects. So I have written a small transfer routine to update the info object. But it is not getting updated with this routine. I am not sure where the problem is. Any ideas why?
The following is the code of transfer routine. There are two infosources: communicaoin structure and Transfer structure. I wrote the routine in transfer structure. This routine is written for the info object Vendor.
PROGRAM CONVERSION_ROUTINE.
Type pools used by conversion program
TYPE-POOLS: RS, RSARC, RSARR, SBIWA, RSSM.
Declaration of transfer structure (selected fields only)
TYPES: BEGIN OF TRANSFER_STRUCTURE ,
InfoObject SL_ACTIV: CHAR - 000004
ACTIV(000004) TYPE C,
InfoObject SL_AWORG: CHAR - 000010
AWORG(000010) TYPE C,
InfoObject SL_AWTYP: CHAR - 000005
AWTYP(000005) TYPE C,
InfoObject 0ACDOC_NO_F: CHAR - 000010
BELNR(000010) TYPE C,
InfoObject 0PSTNG_DATE: DATS - 000008
BUDAT(000008) TYPE D,
InfoObject 0ITEM_NUM: NUMC - 000003
BUZEI(000003) TYPE N,
InfoObject 0CHRT_ACCTS: CHAR - 000004
CHARTACCTS(000004) TYPE C,
InfoObject 0CREATEDON: DATS - 000008
CPUDT(000008) TYPE D,
InfoObject SL_CPUTM: TIMS - 000006
CPUTM(000006) TYPE T,
InfoObject 0CREDIT: CURR - 000017
CREDIT(000009) TYPE P,
InfoObject 0CURRENCY: CUKY - 000005
CURRUNIT(000005) TYPE C,
InfoObject 0CURTYPE: CHAR - 000002
CURTYPE(000002) TYPE C,
InfoObject 0DEBIT: CURR - 000017
DEBIT(000009) TYPE P,
InfoObject SL_DOCCT: CHAR - 000001
DOCCT(000001) TYPE C,
InfoObject SL_DOCLN: CHAR - 000006
DOCLN(000006) TYPE C,
InfoObject SL_DOCNR: CHAR - 000010
DOCNR(000010) TYPE C,
InfoObject SL_DOCTY: CHAR - 000002
DOCTY(000002) TYPE C,
InfoObject 0FISCPER: NUMC - 000007
FISCPER(000007) TYPE N,
InfoObject 0FISCVARNT: CHAR - 000002
FISCVAR(000002) TYPE C,
InfoObject SL_LINET: CHAR - 000005
LINETYPE(000005) TYPE C,
InfoObject SL_LOGSYS: CHAR - 000010
LOGSYS(000010) TYPE C,
InfoObject SL_POPER: NUMC - 000003
POPER(000003) TYPE N,
InfoObject 0QUANTITY: QUAN - 000015
QUANTITY(000008) TYPE P,
InfoObject 0UNIT: UNIT - 000003
QUANUNIT(000003) TYPE C,
InfoObject 0GL_ACCOUNT: CHAR - 000010
RACCT(000010) TYPE C,
InfoObject 0COMP_CODE: CHAR - 000004
RBUKRS(000004) TYPE C,
InfoObject 0COSTCENTER: CHAR - 000010
RCNTR(000010) TYPE C,
InfoObject SL_REFACT: CHAR - 000004
REFACTIV(000004) TYPE C,
InfoObject SL_RFDCCT: CHAR - 000001
REFDOCCT(000001) TYPE C,
InfoObject SL_RFDCLN: NUMC - 000006
REFDOCLN(000006) TYPE N,
InfoObject SL_RFDCNR: CHAR - 000010
REFDOCNR(000010) TYPE C,
InfoObject SL_REFRYR: NUMC - 000004
REFRYEAR(000004) TYPE N,
InfoObject SPL_CUR1: CUKY - 000005
RTCUR(000005) TYPE C,
InfoObject 0VERSION: CHAR - 000003
RVERS(000003) TYPE C,
InfoObject SPL_CUR2: CUKY - 000005
RWCUR(000005) TYPE C,
InfoObject 0FISCYEAR: NUMC - 000004
RYEAR(000004) TYPE N,
InfoObject 0CO_AREA: CHAR - 000004
RZZKOKRS(000004) TYPE C,
InfoObject 0PROFIT_CTR: CHAR - 000010
RZZPRCTR(000010) TYPE C,
InfoObject 0PACCOUNT: CHAR - 000010
SACCT(000010) TYPE C,
InfoObject 0PCOMP_CODE: CHAR - 000004
SBUKRS(000004) TYPE C,
InfoObject 0PART_CCTR: CHAR - 000010
SCNTR(000010) TYPE C,
InfoObject 0POSTXT: CHAR - 000050
SGTXT(000050) TYPE C,
InfoObject SL_PPRCTR: CHAR - 000010
SZZPRCTR(000010) TYPE C,
InfoObject SL_TMSTMP: DEC - 000015
TIMESTAMP(000008) TYPE P,
InfoObject 0SALES: CURR - 000017
TURNOVER(000009) TYPE P,
InfoObject 0RECORDMODE: CHAR - 000001
UPMOD(000001) TYPE C,
InfoObject 0USER_NAME: CHAR - 000012
USNAM(000012) TYPE C,
InfoObject 0VTYPE: NUMC - 000003
VALUETYPE(000003) TYPE N,
InfoObject 0VALUATION: NUMC - 000001
VALUTYP(000001) TYPE N,
InfoObject SL_WSDAT: DATS - 000008
WSDAT(000008) TYPE D,
InfoObject SL_SPLTMD: CHAR - 000001
XSPLITMOD(000001) TYPE C,
InfoObject 0ASSET_MAIN: CHAR - 000012
ZZANLN1(000012) TYPE C,
InfoObject 0ASSET: CHAR - 000004
ZZANLN2(000004) TYPE C,
InfoObject 0DEBITOR: CHAR - 000010
ZZKUNNR(000010) TYPE C,
InfoObject SL_ZZLFNR: CHAR - 000010
ZZLIFNR(000010) TYPE C,
InfoObject SL_ZRPRCR: CHAR - 000010
ZZREPPRCTR(000010) TYPE C,
InfoObject SL_ZTCDE: CHAR - 000020
ZZTCODE(000020) TYPE C,
InfoObject 0REF_DOC_NO: CHAR - 000016
ZZXBLNR(000016) TYPE C,
END OF TRANSFER_STRUCTURE .
Global code used by conversion rules
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
$$ end of global - insert your declaration only before this line -
FORM COMPUTE_CREDITOR
Compute value of InfoObject 0CREDITOR
in communication structure /BIC/CSSPL_LINE
Technical properties:
field name = CREDITOR
data element = /BI0/OICREDITOR
data type = CHAR
length = 000010
decimals = 000000
ABAP type = C
ABAP length = 000010
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_CREDITOR
USING RECORD_NO LIKE SY-TABIX
TRAN_STRUCTURE TYPE TRANSFER_STRUCTURE
G_S_MINFO TYPE RSSM_S_MINFO
CHANGING RESULT TYPE /BI0/OICREDITOR
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 SINGLE CREDITOR FROM /BIC/AAPOSLVEN00
INTO RESULT
WHERE /BIC/SL_RFDCNR = TRAN_STRUCTURE-REFDOCNR.
IF SY-SUBRC NE 0.
CLEAR RESULT.
ENDIF.
returncode <> 0 means skip this record
RETURNCODE = 0.
abort <> 0 means skip whole data package !!!
ABORT = 0.
$$ end of routine - insert your code only before this line -
ENDFORM.
FORM INVERT_CREDITOR
Inversion of selection criteria for InfoObject 0CREDITOR
This subroutine needs to be implemented only for SAP RemoteCubes
(for better performance) and for the Report/Report Interface
(drill through).
--> I_RT_CHAVL_CS Ranges table for current InfoObject
--> I_THX_SELECTION_CS Selection criteria for all other InfoObjects
<-- C_T_SELECTION Selection criteria for fields of
transfer structure
<-- E_EXACT Flag: Inversion was exact
FORM INVERT_CREDITOR
USING I_RT_CHAVL_CS TYPE RSARC_RT_CHAVL
I_THX_SELECTION_CS TYPE RSARC_THX_SELCS
CHANGING C_T_SELECTION TYPE SBIWA_T_SELECT
E_EXACT TYPE RS_BOOL.
$$ begin of inverse routine - insert your code only below this line-
DATA:
L_S_SELECTION LIKE LINE OF C_T_SELECTION.
An empty selection means all values
CLEAR C_T_SELECTION.
L_S_SELECTION-FIELDNM = 'REFDOCNR'.
Selection of all values may be not exact
E_EXACT = RS_C_FALSE.
$$ end of inverse routine - insert your code only before this line -
ENDFORM.
Thanks for the great help,
Sobhan.Hi manoj,
Welcome to SDN!!
Check this blog:
/people/sap.user72/blog/2005/09/05/sap-bw-and-business-content-datasources-in-pursuit-of-the-origins
Bye
Dinesh -
Replacing Info Object In Infocube
Hi,
I am working in development for Purchasing and I am using standard Info objects, transfer rules, Update Rules, and Infocube.Data already contains in Infocube and queries are executing.
Now we want to add 0GN_VENDOR TO 0VENDOR in update rules so that Vendor values will global.
I tried to map in update rules but I cant find 0GN_VENDOR in UR, I already included 0GN_VENDOR in the infocube under 0VENDOR dimension.
Please some tell me wht I am trying to do is right or wrong, if so please give me the idea to solve this issue. Let me know if you need some more help.
Regds
Dave.Hi Bhanu, and Kalyan,
Thanks for quick reply, Here our requirement is like we want to keep the attributes of 0GN_VENDOR and 0VENDOR values globally. For example in the reporting we can use attributes of 0GN_VENDOR as well.
Here I want two vendors attributes values in the reporting. One vendor I can directly map to 0VENDOR and other to use UPDATE ROUTINE and START ROUTINE which just brings Vendor values using select statement so that I can use attributes of both Vendors.
If I remove 0VENDOR value than I wont get the data of vendor so .
Please let me know if you any more information.
Thanks
Dave. -
" COMBINING TWO INFO-OBJECTS ! "
Hai Friends ,
I am having 2 info-objects : Info-object1 - length 60, Info-objec2 - Length -30. I have to combine these two Info-objects . Let anyone know me the procedure forcombining these two Info-objects : Info-object1,Info-object2 .
Waiting for your reply .Hi,
Create the infoobject which contain the string.
if CHAR1 is 30 and CHAR2 is 60, your new infoobject should be 90.
In the transformation/update rule you concatenate the two infoobject.
Concatenate is a function which is available in the formula builder, no ABAP needed
In the Routine you reference at the uploaded Data with:
concatenate COMM_STRUCTURE-infoobject1
COMM_STRUCTURE-Infoobject2
into RESULT.
Thanks & Regards,
Vipin -
Error while creating Info Object in Info object catelog
Hi experts,
I'm making few info object in info object catelog but while activating system giving error mesage as "Error when generating master data routines"
can any one tell what's the problem and what needs to be done.
SumantraHi
let me know weather r u using any reference object which contain the routinee.
regards,
chandra. -
Error when assigning SID while uploading text in the info-object of the DSO
Hi
I have a scenario where I need to extract a char 60 field from R/3 in the DSO.
I have created the info-object which is char 60 which has the master data text activated.
In the DSO transformation I have mapped it to the R/3 field.
While activating the data in DSO its giving the error message
'Value '20 per action plan' (hex. '32302070657220616374696F6E20706C616E') of characteristic'
'Error when assigning SID: Action VAL_SID_CONVERT InfoObject ZRMSD '
How to overcome this issue.
Please advise.
Thanks in advance.Change the InfoObject for this text so that it will allow lowercase letters. To do this, go into Change mode on the InfoObject, go to the General tab, check the Lowercase letters checkbox and activate the InfoObject. After this has been activated, you can then restart your process and this SID violation error should no longer be thrown for this.
If you don't want to do this, then you can use the TOUPPER formula in the Characteristic Routine, in the Transformation, to change the value of this field contents to uppercase. This can also be done by using an ABAP routine like this:
TRANSLATE column TO UPPER CASE.
Edited by: Dennis Scoville on Nov 3, 2009 9:55 AM -
Strange behaviour of Removal of Alpha for Info object in Quality system
Strange behaviour of Removal of Alpha for Info object in Quality system as compared to Development system.
Hi,
The data for an info object Key in the DSO was 00000000000000000000000000123. I removed Alpha for the info object and data was corrected to 123 in the DSO in development system.
Now, when i transported the info object without alpha to quality and loaded data into DSO, the data is still the same with leading zeros.
I dont want to write routine to remove leading zeros, as I have values as 0. If i write routine, all zeros will be removed and this will be blank.
Both development and quality have same patches applied and are on same level.
Why is this strange behaviour in quality system...
Any inputs?? please suggest.
Thanks.
LavanyaHi,
Did you drop and reload the data after changing the conversion?
Regards,
Raghavendra. -
How to load Data in Info Object
Hi, i have a info-object Called "TYPE"
the value for this is always going to be "S1".
I dont want to add it manually as i want this data to get filled up automatically when transported.
the other objects i either get it from R/3 data source or Flat file.
Should i use a flat file to load this single data ???
Thanks,
GGHello GG NN,
How r u ?
You could do this in the Transfer Rules, Click the EDIT TRANSFER RULES(Triangle with Grid) icon opposite to the InfoObject. It will show some options like InfoObject, Constant, Routine and Formula.
Select Constant and enter the "S1" value and CONTINUE.
SAVE & ACTIVATE the InfoSource.
***No, the source may be anything, the value "S1" will be transferred for this InfoObject by the Transfer Rules.
Best Regards....
Sankar Kumar
+91 98403 47141 -
Urgent::::Data is not loaded for a perticular info object in ods
Hi All,
We have loaded data into an ODS( 0PRC_DS01) in development server. It was successfully loaded into it all info objects.Reports were working well.
When we transported it to production, data loading was taking longggg time (15000 for 9 hours).So, we have done two things to improve the loading speed.
1) we have created an index based on the fields in the where clause RCLNT,RLDNR,RYEAR, DOCNR, POPER in JVSO1 table.
(JVSO1 is an R/3 table from where key data coming to datasource 0EN_JVA_2.)
2)We have updated the optmizer statistics.
Now the problem is, data is not loaded to one perticular info object JOINT VENTURE PARTNER in dso. Which was loaded successfully in development.
Please help us........We will assign points for helpful answersHi Chek in the transfer and update rules whether u mapped the fields with target and also check whether u have routine. and check whether the data is coming for that object from the source.
Khaja -
Query on Time Dependent Info object
Hi ,
I am trying to create a query out of a time dependent info object.The info object is 0employee and since it is time dependent it has the date from and date to automatically in the infoobject master data. However these fields do not come up as characteristics when a create a query out of this infoobject.
Can you please let me know why or am I missing something ? I know I can get it if i use it in a cube or DSO but i want to create from this infoobject. Please help.
Thanks ,
Regards
Ashwin GHi
0employee_attr datasource have start and end date is mapped 1:1. target is 0employee? but when i check at 0employee attribute tab i have seen any start and end date attributes.
If you have it in attr u should be able to assign as read from master data.
Otherwise routine will be
SELECT STARTDATE from /BI0/MEMPLOYEE where employee = source_fields-employee.
for start date and
SELECT ENDDATE from /BI0/MEMPLOYEE where employee = source_fields-employee.
for enddate
Reagards,
Nagaraju.V
Maybe you are looking for
-
HP Photosmart 3310 - Scanner not working over Bonjour since 2.1 update
My HP3310 is connected to my Time Capsule via Ethernet to allow it to be used by my iMac and a Macbook. After I updated to OSX 10.6 I had a few problems but eventually I was able to get my 3310 working as a printer and a scanner with both Macs connec
-
ACL Best Practice - On the Internet interface
I have a question relating to ACL's on a routers 'Internet' facing interface. Further to reading several whitepapers on the topic, a recommended ACL would typically contain the following statements. In addition, the Cisco SDM automatically generates
-
Hi Guys, I have 2 data sources in my Webi report that have the same columns inserted in the form of a Section. The column names are - Employee Name & No. of Projects. No. of Projects = Count (Project Name). Project Name is a merged dimension. Projec
-
Can't remove photos from album? Photos are stored in their current location, iphoto
Can't remove photos from Aperture album unless I send them to Trash? Photos are stored in their current location, iphoto
-
Not all photos in icloud restore
I have just restored my new iphone 5 to icloud but not all my photos have turned up. There are a few from a couple of years ago and some recent photos, but its still missing the ones inbetween. How can i get these if possible?? This restore has tak