Displaying type dec when value = 0

I have a variable which is of type dec. When 0 is entered as a value, the value displays as a blank field whereas I want to display as 0.0 - but only if 0 has been entered as a value. Can this be done?

I have come with an approach but to be honest I think your original is probably better.
I have basically worked with character fields but created them in the dictionary and used
conversion exits.
I created a data element ZNRW_CHAR5 using a domain of the same name.
The domain ZNRW_CHAR5 is type CAHR length 5 but has an output length of 6 and uses a convers routine of ZNRW5.
I created a local function group which contained two function modules which have the same interface:
an untyped importing parameter 'input' and a simlar exporting parameter 'output'.
CONVERSION_EXIT_ZNRW5_INPUT...the only code in this is: output = input.
CONVERSION_EXIT_ZNRW5_OUTPUT...has a bit more code
data l52(3) type p decimals 2.
data l_string(6) type c.
clear output.
if input co ' 1234567890.'
and input is not initial.
write input to l_string.
l52 = l_string.
output = l52.
endif.
I created a test abap:
REPORT  ZNRW_TEST_CONV_EXIT.
parameters: p_char type ZNRW_CHAR5.
write:/ '''' no-gap,p_char no-gap,''''.
This works but I think it's messier than your origianl. Maybe it could be cleaned up a bit??

