Change screen field dynamically only for decimal places

Hi,
I have variable for which is declared to take upto 3 decimal places, my requirement is ...
when this variable is getting populated for a particular screen i have to display decimal upto only 2 places, this data element is also used in other screens ao i cannot modify its domain directly...
is there anyway i can do it dyanmically when values are getting populated on screen
Regards,
Prateek.

Hi,
If you want to use with WRITE statement:
Effect of different DECIMALS specifications:
DATA: X TYPE P DECIMALS 3 VALUE '1.267',
Y TYPE F VALUE '125.456E2'.
WRITE: /X DECIMALS 0, "output: 1
/X DECIMALS 2, "output: 1.27
/X DECIMALS 5, "output: 1.26700
/Y DECIMALS 1, "output: 1.3E+04
/Y DECIMALS 5, "output: 1.25456E+04
/Y DECIMALS 20. "output: 1.25456000000000E+04
If you want to use in ALV display - Fieldcatalog:
*-Decimal places for Del Qty and Bag Wt
    IF p_fieldname = 'DELQTY' OR  p_fieldname = 'BAGWT'.
         ls_fieldcat-decimals    = '000002'.
    ENDIF.
  APPEND ls_fieldcat TO gt_fieldcat.
Regards,
~Satya

Similar Messages

  • Getting an error in CIF Inbound queue:"Only 0 decimal places are permitted for unit of measure PC"

    Hi,
    I am getting an error in CIF Inbound queue (function: CIF_ORDER_INBOUND_30A). The error text says "Only 0 decimal places are permitted for unit of measure PC".
    Can anyone point out the solution to resolve this error? It would be a big help for me as I am new to APO and so getting difficult to find a clue for it.
    Thanks.
    Regards
    Mansi

    Hi Mansi,
    Please check the cif queue you will get the order number from that order number you can find out material code. Then check the material master unit of measure in MM03 you have used some alternative unit of measure and system is unable to convert order to  alternative unit of measure because of decimal setting. If you go to CUNI and check the unit if measure PC it is not permitted for decimal places. If you need decimal than change the UoMof Material and use diff UoM or allow the decimal for PC which is not good practice.
    Regards,
    R.Brahmankar

  • How to change the attributes of screen fields dynamically

    <b></b>
    well i have created a table by name empmaster_data with following fields.
    *emp_id.
    *emp_fname.
    *emp_lname
    *dob.
    *doj.
    *dept.
    *desig.
    now using a single screen i want to create,change and display the information.even i am using save and exit button.
    now i want to change the attributes of screen fields dynamically like active,input,output,invisible.

    Hi,
    Have Different Radio Buttons for the purposes what you have and use AT Selection Screen Output, Under the event Use loop at screen and with continue with your requirement.
    Hope This Info Helps YOU.
    <i>Reward Points If It Helps YOU.</i>
    Regards,
    Raghav

  • Changing Screen field position dynamically

    Hi,
    Is there a way to change the position of screen fields dynamically in a module pool program?
    My requirement is that based on the value of a variable, I need to arrange a few input and text fields on a subscreen in different order.
    Points will be rewarded for helpful answers..
    Regards
    Abhishek

    Hi,
    For this what I can think of is that u need to create the fields multiple times on the same screen and then using SCREEN variables, u need to make them visible/invisible.
    e.g. Say, u want Matnr at first position at one time and 6th position at another. In that case, what u can do is create the field MATNR twice and them hide/unhide it depending upon the condition.
    Hope this helps.
    Regards,
    Himanshu

  • PCUI: Changing screen structure dynamically

    How to change screen structure dynamically, i.e based on the input need to display details of corresponding structure.

    Hi Arun ,
    I am not too sure what your question means .If you want to change fields dynamically then screen-variants are
    a good way to do it.
    If you want to change the entire structure itself for the same ROLE then you can try a viewswitch which combines several tab pages .
    More details about this is available ib the PCUI cookbook.
    (Implementing People-Centric User Interfaces with Business Server Pages and SAP Enterprise Portal).
    An extract is given below -
    To minimize the number of tabstrips, a so-called viewswitch is offered. This means that within one tab, multiple views are available and can be selected from a dropdown list in the toolbar. This viewswitch works in the same way as the tabs on a lower level. A viewswitch should be used for similar content, for example: Instead of using the three tabs Competitor Address, Competitor Products and Competitor Strategy, they can be combined to one viewswitch OPP_Competitor with the fields address, products, and strategy in the dropdown list box in the toolbar. The dropdown list box only appears if the viewswitch tab is active. To build a viewswitch, several tabs have to be combined to a viewswitch group.
    Regards,
    Satyadeep

  • Need only two decimal places, but BigDecimal isn't working

    Hello again. This time I've got a problem with getting only two decimal places. I tried using BigDecimal but when I compile it, I get an error "cannot find symbol class BigDecimal" and a "cannot find symbol variable BigDecimal".
    Grrr... I just want my value to have only 2 decimal places before it ends up in my text field.
    Any help will be appreciated.
    - Phonse
    if (ostuff1.equals("amt tendered"))
                     finalamt = total1 * 1.12;
                     change = cash1 - finalamt;
               BigDecimal finalamt2 = new BigDecimal(finalamt);
                  finalamt2 = finalamt2.setScale(2, BigDecimal.ROUND_DOWN);
                  BigDecimal change2 = new BigDecimal(change);
                  change2 = change2.setScale(2, BigDecimal.ROUND_DOWN);
                  finalamt = doubleValue(finalamt2);
                  change = doubleValue(change2);
                     addItem(String.format("Amount Tendered:          "+"P "+finalamt));
                     addItem(String.format("Change:                     "+"P "+change));
                   }

    @ georgemc
    Isn't it better to import whole packages instead so
    you can have everything available when you call them?
    I mean, it's kinda hard to import individual classes
    everytime you need to call them.No. You can get conflicts when importing complete packages. If you importjava.awt.*;
    java.util.*;and then declareList list;the compiler does not know which List you meant, java.util.List or java.awt.List.
    Offtopic @ prometheuzz
    LOL. When I was a kid still playing my Playstation I
    wanted to have a career in computers when I got to
    college. Now I'm 14 and a 3rd year high school
    student and I just got a reality check -- computers
    just isn't for me. And alot of those professionals
    say Java is the "easiest" programming language. O_O
    Meh. I'll just follow my other dream of becoming a
    chef. Just seems like my parents won't like it...
    Bleh... Two more years... Two more years...Sure, but if you like programming, work (hard) for it. Most people have to work hard in order to become good at something, no one is born as a programmer. This goes for becoming a chef as well.

  • Config settings for Decimal places in Master Inspection Characteristics

    Hi,
    can any body tell me where to do the configuration settings for decimal places  in master inspection characteristics
    i want my limits to be 1.234
    i want 3 decimals after point
    Regards,
    Raj

    Hi,
    Please go through the below link.
    http://www.freesaptutorial.com/how-to-create-master-inspection-characteristic-in-sap-qm-module/
    While creating the MIC in QS21 after entering the control indicators you will get Quantitative data screen.
    In that screen you can enter the decimal places, UOM, target, lower limits etc
    Regards
    Hari

  • How to update screen fields dynamically

    Hi,
    Can any one help me in updating screen field dynamically using so_expr, so_where,so_flds

    Hi,
      Use this type of logic. Though this code is for selection-screen, but you can use this type of logic for screens by using screen table and implement this logic in PAI.
    REPORT z_sdn.
    PARAMETERS:
      p_num RADIOBUTTON GROUP rad1 DEFAULT 'X' USER-COMMAND abc,
      p_char RADIOBUTTON GROUP rad1.
    PARAMETERS:
      p_num1 TYPE i MODIF ID num,
      p_num2 TYPE i MODIF ID num,
      p_char1 TYPE c MODIF ID chr,
      p_char2 TYPE c MODIF ID chr.
    AT SELECTION-SCREEN OUTPUT.
      IF p_num EQ 'X'.
        LOOP AT SCREEN.
          IF screen-group1 EQ 'CHR'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF screen-group1 EQ 'NUM'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    Regards
    Abhijeet

  • Change Screen Lables dynamically

    HI
      I want to change screen labels dynamically based on my sales area/Plant ... how can I achieve this task, what are steps I have to take to change the screen labels dynamically?
    Please give your input/suggestion.
    Thanks

    I wonder if you could use some of the SD user exits in Sales Order processing.
    MV45AOZZ is for custom PBO routines.
    MV45AIZZ is for custom PAI routines.
    They are meant for the screen user exits (Additional Data tabs at the header and item level).  They might get called for each screen.  Because they are the "older style" of user exits, you still need a access key.  However, SAP considers changes to these programs as enhancements, not modifications.
    Same applies for USEREXIT_FIELD_MODIFICATION in MV45AFZZ.  This is called for every screen in SD order processing.  With a CASE statement against SCREEN-NAME and a check for the dynpro number, you might be able to manipulate the label values.  If I had access to a system, I would check... but I don't right now.
    Many of the labels reference the labels for the data elements in the data dictionary, so these userexits may not be able to over ride the values.

  • How to change the background color only for one HTML-Portlet?

    Hi all,
    I have created a HTML-Portlet in my root-page. The root page have a style: Main-Style.
    I want to change the background-color only for this one HTML-Portlet:
    <html>
    <header><title>Test</title></header>
    <body bgcolor="#999999">
    Test
    </body>
    </html>
    But this does not work...
    When I use the CSS, then it will change the background-color for the root-page too.
    Thans
    Leonid Pavlov

    could you try this
    <table bgcolor="#999999">
    <tr>
    <td>
    test
    </td>
    </tr>
    </table>
    I don't think you need <html><header><title>Test</title></header>
    <body></body></html> for your HTML-Portlet.

  • How to make form field read only for users with certain permissions

    We need to make two form fields read only for users with certain permissions. Kindly guide me on how to do this in Infopath. I searched and there is an option to disable to the column, but no option to select user permissions. 
    Please give your suggestion on this. 
    thanks.

    Hi,
    See the link below:
    http://info.akgroup.com/blog-0/bid/69277/InfoPath-Restrict-visibility-to-users-in-a-SharePoint-Group
    Here you can add the fomatting action on the field to disable the field if those users belong to certain Sharepoint group (does not matter the permission levels though). Hope it helps.
    Regards, Kapil ***Please mark answer as Helpful or Answered after consideration***

  • Another feature to allow users to change screen resolution to HD for gaming

    I liked k3 Note, smartphone which is filled with lots of professional features. Can you add a control to change screen resolution to HD for games. Lots of people are there which are thinking that other phones' gpu are better and the Mali t760 m2 not so good.

    Hi
    In case someone else encounters the same problem, here is some more information.
    The high refresh rate is quite visible in Device Manager. It would refresh every one or two seconds. The cause seems to be a conflict between a Fingerprint software installed during the Task sequence and the Validity Sensors Drivers.
    I made a Scan for hardware change in Device manager and saw that a few devices were appearing as unknown. Right click, update drivers from local cache solved the problem.
    I cancelled install of the fingerprint software and did not encounter the problem anymore.
    Brgds
    bruno

  • Idoc not Trigerring for Change Pointers in CREMAS only for 2 fields

    Hi All,
    I am trying to trigger the Idoc for 2 fields ( Contact Person First Name & last Name) KNVK-NAMEV and KNVK-NAME1. I have maintained the fields in BD52. Whenever I change the fields, entries get created in CDHDR, CDPOS and BDCP. But the Idloc doesnt get triggerred. But if I change any other fields of LFA1 or LFB1 for the same vendor, the Idoc gets created. Can anybody please help out on this?
    Thanks,
    Geetha

    Hi,
       Just check after executing the program "RBDMIDOC" idocs getting triggered or not.
    Thanks,
    Asit Purbey.

  • Is it possible to make a screen control appear only for a specific patch?

    I use MainStage almost exclusively for guitar. Frequently I will use different guitar amps in different patches (usually the AmpliTube plugin, but occasionally Amp Designer). I'd like to use different screen controls for specific patches. For example, I might be using a Marshall JCM900 amp model for one patch, and a Vox AC-30 Top Boost amp model for a different patch. The Marshall has a gain control, and a master volume, but the AC-30 only has a master volume. Conversely, the AC-30 has a top cut control that doesn't exist on the Marshall.
    Is there a way to hide the screen control for the Marshall gain on a patch that uses an AC-30 model?
    It seems like there would be many, may scenarios where controls that are relevant to one patch would be undesirable with a different patch, but it seems like screen controls are global for an entire concert. Sure, a given control can be mapped to different parameters in different patches (but you can't give a screen control different names in different patches), but there's limited space on a layout, and it seems wasteful to have to provide a given screen control that might only be relevant for one patch out of a dozen in a given set or concert visible in every single patch.

    Hi
    Standard Screen Controls will always appear in Edit Mod and in Perform Mode for a given Concert. Controls that are not assigned to any parameter will be grayed out in Performance Mode. To do this, select the control in Edit, and choose "None" in the Screen Control Inspector.
    Smart Controls adapt for a particular Patch. Different layouts can be assigned per patch.
    ericmurphysf wrote:
    you can't give a screen control different names in different patches)
    That depends on the method you used to name them in the first place:
    Controls can have different formats of labelling ( done in Layout mode), where they can show the particular parameter name etc etc. These can change from patch to patch.
    You can assign a "Hardware Label" that is global.
    Separate Text labels can have global or Set/Patch labels, and they can be labelled for a single Patch by overriding any higher level labelling
    hth
    CCT

  • Printing only 2 decimal places

    Hi people, thank again in advance for your help.
    if i have a number with tons of decimal places behind it...and only wantto print on screen 2 (for instance when I am want $10.00 instead of $10.000000001) or somethign like that, what can i do?
    With Math.round() work? but i also want such that if the figure is zero....to be printed $0.00 and not $0.0.
    Can anybody helo?

    Thanx mark. but when i tried i get these errors.
    C:\WINDOWS\Desktop\BC201\assignment2\Savings.java:86: cannot resolve symbol
    symbol : class DecimalFormat
    location: class Savings
              DecimalFormat df = new DecimalFormat(".00");
    ^
    C:\WINDOWS\Desktop\BC201\assignment2\Savings.java:86: cannot resolve symbol
    symbol : class DecimalFormat
    location: class Savings
              DecimalFormat df = new DecimalFormat(".00");
    ^
    2 errors
    Tool completed with exit code 1

Maybe you are looking for