ABAP needed: New Value/Old Value in Update Rules
Hi all
I'm updating some attributes in IObj by ABAP routine. Is it possible to get not only new value of attribute but the old one to compare them?
Is it possible to get others attribute old and new values?
I'll illustrate it with example.
Say, IObj has 3 attributes:
0ACC_GRP
0DT_FROM
0DT_TO
if NEW value of 0ACC_GRP <> OLD value of 0ACC_GRP then
new 0DT_FROM = SYSDAT
new 0DT_TO = old 0DT_FROM
else
new 0DT_FROM = old 0DT_FROM
new 0DT_TO = old 0DT_TO
My case quite simple I guess.
I got 0CUSTOMER infoobject and appended it with several time-dep attributes. After it my Update rules were deactvated. I got error message with prompt to fill out FROM_DATE, TO_DATE as key fields in every attribute (time-dependable and none time-dependable) while was trying re-activate Update Rules.
So, what's wrong with that? What I supposed to do with all those to/from date key fields in my Update Rules??
Edited by: Gediminas Berzanskis on Jul 2, 2008 3:44 PM
Similar Messages
-
Update open sales order values. - Update rule.
Hi
In library below information given for the updation of open sales order value in infostructure. Can any one please explaing how can we configure below two rules.
An update rule describes the set up of the open sales order value, i.e., the open sales order quantity. The second update rule describes the reduction of open sales order value, i.e., the open sales order quantity by the corresponding deliveries.
http://help.sap.com/saphelp_47x200/helpdata/en/96/dfec3410b5f563e10000009b38f83b/frameset.htm
Path: LIS - SIS - How the key figures are calculated - open sales order value.
Thanks in advance.
Raj.Any inputs please.....
-
New to ABAP -- Need help with any BAPI to update the vendor master record
I have a requirement to update the vendor master record ( ie purchasing block data inlfa1 and lfm1 table )directly. i have created the report but my problem is i am updating tables directly by using modify which is not correct according to SAP hence i want to use bapi whereby i can change the fields of the table. does anyone know any bapi which can modify the lfa1-sprem field and lfm1-sperm field. Plz hep me. They have specifically asked me to do it using BAPI's.
MAP2e_lfa1_to_bapivendor_04
MAP2e_lfa1_to_bapivendor_05
will be helpful -
How to fetch old and new value from of a field(non-key) from LOGDATA
Hello SDNers,
i m fecthing LOgdata from dbtlog table[in our case the log is not getting Updated in CDHDR and CDPOS table]
i m using the same logic as it is used in RSVTPROT
but the problem is
" IT is fetching OLD and NEW VALUE after Update from same field LOGDATA of dbtlog table BUT when i used same logic it is FEtching only OLD VALUEs,
CAN U GUYS PLS TELL ME HOW TO FECTH OLD VALUE and NEW VALUE of a PArticular field(non-key field, fecthing key field is not an issue) From LOGDATA field of DBTLOG.
thx a lot in advance
Regards
KuldeepHi,
May be this link is useful to you.
a® -
How do I get a new value for the service name field and update it in Connection Properties?
I am running Windows Vista. I just upgraded to Firefox 4. When I try to log on to the internet, it tells me the proxy server is refusing connections. A diagnostic reported Error 815 and said the remote server is not responding because there is an invalid value for the "Service Name" field. It said to get a new value and update it in Connection Properties. How do I do this?
When you create a new film script, the first page you see is a title page.
The page after this title page is the one where you generally type in your scenes.
It looks like you are facing some issue and not able to delete any text.
Can you please send me this script so that I can have a better look at your issue?
You can save this script to disk by using option 'File -> Save to disk'. This will create a '.stdoc' file on your system.
Just mail this '.stdoc' file to me at 'roverma <at> adobe <dot> com'
Thanks -
Variable update with new value
Hallo,
How can i a variable (XML Publisher Syntax <?variable:name?>) one new value assign/update.
e.g.
initialize: <?variable:name?>[value]<?end variable?>
[loop]
new allocate:
<?variable:name?>[value]+1<?end variable?> -> doesn't work
[end loop]
I use the XML Publisher syntax because i use before function "instr".
who can me help. please. I'm to despair.
Thanks for help
HolgerAs I understand you are looking for the Variable handling similar to X=X+1 , and you want to loop this from say 1 to 15.
- I think you just did not include the counter within the loop
- Also you are trying to loop on $YY, which first of all can not be accessed this way. You will have to use xdoxslt:get_variable($_XDOCTX, 'YY') . Secondly your loop should run against a group of data. It can be a variable like $YY but it should hold such a group of data.
so, assuming that your data is flat and grouped under ROW tag...
<?xdoxslt:set_variable($_XDOCTX, ’YY’, 1)?>
<?for-each:ROW[position()<16]?>HELLO
<?xdoxslt:set_variable($_XDOCTX, 'YY', xdoxslt:get_variable($_XDOCTX, 'YY') +1)?><?xdoxslt:get_variable($_XDOCTX, ’YY’)?>
<?if: (xdoxslt:get_variable($_XDOCTX, ’YY’))=15?>Yes Yes<?end if?>
<?end for-each?> -
Need hints to bring BC400(ABAP) knowledge to BW update rules/routines.
Hi,
I have just completed the BC400 (ABAP) course at SAP but the instructor had no clue about BW.
From se80, he thought how to create packages, programs, functions modules, classes/Interfaces, etc. but whenever, I asked how these fit into the BW update rules and transfer rules, he said he knew nothing about BW.
For example, how do I bring in a program written in se80 into my update rule or transfer routine which updates and ODS or cube?
i.e. The main reasoning for learning this BC400(ABAP) is to be comfortable in writing update rule or transfer routine to update ODS/Cubes in BW but the instructor failed me in making the link between the ABAP class and BW.
Can you give me some guide on this?
Can I work in se80 as I was taught and bring codes from there to update a cube?
i.e. if I need to write an update routine to update a cube from an ODS, can this be done in se80 (on BW)
I will appreciate any guidelines to bring in my new found knowledge to the BW environment.
ThanksMost Bw transformations are already includes inside programs or cmods or BTEs
By double cliking on start routines and end routines it already takes you into the ABAP enviroment
Have a look at the sappress book - user exits and BADIs in BW (it's not a brillaitn book by any means - it's just about passable and is short on detail - but it will get you a head start) -
ABAP Help needed with update rule
I have created a new keyfigure A and a new keyfigure B in 1 update rule, derived from basic keyfigures. Keyfigure C is calculated by adding A and B together...in the same updaterule.
keyfigure A and B are filled (recalculated ) as expected but keyfigure C remains empty. Can anybody tell me why?
regards,
tomHi Tom
I think you have written a update rule for all the three keyfigures A, B and C.
When you write an update routine it is local and the value returned by any routine or calculation can not be accesed by other keyfigure. The Key Figure C will be calculated with values of A and B from the datapacket which are both SPACE(not from the values returned by update routines of A and B). so value of C will always be SPACE or Empty.
To solve the problem write Start Routine for calculating A B and C
Please assign points if helpful.
Neelima
Message was edited by:
Neelima Ravipati -
ABAP code in update rules to convert the date
Hi,
Could any one send me the ABAP code that is written in the update rules to convert the date (DD/MM/YYYY -- lenght 10) to YYYYMMDD --- length 8 format.
Also please let me know where I should write this code; while creating update rules or while creating infosource.
Thanks,Hi Bharath,
Hi Bharath,
I suggest you do the conversion of dates in the transfer rules. Here is the correct code you need:
* Assuming the source data field is called MYDATE
* Place the ff. in the routine in the transfer rules:
concatenate tran_structure-mydate+6(4) tran_structure-mydate+3(2) tran_structure-mydate(2) into result.
replace MYDATE with the name of the source field (10 chars) in the transfer structure. Hope this helps. -
URGENT !!! - ABAP code in update rule
Friends,
With my limited knowledge in ABAP, I need some help from the forum.
I need to create a routine in update rule to capture 'date of last GR against a PO delivery schedule'. Let's say
PO # 1234
IT # 10
SCL # 1
There are multiple partial deliveries against SCL # 1 above and I have to capture the last delivery date and subsequently the last invoice date. If I try to set the rule to capture the 'posting date' based of 'transfer type' - the GR date field gets overwritten by the last invoice date (the date of last activity). My requirement is to separate the two i.e.
1) Date of last GR against PO - Item - SCL line
2) Date of lasr INV against PO - Item - SCL line
Can any one help me with the code ???
Thanks,
AKHi,
check the following link, gives an example of an update routine.
http://help.sap.com/saphelp_nw70/helpdata/en/80/1a64fae07211d2acb80000e829fbfe/frameset.htm -
Can someone give me an example for each of the different Update types Addition, maximum, minimum and No update?
Can you give an example of a key figure for each different method? I assume most key figures would use the Addition type because you want to aggregate data for a specific combination of a number of characteristics. Where would we use the other three options?
thanksRegarding Info cubes, based on the aggregation type u choose for the Key figure ,
the new values are updated in the Info cube.The aggregation type like Addition, Minimum and Maixmum determines how ur key figures are going to be updated if the primary keys are same.If u r not choosing anything, automatically Addition is selected. If u choose No update means the key figures are not updated ,no records are written in the InfoCube with the first data transfer, or that data records that already exist, will remain in place with subsequent transfers.
Regarding Infoobejcts , only the Overwrite option is available , so only new values are going to be updated.
Regarding ODS, we have Overwrite, Minimum, Maximum. Baseed on the aggregation type u choose the key figure values are going to be updated in to the ODS. Overwrite determines the delta capability for example take sales doc no and quantity as 1 and 10 during the first load. in the second if u r loading 1 and 15, then in ODS first load values are going to be overwritten by the second load process.hope this helps. -
Inactive connection in update rules
Hello,
How do I update my update rules for 0MATERIAL_ATTR in the production system (BW prod)?
I have attempted to transport the update from dev. I have the info object in the uodate rules, but not the connection to the source field.
How do I get the connection active in the update rules?
Best regards,
FredrikFrederik,
create new transport from DEV for Update Rules( Make some change in the description or some space in the routine). Transport this request to production it will be rectified.
or try to import the previous transport again. When cube gets changed UR get deactivated. Try to reactivate the UR either by creating new transport or reimport the old one.
Last week i faced the same problem. i reimported the same transport i sloved my problem. one time i created new transport for UR, i imported in Production it's activated my UR.
all the best.
Regards,
Nagesh Ganisetti. -
Missing Update Rules for 0IC_C03 in Business Content
We had a problem with 0IC_C03, so we decided to reload from Business Content and then migrate to 7.0 format again.
However, when we try to gather all of the dependent objects for the InfoCube in Business Content, we only get one set of obsolete update rules (2LIS_40_S278), and the update rules for 2LIS_03_BX, 2LIS_03_BF, 2LIS_03_UM do not show up. They do not appear under update rules, either.
I know they were there at one point because I activated and migrated the cube once already.
Can someone help us find our lost update rules?Hi Dan,
There are no update rules deliverd with BI 7.0 for 0IC_C03. There are only
transformations Delivered as part of the content. In the new release
Transformation replace the update rules and the transfer rules.
You have the 3 data sources and the associated transformations to
upload data to the infoCube.
Transformations installed
TRCS 2LIS_03_BF_TR -> CUBE 0IC_C03
TRCS 2LIS_03_BX_TR -> CUBE 0IC_C03
TRCS 2LIS_03_UM_TR -> CUBE 0IC_C03
DataSources installed
2LIS_03_BF
2LIS_03_UM
2LIS_03_BX -
Hi Gurus,
We installed some Business content cubes along with the corresponding update rules. We want to do Z-copy of the cube. How do we copy update rule of a Business Content Cube (eg 0PUR_C01) to a Z-copy of the same cube (eg ZPUR_C01)?
Please let me know
ThanksWe have a standard ODS which gets updated thru update rules from an Infosource. However, the next level Data Target (which is a Standard infocube) gets updated from the ODS. While doing the Z-copy of ODS I did have the original ODS as in the 'template' field in the 'create update rule' initial screen and I got the update rules copied in same way as it is with the original ODS. However, I am not sure what exactly I need to do for copying the update rules from the Z-ODS to Z-cube. What needs to be filled in the "template" field?
-
Transfer and Update Rules in BW
Hi All,
I am a SAP Tech.consultant and wants to know the Role of ABAP in SAP BW in transfer and Update Rules. I want to know the general update and transfer rules in BW.Please search the forum as this has been dicussed in details many times. Thanks!
Maybe you are looking for
-
How to make a supreport to show its that in a new page
<p>Dear all,</p><p> I am using Crystal Report XI Release 2 with a VB6 application. I have many reports and want do show then like only one to make a big report of all stuff. I try using subreports but I want that each subreport begins in a new pa
-
I am having trouble with Team development: Suppose two developers are working on the same file Developer A adds a constant public static final String welcomeMSG = "Hola" Developer B adds a different constant public static final String exitMSG = "Adio
-
I downloaded 2 movies to my pc. How do I get them on my iPad? I couldn't even find them on my pc so I thought I'd download them to my iPad and the iTunes store said I'd already rented them...
-
Hi All, I'm new in RMAN and Currently we have 14 days retention policy for daily and weekly backup. In the same time we also will have 186days retention for monthly backup, that's mean its should be recoverable around that 3 month (for monthly). My q
-
Settlement Parameters on Product Cost Collectors
The basic config on Product Cost Collectors has settlement to a material. 1) Does someone know how to change the settlement rules to settle to a GL account or Order for new materials 2) For old materials, does someone know how to change the settlemen