Offset for the currency field
Hi frndz,
i having a amount (2000.00)
i need to convert to 2000
and next i need to apply offset functonality
to 2000 to split. but its telling this function cannt be applied for the p type data.
Edited by: Alvaro Tejada Galindo on Apr 30, 2008 1:44 PM
Just another option
DATA:
amt TYPE p DECIMALS 2 VALUE '2000.00',
amt2(10) TYPE n,
amt3(10) TYPE c,
leftover(2) TYPE c.
amt2 = amt.
amt3 = amt.
SPLIT amt3 AT '.' INTO amt3 leftover.
write amt3 to amt3 right-justified.
WRITE:/ amt.
WRITE:/ amt2.
WRITE:/ amt3.
Output
2,000.00
0000002000
2000
Similar Messages
-
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 -
How do u handle the user parameters for a currency field.
How do u handle the user parameters for a currency field.
Decimal saperator and a hundreds saperator. (depending upon the user parametes set for the user the saperators may differ)
Eg: currency field: 13.896,01 (In this case u2018,u2019 is a thousand saperator and u2018.u2019 is a decimal saperator) How to handle this one.
Regards,
Ram.Hi,
Try this code....
DATA: V_KURSF1 TYPE c LENGTH 10,
v_kursf2 type c LENGTH 10,
v_dcpfm TYPE xudcpfm, "Decimal or Thousand Notation
v_thousand TYPE char1, "Thousands Notation
v_decimal TYPE char1. "Decimal Notation
CONSTANTS: c_x TYPE char1 VALUE 'X',
c_y TYPE char1 VALUE 'Y', "Value Y
c_comma TYPE char1 VALUE ',', "Comma
c_point TYPE char1 VALUE '.', "point
c_blank TYPE char1 VALUE ' '. "Blank
IF v_dcpfm IS INITIAL.
SELECT SINGLE dcpfm
FROM usr01
INTO v_dcpfm
WHERE bname = sy-uname .
IF sy-subrc = 0.
CASE v_dcpfm.
WHEN c_x.
v_decimal = c_point.
v_thousand = c_comma.
WHEN c_blank.
v_decimal = c_comma.
v_thousand = c_point.
WHEN c_y.
v_decimal = c_comma.
v_thousand = c_blank.
ENDCASE.
ENDIF.
ENDIF.
Find c_point in wa_segment-exchange_rate. ( Eg:ield)
if sy-subrc = 0.
replace c_point in wa_segment-exchange_rate with v_decimal.
endif. -
To calculate average for a currency field in alv
Hi,
I have a requirement in which i need to find the average of a currency field in alv. For the particular field, i'm passing the value of DO_SUM = 'C' in thr field catalog(as suggested in many threads); but I'm not able to calculate the average. it still shows me summation when i click on summation button.
What could be the possible error??? Is there any other method we can do the same??
Thanks in Advance.
JaspreetHi
U can try this way.
*& Report Z_DEMO_JG
*& Display average in ALV report
REPORT z_demo_jg LINE-SIZE 80 LINE-COUNT 50
NO STANDARD PAGE HEADING.
TABLES: sflight.
TYPE-POOLS: slis.
* Data declaration
DATA: i_flight TYPE STANDARD TABLE OF sflight,
i_catalog TYPE slis_t_fieldcat_alv,
w_flight TYPE sflight,
w_catalog TYPE slis_fieldcat_alv.
DATA: v_repid TYPE syrepid.
* Selection screen
SELECT-OPTIONS: s_carrid FOR sflight-carrid.
START-OF-SELECTION.
* Fetch data from sflight table
SELECT *
FROM sflight
INTO TABLE i_flight
WHERE carrid IN s_carrid.
CHECK sy-subrc = 0.
v_repid = sy-repid.
* Build field catalog for ALV report
PERFORM build_catalog.
* Display ALV report
PERFORM display_report.
*& Form build_catalog
* Build field catalog for ALV report
* None
FORM build_catalog .
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = v_repid
i_structure_name = 'SFLIGHT'
CHANGING
ct_fieldcat = i_catalog
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc = 0.
* For average populate 'C' as value in
* field DO_SUM
w_catalog-do_sum = 'C'. " C = Average
* Modify record with new value
MODIFY i_catalog FROM w_catalog TRANSPORTING
do_sum WHERE fieldname = 'PRICE'.
ENDIF.
ENDFORM. " build_catalog
*& Form display_report
* Display ALV report
* None
FORM display_report .
IF i_catalog[] IS NOT INITIAL.
* Call ALV grid
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
it_fieldcat = i_catalog
TABLES
t_outtab = i_flight
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc = 0.
ENDIF.
ENDIF.
ENDFORM. " display_report
Edited by: meetjoe on Sep 15, 2009 7:17 PM -
Make the currency field in SOCO editable
Hi All:
PDP Scenario
I have a requirement to make the currency field in SOCO. I did try to control it in SPRO > SAP SRM > Cross-App > Extensions and Field Control > Configure Control for Fields on Item Level > Metadata for Fields on Item Levels, but did not work.
Configuration Entries:
Field Name: Currency
Object Type: BUS2121
Transaction Type: " "
Field Visible: Checked
Field Enable: Checked
Field Required: Unchecked
Any input is appreciated.
Thanks: MikeHi Mike,
You were almost at the right spot:
SPRO > SAP SRM > Cross-App > Extensions and Field Control > Configure Field Control > Configure Control for Fields of Substructures > Metadata for Fields of Substructures and Table-Like Enhancements
Entries:
Set type: SI
Field name: Currency
Obj Type: AO_SOCO
Set level: ITEM
Field Visible: Checked
Field Enable: Checked
Field Required: Unchecked
Perhaps you also need to check the "post-editable" field...
Hope that works!
Best regards,
Jos -
Validated the currency field in WEB
Dear all,
I have a develop a new WEB SRM screen, but I'm not managing to validate the Currency field when the user puts letters.
The field is of type CURR and when the user hits "enter" it puts all letters in CAP but doesn't sends any error message.
Anyone had this problem?
Thank you in advanced,
Vasco PiresHi Masa,
The screen works corretly when we run it on SAP Gui, the field has the type CURR, but when we executed on web, with a its web interface:
<input type="text" name="ZDADOS_FACT-PRC_NOVO[`j`]" value="`ZDADOS_FACT-PRC_NOVO[j].value`"
maxlength="17" size="10">
But when the users inputs the price, the system doesn't send the error box with the error message.
Thank you for your support,
Vasco -
How to add the Match code object for the requisitioner field in TCODE ME51N
Hi,
How to add the search help (Match code object) for the requisitioner field in transaction ME51N.
Please do the needful to me.
Regards
Rajeshdon't you think that posting your question to a microsoft developer site would be more efficient?
regards,
anton -
How to find out the description for the given field?
Hi All,
How to find out the description for the given field?
I mean ETTYP Desription is VTEXT. This we can find in TVEPT Table. So, How canwe find this?
Thanks in Advance
Sri...Hi Avi,
If i want to disply the fields like AUART and 'Description of AUART',
Suppose based on my query i will take AUART from T184 table. And the description of AUART is available in TVAKT table.
my question is if i have given T184-AUART and how do u find out AUART Description ?(How do u know which table is having Description of AUART)?
Thanks in Advance
Sri... -
In a query, for the selection field 'KNB1-ZWELS' a match-code isn't availab
Hi All,
Creating a query, for the selection field 'KNB1-ZWELS' a match-code isn't available.
Could anyone tell me the reason?
Thanks
GandalfHi,
Match Code Object is not available for the field ZWELS. If required, You need to contact a Developer for creating one . -
How to get the value for the LIT_Withheld field in the city tax form?
I am trying to get the value for the LIT_Withheld field on the city tax form , PAYUSEET.. This is not a database column but is generated based on some conditions.. Appreciate the help. Thanks, Suguna
Hi Abhmanyu,
Thanks for your response.
Search Help Name : ZZ_MG_MARITAL_VH
Selection Method : T502T
Search help parameters are SPRSL, FAMST, FTEXT,
Can u provide me a sample code to fetch the value of corresponding text.
Thanks,
Hari -
Field name and table name for the value field
hi,
i requred the value field for which the quantity that is not delivered in purchase order, so please tell me which field i have to go for the value field.
thanks and regards.Hi,
There is no direct field to get the PO Open qty(undelivered Qty).
Take the PO quantity for each Item from EKPO-MENGE.
For each PO Item there will be multiple GR(good's receipts) 's in MSEG table.
So pass EBELN and EBELP for MSEG table and Take all the GR Quantities(ERFMG) field and sum up .(have to take care of the Movement type also, becasue there will be some returns and GI's).
Substract the GR qty from PO qty you will get the UNDELIVERED QTY of A PO.
Regards,
Anji -
F4 help for the screen fields in module pool program
Hi All,
I have a requirement that, i want to provide F4 help for the 2 fields in module pool program. the fields are document number and fiscal year from rbkp table.
i could provide search help for two fields.
but how to select matching fiscal year for that document number.
problem: i am getting fiscal year as first four digits of document number.
please help me to solve this problem.
Thanks & Regards,
Namratha.VHi,
If your requirement is after selecting the document no from f4 help then the corresponding year should be updated in the document year field then use FM --> DYNP_VALUES_UPDATE
In this function module pass the screen no program & field for which u want to update value -
Providing F4 help for the same field on selection screen
Hello Experts,
My requirement is :
There are 2 radio buttons and a parameter "p_file" on my selection scree.
1. rb_appl
2. rb_pres
If the radio button rb_appl = 'X', I need to place the logic of F4 help of application server for the field p_file. Else if the rb_pres = 'X', then I need to place the logic of F4 help of presentation server for the same field p_file.
I have written the code in the below manner
PARAMETERS: rb_appl RADIOBUTTON GROUP rad DEFAULT 'X',
rb_pres RADIOBUTTON GROUP rad ,
p_file TYPE ibipparms-path.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
IF rb_appl = 'X'.
PERFORM f_applictn_server_filenm.
ELSEIF rb_pres = 'X'.
PERFORM f_presentation_filenm.
ENDIF.
But I am getting the F4 help for only the radio button for which i have placed the default value in the parameters.
So please let me know how to define the F4 help for the same field based on the radio buttons.Hi,
You can acheive the same by the addition of [USER-COMMAND fcode].
RADIOBUTTON GROUP group [USER-COMMAND fcode] - The addition USER-COMMAND can be used to assign a function code fcode to the first parameter in a radio button group. The function code fcode must be specified directly, and have a maximum length of 20 characters. When the user selects any radio button of the radio button group on the selection screen, the runtime environment triggers the event AT SELECTION-SCREEN and transfers the function code fcode to the component ucomm of the interface work area sscrfields.
So you code should be altered as
PARAMETERS: rb_appl RADIOBUTTON GROUP rad
USER-COMMAND radclick "Addition which you have to make.
DEFAULT 'X',
rb_pres RADIOBUTTON GROUP rad ,
p_file TYPE ibipparms-path.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
IF rb_appl = 'X'.
PERFORM f_applictn_server_filenm.
ELSEIF rb_pres = 'X'.
PERFORM f_presentation_filenm.
ENDIF.
Thanks & Regards,
Harish -
HR - have to add description for the customised field in infotype 4118.
I need to add description for the customised field in info type 4118 in HR module.
hi,
for HR infotype go to tansaction PM01 .
OPEN YOUR INFOTYPE . ADD YOUR COSTOMIZING FIELD .
also see these links
http://www.sapdevelopment.co.uk/hr/hrhome.htm
See:
http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
sites regarding hr-abap:
http://www.sapdevelopment.co.uk/hr/hrhome.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
http://www.atomhr.com/training/Technical_Topics_in_HR.htm
http://www.planetsap.com/hr_abap_main_page.htm
You can see some Standard Program examples in this one ...
http://www.sapdevelopment.co.uk/programs/programshr.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification
http://www.erpgenie.com/faq/hr.htm.
http://www.planetsap.com/hr_abap_main_page.htm
http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
These are the FAQ's that might helps you as well.
http://www.sap-img.com/human/hr-faq.htm
http://www.sapgenie.com/faq/hr.htm
http://www.planetsap.com/hr_abap_main_page.htm
http://www.atomhr.com/library_full.htm
HR Long texts Upload
Look at the below link
BDC - hr maintain text
HR
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
http://www.atomhr.com/training/Technical_Topics_in_HR.htm
http://www.planetsap.com/hr_abap_main_page.htm
you can see some Standard Program examples in this one..
http://www.sapdevelopment.co.uk/programs/programshr.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification
These are the FAQ's that might helps you
http://www.sap-img.com/human/hr-faq.htm
http://www.sapgenie.com/faq/hr.htm
http://www.erpgenie.com/faq/hr.htm.
www.sap-img.com
http://www.planetsap.com/hr_abap_main_page.htm
http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
http://www.sapfans.com/forums/viewtopic.php?p=498530&sid=d7ec5866e3fb26880da129de45ce79de
http://www.sapcookbook.com/preview_hr_questions.htm
http://www.atomhr.com/library_full.htm
http://www.sapdevelopment.co.uk/hr/hrhome.htm
http://www.planetsap.com/hr_abap_main_page.htm
http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci983590,00.html
http://www.allsaplinks.com/HRmaterial.html
http://www.allsaplinks.com/timemanagement.html
http://www.allsaplinks.com/payrollcompletefunctional.html
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/HRINF/HRINF.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYXXFORM/PYINT_FORMBUILDER.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMPA/BCBMTWFMPA.pdfhttp://help.sap.com/printdocu/core/Print46c/en/data/pdf/MYSAP/SR_HR.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
Re: New to ABAP HR Programming
http://www.planetsap.com/hr_abap_main_page.htm
Reward points if useful.
REGARDS ,
PANKAJ -
Displaying no default zeroes for the numeric field in the table display.
hi folks,
I am binding a table in the context which has some numeric fields. I'm displaying the same table which has some records for editing purpose. But the problem is that the numeric field column is being displayed with zeros if it doesnot have any value in it. Can u explain how to disable the zeroes by not displaying them by defualt when there is no value for the numeric field.
regards,
Ramuset the format of the context attribute TEST is the context attribute name
data: lr_info type ref to if_wd_context_node_info.
data: ls_prop type WDY_ATTRIBUTE_FORMAT_PROP.
lr_info = wd_context->get_node_info( ).
ls_prop = lr_info->GET_ATTRIBUTE_FORMAT_PROPS( name = 'TEST' ).
LS_PROP-NULL_AS_BLANK = 'X'.
lr_info->sET_ATTRIBUTE_FORMAT_PROPS( name = 'TEST'
FORMAT_PROPERTIES = ls_prop ).
Abhi
Maybe you are looking for
-
HELP!! error message: "The iPod cannot be updated. The file or directory is corrupted and unreadable." What do i do?!?! it wont let me update or ANYTHING, it wont even let me delete anything off of it. Its a 5th generation 30 gig about 1 1/2 years ol
-
Streaming audio restarts after stopallsounds
Hello, the site in question is thirdcache.com - i've got streaming audio playing as background music, however after someone clicks the stop all sounds button it stops, however when the background music reaches the end of it's timeline, it starts back
-
ITunes 11 changes artist and album information
Since iTunes 11 I cannot rename artist name and album information and have it stick.. I sort by last name and always delete the sort information in the sort tab. After restarting my Mac I find the information in sorting has reappeared and the artist
-
2008 R2 cannot proceed sysprep. Error 4201 SOLVED
Hello, I've tried everything what i have found on the internet about the error code 4201 when proceeding to a sysprep generalise. I've made a clone of a virtual machine, removed the network connections. Putted the Windows server 2008 R2 in workgroup
-
17" MBP Shipping in 1 to 2 days from CompUSA ?
Can anyone confirm this? Is this a sign the 17" MBP are soon here? http://www.compusa.com/products/productinfo.asp?productcode=51764571&pfp=SEARCH Windows XP