To refer logical source in update rules
Hi,
I wanted to find the logical source system using abap into my update rule, is it possible.
Help would be appreciated.
Thanks,
SD
Hi,
you have only to write something like this:
case sy-sysid.
* development system
when 'dev1'.
result = 'r3_dev'.
* test system
when 'test1'
result = 'r3_test'.
endcase.
dev1 and test 1 are your bi systems. When data comming from one source system you can use this code in each transformation.
Regards
Andreas
Similar Messages
-
"Master data attr. of" un change source of update rule.
hi,
What is the importance of following in "change source" (characteristics) in update rules.
1. master data attr. of
2.initial value
3. Source chars
4. constant
When and why these are used.
Thanks in advance.
Regards,
AvneetHi Avneet,
Lets say Material group is an attribute of 0MATERIAL. You cube contains Material and also Material Group as a separate characteristic (not as navigational attr) becasue you want to store the value of material group as it was during the time the transaction happened.
But here you transactional data coming from the source brings Material values, not values of Material Group. So in the update rule for Material Group, you can specify "Master data attribute of" 0MATERIAL. What the system will do is take the value of 0MATERIAL on this record and populate Material Group taking the value that is present in Material Master data.
So if Material = M100 and Material Group is MG01 in master data, it will supply MG01 to Material Group char in the cube.
Hope this helps... -
Find break-points source code (update rules, transfer rules)
Hi all,
Is there any effective and efficient way to find (active) break-points in source code, more specfic update rules, transfer rules or other objects where custom code is implemented? Or in other words look for strings in source code or programs.
I looked and searched everywhere but could not find any answer.
RSRSCAN1 (does not work)
RPR_ABAP_SOURCE_SCAN (does not exist)
We are on SAP BW 3.5 with SAP Basis 640.
Thanks all.Hi,
Try this
1) if you're checking any program from SE38 ..goto Utilities -> find in the source code-> give breakpoint and search.
2) else. load data , Goto details tab in the monitor and right click on any of the data packages.
Simulate update -> choose transfer rules or update rules for debuging.-> It will take you debuging screen. -> Create a watch point with key word "break-point" and execute (F8).
It will go and stop where there is "break-point" -
Update rule could not be found during business content activation
Dear BW experts,
I am having an issue activating business content for an update rule (2LIS_03_BX) for 0IC_C03. Below is a log of the error. It seems like the system is not recognizing the update rule for some reason. Can somebody please help shed some light on this.
Installation (simulation mode) of: Update Rules (UPDR)
Transfer/Merge of the Content Version (Object Type Update Rules )
Object Update Rules BW9VUFZSUYTTIZS0HT9I4U3RP: Installation of the Content Version
Transfer update rules IC: 0IC_C03 / IS: 2LIS_03_BX
Object UPDR BW9VUFZSUYTTIZS0HT9I4U3RP could not be found
Transferring the 1 objects from type UPDR took 1.2 seconds
Post-processing of Objects after activation
The post-processing lasts 0.0 seconds
Thank you.
AndrewRavi,
Thanks for you reply. I checked the underlying cube (0IC_C03) and the info source (2LIS_03_BX) and they are both active. I didn't choose the option in data flow before and after because it would have brought way too much contents which I don't need. Instead, I only activated the info source and update rule individually. All three info sources (2LIS_03_BF, BX, UM) and the info cube were successfully activated. I am only having problem with the update rule.
Any other ideas?
Thanks,
Andrew -
Update Rule Problem for conversion char values
Hi all,
I need to implement the following logic into the update rule:
data: ch1(10) type c,
ch(8) type c.
ch = ch1.
The value in ch1 can be only characters or only numbers. I am facing problem in converting this, as characters are left aligned and the numbers are right-aligned.
Please guide.
ThanksAnother example can be:
data: ch1(10) type c,
ch(8) type c,
ln type n.
ch1 = '0000000010'.
condense ch1.
ch = ch1.
write:/ ch1, '-----', ch.
In this case, we get only 0 in ch field.
Thanks, -
Need to create a transformation based on Update Rules Logic
Hi,
I have an existing complex Update Rule. I need to manually create a Transformation based on this Update Rule logic. The Start Routine of the Update Rule comprises of:
1) All data declarations in the Global Area
2) The local coding area consists of various select statements from various r/3 tables used later for mapping. It also calculates and stores values in the Data Package final internal table for few infoobjects that are not present in the Source object but and are used to populated data in the target.
3) then we have the various one to one individual Infoobject mappings/constants and many individual infoobject routines that pick result from the comm_structure
I am not very clear as to where each of the above coding logic should be put in the transformation coding area...... I can see four main coding areas in the transformation....global area, 2nd Global Area, Method Start_Routine and Method Inverse_Start_Routine........... I think the global data declarations(point 1 above) should be put in the Global declaration area of the start routine. The local area of the update rule logic (point 2 above) that contains select statements should be put in 2nd Global part or should it be put in Method Start_routine????? Point 3 above for individual filed mappings will be done through Rule groups. Also can anyone let me know what is the methos inverse_start_routine used for?????
Thanks.Hi,
Point 1 you mentioned should be put under2nd Global declaration part of start routine.
Point 2 should be put under Method Start_routine.
Point 3 as you only mentioned can be done by individual field rule mappings.
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)
Not very clear though about Inverse routine. But definetly not being used for the case you mentioned.
Hope it helps. -
Feasibility of update rule logic
I have the following scenario:
I have a DSO which stores a number of records and stores a value for a revenue KPI. This DSO mainly stores item data and we now would like to include the records which are in the header DSO but not the item DSO and give them a zero revenue.
Is it best that I select all the data from the header DSO as part of the start routine logic or is there a better way in which I can collect the missing records?
ThanksHi,
Looking up the item DSO will be too much performance oriented and may result in long time for loading.
Do a look up on header DSO while loading the item DSO and select the records from the header which are not equal to the records in the delta package...and then populate them in the item DSO with the flag.
But this may require you to reload the whole data in the item DSO again...may be you can do this by creating a self update rule to the item DSO and run it for once to maintain the history
schedule the delta daily from the data source to manage the changes.
Thanks
Ajeet -
Source System Assignment in Update rules
Hello Friends,
Good Day....
I need to extract both transaction data and master data from four different source systems and the data is also different from one soure system to another system.
In BW iam using same infoobjects and the transfer rules,update rules and the datatargets are different. so how can i differentiate data from one system to another system with the same info objects.
<i>where can i do the code can we do that in update routines?
or do we need to do compounding?</i>
sorry friends if i am asking an easy question got confused here....please let me know if any solution.
Regards,
Ala.Ala,
You could use the client number as a key field / dimension to uniquely identify the records , als you can look out for this info Object called LOGSYS whish if present will get updated by the logical system name or have an infoobject for the same and since your transfer rules will be different for each , have the IOBJ populated by a constant depending on the client and then update the data to the data targets , that should solve your problem.
Hope it helps..
Arun
Assign points if helpful -
Simple creation of Update Rule from BW Data Source
Hi guys,
Pertaining standard SAP Business Content extractors
I am referring to <b>InfoCube : 0PA_C01(Headcount and Personnel Actions)</b>
I am attempting to<u> create </u>an <b>Update Rule</b> from <b>Info Source : 0HR_PA_PA_1(Headcount)</b>
This <b>Info Source : 0HR_PA_PA_1(Headcount)</b> is connected to <b>BW Data Source</b>(Not R/3!) 0HR_PA_PA_1
I have created an Info Package for this Info Source and managed to get 15 records{In Contrast to my 68800 Records from Info Source : 0HR_PA_0(Employee)}
So, when I create an Update Rule to Connect <b>Info Cube: 0PA_C01(Headcount and Personnel Actions)</b> to <b>Info Source to Info Source : 0HR_PA_PA_1(Headcount)</b>, I get the following error
ERROR : <b>IC=0PA_C01 IS=0HR_PA_PA_1 error when checking the update rules</b>
Could you please also advice, why do I only get 15 records for Data Source 0HR_PA_PA_1 ?
P/S : I am on BW 3.5Hey Rohini,
This <b>Data Source: 0HR_PA_PA_1(Headcount)</b> is tricky to me because it`s a BW Data Source.
Exact Error Message is as follows :-
"<b>Error Message : RSAU461
IC=0PA_C01 IS=0HR_PA_PA_1 error when checking the update rules</b> "
My Exact Problem is that I don`t see any values for the following fields in my Info Cube : 0PA_C01(Headcount and Personnel Actions)
Country;
Country Code;
Gender;
Nationality;
Language;
Postal Code;
Region;
Position;
Job;
Payroll Area;
Payroll Group;
Pay Scale's;
Pay Grade's
This is because, this information is supplied by InfoSource : 0HR_PA_PA_1
But I don`t have an Update Rule for this InfoSource in my InfoCube : 0PA_C01
So, that's why I am attempting to create this additional Update Rule
<i> And also, could someone enlighten me why would SAP not include such a standard Update Rule when they have already idenfied those needed fields in a Cube ? This is suppose to be a STANDARD workable Business Content right ?</i>
P/S: I have applied Note : 336229 -
While creating Update rules -"Error Info source does not exist"
While creating an update rule I am getting an error that Info source doesnot exist though the inf source is active.
here is error:
No communication structure exists in version abc... A
Message no. RSAU251
Diagnosis
In order to be able to maintain the update rules an active communication structure must be available.
Procedure
This error message can have two causes.
No active communication structure exists.
Activate the communication structure in the Data Warehousing Workbench.
No communication structure exists for the InfoSource.
Create a communication structure in the Data Warehousing Workbench for the InfoSource.
<<text removed>>
Thanks,
Vasu
Edited by: Matt on Apr 26, 2010 9:31 AMHi Vasu,
as it clearly shows below message
No communication structure exists for the InfoSource.
Create a communication structure in the Data Warehousing Workbench for the InfoSource.
Create an info source first and assign it to your datasource and map the fileds in transfer rules and activate it.
Then try to create the update rules between your target and info source.
Hope this helps.
Regards,
Reddy -
ABAP assistance - start routine logic in update rule
I have used an existing update rule and have based my logic around the same. The purpose of the rule is to look up customer master data and get a subset of customer numbers from the transaction records so that the values for customer number from the transactional data will not be updated if it does not match with existing master data customer numbers.
The loads are full and we drop the data before we load.
I have listed the logic below (the number at the front is to be considered as the line number) and a list of open questions that I have thereafter:
Start routine logic:
1 DATA: l_index LIKE sy-tabix.
2 DATA: BEGIN OF ls_customer,
3 customer TYPE /BI0/OICUSTOMER,
4 objver TYPE RSOBJVERS,
5 END OF ls_customer,
6 lt_customer LIKE TABLE OF ls_customer.
7 REFRESH: lt_customer.
8 LOOP AT DATA_PACKAGE.
all customers from data package
9 ls_customer-custno = DATA_PACKAGE-custid.
10 ls_customer-objver = 'A'
11 APPEND ls_customer TO lt_customer.
12 ENDLOOP.
12 SORT lt_customer.
13 DELETE ADJACENT DUPLICATES FROM lt_customer.
14 IF NOT lt_customer[] IS INITIAL.
15 SELECT /BI0/OICUSTOMER RSOBJVERS
16 FROM /BI0/PCUSTOMER
17 INTO CORRESPONDING FIELDS OF TABLE lt_customer
18 FOR ALL ENTRIES IN lt_customer
19 WHERE ls_customer-custno = DATA_PACKAGE-custid
20 AND ls_customer-objver = 'A'
21 SORT lt_customer BY customer ASCENDING
22 ENDIF.
Questions
Line
1 - what is the purpose of this line? What is it that is being declared
2 - in some code I have seen this line with OCCURS 0 at the end what does this mean with and without the term?
4 - I am using the Data Element name is this correct or should I use the field name?
3 - 5 here I declare an internal structure/table is that correct?
6 - here I declare a work area based on the internal table is that correct?
7 - What would happen if I avoided using the REFRESH statement?
8 - 12 - Is this syntactically correct, I am trying to get a set of data which is the customer numbers which match the master data customers and the master data record is án active version and than appendíng to the work area?
13 - My understanding is this will reduce the number of records in the work area is this correct and needed?
14 - 22 I am trying to identify my required set of data but feel I am repeating myself, could someone advise?
Finally what logic would I actually need to write in the key figure object, could I use something like:
Result = lt_customer.
Thanks
Edited by: Niten Shah on Jun 30, 2008 8:06 PM1. This line is not required
2. OCCURS 0 is the OLD way of defining an internal table with that structure. As it is, it just defines a flat structure.
3. Data element is usually best
3-5 Yes
6. No. Here you are declaring a table of the type of the flat structure. Just as the ABAP says!
7. Nothing. But by putting this in, you ensure that you know the state of the table (empty) before you start looping through the data package
8-12. You can tell if it is syntactically correct by pressing Ctrl-F2 when in the editor. Looks ok.
13. Ensures your list of customers contains no duplicated. The code up to this point is building a list of all the unique customers in the data package.
14-22. Goes to the database and brings back ONLY those customers which are found in the master data. Looks ok.
This is a start routine (that's why you've got a data package). You don't use result. You should update the datapackage. But this you haven't done. Double click on the table name /BIC/PCUSTOMER to get the correct field names.
So you have to loop through the data package again, and check if the customer in the datapackage is lt_customer. If it is, fine, otherwise you blank it and report an error, or set an error message or whatever.
I wouldn't do it like this. I'd do something like this:
STATICS: st_customer TYPE HASHED TABLE OF TYPE /bi0/oicustomer
WITH UNIQUE KEY TABLE_LINE.
* st_customer retains its value between calls, so only populate if empty
* In one run of the infopackage, this will mean you do only one read of
* the master data, so very efficient.
IF st_customer IS INITIAL.
SELECT customer FROM /BI0/PCUSTOMER
INTO TABLE st_customer
WHERE objvers EQ 'A'. " Only active values
ENDIF.
* Go through data package
LOOP AT DATA_PACKAGE.
* Check whether the customer exists.
READ TABLE st_customer TRANSPORTING NO FIELDS
WITH TABLE KEY table_line = DATA_PACKAGE-custid.
CHECK sy-subrc IS NOT INITIAL.
* If you get here, the customer isn't valid. So I'm just setting it blank
CLEAR DATA_PACKAGE-custid.
MODIFY DATA_PACKAGE. " Updates the datapackage record
ENDLOOP.
Even this is not fully optimised, but it's not bad.
I strongly suggest that you get yourself sent on the basic ABAP programming course if you're going to do a lot of this. Otherwise, read the ABAP documentation in the help.sap.com, and, from the editor, get the cursor on each ABAP keyword and press F1 to read the ABAP help.
matt -
Aggregation rule ignored for Logical sources
Hi,
We are using materialized views as logical sources for our logical tables. These logical sources contain aggregated data at higher level for dimensions. However, we have a logical source at the most detailed level for the dimensions.
Problem: We OBIEE hits the correct logical source based on dimensions selected in answers, it does not apply the default aggregation rule.
For instance, if a measure has aggregation as AVG, then when the logical sources corresponding to aggregated tables are queried, OBIEE does not apply AVG function. However, it does apply the aggregation rule when it uses the logical source at the most detailed level.
I have specified the aggregation content properly for every dimension.
Any pointers to debug the issue will be helpful.
Thanks,Click on LTS of Table - Column Mapping - Select the logical column - click on expression - Put your logic here. You will get Aggregation rule is enalbed for the column.
Why ? -- Reason could be nested aggregation is not allowed. Aggregation on the normal column applied during query generation at run time. If you use that Agg.Measure to derive another Agg.measure server could not recognize it during runtime. -
Update rules, different source and target units (0BASE_UOM-- 0QVVMRA)
Hi,
I have a problem with update rules as I'm trying to map two keyfigures with different unit-types together. They are both kilograms (KG) but the source figure is defined as 0BASE_UOM and the target keyfigure is 0QVVMRA (Amount of sales).
How can I make this connection work? Do I have to use the 'Unit calculation in routine' -option or is there a more simple way? I a routine must ne written, please post an example or link to a thread which has one.
Thx!
-miikkaHi,
The Problem is that you are trying to connect a Key Fig for Type Quantity with the Key Figure Amount.
The Amount Key Fig will have either 0CURRENCY or Fixed Currency.
Using Update Rules Coding you could transfer the Value but you will have problems with the Currency. You cant store a Unit like KG in 0CURRENCY.
Regards. -
I am looking at an update rule to a DSO which also consists of start routine logic.
In the update rule a status object is derived using logic.
In the start routine there is some logic specific to the status object the details are as follows
Start Routine Logic (have not included definition of variables)
ls_c-status = <ls_c>-/bic/zstatus.
Logic in info object in the start routine
DATA:
l_status TYPE /bic/zstatus.
SELECT /BIC/Zstatus
INTO l_status
FROM /BIC/AZDSOLookup
WHERE
/BIC/ZKey_Field = COMM_STRUCTURE-/bic/zkey_field.
ENDSELECT.
RESULT = l_status.
CLEAR l_status.
The routine in the info object is making no reference to the variables defined in the start routine. Is that correct?
ThanksHi Edwin,
I think you are right I need to place in Global area/start routine I will post another question with details of requirements
Thanks -
How to Code "AND" logic in Update Rule?
Hi:
I have minimal ABAP knowledge and need some help....
I have to use the Query logic and code in my Update rule... (i.e. multiple conditions have to be met)
IF (COMM_STRUCTURE-Sales_Org = '100' AND COMM_Structure-Division = 'LA' AND COMM_STRUCTURE-Acct_Grp = '0120')
RESULT = COMM_STRUCTURE-Credit_Amoutn (I want to assign a specific KF)
ELSE
RESULT = 0 (I want to assign Zero)
ENDIF
I attempted this logic, but I keep getting an error with 'AND' statement. I am not sure what is the syntax.
Can someone please help me out with the logic/sytax
Thanks..... LeeHi:
I responded without checking the logic.... assuming it would work...!~
Unfortunately it gives me error:
QUOTE
E:Incorrect logical expression: ")" must be followed by "AND" or "OR" . .
UNQUOTE
Can anyone help me resolving this please....!!!!
Thanks... lee
Maybe you are looking for
-
Some, I can't open at all because of the error message. How do I fix this? I have tried syncing to iTunes, updating software, etc.
-
I am using a Dell Inspiron I8100 Laptop with Windows XP Home and am running LabVIEW 5.1 in Windows 95 compatability [I also did so for the install to get rid of the "wrong os" message]. I am able to use nearly all of the functions, but a few of them
-
SVS on model attribute bound to webservice from entity bean
Hi, i want to use an SVS on a model attribute. The model comes from a session bean, that talks to an entity bean. The problem is, that the model attribute has a type of longObject and i think that's the cause why SVS cant be used. The entity bean bel
-
Issue regarding authorization CRM 5.0
Hi Guys, Currently we are working in CRM 5.0. the issue we have defined a new Zrole and we assigned IS01(Problem and Solutions) this transaction should not allow the user to create or change always it should be in display mode.kindly suggest me what
-
Error message about Shared Technologies
Have tried many, many times to install Elements 12 and always same error message about Shared Technologies when install aborts. Never had problems installing previous versions of Elements nor problems with Lightroom installs. Very frustrating!!!!!!