Similar Messages

  • Function module to convert float value to data type 'dec'

    Hi experts,
      In a report i need to convert float value to the data type 'DEC'. How to convert it. Is there any function module for this conversion.
    Thanks and Regards,
    Vaibhav Tiwari.

    Hi ..
    We can do like this...
    Data : V_float type F value '12345.67'.
    Data: V_dec type P Decimals 2.
    Write:/ V_float exponent 0. "This will display it like Type P
    or
    Write V_float to V_dec EXPONENT 0.
    Write:/ V_dec.
    reward if Helpful.
    <b></b>

  • Displaying TYPE body text when clicking on the type in the tree on the left

    It seems that the SQL Developer is unable to display the text of the TYPE BODY when you click on the type body in the explorer tree on the left hand side.
    All it shows is just this:
    create or replace and nothing else. The type body is completely missing.
    Running v1.0.0.14 Build 14.22 on Windows 2000 and XP.

    Just fixed that yesterday. I'll be out later this week.
    -kris

  • Multiple Display Types in a single column

    I have a situation where I have to display a bunch of attributes for a customer. Each attribute can have a different type, Text, Dropdown, Date etc and that information is stored in a table.
    I was able to use apex_item to display the different display types based on the type of attribute.
    So the layout of the form has 2 columns, column 1 is the name of the attribute and column 2 is the value of the attribute (displayed as the various types of date, text, dropdown etc) However, I am having an issue with the Date popups. When I select a date it always goes into whatever date is listed first. No sorting is going on in the select or the report.
    I'm guessing my issue has to do with displaying different display types in the same column? If that is true, how should I change my approach to this problem? I want all the attributes on a single page, so is my only option to have each attribute in a different region?
    Thanks,
    -- Johnnie

    Denes,
    OK thanks for the heads up, let me try to clarify.
    My problem is that I have multiple date popups on the same form. When I pick a date for any of the date popups, it always updates the first date popup field on the form. I stated there was no sorting at all because this thread indicated that sorting could cause this issue:
    DATE_POPUP
    Another hit for this issue was here:
    Re: HTMLDB_ITME.DATE_POPUP problems
    This suggested that having multiple data types in the same column (which is what I am doing) is not supported, but this is an old thread.
    My form will be a manual tabular form. I need to display a list of attributes, however some are freeform text, some are SQL LOV dropdowns, and some are date popups. Right now they are all displayed in the same column. Could this be causing my date popup issue? If so what alternatives do I have?
    Screenshot of my form here: http://johnniebillings.googlepages.com/outlook.jpg
    Hope that clears up the issue I am having.
    -- Johnnie

  • The data type DEC while downloading from ALV to EXCEL

    The data type DEC while downloading from ALV to EXCEL is giving some invalid data .
    Ex : In ALV field is the time difference in  hours:minutes
      if the value is  :23 in Excel it will be 22:59 .
    Please Suggest immediately

    Hi ....
    I have the similar problem. My coumns are not in any sequence when I download it to excel sheet.
    How do I fix it.
    Neha

  • Error:   /BIC/ZPROP_REM cannot be convertedin type DEC

    Hi All,
    I am loading data from a flatfile, I am able to see Data coming in preview, but when I schedule its shooting an error message,
    Record                                                   1:ContentsProperties Remedi from field /BIC/ZPROP_REM cannot be convertedin type DEC ->longtext
    Message no. RSAR198
    Diagnosis
    The value 'Properties Remedi' from field /BIC/ZPROP_REM cannot be converted into the DDIC data type DEC of the InfoObject in data record                                                   1. The field contentcould not be transferred into the communication structure format.
    System response
    The data to be loaded has a data error or field /BIC/ZPROP_REM of the transfer structure is mapped to an unsuitable InfoObject.
    The conversion of the transfer structure into the communication structure was cancelled. The processing of data records with errors was continued with respect to the settings in the error handling of the InfoPackage (Tab Page: Update Parameters).
    Not able to find the solution..
    Please help in resolving this,
    Thanks in Advance,
    Sai

    Hi Kapadia,
    thanks for ur immedaite reply,
    As I am loading flatfile, the transfer rule assignment will be generated automatically when we aiisgn datas source,
    moreover its a keyfigure which is in DEC format..
    please explain me where I am going wrong..
    Thanks,
    Sai

  • How to display further information when a drop down menu option has been selected.

    Hi all,
    Thank you in advance for any replies!
    I'm building a website which has a drop down menu (HTML for the menu is below). When a TV size is selected i need the pricing information for that specific TV size to appear below the menu.
    Is there a way to do this?
    Thank you!
    <select name="Please select your TV Size" size="1">
            <option> </option>
            <option>Less than 42&quot;</option>
            <option>More Than 42&quot;</option>
          </select>

    Sure it is. And Nancy has given you a good alternative as well.
          <p>TV1 <input id="num1" type="radio" checked value="tv1" onclick="document.getElementById('tv1').style.display='block';document.getElementById('tv 2').style.display='none';this.checked=true;document.getElementById('num2').checked=false;" ></p>
          <p>TV2 <input id="num2" type="radio" value="tv2" onclick="document.getElementById('tv2').style.display='block';document.getElementById('tv 1').style.display='none';this.checked=true;document.getElementById('num1').checked=false;" ></p>
    <div id="tv1">Info for TV1</div>
    <div id="tv2">Info for TV2</div>
    With this CSS -
    <style type="text/css">
    #tv1 { display:block; }
    #tv2 { display:none; }
    </style>
    Should work.

  • Problem with type DEC

    Hi,
    I have a data of type DEC in a table, in MI Server. The value it is 3. When i sync the app this value is transformed in 786435 by MI Server. And this happen with all data of this type. Anynone knows what can be happen?
    Thanks..

    Hi Jo,
    We are using smartsync layer... When i get this field, the type it is P in the application... I'm confusious because if i do a select in the table on MI Server, the data is returned correctly and when this data is sync, in the merep mon shows that this value updated. anymore idea?
    Thanks.

  • Display Login failure when using External Custom Login Form

    I am new to OAM area and really apreciate if some one can guide me in the right direction. I have configured External Custom Login Form (thanks to fusionsecurity blog) with Oracle Access Manager 11g + webgate 10g. If I enter correct user id and password in the below form, then all is good and able to access the protected resoruce.
    If I enter incorrect values for loginname/password fields, then the from simply refreshes itself and does not give me any error message. How can display error message when a user enters in correct values for those fields?
    <form action="http://hostname:7777/oam/server/auth_cred_submit" method="post">
    <fieldset>
    <legend>Login Screen</legend>
    <label for="username" accesskey="u">User Name:</label>
    <input type="text" id="username" name="username" size="15" tabindex="1">
    <label for="password" accesskey="p">Password:</label>
    <input type="password" id="password" name="password" size="15" tabindex="2">
    <input type="hidden" name="login-form-type" value="pwd">
    <input class="submit" type="submit" value="Login" tabindex="3">
    </fieldset>
    </form>
    Thanks

    Hi!
    I have installed Oracle Access Manager 11g + Webgate 11g and not 10g, but I think
    it has to work beause login is being processed by OAM (/oam/server/auth_cred_submit);
    and it if does not work, it may give you a clue on how to do it.
    Having stated that fact, it is very simple to do it: whenever I try to access a protected
    resource and I am not authenticated I am redirected to my login page and some
    special parameters are passed to it such as: request_id, OAM_REQ, authn_try_count and
    some others.
    authn_try_count is the magic one as it show the number of login tries, so here is
    a code snippet of my login page which uses JSTL for conditional processing.
    <form...>
    <c:if test="*${param['authn_try_count'] > 0}*">
    &lt;span class="error-msg"&gt;
    <fmt:message key="login.val.wrong.login"/>
    &lt;/span&gt;
    </c:if>
    </form>
    Best regards,
    Jesús García from
    Mexico city

  • ClobDomain and editor Display Type

    I have defined a database column as Clob. When I generate the application, the Application Definition editor shows Java Type as ClobDomain
    for that item. I changed the Display type to 'editor' and when I ran the application the editor is acting weird. First of all when I start typing all the existing text disappears. Is that a limitation with CLOB datatypes?
    I tried using editor for other string types and it works fine.
    Did anyone else encounter the same problem.?
    Thanks.

    Hi Steven,
    This is what the inputtext for CLOB looks like in my case:
    <af:inputText id="Desc"
    value="#{bindings.Desc.inputValue}"
    required="#{bindings.Desc.mandatory}"
    rows="#{bindings.Desc.displayHeight}"
    columns="#{bindings.Desc.displayWidth}" simple="true" partialTriggers="DescEditorLink"
    binding="#{DescEditorItem.editorItem}">
    </af:inputText>
    Could you please explain what processScope means. Should I define that somewhere else other than the .jspx page? Should I replace the existing "value" with the processScope you mentioned.
    Thanks.

  • Customer not getting displayed in PDF when sales order is received in email

    Hi,
    We are using a Z smartform for printing order acknowledgement for sales order.When printing the same on paper or in print preview, the output is correctly displayed. However, when automatic pdf is received in email, customer field is missing.
    Any suggestion why this could be?
    Below are the configurations in nace transaction for this output type:
    Output Type     YA02   
    Application        V1     
    Medium               Short text                        Program                         Form Routine      Form            Smartform
    1     Print output                           /SMB40/RVADOR01     ENTRY                          Y_ORDER_ACK_NEW
    2     Fax                           RVADOR01                          ENTRY     RVORDER01
    6     EDI                           RSNASTED                          EDI_PROCESSING                    
    8     Special function     /SMB40/RVADOR01          ENTRY                          Y_ORDER_ACK_NEW
    A     Distribution (ALE)     RSNASTED                         ALE_PROCESSING                    
    TIA
    Vartika

    Hi Vartika
    Take help of ABAP developer to debug smartform. when Smartform converts data into PDF may be customer number is missing.
    Regards
    Nagendra

  • With display type native event is not working in my wd application

    Dear Friends,
    I have few interactive forms created webdynpro components.
    in SFP: formtype: ZCI and inserted the webdynpro script in the layout and interface type is DDIC.
    in Webdynpro: taken IF form UI element and with Enable check box checked(ON) and display type is Native.
    when i run my wd application interactive forms is opening but when i click on button on webdynpro or on enter of input field event is not getting trigger. cursor is showing wait icon and in busymode only.
    if i try with display type as activex it is working fine.
    But i don't want to use type as Activex.
    One more thing initially i have created 2 interative forms with those forms with displya type native is working fine, for new forms only the poblem is coming.
    please let me know how to get rid of this.
    Thanks,
    Mahesh.Gattu

    Hi ganesh,
    i hope you have already followed the process what i mentioned in my question.
    above that some times we are facing this busy mode issues, might be.. there coudl be some problem when we insert the webdynpro script.
    on sfp layout from utilities insert the webdynpro script.
    then sheck the script editor by selecting the data node in hierarchy tab.
    make sur the both event *presave and *formload are filled with some in built script and the language is Java script and Client side.
    then save activate the form and try.
    all the best.
    Thanks,
    mahesh.gattu

  • Display Currency symbol with value in ALV Report

    Hi Experts,
    I need to display currency symbol with value in ALV Report like if currency type is dollar then $200.
    Here I am using field catalog type slis_t_fieldcat_alv and suing field merge catalog FM: 'REUSE_ALV_FIELDCATALOG_MERGE'
    I tried like this
        IF <fs_fieldcat>-fieldname = 'STPRS'.
          <fs_fieldcat>-seltext_s = 'Std Cost '.
          <fs_fieldcat>-seltext_m = 'Std Cost'.
          <fs_fieldcat>-seltext_l = 'Std Cost '
           <fs_fieldcat>-tabname = 'MBEW'.
          <fs_fieldcat>-ctabname = 'T001'.
          <fs_fieldcat>-cfieldname ='WAERS'.
          <fs_fieldcat>-datatype = 'CURR'.
        ENDIF.
    Please any one can suggest the solution for this.
    Advance Thanks.
    Regards,
    Bala Achari

    Hİ,
    Check this link.
    http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=24379571
    Take care.
    Çağatay

  • Is it possible to create a custom display type in DIAdem, for example a speedomete​r type instrument​?

    As an example I have velocity data which shows a vehicle accelerating from rest to 60 km/h and then travelling at a constant speed. As opposed to displaying this data using a 2D axis system is it possible to create a new speedometer display type to display this information? Maybe this display type already exists but I have not come across it yet? I've been using DIAdem for a few days now. The current version I am using is 11.2. It has been suggested in the past that it was possible to display data using numeric displays etc but I can't seem to find the features in v11.2. Thanks for your help in advance.

    Hey Matthew,
    I'm sorry for the [extremely] delayed reply - I have been out of the office (and out of the country) for two weeks with extremely limited email access.  I've attached the files that I used to create the example you saw in the YouTube video embedded above.  Please note that I threw this together pretty quickly for the video, and that it is not "commercial quality."  Use this as a proof-of-concept upon which to elaborate to get started.
    The parts are:
    CAN Synchronization.tdv
    This is the DIAdem VIEW Layout that contains the video, map, 2D axis, and embedded user dialog with ActiveX gauge control.  Think of this as the "user interface" you see in the video.
    Gauge.sud
    This is the scriptable user dialog (SUD) box that is embedded in the VIEW Layout described above.  It contains the ActiveX control which I have affectionately named "MyGauge."
    DisplayCursorCommand.vbs
    This is the short script that is designed to react to the event that fires when the cursor is playing in DIAdem VIEW.  I have commented all 5-ish lines with their functionality.
    In order to register the script so that it fires in reaction to the event when the cursor is playing, I chose to register it as a DIAdem UserCommand (Settings » Options » Extensions » User Commands) and then run the line of code:
    View.Events.onCursorChange = "DisplayCursor"
    You could do this elsewhere within some other script.
    Let me know if you have any questions!
    Derrick S.
    Product Manager
    NI DIAdem
    National Instruments
    Attachments:
    Gauge.zip ‏7 KB

  • ECT List View Web Part displaying incorrect data when View Item

    I have a External Content Type which pulls data from a stored procedure. The stored procedure has 1 parameter - the users logon id. The data retrieved is a list of meetings with start date time, end date time, location, subject, etc. From this ECT there
    is an External List which displays all data correctly.
    There is 2 pages within the site and its subsites that have list view web parts which display a subset of the info from the external list. When the user clicks a specific meeting to display the complete info on the meeting, the wrong information is displayed,
    it always displays the info for the 1st meeting in the list. So, I displayed the BDC Identity field on the list and this field is identical for all the rows since the key for the ECT is the username and hence not unique.
    I've spent all day trying to finding a way to resolve this and have come up empty. I've tried to find a way to make the BDC Identity field to be unique, using Business Data View web part, Data View web part, and nothing.
    The user needs to be able to click the My Meetings url header on the above pages to see a full list of their meetings so I need the external list. Any ideas how to make the BDC Identity field unique or how to get the View Item on the List View web part to
    work correctly?

    Sorry, I do not understand what you mean.
    I resolved the non unique BDC Identity problem by simply adding the row # to the Username in the stored procedure so the BDC Identity fields on the list records are now unique (although they're really long ie. __bk44003500070057003700560027000200140037003700f600360096001600470056003300,
    __bk44003500070057003700560027000200140037003700f600360096001600470056004300 etc). Not sure how it generates the BDC Identity?
    I still see the same behaviour when you select a meeting to display the details. It always displays the 1st record in the list.
    I added code to the DispForm to display the ID when the page loads and the BDC Identity from the record and verfied that they do match.
    I can add another parameter to the stored procedure and just return the row # in that field. What do you mean by make the identifire as Identity in operations?

Maybe you are looking for

  • RWI 00200 Error while scheduling the Bex Query based Webi report

    Dear All, I am facing the below error while scheduling the Bex Query based Webi report. Error:RWI 00200 We are using BO XI 4.0 Sp05. Please advise

  • Problem With MRP

    Hi Friends, I am facing a problem with MRP. In my Implementation, my Client is a Automobile Gasket Manufacturer. One major product line is Gaskets which is high volume and low price We will use Make to stock  with streategy 40. Now the queries are as

  • Fustrated of not able to get the update download.

    Ok, this is getting ridulous, I have been trying to download the maverick for the past hour and it is not getting anyway. Is this going to be like this, not user friendly,

  • What handler is called when a Status-Bar-Icon is clicked in Cocoa-Applescript?

    In Cocoa-Applescript Xcode, what handler is called when the Status-Bar-Icon for my app is clicked? Are there any variables or connections that I have to make?

  • Dll C structure

    I search all the examples about how to pass the c  structure dll in LABView, but I really don't know the true answer.here is my question: I want to use this dll which was given from my  customer.but I don't get the following data that I expected. /*s