Number formats in SAPSCRIPT

Hi.  I'm having an issue when using SAPSCRIPT where I'm getting a run-time error on my form printing if the dollar amount for the field being passed is greater than 1,000.  Within my form I have a PERFORM command that calls a routine in a custom program.  I am passing the value of &MSEG-DMBTR& into the custom program and if it's over $1,000 it passes with both the comma and the decimal place...meaning it passes 1,200.50.  If the value is less than $1,000 (meaning no comma has to be sent) it works find.  The error that I receive says:
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_CONVERSION_NO_NUMBER', was not
caught in
procedure "FETCH_PRICE" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
The program attempted to interpret the value " 2,479.60 " as a number, but
since the value contravenes the rules for correct number formats,
this was not possible.
Has anyone else faced this, and if so how was it resolved?  I hope that my explanation is clear.
Thanks.

Hi,
Always use the character variable for printing instead of using numeric variables. So ensure that the valus returned by your custom program is assigned to this character variable before using WRITE_FORM.
I hope this helps,
Regards
Raju Chitale

Similar Messages

  • Number pages in sapscript layout

    Hi experts,
    What type of variables normally used in sap script to output data? 
    How do you number pages in sapscript layout outputs? 
    Thanks and Regards,
    Logu.

    Hi,
    ·     &SAPSCRIPT-FORMPAGES&:
    This field contains a number representing the total number of pages of the currently formatted form (any output between START_FORM and END_FORM). The page counter mode (START, INC, HOLD) of the individual pages is ignored. You can use this symbol to formulate information like
    ‘Page x of y’ for your output.
    ·&SAPSCRIPT-JOBPAGES&:
    This field contains a number representing the total number of pages of all forms contained in the currently formatted print request, in other words, of all forms created using the OPEN_FORM, START_FORM.. ENDFORM, START_FORM.. END_FORM,..., CLOSE_FORM function modules.
    &PAGES& current page.
    Thanks,
    Arunprasad.P
    Reward if useful.

  • COPA line item report, Number format  -output type - object list(ALV).

    Hi,
    I am preparing COPA line item report. I want to change number format (two decimal place). I did the changes in form level then I did the changes in drill down report as well and saved as save definition.
    But changes are not reflecting in- output type - object list(ALV).
    Please provide help in this.
    Regards

    HI
    What t-code you are using to write this line item report ?

  • Problem with the number format in the graph axis with Report Generation Toolkit.

    Hi!
    I'm trying to use the Report Generation Toolkit to plot some graphs in Excel.
    My first problem is that I don't know how to configure the number format in the Excel Set Graph Font.vi so that my numbers are correctly displayed in the graph's axis. The only given option is general (0,0) but this is not enough for me, my numbers can get really small so I need engineering notation or fraccional format.
    Second: I also insert a table with the graph source data, but the numbers are not correctly displayed either: for example: 
    0,75 is shown as: 
    0,750000
    but 1,25  is shown as: 
    1!250!000
    My guess is I am making to much or wrong string to number conversions or Excel is getting it wrong but I can't find my way...
    Can someone help me with this?
    Thanks,
    Isabel

    Here is my VI, it's just a trial so it can look messy...
    Thanks,
    Isabel
    Message Edited by Isa_pm on 01-22-2007 01:12 PM
    Attachments:
    Create report.vi ‏96 KB

  • Number formatting issue in Web intelligence report

    Folks ,
    I've an object called ' Serial number' (12 digits long) but when I set this in query filter as a prompt number format gets changed.
    Similar like this:  
    whereas I am expecting to see 123456789123 something like this.
    I made sure that object data type is number while designing universe as well as also format the object ( using format object option) and set as ############. ( 12times #) to forced as 12 digits number.
    When I drag this object in 'result objects' results shows fine but if i add this as 'Query Filters' number gets changed as above pic.
    Any advise ?
    Cheers,
    iTanzir

    Hai Itanzir
    Try to create a dimension variable in universe and choose the data type as string. Please check this and let me know for issues, if any.
    Regards,
    Amala.S

  • Number format issue in XML Publisher from OAF (',.' is replaced by 'u n')

    Hi All,
    I am facing a problem in XML Publisher report. In report I need to display some number fields with 'USD' format. In RTF, data type 'Number' and format '###,##0.00' is selected. If I run concurrent program from oracle core forms using System Administrator > Concurrent > Request, I am able to get correct number format.
    Ex : 123456.00 After Number format : 123,456.00
    Also its working fine from XML Publisher Administrator responsibility (using Preview).
    But problem is when I submit the concurrent request through OAF, I am not getting correct data. ',' is replace by 'u' and '.' is replace by 'n'.
    Ex: 123456.00 In Report 123u456n00
    Checked profile value : ICX: Numeric Character and its set to 1,000.00 at site level.
    Do I need to set character set anywhere in OAF before calling concurrent program?
    I tried to use "alter session set nls_numeric_character = ',.';" by calling stored procedure from OAF. But still its not working.
    Please give me solution for this.
    Regards,
    Sadanand

    Hell - I am running into the same issue? Did you guys find a resolution for this? Please let me know, would really appreciate your help.
    Thanks,
    Dhiraj
    [email protected]

  • How to change number format to international setting

    Hello everyone,
    I need some help on how to change the number format on my phone from the standard US format to an international format with no spacing between the numbers. Currently, my numbers appear as: 0706 343 3456. However, I will like for it to appear as 07063433456. When i recieve calls, the number format is not recognised and I cannot tell who is calling. Same goes for SMS messages. In this part of the world, the number format is not spaced, which is quite frustriating.
    Can anyone please advice me on how to go about this.
    Thanks

    Really? I tried that but it did not work. I restarted the iphone several times but the number format did not change.

  • How to change number format in web reports

    Hi, Experts,
        Simple question, if I want to change the number format on web report as following
    . . . . . . . . Actual
    . . . . . . . . *1000SGD 
      new order   .   341.5
      sales       .   567.45
    if I click "Actual" then select properties, set data format from "in 1000" & "0" to "in 1" & "0.00", nothing changed in web report after refresh.
    if i click one number (for example: 341.5) or "New order" to set data format from "in 1000" & "0" to "in 1" & "0.00", only this row's format is changed, others row still keep old format.
    how to change whole column's data format at once setting?
    thanks in advance.
    Message was edited by: jie miao
    Message was edited by: jie miao

    Hi,
    Logout and login may help you and also Delete the session in SM04  before re login. Some times system will not do complete refresh of data even though you select refresh button.
    With rgds,
    Anil Kumar Sharma .P

  • How do I change the number formatting within a Cell Table in Microsoft Word?

    Hi, I was wondering if someone could help me out on an issue I've been having... I work for an accounting firm and we do a lot of financial statements. 
    I was wondering if we would be able to treat a cell table in Microsoft Word 2007 like I would a cell table in Microsoft Excel. Meaning, I would like to change the formatting of the numbers in the table to the "Accounting" (number) format so it
    aligns by the decimal point and use the $ signs and () for negative numbers.  We do use the link tables feature, however, most of our balancing pages just can't be done in Excel because of the way the text is written. It would be much harder to format
    the text if it were to be typed in Excel. We have also tried  creating an Excel sheet within Microsoft Word but it is the same as linking the tables... Again, a text formatting issue.  The only option is to use tables within Word but how do we change
    the number formatting to a "accounting" (number) format where the numbers would align with the decimal point and use () for the negative numbers. Is there ANY option for us to do this other than manually entering this information in using tabs?  
    If there are no options other than entering it in manually, please consider this as an option for your next software update. I believe that a LOT of people out there will be interested in this feature... My manager and I just attended a webinar on Microsoft
    Advanced Word Tips Tricks and Techniques and 75% of the attending people had this question but no answer.
    Thank you very much for your help!!!!!

    Word does not really have number formatting for table cells. You can align cell contents on the decimal point, though, by setting a so-called decimal tab stop.
    Option 1:
    - Select the cells for which you want to do this.
    - Display the ruler.
    - Click the Tab box on the left hand side of the ruler until the box contains an inverted T with a dot.
    - Click in the ruler where you want the decimal tab.
    Option 2:
    - Select the cells for which you want to do this.
    - Click the arrow in the lower right corner of the Paragraph group on the Home tab of the ribbon.
    - Click the Tabs... button in the lower left corner of the dialog.
    - Specify a tab position in the box, e.g. 1.5".
    - Select the 'Decimal' radio button under 'Alignment'.
    - Click Set.
    - Click OK.
    You will have to type the numbers as they should appear, including the $ for currency and the ( ) for negative numbers.
    Regards, Hans Vogelaar

  • Applying date and number format mask

    I have specified a date format for an attribute and a number format for another attribute of an entity object using Entity Object Editor - Control hints for the attributes.
    The date format is:
    Format type: Simple Date
    Format: dd.MM.yyyy
    The number format is:
    Format type: Currency
    Format: 0,000.00 km
    When using <c:out value="${bindings.MyDate}"></c:out> the format mask for the date is applied and it looks good, but when using
    <c:forEach var="Row" items="...">
    <c:out value="${Row.MyDate}"></c:out>
    </c:forEach>
    the format mask is not applied.
    When it comes to the number format it is not applied no matter what I use.
    I have tried setting the format for the view object attributes as well but the result is the same. How do I make this work?

    Can it have something to do with <html:form> ? Since it works using <c:out value="${bindings.MyDate}"></c:out> inside a html:form.

  • How to create a page format at sapscript?

    Hi all,
    Please help me in creating a page format for sapscript.
    Thanks.

    Hi Deniz,
    Page format – Specifies the format in which the form needs to be printed. E.g. Dina4, US Letter etc. The page format is determined from spool administration table with transaction SPAD.
    When u create new SAP Script from SE71 , u get  2 tabs- adminstrative data and basic settings.
    when u select Basic settings tab , u have options to set page format.
    DINA4 is the very common page format we generally use.
    REWARD IF USEFUL
    thanks and regards
    suma sailaja pvn

  • Has someone knowlege of how to use Custom Number Format in Numbers V3.0

    Hello Everyone,
    From Excel to Numbers '09 I worked with Custom Number Format.
    Making formats like 60 sec, km/h or m/s².
    In the new Version 3.0 it is not under 'Format'/Custom Number Format.
    I did not find it! Has someone found a way to do it the old way.
    I am working with the German version.
    Bye

    Limmy,
    There is no option in Numbers 3.0 for Custom Format. If that is mandatory for your purposes, it is still available in Version 2.3.
    Jerry

  • How to use FM format element in number format model

    Dear all,
    Could anybody explain what is FM format element for in number format model? I read the documentation, it doesn't show a clear description as it those in Datetime Format Model section.
    regards,
    Valerie

    It works mopre or less the same for numbers as for dates:
    SQL> -- generating some numbers:
    SQL> with t as (
      2  select level n
      3  from   dual
      4  connect by level <= 10
      5  )
      6  --
      7  -- actual query:
      8  --
      9  select n
    10  ,      '*'||to_char(n, '09')||'*' nofm
    11  ,      '*'||to_char(n, 'fm09')||'*' fm
    12  ,      length(to_char(n, '09')) lnofm
    13  ,      length(to_char(n, 'fm09')) lfm
    14  from   t;
             N NOFM            FM                   LNOFM        LFM
             1 * 01*           *01*                     3          2
             2 * 02*           *02*                     3          2
             3 * 03*           *03*                     3          2
             4 * 04*           *04*                     3          2
             5 * 05*           *05*                     3          2
             6 * 06*           *06*                     3          2
             7 * 07*           *07*                     3          2
             8 * 08*           *08*                     3          2
             9 * 09*           *09*                     3          2
            10 * 10*           *10*                     3          2
    10 rows selected.As you can see, the leading spaces are trimmed.

  • Stored Procedure for Batch Number Format and Block Duplicate Batch Number

    Hi Experts !
    I am new one in forum asking question.. I want Stored procedure for Batch Number Format. I want fix one Batch number format in Stored Procedure.
    Example :
    My Batch number format Like  BATCH00001 - It should be first five digit is text format and next five is Numeric.
    IF create Goods receipt PO or Goods receipt stage I create batch number like BATCH 00001 or any other number means don't add that document and also duplicated batch number also does not allowed. please give me the solutions. I am sorry for my bad english .

    Dear Nagarajan K.
                         Thanks for your replay ..
    IF @transaction_type IN ('A','U') AND (@object_type = '106' )
    BEGIN
    set @item = LEFT( @list_of_cols_val_tab_del, CHARINDEX(CHAR(9),  @list_of_cols_val_tab_del,1) - 1)
    set @batch = substring(@list_of_cols_val_tab_del, len(@item)+1, (CHARINDEX(CHAR(9),  @list_of_cols_val_tab_del,len(@item)+2)) - (len(@item)+1))
    --set @base =( select basetype from ibt1 where batchnum = ltrim(rtrim(replace(@batch,char(9),''))))
    set @count = (select count(*) from oibt quantity > 0 and where  batchnum = ltrim(rtrim(replace(@batch,char(9),''))))
    if @count > 1
    begin
    set @error = 1
    set @error_message = 'Please enter different Batch Code for batch ''' + @batch + ''' for item ' + @item 
    select @error, @error_message
    END
    END
                  I used above Stored Procedure. here we can use one batch number for different item but  i want to block one batch we should use one item and one time only after than we never use that batch number for same item and another item.
             After that I want format for Batch, we should follow unique Batch number for all items.

  • UCCHECK error:  TRANSLATE... CODEPAGE/NUMBER FORMAT is not allowed

    Hi ,
    I am getting error " TRANSLATE... CODEPAGE/NUMBER FORMAT is not allowed" while doing UCCHECK activity.
    Existing code is
      DATA: BEGIN OF BIN_TAB OCCURS 500,  
            SATZ(1500)  TYPE C,
          END OF BIN_TAB.
       translate bin_tab from code page '1100'.
    I am getting this error for above statement.
    Class  CL_ABAP_CONV_IN_CE should be used but not sure about the syntax.
    Please suggest how to resolve it ?
    Thanks:
    Anugrah

    Please refer to below link:
    http://wiki.scn.sap.com/wiki/display/ABAP/CL_ABAP_CONV_IN_CE
    Thanks,
    Sunny

Maybe you are looking for

  • How to get my photos off my phone?

    The other night i put my phone on the charger and it was charging fine. When i woke up it only had 13% battery and it wouldn't charge. I used several different charges in all different ports and it still wouldn't work and still wont. I know it's not

  • Help.iTunes could not connect to the iPod, you must enter passcode first...

    My wife recently turned her iTouch on, to find this connect to iTunes screen. When we connect it to iTunes, we get this pop up. The problem is, the iPod will not allow us to do anything but shut it off and it remains on the connect to iTunes screen?

  • Z1 compact does not charge magnetic.Please Help Me.

    Hello. My device is not charging magnetic. Screen freezes when I inserted the magnetic charging cable. I need to make a quick start to open my device. How do I charge Please help. Thanks...

  • XML second page output overlap with predefind Header

    Hii XML Report second page output in overlap with Predefined Header (Paper Header) . so in second page how can i put down the row from Predefined Header. Thanks

  • Three-Finger Dictionary only shows one reference source

    Hi all After I upgraded to Yosemite 10.10.2 I got this problem. As I mentioned in title, before 10.10.2 I could see different references results (like wikipedia, apple dictionary ...) when I used Three-Finger Dictionary. But now when I do the same on