Negative sign disappears in Update Rule assignemnt
Hello, I have a strange problem with an update rule. I try to copy a number with comma and sign into an attribute FI_TAXRT of an InfoObject. The number get ther ecorrectly but the sign deiappears.
FI_TAXRT = Key Figure of type Number (Dec =counter or amount field with comma and sign)
The trasfer rule from my Data Source provides a field KBETR. This field is calculated from a an amount field in a condition table. In fact it is a percentage, so to remove the currency field I created a user exit in the data source to copy the amount field in a char field of the same length.
This works fine because I get the correct number with comma and sign (I checked that in RSA3 and also in the PSA).
When I debug the transfer and update rules the negative sign is there. I checked this by lgging a message in the update rule if the field is negative. (See code below)
I get my messages in the log, but in the InfoObject, the field is displayed without sign when I do maintain master data or when I read the underlying table with SE16
IF COMM_STRUCTURE-/BIC/FI_TAXRT < 0.
MONITOR-msgid = 'Z_MSG'.
MONITOR-msgty = 'I'.
MONITOR-msgno = '01'.
CONCATENATE COMM_STRUCTURE-/BIC/FI_MWSKZ ' negative'
INTO l_text.
MONITOR-msgv1 = l_text.
append MONITOR.
ENDIF.
RESULT = COMM_STRUCTURE-/BIC/FI_TAXRT.
RETURNCODE = 0.
ABORT = 0.
I created the routine because a simple assignment of the InfoObject in the UR produced the same thing.
Any ideas why this could happen?
Please check if there is any conversioun routine defined for the InfoObject, which might change the sign.
/ Christian
Similar Messages
-
DEBIT NOTE PRINTING NEGATIVE SIGN DISAPPEAR
Dear Experts,
Hi! Can any expert help on this. We have one negative transaction of Debit Note posting for "-26,000". But unfortunately, currently when we print Debit Note with negative posting, the amount in item 1 should be "-26,000" but the "-" sign disappeared. The final total showed correctly as "-26,000". Thanks a lot.
Regards/Lisa Goh
Edited by: Lisa GOH Siew Chen on Feb 13, 2009 10:07 AMNO SOLUTION GIVEN.
-
Which way is better to reverse a key figure sign, update rule or KF prop.?
We are trying to reverse a key figure sign and have got two options:
1. In Update Rule by using formula to make this key figure * 1-, or
2. In key figure property of query design mode, there is a checkbox of "Reverse +/- Signs".
Which one is better for the above two options?
Thanks
Message was edited by: Kevin SmithHi,
1. In Update Rule by using formula to make this key figure * 1-, or
A: If you want to update data permanently in Data Targets then go for update rules.
2. In key figure property of query design mode, there is a checkbox of "Reverse +/- Signs".
A: The data is not updated in Data Targets but while displaying in Reports it will display the sign.
That is upto you and business requirements.
Thanks
REddy -
Update Rules changes from 1 ODS to another disappear upon activation
Dear Experts,
We have encountered a situation whereby we have an update rule from ODS feeding a field update to another ODS.
This update rule change works correctly as I have debugged it and you can see the resultant changed in the new (40) table. But upon activating this change, the field change disappears.
Can anyone provide an explaination and how I can go about fixing this ?
Thanks
CraigHi,
If the data source support deltas and we load the data into ODS then the update type for the keyfig. Amount and the quanty always Choose as "Addition" .So you change the update type for that KF as Addition .
Thanks & regards,
venkata sharma. -
Hello everyone,
May I know why the standard freight cost is negative sign in SD but positive sign in COPA.
Also sales and various kind of cost are showing positive sign in COPA. No negative sign in COPA?
Thank you.
Regards.Hello,
It is also possible to transfer conditions from MM to update billing data in pooled payment in the Information Systems (IS) retail system. These are transferred according to the same rules as SD conditions. Conditions from SD are always transferred to COPA with + signs, with the exception of credit memos and returns. The reasons for this is that the signs for revenus are handled differently in the different applications of the system. For example, revenus are positive in SD, while they are negative in FI. Consequently, COPA accepts all of the values as positive, and then subtracts deductions and costs from revenues in IS.
Note that indicator transfer +/- is not used to compare the different use of +/- signs between FI or SD and COPA. If you active the indicator, only the positive and negative values for the condition in question will be balanced. This guarantees that the sum of the negative and positive condition values are displayed as a correct total value in the value field asigned to that condition.
In order to perform transfer conditions from the billing documents the same definitions must be established for the value fields in Profitability Analysis and both pricing and conditions types must be defined in SD.
Regards,
Ravi -
Populate negative sign to amount fields
Dear SDNers,
i need to populate a amout in local currency and amount in document currency fields with negative sign based upon debit./redit indicator. that is if debit/credit indicator gives s means we need to populate neagtive sign to for those fields, if it gives H nothing has to be populate.
this is possible in update rules. plesae provide the code or else posible in bex.
fields
/BI0/OIOI_DMBTR-----amount in local currency
/BIC/OIZWRBTR----amount in document currency
/BI0/OIFI_DBCRIND---- Debit/Credit Indicator
need the code for in update rules.
help me on thatHi ,
i am getting the following the error while checking the update routine
E:Field "COMM_STRUCTURE-OIFI_DBCRIND" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA"statement.
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
$$ end of global - insert your declaration only before this line -
The follow definition is new in the BW3.x
TYPES:
BEGIN OF DATA_PACKAGE_STRUCTURE.
INCLUDE STRUCTURE /BIC/CSZADPAY.
TYPES:
RECNO LIKE sy-tabix,
END OF DATA_PACKAGE_STRUCTURE.
DATA:
DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
WITH HEADER LINE
WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
FORM startup
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
DATA_PACKAGE STRUCTURE DATA_PACKAGE
USING RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line -
fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
to make monitor entries
IF COMM_STRUCTURE-OIFI_DBCRIND = 's' .
RESULT = COMM_STRUCTURE-OIOI_DMBTR * -1.
ELSEIF COMM_STRUCTURE-OIFI_DBCRIND = 'h' .
RESULT = COMM_STRUCTURE-OIOI_DMBTR.
ENDIF.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
$$ end of routine - insert your code only before this line -
ENDFORM. -
The option 'Display Credit Balance with negative sign" was not activated.
I've encountered with a huge problem after load opening balance.
I forgot to tick the option 'Display Credit Balance with negative sign"
It makes my client's Chart of Account uncommon such as credit balance in Cash Account, AR .....
However, I've search the sap note to solve it as follow:
Description of the bug::
When creating the company in the system the option 'Display Credit Balance with negative sign' was not activated.
Once transactions were created in the system the functionality can not be changed.
Limits of the query:
After running the update query, please restart SBO first and then run the restore 'GL account and bp balances';
otherwise, the cashed value of SBO will not be updated and restore function may not take effect.
1. Meaning of restart SBO => restart SBO Service Manager right?
2. Please help me please to find "The restore G/L account and bp balances" form. Where is it?;
Thank youHi,
I would think that you are following the PEQ instructions for note 970813, correct?
If this is the case and you are using 2007 then you will find the restorev in the top menu; Help -> Support Desk -> Restore. You will find the functions here. Please note that this should only be used on direct instruction from support or a note like in this case. A backup should also be taken before running restore.
Regards,
Jesper -
I have 3 sql statements in my application (1 select/1 update and 1 insert) where I've noticed that after some time of working properly, all of a sudden these statements stop handling negative integers and instead process them as positive integers.
i.e. the select statement would return result as if the where clause parameter was positive instead of negative, the insert statement would actually insert the number as a positive, etc... The only way for me to fix the problem is the restart the iPlanet application server (connecting to an oracle 8.1.7 db using the oracle 8.1.7 jdbc)
I log the parameters from the PreparedStatement setInt() and setObject() comments just before execution and clearly the values are logged as negatives.
e.g. (not the actual source code, but the same idea)
PreparedStatement pstmt =
conn.prepareStatement ("insert into testTable (anInt, name) values (?,?)");
int anInt = -1;
String name = "test";
System.out.println("Before insert: " + anInt + " " + name); // outputs Before insert: -1 test
pstmt.setInt(1, anInt);
pstmt.setString (2, name);
pstmt.execute ();
====================
select * testTable;
anInt name
===========
1 test
Any ideas?
regards,
RobDid the author of the original posting (Rob Terro) ever learn anything about the nature of this problem and the appropriate fix?
We are observing what sounds like the same behavior: after some time of working properly, all of the sudden stored procedures to which we pass negative parameters (in particular, -1) in Java start receiving these as positive parameters at the database.
We are using the Oracle JDBC 8.1.6 thin driver, running on Solaris 5.9 generic_112233-03, using the Sun HotSpot JVM, version 1.3.1_07.
We had been running with this configuration for some time without apparent problems. Recently, we added to the command line the JVM "-server -Xconcurrentio" options. These greatly improved performance, but apparently lead to this problem of losing negative signs when talking to Oracle. However, the problem appears erratically, so we are not 100% certain that these options cause the problem. Also, we would ideally like to hang on to the performance gains produced by using these options.
How does this configuration compare to the configuration used by the original poster when he encountered this problem?
Does anyone have insight into the possible nature of this problem? -
Filtering records using a start routine inside the update rules for a dmart
Hi
I am using a start routine inside the update rules. I want to filter out all records that have 0 in all three fields. My problem is that it not only filters these records, but also filter records with negative values, which I do not want. Only 1 field has a negative value, the other 2 have 0.
I have tried:
DELETE DATA_PACKAGE where /BIC/ZBILLCONS = 0 and /BIC/ZBREVPRIM = 0 and /BIC/ZBREVSUBO = 0 .
DELETE DATA_PACKAGE where ( /BIC/ZBILLCONS = 0 and /BIC/ZBREVPRIM = 0 and /BIC/ZBREVSUBO = 0 ).
also tried:
delete DATA_PACKAGE where /BIC/ZBILLCONS IS INITIAL and
/BIC/ZBREVPRIM IS INITIAL and /BIC/ZBREVSUBO IS INITIAL.
The records are going to 1 cube and 1 ODS, I only have the start routine in 1 update rule. I view the filtering in the PSA.
Has anyone ran into this before?Try
delete data_package where /BIC/ZBILLCONS = '0' and /BIC/ZBREVPRIM = '0' and /BIC/ZBREVSUBO = '0' .
OR
delete data_package where /BIC/ZBILLCONS EQ '0' and /BIC/ZBREVPRIM EQ '0' and /BIC/ZBREVSUBO EQ '0' .
Good luck! -
PE51 - Deduction Wage Type amount showing with a negative "-" sign
Dear All,
We have pay slip configured for the client in PE51 - HR Foms Editor.
Here, we have added the deduction wage types in Window tab and Cumulations tab.
However, when we generate the pay slip, the custom wage types which are defined in deductions show up the amount with a negative " - " sign.
Please advise how this negative sign can be removed.
Please note that in Cumulations tab, under deductions, the MS value against all the deductions wage type is " +"
Regards,
ReemaHi,
Write a rule to remove the prefix '-' for the WT's for the STD payslip
Regards,
Hemant V.Mahale -
Querying Cubes on Update Rules?
I have an update rule that currently queries an ODS to get the value of a key figure and then apply that key figure to the cube the update rule is intended for.
Basically, this is the select statement I use in the routine:
select defect_quantity from table_a
where notification = notification
and notif_item = notif_item.
Since the ODS is a flat table, this works fine. However, I am having trouble figuring out how to write this same query against a cube.
Is there a way to query a cube with ABAP in an update rule? Any info or link to how to do this would be appreciated.
Thanks,
BrentHi,
There is simple example:
**> You must fill G_T_RANGE table with selection conditions for
**> InfoCube data. In this case char 0VERSION = '1' and
**> 0CALYEAR = '2005'.
CLEAR G_S_RANGE.
G_S_RANGE-CHANM = '0VERSION'.
G_S_RANGE-SIGN = 'I'.
G_S_RANGE-COMPOP = 'EQ'.
G_S_RANGE-LOW = '1'.
APPEND G_S_RANGE TO G_T_RANGE.
G_S_RANGE-CHANM = '0CALYEAR'.
G_S_RANGE-SIGN = 'I'.
G_S_RANGE-COMPOP = 'EQ'.
G_S_RANGE-LOW = '2005'.
APPEND G_S_RANGE TO G_T_RANGE.
**> You should also provide information for which combination
**> of characteristic you need value
CLEAR G_S_SFC.
G_S_SFC-CHANM = '0VERSION'.
G_S_SFC-CHAALIAS = '0VERSION'.
G_S_SFC-ORDERBY = 0.
INSERT G_S_SFC INTO TABLE G_TH_SFC.
G_S_SFC-CHANM = '0PROFIT_CTR'.
G_S_SFC-CHAALIAS = '0PROFIT_CTR'.
G_S_SFC-ORDERBY = 0.
INSERT G_S_SFC INTO TABLE G_TH_SFC.
G_S_SFC-CHANM = '0CALYEAR'.
G_S_SFC-CHAALIAS = '0CALYEAR'.
G_S_SFC-ORDERBY = 0.
INSERT G_S_SFC INTO TABLE G_TH_SFC.
**> And finaly which keyfigure should be aggregated
CLEAR G_S_SFK.
G_S_SFK-KYFNM = '0AMOUNT'.
G_S_SFK-KYFALIAS = '0AMOUNT'.
G_S_SFK-AGGR = 'SUM'.
INSERT G_S_SFK INTO TABLE G_TH_SFK.
**> I_INFOPROV - InfoProvider name. In this case InfoCube name
**> I_TH_SFC - table with selected chars
**> I_TH_SFK - table with selected keyfs
**> I_T_RANGE - table selection conditions
**> I_PACKAGESIZE - number of records in one function call
**> You should call this function as many times as parameter
**> E_END_OF_DATA will receive 'X' which means that last data
**> packet has been read
**> G_T_DATA - table with aggregated data from InfoCube
CALL FUNCTION 'RSDRI_INFOPROV_READ'
EXPORTING
I_INFOPROV = 'ZINFOCUBE'
I_TH_SFC = G_TH_SFC
I_TH_SFK = G_TH_SFK
I_T_RANGE = G_T_RANGE
I_PACKAGESIZE = 10000
I_ROLLUP_ONLY = ''
IMPORTING
E_T_DATA = G_T_DATA
E_END_OF_DATA = END_OF_DATA
CHANGING
C_FIRST_CALL = G_FIRST_CALL
EXCEPTIONS
OTHERS = 1.
Krzys -
Formula Problem in Update Rule
Hi all,
I am facing one problem with formula in update rule.
I have written one formula in update rule which it is working in development, but I moved the content to quality there it is not working.
I have used the following formula.
IF( NEGATIVE( TRUNC( Total Revenue in USD ) ) >= 5,000,000, 1, 0 )
Best Regards,
SGKHi
It should work fine,If you still facing the same problem,do one thing(work around)
Create a transport request for your cube with indata flow before,and then activate your update once again in dev server,then transport it...
Hope it helps
Thanks
Teja -
Problem: Exchange rate in Update rules with DELTA mode
Hi experts,
During the loading since the ODS13BIL towards the CUBE, I use in the update rule the function
"CONVERT_TO_LOCAL_CURRENCY" to convert a currency.
The loading mode is DELTA.
If I modify an invoice in the system source (R/3) for example: "change on" (0CH_ON), during the loading delta since the ODS towards the cube, the exchange rate is reversed (sign), which implies that the values of the ratios during the conversion with the function module " CONVERT_TO_LOCAL_CURRENCY" are false.
How could I resolve this problem?
Example:
1-First load:
R/3:
Key figure 1 :100
Exchange Rate :-1,2
Document currency :USD
Local currency :EUR
Change on :00.00.0000
ODS13BIL:
Key figure 1 :100
Exchange Rate :-1,2
Document currency :USD
Local currency :EUR
Change on :#
CUBE:
Key figure 1 :100/1,2
Currency :EUR
2-Seconde load:
R/3:
Key figure 1 :100
Exchange Rate :-1,2
Document currency :USD
Local currency :EUR
Change on :06/01/2006
ODS13BIL:
Key figure 1 :100
Exchange Rate :-1,2
Document currency :USD
Local currency :EUR
Change on :06/01/2006
CUBE:
Key figure 1 :100/1,2
Currency :EUR
and
Key figure 1 :-100*1,2 <-- False
Currency :EUR
Thank you for your precious help.Hello,
Thank you for your answer but that still not works: Give erroneous data is corrected but the data which are not erroneous become erroneous.
I think that if I manage to return the field "Exchange misses" (0EXCHG_RATE) nonmodifiable by the DELTA mode, I cross that will resolve the problem.
With what is used following fields in the definition of the ODS, and it is what impacts it on the existing data: "Non cumulative value" et "Cumulative value"
thanks a lot. -
Hi experts,
What are the types of update rules?
Regards,
SivaHi......
Yes either you can say what are the different update types.........that Praveen has already ansered..............or you can say.........
You can say what are the diffrent types of update routines...then the answer is :
1) Start Routine in Transfer Rules
2) Transfer Routine in Transfer Rules.
3)Start Routine in Update Rules
4)Update Routine in Update Rules.
The routines that you write in transfer rules are applicable to all the Data targets that get the data from that particular Infosource, when you are going to write some code in Transfer rules, you have to understand that you are going to manupilate the data that is going to get into BW .
If you are going to write in Update Rules , then that logic is going to apply only for that particular Data target .
Eg : Let suppose I have a Flat file that gets data from 3 countries, US, Canada and Mexico.
Now I have prepared the data source for the same . But I dont want to have the data of Mexico in to BW itself.
So I will write a Start routine at TR to eliminate the data of Mexico.
My Next step is I want the data of US into one ODS and Canada data in to another ODS.
For this I handle the dataflow at Start routine in Update rules, to eliminate Canada data for US ODS and Vice Versa.
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 ..
transfer routine
Date key figure: Convert DATS format to DEC format
Date Conversion in Flat File
Transfer Routine ABAP
conversion exit
Date Conversion
Problem with conversion char to numc in transference rules
conversion routine..?
update routine
How to call a function in Update Rules to reverse a key figure sign
Need Sample Code for Update Rules
Date calculation
Difference between data in PSA and Data in Infocube
No RETURNCODE <> 0 allowed in update routines in transfer mode
the diffrerece between DEC and (yyyymmdd) 8 char in Time defination
Access master data in update rules
Date key figure: Convert DATS format to DEC format
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
Regards,
Debjani........... -
Start routine and update rules
Hi,
What is accessed first:-
Start Routines or Update Rules?
What is the use of global variables in start routine?
Please reply.
Thanks.Hi......
You have different types of Routines in BW .
1) Start Routine in Transfer Rules
2) Transfer Routine in Transfer Rules.
3)Start Routine in Update Rules
4)Update Routine in Update Rules.
The routines that you write in transfer rules are applicable to all the Data targets that get the data from that particular Infosource, when you are going to write some code in Transfer rules, you have to understand that you are going to manupilate the data that is going to get into BW .
If you are going to write in Update Rules , then that logic is going to apply only for that particular Data target .
Eg : Let suppose I have a Flat file that gets data from 3 countries, US, Canada and Mexico.
Now I have prepared the data source for the same . But I dont want to have the data of Mexico in to BW itself.
So I will write a Start routine at TR to eliminate the data of Mexico.
My Next step is I want the data of US into one ODS and Canada data in to another ODS.
For this I handle the dataflow at Start routine in Update rules, to eliminate Canada data for US ODS and Vice Versa.
Global variables in Start routine
You can have global variables, internal tables populated by the
startup routine. This data will be available to the field
routines. Create yourself a start routine, declare some
variables in the global section, and then create a field
routine. You will be able to use the globally declared objects
in the field routine
Please check below help link for routines in sap netweaver 2004s
http://help.sap.com/saphelp_sem60/helpdata/en/e3/732c42be6fde2ce10000000a1550b0/frameset.htm
How to guide "How to transformations routines".Please check the below link:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/dc1d9990-0201-0010-16aa-db3c4eb8b642
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 ..
transfer routine
Date key figure: Convert DATS format to DEC format
Date Conversion in Flat File
Transfer Routine ABAP
conversion exit
Date Conversion
Problem with conversion char to numc in transference rules
conversion routine..?
update routine
How to call a function in Update Rules to reverse a key figure sign
Need Sample Code for Update Rules
Date calculation
Difference between data in PSA and Data in Infocube
No RETURNCODE <> 0 allowed in update routines in transfer mode
the diffrerece between DEC and (yyyymmdd) 8 char in Time defination
Access master data in update rules
Date key figure: Convert DATS format to DEC format
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 you..........
Regards,
Debjani.........
Edited by: Debjani Mukherjee on Oct 1, 2008 4:58 PM
Maybe you are looking for
-
Goods Reciept PO and AP Invoice Contain Different Balance Due Totals.
The scenario is that if we create a Goods Receipt PO for 06/07/2010 and then the next day (07/07/2010) copy to a AP Invoice the Totals and Balance Due are the same BUT if we then change the posting date back a day u2013 to the same date as the origi
-
Blanket PO - Invoice Verification
Dear Gurus, I am facing a problem while posting IV against a Blanket PO. I have created a PO with document Type FO and used account assignment K and Item category B. Put the Overall Limit 1000 and expected limit as 2000, it showed me 2000 as the net
-
Error message when starting - Set Config. App.
New member here! I have searched an looked at these forums for some time but only now joined. Should have done it before. Operating system is MS XP Pro, Printer involved is HP LaserJet 1150 Computer is a Fujitsu LIfebook that is used in several field
-
Hi folks, Note: I've found a way to post images... here they are... [http://i1087.photobucket.com/albums/j480/_Melk_/iGoogle_Firefox_broken2.png iGoogle Firefox Broken (same in version 5.x, 6.x & 7.x)] [http://i1087.photobucket.com/albums/j480/_Melk_
-
Recovering user profiles and applications from old iMac HDD
Wanting to upgrade my 2007 24" iMac, I replaced the HDD with a SSD and did a fresh install of Mt Lion. The goal is to transfer applications and usere profiles back to the iMac from the old drive. I want to keep personal files (doc, pix, ect) on the o