Decimal Problem while division in abap
Hi dudes,
I'm using following statement in the report
l_steuer_ep-zzfwgross_SGD = ( ep-zzfwgross ) / ( w_exrate-EXCH_RATE ) .
where EP-ZZFWGROSS = 30694.30-
and W_EXRATE-EXCH_RATE = 0.77851
Resultant value definitely will be greater than 30694 logically thinking...
but i'm getting 0.39- .
Both zzfwgross as well as zzfwgross_sgd are Same Data Types. I dont know why its happening...
My Actual requirement is to convert Currency which is in USD(zzfwgross) into SGD (zzfwgross_sgd)
<removed by moderator>
Regards,
Annamalai.
Edited by: Thomas Zloch on Nov 17, 2011 1:20 PM
Hi AnnaMalai(Brother Mountain)
-(is that your name..?? Pls forgive me if wrong ..;-) )
If you want to convert to USD to SGD, you need not to use formulas,
there will be many Functional Modules available to convert,
For ex: CONVERT_TO_FOREIGN_CURRENCY
you can use these FMs to convert the currencies, it would be the best option..
Similar Messages
-
Problem while testing a ABAP Web Service
Hello,
I'm facing a problem while testing a webservice for the BAPI BUPA_CENTRAL_GET_DETAIL. I have opened the Web Service Home page, and I get no error. I fill in the input values and then when I send the request, I get back an error which says "Authority check failed"
Urgent help needed..
Thanx,
Anupamayou need s_service and s_object authorization objects in your role.
its explained in this document
section 3.1 on page 7
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/92d80512-0a01-0010-32a3-cd3735bd9275
Regards
Raja -
Problem while creating WebAS ABAP Technical System in WAS 7
Hi All,
I have installed WAS 7 and EP 7 SP9 as part of SR2 Installation. I had checked the option configure local SLD. I have to create and SLD to conenct EP to ECC 6.
When I was creating the Technical System, at the last step i found out that ECC 6 was not available in the installed products(only ECC 5 was available). So i Upgraded CR Content to SAP_CR 3.2 and CIM to 1.5.20. When I am trying to create the Technical System again I do find ECC 6.0 in the Installed Products but there are no corresponding Installed Components for ECC 6.(The same exists for ECC 5). as a result I am not able to create the Technical System as atleast one component has to be selected. I have tried re importing the CIM Model and cr content again but its not working.
When I select SLD Data Supplier in Visual Admin I get the following error message.
Error While loading service SLD Data Supplier
java.lang.ClassNotFoundException: com.sap.sldserv.vaclient.ClientManagement
Is there any solution to this. Points will be given.
Regards,
Shyam.
Message was edited by:
Shyam R Nairhi,
use th following thread,
No products installed while adding a Technical ABAP System in the SLD.
Regards
Jayapriya -
Problem while creating a ABAP Quarry report for material master
Hi Friend,
While I am trying to create a Quarry, certain warning message is coming and while I am executing single material is coming too many times in report with all currencies.
Picking the data from Table: MARA, MARC, MARD, MAKT, MBEW, QMAT, AND T001 (FOR Currencies only).
I need your help to clarify 2 point:
Where I should assign the table with whom as I have simply selected the table one by one assigned button clicked.
2nd How and from which Table currencies could picked as here said warning is coming and a single material is coming multiple times with all currencies in report.
I have used as SQ03 then SQ02 and finally SQ01u2026..else I have checked the same in SQVI, but still I didnu2019t get any such fruitful.
Filed Description List Display Screen Display Table u2013 Field
Plant X X MARC Material Code X X MARA
Storage Location X X MARD Storage Condition X X MARA - RAUBE
Material Type X MARA
Old Material No X MARA - BISMT Material Description X MAKT Base Unit of Measurement X MARA - MEINS
Material Price (Moving) X MBEW Material Price (Standard) X MBEW
Valuation Class X MBEW -BKLAS
Inspection Type X QMAT - ART Currency Key X T001 -WARES
Rest of the field I have not written as you are aware about that .
Pl suggest or help me to prepare the doc in screen shot, will have a great help from you end.
Regards,
PinkuDear Vijay,
I have done the same as per your earlier, but for picking th ecurrency in display, I have given Table T001, whether it is o.k. or else what? Wheneven I am trying by th esam eway, system is poping a warning message and then it's executing , but displaying all the materials with all currecies means a single material is coming too amny times with all currecy, so I need to pick extact one and for that if you could do andcan send me a screen shot more helpful to me.
Thanks.
jbs.sap.mm at the rate of hotmail.com
Pinku -
Problems while activating ABAP proxy
Hi All,
I am dealing with a problem while I am trying to activate a proxy in Sproxy tcode
Package Check for Table/Structure ZDT_ENVIO_DADOS_MESTRES_IN
The object TABL ZDT_ENVIO_DADOS_MESTRES_IN uses TTYP PRXCTRLTAB
Table Type PRXCTRLTAB
Package ZBW does not have sufficient use access
Does someone could help me on how to fix that ?
Regards
DiegoHi Diego,
Add SAI_TOOLS under Use access.
Check the below link for more info.
http://help.sap.com/saphelp_nw04/helpdata/en/ea/c05da0f01011d3964000a0c94260a5/content.htm
Thanks, -
Problem while retrving data from a view
Hi Friends
i have a problem while retriving data from a view <b>v_t685a</b>.
the error message is :""" "V_T685A" is not defined in the ABAP Dictionary as a table, projection view or database view."""
i wrote : select single VTEXT1 from V_T685A into w_cst_jin1 where
KSCHL = 'JIN1' and
KAPPL = 'V'.
how to retrive the data.
waiting for quick response
Regards
MukeshHi
This is a Maintenance View, not a Database View
SO can't fetch data using select statement.
You can use the Table <b>T685</b> directly to fetch the condition Types data straight away instead of the view. write the same select for this table and use.
Regards
Anji
Message was edited by:
Anji Reddy Vangala -
I face a problem while making a confirmation on portal.
Hello ,
Can anyone help me I am facing a problem while making confirmation in the portal.
the system pops up an error as mentioned below. Please help
Folgender Fehlertext wurde im System SRP prozessiert: Speicherungsform der Produkt-ID ist im Customizing noch nicht definiert
Der Fehler trat auf dem Applikationsserver eccprd-srp_SRP_50 und im Workprozess 3 auf.
Die Abbruchart war: TH_RES_FREE
Die ABAP-Aufrufhierarchie war:
Form: READ_SETTINGS of program SAPLCOM_PR_CONVERSION
Function: CONVERSION_EXIT_PRID1_INPUT of program SAPLCOM_PR_CONVERSION
Function: BBP_PDH_PRODUCT_READ_BUFFER of program SAPLBBP_PDH
Form: GET_LOCAL_PRODUCT of program SAPLBBP_ECI
Form: APPLY_OLD_MAPPING of program SAPLBBP_ECI
Function: BBP_PRODUCT_MAP of program SAPLBBP_ECI
Function: B31I_PO_GETDETAIL of program SAPLBBP_BD_DRIVER_31I
Function: META_PO_GETDETAIL of program SAPLBBP_BD_META_BAPIS
Function: BBP_BE_PO_GETHISTORY of program SAPLBBP_PDH_HISTORY
Function: BBP_PDH_SEARCH_PO_SUBLIST of program SAPLBBP_PDH_SEARCH
Best Regards,
SairamHi,
Pls see if the foll notes are useful.
<b>Note 911217 - Copy vendor product number from contract search help to PO</b>
1047769 - No returns for search by Product ID in Monitor Shopping Cart
Note 1023012 - BBPSC: Long product ID triggers short dump
BR,
Disha.
Pls reward points for useful answers. -
Problem while opening Bex query on the web
Hello BW experts,
I have a problem while opening Bex query from my SAP Favorites.See below.
When i double click on the query, i get the following page, with the server name KBWS01QX.
But, from RSRT Tcode, select the query > query display as HTML > Click on ABAP Web , click execute as shown below, it is going to the correct URL as in the 2nd screen shot below.
My question is why is it going to the wrong URL when i open it from SAP Favorites menu?
I want it to open the same URL as it opened from RSRT(which is the right one)
What is the Config needed to make it to work from SAP favorites.
Any help would be appreciated.
Thanks alot.
SVHello,
Thank you all for your responses.
See below some additional info.
From RSRT, this time I clicked on JAVA WEB, and i get the below URL, which is the same URL i was getting when i executed the query from SAP favorites.
http://kbws01qx.xxxxxxx.com:50000/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?QUERY=ZCONSUMPTION
Also, i have executed the Function module : RSBB_URL_PREFIX_GET and i get the below values.
It seems that it is trying to connect to Java portal something services may be, but i want it to open in ABAP web only.
Please help. -
Problem While Activating Transformation
Hi BW Gurus,
I am currently working on BW 7.0 on Purchasing Area, I found some problem while modifying the transformation or activating the transformation. I have mapped the data source 2LIS_02_SCL Purchasing Data (Schedule Line Level). I have written a routine for mapping rules of 0ORDER_VAL base on the source field of BWVORG, BWAPPLNM, BWEFFWR, BEDAT, WAERS, HWAER, WKURS. And it shows no error while syntax check. But while activating the Transformation it leads to dump. And after that if I try to change the routine, it leads me to the same dump.
Please advice.
For reference, find the code what I wrote in the routine below,
IF ( SOURCE_FIELDS-BWVORG = '001' or SOURCE_FIELDS-BWVORG = '011'
or SOURCE_FIELDS-BWVORG = '021' or SOURCE_FIELDS-BWVORG = '004'
or SOURCE_FIELDS-BWVORG = '014' or SOURCE_FIELDS-BWVORG = '024' )
AND SOURCE_FIELDS-BWAPPLNM EQ 'MM'
AND SOURCE_FIELDS-BWEFFWR 0.
PERFORM LOC_CURR_CONVERT
USING SOURCE_FIELDS-BWEFFWR
SOURCE_FIELDS-BEDAT
SOURCE_FIELDS-WAERS
SOURCE_FIELDS-HWAER
SOURCE_FIELDS-WKURS
CHANGING RESULT.
ENDIF.
where the LOC_CURR_CONVERT is given below
FORM LOC_CURR_CONVERT *
--> LC_DOCUMENT_VALUE *
--> LC_DATE *
--> LC_DOCUMENT_CURRENCY *
--> LC_LOCAL_CURRENCYY *
--> LC_RATE *
LC_LOCAL_VALUE *
FORM loc_curr_convert
USING lc_document_value
lc_date
lc_document_currency
value(lc_local_currency)
lc_rate
CHANGING lc_local_value.
conversion of lc_rate from floating-point to decimal. Necessary for *
call of CONVERT_TO_LOCAL_CURRENCY.
data lc_rate_dec type p decimals 5.
lc_rate_dec = lc_rate.
IF lc_document_currency = lc_local_currency
no conversion necessary -> Main case 1
AND NOT ( lc_document_currency IS INITIAL
OR lc_local_currency IS INITIAL ) .
lc_local_value = lc_document_value.
ELSEIF NOT ( lc_document_currency IS INITIAL
OR lc_local_currency IS INITIAL OR lc_date IS INITIAL ) .
conversion necessary with lc_date -> Normally not possible
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
date = lc_date
foreign_amount = lc_document_value
foreign_currency = lc_document_currency
local_currency = lc_local_currency
rate = lc_rate_dec
IMPORTING
EXCHANGE_RATE =
local_amount = lc_local_value
EXCEPTIONS
NO_RATE_FOUND = 1
OVERFLOW = 2
NO_FACTORS_FOUND = 3
NO_SPREAD_FOUND = 4
DERIVED_2_TIMES = 5.
IF sy-subrc NE 0.
message a802 with lc_date lc_document_currency lc_local_currency
sy-subrc.
ENDIF.
ELSE.
if conversion not possible -> assign target values
lc_local_value = lc_document_value.
lc_local_currency = lc_document_currency.
ENDIF.
ENDFORM.
Thnaks
Regards,
Deep.Hi,
Please check routine if any for 0CO_REPLINE and also expert routine.
Regards,
Rema. -
Long text problem while uploading Inspection plan through BDC.
Hi,
I am facing some problem while uploading the inspection plan. There are few MICs for which we are having long text, while uploading the inspection plan through BDC - some other long text is getting copied into the MIC's long text. After checking I came to know that in function module, read_text - some text which is stored in ABAP memory is getting copied into the inspection plan.
I am working in SAP release 4.7. I have checked with SAP notes: 97419, but it is also not satisfying.
Waiting for quick solution.
Thanks in advance.
FahiéHi a®s,
Thanks a lot for your kind reply.
My requirement is I want to maintain long text for few MICs (which are not having long texts at MIC level) in inspection plan (QP01).
When I am trying to manually assign the MIC's to inspection plan (QP01), long text is copied whereas I am not clicking the long text icon in (QP01). Long text is not maintained in MIC level, still some long text is copied to this MIC. This was also happening while uploading the inspection plan thro' BDC.
I believe what you have mentioned about function module SAVE_TEXT cannot be used here since long text is already copied before we pass the long text. Also if we pass some long text, still apart from the long text what we have passed there is some other long text copied (extra long text).
Waiting for quick solution.
Thanks in advance.
Fahié -
A problem while implementing a file to file senario
hi all :
There is some problem while implement a file to file senario. the file couldn't be sent or recieved.
and as I try to check Check the Sender File Adapter Status via
Runtime Workbench -> Component Monitoring -> Communication Channel Monitoring ,
It is found that Adapter Engine has error status with red light. Is it why the file couldn't be sent?
Could you please tell me how to make Adapter Engine available?
Thank you very much!!!Hi Sony
Error getting JPR configuration from SLD. Exception: No entity of class SAP_BusinessSystem for EC1.SystemHome.cnbjw3501 found
No access to get JPR configuration
Along with what experts suggested
What is the type of Business system is this. Standalone Java?
JPR can have problem if you have a business system thats not ABAP/Java type if this system is not having a SAP TS in landscape then create Java type.
Thanks
Gaurav -
Getting problem while posting Invoice
Hi all,
Ofcourse this problem is related functional thing, i am posting in ABAP group. we are getting problem while posting invoice through f-43 transaction. The error is "Fiscal year 0000 not allowed for year-dependent commitment items". Please let me know if u have any solution.
Thanks in advance.
chandrasekhar.Hi chandrasekhar,
pls post some infos:
1) application aerea of the message and message no.
2) document date / posting date
and ohter date-fileds of the document
3) SAP-Release
Have you search in SAP-OSS with the message no. or
message text ?
regards Andreas -
Decimal Issue while posting annual salary using HCM P&F
Hello All
We are facing a strange problem while updating the Annual Salary of Infotype 0008 using HCM P&F. User in the form can enter a wage type amount, based on this wage type amount the annual salary is getting calculated by the std. way.
Now the problem here is, say we are passing Hourly wages as 55.000 USD3, the annual salary should have been updated as 114400.00 USD (i.e. 55 * 2080 Hours Annually). But after the posting when we see the annual salary amount it is displayed as 11440.00 USD (Strange!! It is divided by 10 ). But the wage type amount is properly displayed as 55.000 USD3 in PA20. All the other infotypes are updated correctly with the new pay structure and work schedule details correctly.
Appreciate your help, if any of you have come across this issue before.
Thank you.
Regards
Ranganathhahahahahahaha
Been down this road before.
Pretty much it is exactly as said....decimal for currency issue. Some currencies use 2 decimal places...some use 4...and better yet, SAP allows you to even configure your own if needed.
Now, how did WE solve this. We tore apart (debugging) the actual code SAP uses in PA30 when showing/editting/updating Basic Pay. You will see in there how they work the "magic". Oddly.....the look at the decimal setting, multiply it out in the background to store correctly but pull a "switch-a-roo" on the front end to display it correctly as the user would expect (ie 4 decimals for example). It's pretty crazy stuff.
But we got it working....via code in our own generic service......and it worked like a charm. -
Problem while sending the mail from sap
Hi experts,
I am facing some problem while sending mail from sap to external mail.
this is th code i am using but it is not working. plz check and tell me.
REPORT ZMAIL_DEMO.
data: maildata type sodocchgi1.
data: mailtxt type table of solisti1 with header line.
data: mailrec type table of somlrec90 with header line.
start-of-selection.
break-point.
clear: maildata, mailtxt, mailrec.
refresh: mailtxt, mailrec.
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test'.
maildata-obj_langu = sy-langu.
mailtxt-line = 'This is a test'.
append mailtxt.
mailrec-receiver = 'SOME MAIL ID'.
mailrec-rec_type = 'U'.
append mailrec.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'RAW'
put_in_outbox = 'X'
tables
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
exceptions
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
if sy-subrc = 0. "( did not receive any mail) *
write : 'mail sent'.
endif.Hi,
Please check with the following code.
TABLES: KNA1.
data for send function
DATA DOC_DATA LIKE SODOCCHGI1.
DATA OBJECT_ID LIKE SOODK.
DATA OBJCONT LIKE SOLI OCCURS 10 WITH HEADER LINE.
DATA RECEIVER LIKE SOMLRECI1 OCCURS 1 WITH HEADER LINE.
SELECT * FROM KNA1 WHERE ANRED LIKE 'C%'.
WRITE:/ KNA1-KUNNR, KNA1-ANRED.
send data internal table
CONCATENATE KNA1-KUNNR KNA1-ANRED
INTO OBJCONT-LINE SEPARATED BY SPACE.
APPEND OBJCONT.
ENDSELECT.
insert receiver (sap name)
REFRESH RECEIVER.
CLEAR RECEIVER.
MOVE: 'any_email'_ TO RECEIVER-RECEIVER, " SY-UNAME
'X' TO RECEIVER-EXPRESS,
'U' TO RECEIVER-REC_TYPE.
APPEND RECEIVER.
insert mail description
WRITE 'Sending a mail through abap'
TO DOC_DATA-OBJ_DESCR.
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_DATA
IMPORTING
NEW_OBJECT_ID = OBJECT_ID
TABLES
OBJECT_CONTENT = OBJCONT
RECEIVERS = RECEIVER
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8. -
Problem while creating script form - lang EN is not available in client 800
Hi friends,
I getting a problem while creating a script form in SE71.
if I give the name of the script (zform1) and clicked on create then its giving an information message like " Form ZFORM1 language EN is not available in client 800".
But if I use this form in the abap program its giving stop message "Form ZFORM1 language EN is not active and has no errors" and the control is coming out of the program.
What could be the problem and how to solve it friends . Please help me.
Thanks
-HimaHi There,,
By default all the forms will be there in client 100, if you are using the exisiting form and making a Z copy of the same,, then first you will have to copy from the client 100 to 800.
If you are creating the form right from the scratch,, you will that message,,but need now worry about that..
go head and create the Zform, don't forget to activate the form, before calling in the driver program.
In the driver program,, call the function modules to invoke the form and activate the driver program as well. then you are all set/
Thanks-
Rahul
Maybe you are looking for
-
How can I use an iPad upgrade for an iPhone?
My iPad (Verizon) and iPhone were stolen from my car. My iPad has an upgrade available. I understand that normally the iPad can only be upgraded to another tablet. But someone told me I may be able to switch the upgrade to a phone. I have an old Veri
-
How to get the opposite(not true) of a pattern using Regexp_replace
Hi, In the following simple sql query....all occurences of 'a' are replaced by the next character... SQL> select regexp_replace('Palaio Faliro','[a]{1}') from dual; REGEXP_REPLACE('PALAIOFALIRO', Plio FliroIs it possible to get the opposite of this p
-
Is it possible to get JobLog for the series of tasks ???
Hi Experts, I am new to Workflow, can u tell me the following is possible thru Workflow.. My requirement is such.. step 1 : Call a program with varaint in background step 2: Get the status of the job above Step 3 : depending on the Status send mail
-
Xcode 6.1 Not able to open, missing plug-ins?
Hello, I have download and reinstalled Xcode 6.1 for about the 5th time and restarted my computer and i keep getting a error saying that Xcode is missing plug ins which is not even allowing me to open Xcode at all. It is telling me to reinstall Xcode
-
Hi community, after I updated my MacBook Pro to Lion Mac OS X 10.7 I can´t synchronize my iPhone 4 with iTunes 10.4.1 anymore. Is there anybody who solved this problem in the meantime? Thanks for your support.