Adding -ve sign to amount field.
Hi all,
I have an amount field . I want to add -ve sign to it and then perform addition or substraction using that field.
I have added -ve sign to the field by declaring another variable as character type, but i am not able to use the field for adition or substraction since its a character field.
please help.
Thanks,
Bharat.
Hi Bharat,
In order to put the '-' in front, you must have a character field. The reason for the * is because the field is not big enough to hold the value. So make the character field a length of 12, move the type p to the type c, and use the function module which i have mentioned.
function module
CLOI_PUT_SIGN_IN_FRONT
Reward If helpful.
Regards,
Harini.S
Similar Messages
-
Changing SIgn for Amount field
Hi:
We have a requirement where we need to change +/- sign on amount field in Infocube during the data loading. How this can be done?
ThanksHi Sunil,
In the update rules, in the key figure you want, instead of assigning a source key figure from communication structure (first option), select the formula and press create. Name your formula, and then, in the formula editor, double click your key figure so it appears in the upper part. Then press the * button. and finally press constant button and enter -1 in the text box it appears. This should do it.
Hope it helps.
Regards,
Diego Lombardini -
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. -
How to supress sign after the amount field
Hi All,
How to suppress the sign after the amount field is it using only no-sign or any other ways are there for doing that?
Regards
MaheshHi,
Please use the Variable type BSEG-DMBTR, which does not support any sign. <REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 20, 2008 2:07 PM -
Adding up of amount fields in the xml payload
HI ,
I have a issue on hand in mapping .
I am using message mapping to map the source to the target.
The issue is I have a item data in the source message which contains the Amount field . also it has some charge nodes also under it which also has a amount field.
what i need to do is to add all the amount fields from the charge item into the amount of the item field and then map it to the target.
the Source struct is some what as below
Item
|->Amount
|-> ChargeItem
|-> Amount
|-> ChargeItem
|-> Amount
Item(2)
|->Amount
|-> ChargeItem
|-> Amount
|-> ChargeItem
|-> Amount
The target required is somewhat like below
Item
|-> Amount (item(amount) + charge (amount))
Item (2)
|-> Amount (item(amount) + charge (amount))
Hope u can get the issue
Thanks
NikhilHi Bhavesh,
Thanks for the reply. but i have a question.
this will deal with the amount of the charge item but what about the amount of the amount field in item.
how can we take care of that too. as cannot map more than 1 field to the target.
and more over we have to add that field too to the sum of charge item
Thanks
Nikhil -
hi all,
i want to add two amount field.
like field1 = 13,500
field2 = 1,000
when i run this program
it leds to short dump.
error shows
Unable to interpret " 13,905.04 " as a number.
how can add these fields having comma separator.Bala,
you have to code like this:
field3 = field1 + field2 .
remember in you case resulting set (field3) is not being decleare as type p.
you have to decleare all three fields as type p.
Amit. -
Purchase Rebate is adding to Material cost value field
HI,
When i execute purchase rebate scenario, that amount is adding to Material cost value field in COPA report. Kindly tell me what isthe problem and where is the link between this.
Thanks
KBIn customizing the integration of other modules with COPA you have keep in mind the sign logic because it may be different for values coming from different modules.
Example: In our system revenue-reducing sales conditions come to COPA with a negative sign. In postings that come directly from FI to COPA, a negative sign means earnings. So we cannot assign any Fi account for direct posting to COPA to the same value field as SD conditions, because the sign logic doesn't match. We have to use different value fields and then get the formulas right in creating COPA reports to get the correct result in COPA.
I think your problem here is of the same kind: Rebates from purchase seem to come with the same sign as cost of goods sold AND go to the same value field, although one consitutes cost and the other a reduction in costs.
I think you have to get your rebates to post to another value field. Are those rebates an MM-condition or do they go to COPA through an assignment of FI-account to a value field?
Regards
Nikolas -
How to roll up Amount field upto Input Criteria Posting period
Hi All,
I have a requirement to create a FI Budget report where the User will give the Posting Period as the input criteria, and based on the entered Posting period, 2 amount fields, "Original Budget" & "Current Month" need to get derived by looking at another amount field called actual, by rolling up the Amounts up to the entered Posting period.
For example, the user gives input as Posting period = 06, which is December because Fiscal year starts from July here. And my Cube has an amount field "Actual" which displays amount for each posting period. Therefore when posting period = 06, then the "Actual" amount value for months July (PP = 01) through December (PP = 06) should be rolled up i.e added and displayed in the "Original Budget field". The Current month should only display the amount for the input criteria month.
How can I do that, any suggestions please?
Thanks!!Hi Sam,
Is there any way i could do it without the SAP Exit? If yes, how? If no, can u specify in the document you sent, which code i could use as reference for my requirement?
Thanks -
Error when displaying amount field in HTMLB Tableview
Hi all,
I am displaying some 'X' table in HTMLB Tableview and it has one amount field.But reference(currency) field of that amount field is in other table . I know it gives the error.
Please tell me there is any other way to resolve this problem with out adding reference(currency)field in the same table?
Thanks and Regards ,
Harikrishna .Hi Hari,
But reference(currency) field of that amount field is in other table . I know it gives the error.
It will not give any error , you can use the currency key field of other table or structure .
Alternatively you can use predifined type DEC instaed of CURR .
Regards,
Anubhav -
Hi;
I've already made a Z for payment check and works fine, but we have notice something when preview the checks in the spool, some checks in the amount (in numbers) field "*****999,999.99" sometimes it´s moves like this:
1) example "......******999,999.99"
2) example ".............******99,999.99"
3) example "....******999.99"
and so....
in DEV we made a lot of test printing in paper the payment check an worked fine, but the problem is in QAS.
How can i get that the amount doesn´t move in the sapscript...?
Thanks on advance,
David Fúnez
Tegucigalpa, Honduras
Edited by: David Funez on Feb 23, 2012 9:27 PM
Edited by: David Funez on Feb 23, 2012 9:27 PMHi David,
create a SIGN aligned tab for that amount field. The tab is nothing but the position in the form from where the printing of that particular field should start.
This should solve your problem.
Please revert if you still face any problems.
Regards,
Praveenkumar T. -
How make $ appears in ALV amounts fields
Hi
If i have an ALV wich text and amount fields (columns) , does somebody know is there a way to make the amounts appears with '$' sign ?
Regards
Frankhello Frank Henrd ,
If there is a Amount field there will be a Currency field too...in that case you can
1. Display the Currency field directly like USD or INR EUR etc....
2. if you don't want to do so.. just move the Amount field in CHAR field and Concatinate the the Symbol accordingly Have a look up talble for same...
3. OR check if you find some thing reg. this in the field Catlague structurer. ...( i din't found any...!)
Hope it helps, -
User defined function to check the NULL and 0.00 value in a Amount field
Hi Experts,
I have one scenario in which i have amount field in Data type.
I have to create one UDF which will do the following thing.
1. If the amount field is Null it should throw an exception in mapping.
2.If the amount field is 0.00 it should throw an exception in mapping.
3. For all other cases it should pass the amount value to the target.
Can anyone provide me the code For this UDF.
Thanks in advance.Hi,
You can add this logic to the UDF. Here var1 is the input string.
java.math.BigDecimal b=new java.math.BigDecimal(var1);
if(b.compareTo(new java.math.BigDecimal("0.00"))<=0)
//write your logic for values less equal to zero
One small request, if you think your question has been answered, properly and correctly, could you please kindly if possible close down this thread. It helps people who look for solutions to similar problem.
regards
Anupam -
DIsplaying WRBTR (AMOUNT FIELD)WITHOUT DECIMAL PLACES
Dear all,
I am facing a problem in displaying amount field in alv report. I have two currency keys (US dollar and Japan yen). if it is japan yen I should not have to show decimal places and if it is US dollar I should show decimal places.
How can I do it in a alv report if I have only one output amount field?
thanks
Ranjan.Hi chittaramjan,
1. use this kind of funda (just copy paste in new program)
Important things
a) one extra field in internal table
declared in the same exact fashion
waers LIKE tcurc-waers,
b) Populate this field
c) REST THE System will take care
(based upon country settings)
2.
REPORT abc.
TYPE-POOLS : slis.
DATA : alvfc TYPE slis_t_fieldcat_alv.
DATA : BEGIN OF itab OCCURS 0,
f1 LIKE P0008-BET01,
waers LIKE tcurc-waers,
END OF itab.
START-OF-SELECTION.
itab-f1 = '-4.15'.
itab-waers = 'KRW'.
APPEND itab.
itab-f1 = '4.68'.
itab-waers = 'GBP'.
APPEND itab.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'ITAB'
i_inclname = sy-repid
CHANGING
ct_fieldcat = alvfc.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = alvfc
TABLES
t_outtab = itab
EXCEPTIONS
OTHERS = 2.
regards,
amit m -
Error in Report: Next to amount field i could see 'ERROR' word in report
Guys,
Problem in Report: Next to amount field i could see 'ERROR' word in report
Eg: Invoice Amount : "1200ERROR" it should be like "$1200".
Pls help where do i need to check.
ThanksAjeet wrote :
Hi,
It can heppens if all the records getting aggregated in the report are of different currencies and not belonging to one currency.
Do a currency conversion for the key figures and make them all with same currency.
See if the records in the cube for the selection which you have given in the report gives you records with different currency and if it is true then as above said.
Thanks
AJeet
Are you sure ???
The mixed unit values will be displayed as * (by default unless its changed).
ERR comes if unit is not maintained. -
Length of amount field in New GL at the document entry
Hi,
1) At present I am working on ECC 6, EhP 4 with New GL Activated & Old GL "Not deactivated" (i.e deactivate update of Classic General Ledger GLT0 not done).
2) The total table (FAGLFLEXT) & Line item table (FAGLFLEXA) field in new GL has amount field length as 23 digit.
3) When I am trying to enter any FI Document in SAP, using transaction code F-02 or FB60 etc, the length of amount field is coming as 13 digit. I am not able to enter higher value
Question:-
a) Is the above issue due to "non-deactivation" of "Old GL"? As per my understanding, it is not, but wanted your opinion.
b) Is there any configuration which needs to be done to increase the length of the amount field at transaction level?
Thanking you in advance
Santosh Agarwala) Is the above issue due to "non-deactivation" of "Old GL"? As per my understanding, it is not, but wanted your opinion.
No, it is not.
b) Is there any configuration which needs to be done to increase the length of the amount field at transaction level?
No, there isn't. The field length that is appearing during document entry is really dictated by the data type of fields such as DMBTR, WRBTR in table BSEG; which is CURR (13,2). Although the GL view (FAGLFLEX* tables) have longer length, the limitation in entry view (BSEG, etc.) stays as 13,2.
Maybe you are looking for
-
Can't open avi files in quicktime 7.5
When I try to open avi files with quicktime .5 i am told that Quicktime needs soe extra files and am taken to the quicktime page on appl.com What files do i need? Any suggestions welcome!
-
I decided to first "restore" my phone in the itunes store and then i "Erase(d) All Contents and Settings". Its been taking longer then a couple hours and it is not showing the apple logo is is showing the circle loading screen. Is this normal? Pleas
-
Connecting to 2012 localDB from VBA
I have been having a very frustrating time trying to connect to a localDB database from Excel VBA. I have created a database using Visual Studio 2012 Express and in the IDE the database seems fine. I can create data and query it without problem. In V
-
OutOfMemoryError while trying to read a huge table
I do a simple thing like SELECT id, name FROM myHugeTable ORDER by name without any WHERE clause since I need to process the whole table somehow and get an OutOfMemoryError. I see no reason for it, as I do not need all the data at once, so I would ex
-
System folder from old mac after migrating to new mac
I just used migration assistant to move applications & data from a G5 tower to a macbook pro. Can I trash the folder labeled "system (old mac)"?