Moving of character to currency fields
Dear all,
i want to populate the numerical value of a character type field to
currency type field. Pls help me to handle the decimals.
For eg:
data : v1(15) type c value '123456',
v2 type netwr_ak.
move v1 to v2.
How to handle if the value of V1 is 12344546.56 (with decimals)
I have to get the output as 12.344.546,56.
Thanks in advance...
Regards,
Shalem
Dear shalem,
You can pass character field value '12345678.99' to numerical value field.
And that numberical field will display value 12.345.678,99
<b>Ex:
data: f1(15) type c value '12345678.99',
f2 type netwr_ak.
move v1 to v2.
write v2.</b>
<u>output shows:</u>
v2 = '12345678.99'
Reward points if helpful.
cheer !
Moqeeth.
Similar Messages
-
Problem with currency field in smart form
hi
friends ..
i had problem with currency field in smartform iam printing 5 currecny
fields after the main window .But not getting printed on right way gets printed down from the given mesaurement and i get lot of gap betwen the
each fields for ex.
33,260.00
120.00
0.00
0.00
0.00
i thought the the problem is with space .so iwanted to condense it but cannot as it is currency field so move into character fields .but the user want out put in currency format like 22,60.20 if i get the value in char variable i get 2260.20 which i dont want .
so pls help me how to condense or shift left and print the currency field on right place.
regards
answers will be rewarded points.hi,
this is a normal problem u can avoid this by moveing these currencu value to a character field then print the char field us ing condece... &var(C)&..
eve if not solve the problem use the TEMPLATE node..
Please Close this thread.. when u r problem is solved. Reward all Helpful answers
Regards
Naresh Reddy K -
Hello All,
I am moving an amount value to a field that is of currency type using write statment.But i cannot use write statment for currency fields.I tried using currency 'EUR' also but it is giving the same error.
write : gs_outtab-rmwwr_out to lv_rmwwr_out currency 'EUR',
Error : LV_RMWWR_OUT must be a character type.
How to remove this error?
Thanks,
Rakesh.Hello,
With WRITE stmt you cannot use CURR type elements. Do an F1.
You need some workaround.
BR,
Suhas -
Transferring the negative sign from Right to Left for a currency field.
Hi All,
I am trying to transfer the negative sign in a currency field from right to left but in doing that i am not getting the comma seperators of the currency field.
For eg : If the value is 12,345,678.00- then after converting it i am getting it as
-12345678.00 and i am loosing the commas.
I am trying to transfer the negative sign by first converting the currency field into character field.
Kindly help for the same.
Thanks,
SharadenduHi,
Use FM CLOI_PUT_SIGN_IN_FRONT.
Try this code as well
data: var(10),
length type i.
var = '300-'.
write var.
length = strlen( var ).
length = length - 1.
replace first occurrence of '-' in var+length(1) with ''.
concatenate '-' var into var.
write:/ var.
Regards,
Satish
Message was edited by:
Satish Panakala -
Negative sign for Currency fields
Hello experts,
If a currency field containt -Ve sign (86.47-) then, i have to move it this sign to Left sinde. I have do this as follow by moving the currency field value to Charractor field
DATA: w_total1 (18).
MOVE w_total To w_total1.
IF w_total1 CA '-'.
SHIFT w_total1 RIGHT CIRCULAR.
ENDIF.
CONDENSE w_total1 NO-GAPS.
But don't want to move this to Chanddacter field for other pupepose. Now how can i **** the -Ve sign to left side for currency field, IF bsid-shkzg EQ 'H'.
Thanks.Hi sandhya ,
Try this :
DATA: w_total type string ,
w_total1 type string.
w_total = '1,4567.7-'.
MOVE w_total To w_total1.
IF w_total1 CA '-'.
SHIFT w_total1 RIGHT CIRCULAR.
ENDIF.
* CONDENSE w_total1 NO-GAPS.
write : / w_total1.
Hope all your issues are fixed now .
Regards ,
lokesh
Edited by: Lokesh Pattnayak on Oct 11, 2010 10:23 AM -
CURRENCY FIELD IN TABLE CONTROLLS OF MODULE POOL PROGRAM
Hi All.
I am fasing an issue in module pool.
I am using a table controll to display the data on the screen.
There is one field of currency type .
the amount in that field is -ve(Negative) then the program giving a short dump by saying that the problem is in the conversion.
if the field is + ve(means no sign) it's executing fine.
Can any body help me to solve this issue,
Thanks in advance,
regards,
venkatHi Venkat,
Open the screen painter (SE51) and go to the currency field in the table control on the screen. In the "TEXT" field in the toolbar, delete a character (_) and type in "V" as the last character. The issue should be solved.
Regards,
Manoj -
How can I concatenate a currency field (eg: 12.25) with numeric values
Hi,
I ma working in ECC6.0.
How can I concatenate a currency field (eg: 12.25) with numeric and character values into a variable.
I want to concatenate 12.25 with "+" and "0".
Regard,
DivyaHi,
I ma working in ECC6.0.
How can I concatenate a currency field (eg: 12.25) with numeric and character values into a variable.
I want to concatenate 12.25 with "+" and "0".
Regard,
Divya
==================================
data: l_string type string.
move l_curr_field to l_string.
condense l_string no-gaps. "if needed
concatenate l_string '+' '0' into l_string.
now your l_string will have all the values. -
Passing Currency field to external subroutine from script
Hi,
I am passing one currency field to external subroutine from script. In subroutine we can get that currency in character format. I want to convert that into currency format. how can i do that?
thnk ueasy conversion:
number = character_parameter -
Function module RFC_READ_RABLE and currency fields
I am using RFC_READ_TABLE to access table BSEG on a remote system. My problem is retrieving field PSWBT which is a currency field. The value is returned as 20202020203.43 and overwrites part of the next field too. The value should be 4,083.33
Does anyone have any experence with currency fields in this situation and can offer any advice?
Thanks & regards.Hi everyone,
Thank you for your help. I have now resolved the issue.
Yes I was using table FIELDS. Wim was correct that I also needed to use field PSWSL but this alone did not solve the problem. I had to define the currency field PSWBT as char 13. When the field was retrieved using RFC_READ_TABLE, I condensed the field and then moved it back to a currency field. As follows:
TYPES : BEGIN OF ty_accdoc,
pswbt(13),
pswsl type pswsl,
END OF ty_accdoc.
DATA : wa_accdoc TYPE ty_accdoc,
i_accdoc TYPE TABLE OF ty_accdoc.
DATA : wa-pswbt TYPE pswbt.
wa_fields-fieldname = 'PSWBT'. APPEND wa_fields TO i_fields.
wa_fields-fieldname = 'PSWSL'. APPEND wa_fields TO i_fields.
u2026u2026u2026 Call function u2018RFC_READ_TABLEu2019u2026u2026u2026u2026
CONDENSE wa_accdoc-pswbt NO-GAPS.
wa-pswbt = wa_accdoc2-pswbt.
Kind regards,
Alison -
hi
i have to display the currency field o/p with diff. currencies according to countries.how can i do that.Hi,
see example program ERGP2070. It is doing something similar to your requirement.
It is declaring currency as a separate field 'WRG'. and for amount field, setting CFIELDNAME field as 'WRG' and DO_SUM = 'X'.
try this.
Regards,
Satish -
Summary report treats a currency fields as text
In the summary report I have three charts with the currency field. The two charts show 'average' and 'total' but the other chart shows 'percentage' of responses - in other words the report treats that field not as a number but as text. The filed is designated as a currency in the desing view. Why is it treated as text?
Hi,
The percentage of responses is a reference for the responses of that field. If you don't want it to show, you can disable it.
Hope this help,
Perry -
Hi,
In my report I am displaying the currency field NETWR in ALV Report.
Now, the requirement is as such-
For eg- If the value of NETWR field is 57,441.50 then I want to round it off to display only 57(assuming that all values in thousands) i.e 57,441.50 would be considered as 57,000 only.
I think there is some functional module to solve this problem.
Can somebody help me regarding the same,points will be rewarded.Hi friend
Try this.
Check this sample:
DATA: WA_INPUT TYPE P DECIMALS 8,
WA_OUTPUT TYPE P DECIMALS 2.
WA_INPUT = '5678.65800341'.
CALL FUNCTION 'ROUND'
EXPORTING
INPUT = WA_INPUT
IMPORTING
OUTPUT = WA_OUTPUT
EXCEPTIONS
INPUT_INVALID = 1
OVERFLOW = 2
TYPE_INVALID = 3
OTHERS = 4.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
WRITE: WA_OUTPUT.
OR this,
DATA: I TYPE I,
P TYPE P DECIMALS 2 Value '3.5'.
I = P.
Reward if helpfull. -
Hi,
How to Display Currency Field in SmartForm and how to declareYou can display a field in GLOBAL data of TYPE I (v_menge).
then in the related window of that Quantity field create PROGRAM LINES and in that write a small code such that
MOVE ITAB-MENGE to v_menge.
Now display this field v_menge in the smartform
Regards
Anbu B -
hi
currency field in service PR for item category D and B is greyed out, it cant be changed according to sap note
do u have any workaround or any other alternative how this can be chnaged?Hi,
I hope I have understood your question correctly!!
You can maintain Service or Limit in item details there you have the option of maintaining price.
Please for your reference go thru this document: http://www.sap123.com/a/52/
Hope you find these useful.
Reetesh -
Stock account currency field in MB5L report
Hi!
can any one tell me in MB5L report for field materials currency and stock account currency, from system will pick up the values?
I think materials currency field will pick up from GL accounts?
But stock account currency, from where it will pick up value?
regs,
ramesh bHi!
both are not GL account balances.
I have studied the report and understood.
the material currency field: just it will take total stock avialable * std price/MAV price ( it will be equal to value in material master, MB5B, MB51 )
the stock account currency field: it will take GL account balance via valuation class ( OBYC setting BSX)
Here for example if you select only one material in MB5L report , it won't show the GL balance pertaining to that material, it will simply show the total GL balances that means system won't check material number existed in line items ( BSEG table).
any way thanks for your inputs.
regs,
ramesh b
Maybe you are looking for
-
How to print pdf file not using the the adobe reader ?
hello, i used the adobe sdk to open a pdf file in read and modify it serveral times and each time save it to another directory,and now i need to write a program to print the pdf file in this directory.when print the file,i want to continue my work al
-
iTunes could not recover my iPad mini and gave out the error message 3194. What should I do?
-
How to Map IDOC Extensions in LSMW
HI, I am working on a conversion for uploading material master using IDOC Method, There is an extension in the IDOC can anyone tell me how to map the extensions in the LSMW. ADVANCE Thanks Guhapriyan Subrahmanyam
-
Hey, Phil, I still want Blu-ray!
I just read on another mac blog that Phil Schiller says that Mac customers no longer want Blu-ray. Phil, I'm here to tell you I've been a Mac loyalist since 1991. In our household we have 5 mac portables, two iMacs, three iPhones, two iPads, I'm not
-
Help while creating ASM instance on rac environment on Linux
Help while creating ASM instance on rac environment on Oracle enterprise Linux 4 x84_64 Update 5 (10g2). a) Installed ASMLib 2.0 Packages b) Configured and Loaded the ASMLib 2.0 Packages c) Created ASM Disks for Oracle d) I can see, three volumes alr