Setting precision format for variables or in STATS...

I need to be able to format variables so that they only have a certain number of decimal places.  I know you can use a rounding function but it is for about 90 variables so that would not be an efficient way to accomplish this.  Is there a way when global dimensioning variables to set a precision factor or can you set while doing STATS like for average or stdev?? Help appreciated.

Hi BW_Cummins,
There is no way to set an internal precision property of a DIAdem variable or a VBScript variable.  You can of course format the display of that variable with the "str()" function, which you can include as an embedded expresion in a REPORT layout (text box, Axis lable, legend, etc.).  You can also declare DIAdem real variables as either DBL or SGL, so that would set a certain maximum precision, but that doesn't sound like what you want.
Let me know if you need something other than display formatting,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

Similar Messages

  • How to set raw format for canon powershot a1100 is ? ,,according to the specs online it can.

    how to set raw format  for canon powershot  a1100 is ? ,,according to the specs online it can.

    It requires the Canon Hacker's Developement Kit (CHDK). It runs off of your SD card and does not harm your camera. Download a program called Stick-
    http://zenoshrdlu.com/stick/stick.html
    Follow the directions and you will be able to shoot in RAW along with some other deatures not available on your camera previously.

  • To accept all date formats for variables

    Hi,
    I am getting a vadidation message on refresh of a query on entering European date format in the selection criteria "Please enter value in permitted format for variable XXXX"
    I need date to accept all date formats for variables to execute query.
    Currently US date format has been accomodated, On entering European date format i get the above validation message.
    Please suggest how do i supress this validation message or any other thoughts on the same.
    If anyone experienced the same before or applied any notes plz send the SAP Note number for the same. I am currently on BW 3.5.
    Message was edited by:
            tyson m

    tyson,
    why dont you control the date display through the user creation / user details option - then your date entries should sort themselves out.
    Arun

  • How to set exponential format for a cell?

    Hello! Can someone advise how to set exponential format for a cell in Numbers?

    Hi Alejandro,
    If you mean 1000 as 1E+03
    Format Panel > Cell > Data Format > Scientific
    Regards,
    Ian.

  • Setting proper format for  the documents

    Hi,
    I want to set the proper format before saving the documents in Ifs. The Documents are uploaded to Ifs using the Java API.Can any one help me on this?
    Thanks,
    Prasanth

    Hi,
    Thanks rich. I am using the following code to set the proper format.
    // create the definition
    DocumentDefinition ddef = new DocumentDefinition(lsession);
    ddef.setName(docname);
    ifsSession.setAdministrationMode(true);
    FormatDefinition newFormatDef = new FormatDefinition(lsession); //create a new FormatDefinition
    Format format = (Format)ifsSession.createSystemObject(newFormatDef); //create a new Format using the FormatDefinition
    format.setMimeType(mimetype); // set Mime type for the Format
    newDocDef.setFormat(format); //set the format for the DocumentDefinition
    lsession.setAdministrationMode(false); //set the session back to normal mode;
    // create the document using the definition
    Document newdoc = (Document) lsession.createPublicObject(ddef);
    Is there anything wrong with this one? when i save the document with this code,its stored in non-indexed media.
    I tried the code you posted .its working for pdf documents (they are going to indexed Media ) but not for word documents.
    Thanks,
    Prasanth

  • Setting date format for the entire SQL Server installation - SQL Server 2008 R2-2012

    Hi,
    I need to safeguard the behaviour of SQL codes that inserting into SQL tables with some date columns. For this purpose, I need to change the date format for the SQL instance and not using CONVERT and CAST.
    I've seen the SET DATE FORMAT statement, but if I use it, could I solve my problem?
    Thanks

    The language setting is related to the database user.
    BOL: "DEFAULT_LANGUAGE = { NONE | <lcid> | <language name> | <language alias> }              
    Specifies the default language for the new user. If a default language is specified for the user and the default language of the database is later changed, the users default language remains as specified.
    If no default language is specified, the default language for the user will be the default language of the database. If the default language for the user is not specified and the default language of the database is later changed, the default
    language of the user will change to the new default language for the database."
    LINK: http://technet.microsoft.com/en-us/library/ms173463.aspx
    The default language setting can be overridden by SET LANGUAGE for the session:
    http://technet.microsoft.com/en-us/library/ms174398.aspx
    Example:
    SET LANGUAGE us_english; -- mdy
    SELECT CAST ('12/13/2014' as DATE); -- 2014-12-13
    GO
    SET LANGUAGE british; -- dmy
    SELECT CAST ('12/13/2014' as DATE);
    GO
    (1 row(s) affected)
    Changed language setting to British.
    Msg 241, Level 16, State 1, Line 2
    Conversion failed when converting date and/or time from character string.
    Kalman Toth Database & OLAP Architect
    SELECT Video Tutorials 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • How to Set Pixel Format for AEGP Plugin???

    Hi,
    Does Anyone know how to set pixel format (ARGB or BGRA etc) for After Effect (AEGP) Plugin (Source Generator).

    It requires the Canon Hacker's Developement Kit (CHDK). It runs off of your SD card and does not harm your camera. Download a program called Stick-
    http://zenoshrdlu.com/stick/stick.html
    Follow the directions and you will be able to shoot in RAW along with some other deatures not available on your camera previously.

  • Paragraph Format / Character Format for Variable address in SAPSCRIPT

    Dear All,
       I am trying to print variable address for ship-to-party. But the address is variable address for different vendors.
    The contents like
    /:  ADDRESS PARAGRAPH AS
    /:  TITLE    &LFA1-ANRED&
    /:  NAME     &LFA1-NAME1&, &LFA1-NAME2&, &LFA1-NAME3&, &LFA1-NAME4&
    /:  STREET   &LFA1-STRAS&
    /:  POBOX    &LFA1-PFACH&  CODE &LFA1-PSTL2&
    /:  CITY     &LFA1-ORT01&, &LFA1-ORT02&
    /:  POSTCODE &LFA1-PSTLZ&
    /:  COUNTRY  &LFA1-LAND1&
    /:  REGION   &LFA1-REGIO&
    /:  FROMCOUNTRY &T001-LAND1&
    /:  ENDADDRESS
    My question is, How to assign Paragragh format or character format to the above code?
    Your reply will help alot..
    Thanks and waiting
    Regards
    Anukul

    hi,
    in ur code u already gave
    /: ADDRESS PARAGRAPH AS goto paragraph formats n define or make the required changes for the paragraph format AS.
    click on character formats n define/change the character formats as breakpoint has mentioned.

  • Setting uneditable formatting for editable content

    Hey all,
    I'm very new to Dreamweaver (and html/css!) so forgive me if this is simple or I have missed something. I have been Googling what I'm trying to do for the last 2 hours, to no avail, maybe I'm searching the wrong thing.
    I'm designing a template and have just added my editable content. I have a picture (editable_picture), heading (editable_heading) and text (editable_content) that will be different on each page, however I want the size of the picture and the font style, colour and size to remain consistant.
    I've tried entering the following into my css:
    #editable_picture {
        width: 450px;
        height: 300px;
    I've also tried:
    #editable_heading {
      font-size: 16px;
              font-family: Tahoma, Geneva, sans-serif;
              font-weight: bold;
              color: #FFF;
              text-align:left;
    No luck with either. I think I have possibly misinterpreted what the editable content is used for. If I have, can anybody recommend a better way to have different content on each page but maintain a consitant format?
    Many thanks

    I can't seem to assign a particular size to the editable content.
    Nor should you.  Content determines the height of your containers.  Setting explicit height values should be avoided because your site will ultimately contain both long and short pages.
    Your client's should be instructed on how to optimize their images beforehand in a graphics editor.  That is where the image's height & width is established.
    That said, you can add a rule to your CSS code to make all images the same size, however this will be defeated as soon as height & width values are added to the HTML code.
    <img src="some_image.jpg" height="xx" width="xx" alt="some description">
    When asking for help in this forum, it's best to upload your test page to a temporary web space.  Either a commercial one or a TEST folder on your site's destination server.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Set webcam format for capture

    Hi all!
    I'm working with JMF to develop a webcam capture software.
    My webcam allows 800*600 resolution but i can't set it.
    I've tried:
    String str2 = "vfw:Philips VGA Digital Camera (Vesta):0";
        di = CaptureDeviceManager.getDevice(str2);
       Format[] cfmts = null;
       cfmts = di.getFormats();
        RGBFormat fmt = null;
        for (int i = 0; i < cfmts.length; i++) {
                // Find format with desired size, bits/pixel, etc.
                fmt = (RGBFormat)cfmts;
    but it returns [i]Hit uncaught exception java.lang.NullPointerException
    Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    PS. 800 x 600 maybe only be your webcams "interpolated resolution", not it's actual optical resolution.
    In other words, it may only really capture at 640 x 480, but average out the result
    to fill up the image to 800 x 600. Read the webcam specs closely.
    JMF will only use the true optical resolution, it would be up to you to "cheat" and
    scale up the image as you see fit.
    regards,
    Owen

  • Setting date format for import

    I have a CSV file that has approx. 600 entries in it.  2 of these fields are dates in the format mm/dd/yyy and mm/dd/yy.  The problem is that the import function treats them as dd/mm/yyyy or dd/mm/yy. 
    Is there any way to tell the import routine what format the date fields are in?

    1. Straight from the documentation ([DROP TABLESPACE|http://download.oracle.com/docs/cd/B14117_01/server.101/b10759/statements_9004.htm|DROP TABLESPACE]):
    Oracle Database removes from the data dictionary all metadata about the
    tablespace and all datafiles and tempfiles in the tablespace. The
    database also automatically drops from the operating system any
    Oracle-managed datafiles and tempfiles in the tablespace. Other
    datafiles and tempfiles are not removed from the operating system
    unless you specify INCLUDING CONTENTS AND DATAFILES.
    HTH!

  • Numver format for readonly setted af:inputText

    Hello All,
    <af:inputText id="itTtlDue" readOnly="true" value="#{bindings.return.inputValue}"
    required="#{bindings.return.hints.mandatory}"
    columns="#{bindings.return.hints.displayWidth}"
    maximumLength="#{bindings.return.hints.precision}">
    How can I set display format for above tag?
    Note:
    When I execute above tag with a numerical value as "25.333333333336" , then it display as 25.333333333336.
    So it correct..!
    But how can I display it with formated output as #######.## (So result should be 25.33)
    Thanks.

    Hi
    you can use <af:convertNumber> tag with pattern attribute inside the your inputText
    <af:inputText id="itTtlDue" readOnly="true" value="#{bindings.return.inputValue}"
    required="#{bindings.return.hints.mandatory}"
    columns="#{bindings.return.hints.displayWidth}"
    maximumLength="#{bindings.return.hints.precision}">
    <af:convertNumber pattern=""#######.##>
    </af:inputText>

  • How to set default number format for whole app

    Hi!
    I have a bunch of View Objects and I have to set the format for each attribute of type number. I've tried using
    MyAtt_FMT_FORMAT=#,##0.00
    MaAtt_FMT_FORMATTER=oracle.jbo.format.DefaultNumberFormatter
    on just a couple of attributes and it works OK. But since I have a lot of number fields across application in a lots of view objects, I would like to set this format as default for all the number fields in my application.
    Can I do that and if yes, how?
    Thanks

    you can use Domains.
    chapter 26 Advanced Entity Object Techniques in Developer’s Guide For Forms/4GL Developers
    Regards,

  • OBIEE Presentation Services : Default formatting for numeric fields

    Hello all.
    I need help in setting default formatting for numeric fields in criteria. If a user adds an numeric field, it does not have any formatting associated with it. I want to know how do you set default formatting (for example if user adds sales measure it should appear in default format like $1,000 or even with decimal places).
    Please help.
    Thank you.

    Hi,
    1) We have so many subject areas. If we select "system wide default for this data type", is this change going to reflect in all subject areas.No should do this subject area wise.
    2) Will this effect if we migrate from dev to prod environment.Yes it will effect.
    I hope u will follow this to-
    http://forums.oracle.com/forums/ann.jspa?annID=939 :)
    Regards,
    Srikanth

  • Correct format for field

    Hello All,
    Im downloading EAN11 (it is a character of length 18 ) field form MARA table to an excel. In excel i got the value like 3.16514E+12 where as actual value to be displayed is 3165140039925.
    But i know that, to get the value displayed without exponential format, i need to put single quatation in front of the number. I mean, we need to concatenate single quatation with the value.
    But is there any other way to do this. If im not wrong, we have to do some thing with OLE format.
    Good answers will be appriciated.
    Thanks in advance.
    Best Regards,
    Sasidhar Reddy Matli.

    Please check below code may help to create excel usign OLE.
    REPORT ZTEST_BYW.
    * OLE specific include file
    INCLUDE OLE2INCL.
    INCLUDE EXCEL__C.
    * data definitions of OLE objects with type ole2_object
    PARAMETERS: P_FILENM(80) LOWER CASE OBLIGATORY
    DEFAULT 'C:\Documents and Settings\gunasekharb\Desktop\report_tsl.xls'.
    DATA: G_TMP_WORKBOOK TYPE OLE2_OBJECT.
    DATA: G_TMP_WORKSHEETS TYPE OLE2_OBJECT.
    DATA: G_TMP_WORKSHEET1 TYPE OLE2_OBJECT.
    DATA: G_TMP_WORKSHEET2 TYPE OLE2_OBJECT.
    DATA: G_PC_TEMPLATE LIKE RCGFILETR-FTAPPL
    VALUE 'C:\Documents and Settings\gunasekharb\Desktop\mmr_rpt_tsl_tmp.xls'.
    DATA: G_EXCEL TYPE OLE2_OBJECT.
    DATA: G_WORKBOOKS TYPE OLE2_OBJECT.
    DATA: G_WORKBOOK TYPE OLE2_OBJECT.
    DATA: G_WORKSHEETS TYPE OLE2_OBJECT.
    DATA: G_WORKSHEET TYPE OLE2_OBJECT.
    DATA: G_CELL TYPE OLE2_OBJECT.
    DATA: G_CELL1 TYPE OLE2_OBJECT.
    DATA: G_CELL2 TYPE OLE2_OBJECT.
    DATA: G_CELLRANGE TYPE OLE2_OBJECT.
    DATA: G_FONT TYPE OLE2_OBJECT.
    DATA: G_INTERIOR TYPE OLE2_OBJECT.
    DATA: G_BORDERS TYPE OLE2_OBJECT.
    DATA: G_FIRST_WS VALUE 'Y'.
    DATA: G_ROW TYPE I.
    DATA: G_COL TYPE I.
    * definition of loop counter
    DATA: I TYPE I VALUE '5'.
    DATA: BEGIN OF T_SHEET1 OCCURS 1,
    COL1(10),
    COL2(20),
    END OF T_SHEET1.
    DATA: BEGIN OF T_SHEET2 OCCURS 1,
    COL1(10),
    COL2(20),
    END OF T_SHEET2.
    START-OF-SELECTION.
    PERFORM PREPARE_DATA.
    PERFORM DOWNLOAD_TO_EXCEL.
    END-OF-SELECTION.
    * call method of excel 'QUIT'.
    * it is now possible to leave the EXCEL application
    * remark: you have to go to the EXCEL application and answer the
    * popup dialog screen
    *& Form PREPARE_DATA
    FORM PREPARE_DATA.
    T_SHEET1-COL1 = 'A1'.
    T_SHEET1-COL2 = 'A2'.
    APPEND T_SHEET1.
    T_SHEET1-COL1 = 'B1'.
    T_SHEET1-COL2 = 'B2'.
    APPEND T_SHEET1.
    T_SHEET2-COL1 = 'Y1'.
    T_SHEET2-COL2 = 'Y2'.
    APPEND T_SHEET2.
    T_SHEET2-COL1 = 'Z1'.
    T_SHEET2-COL2 = 'Z2'.
    APPEND T_SHEET2.
    ENDFORM. " PREPARE_DATA
    *& Form DOWNLOAD_TO_EXCEL
    FORM DOWNLOAD_TO_EXCEL.
    PERFORM OPEN_EXCEL.
    PERFORM ADD_WORKSHEET1.
    PERFORM ADD_WORKSHEET2.
    PERFORM OPEN_TEMPLATE_FILE.
    PERFORM CLOSE_EXCEL.
    WRITE: / 'End of program'.
    ENDFORM. " DOWNLOAD_TO_EXCEL
    *& Form FILL_CELL
    *& FORM routine, which fills the specified cell in the EXCEL sheet
    *& with the given value
    FORM FILL_CELL USING I_ROW TYPE I
    I_COL TYPE I
    I_VALUE
    I_FONTBOLD
    I_DIGIT
    I_WRAPTEXT
    I_HORIZON_ALIGN
    I_VERTICAL_ALIGN.
    DATA: L_STR TYPE STRING.
    CALL METHOD OF G_EXCEL 'CELLS' = G_CELL
    EXPORTING #1 = I_ROW
    #2 = I_COL.
    SET PROPERTY OF G_CELL 'VALUE' = I_VALUE.
    IF I_FONTBOLD = 'X'.
    GET PROPERTY OF G_CELL 'Font' = G_FONT.
    SET PROPERTY OF G_FONT 'Bold' = 1.
    ENDIF.
    IF NOT I_WRAPTEXT IS INITIAL.
    SET PROPERTY OF G_CELL 'WrapText' = 1.
    ENDIF.
    IF NOT I_HORIZON_ALIGN IS INITIAL.
    IF I_HORIZON_ALIGN = 'L'.
    SET PROPERTY OF G_CELL 'HorizontalAlignment' = XLLEFT.
    ELSEIF I_HORIZON_ALIGN = 'R'.
    SET PROPERTY OF G_CELL 'HorizontalAlignment' = XLRIGHT.
    ELSEIF I_HORIZON_ALIGN = 'C'.
    SET PROPERTY OF G_CELL 'HorizontalAlignment' = XLCENTER.
    ENDIF.
    ENDIF.
    IF NOT I_VERTICAL_ALIGN IS INITIAL.
    IF I_VERTICAL_ALIGN = 'T'.
    SET PROPERTY OF G_CELL 'VerticalAlignment' = XLTOP.
    ELSEIF I_VERTICAL_ALIGN = 'B'.
    SET PROPERTY OF G_CELL 'VerticalAlignment' = XLBOTTOM.
    ELSEIF I_VERTICAL_ALIGN = 'C'.
    SET PROPERTY OF G_CELL 'VerticalAlignment' = XLCENTER.
    ENDIF.
    ENDIF.
    * To set number format for cell
    IF I_DIGIT <> ''.
    IF I_VALUE IS INITIAL AND I_DIGIT <> '%'.
    SET PROPERTY OF G_CELL 'VALUE' = ''.
    ELSE.
    * Set number format for cell with number
    IF I_DIGIT = '1'.
    SET PROPERTY OF G_CELL 'NumberFormat' = '#,###.0 '.
    ELSEIF I_DIGIT = '2'.
    SET PROPERTY OF G_CELL 'NumberFormat' = '#,##0.00 '.
    ELSEIF I_DIGIT = '%'.
    SET PROPERTY OF G_CELL 'NumberFormat' = '#,##0.00% '.
    ELSE.
    SET PROPERTY OF G_CELL 'NumberFormat' = '#,### '.
    ENDIF.
    ENDIF.
    ENDIF.
    ADD 1 TO I_COL.
    ENDFORM.
    *& Form OPEN_EXCEL
    FORM OPEN_EXCEL.
    DATA: L_CNT TYPE I.
    * create object excel of OLE class 'EXCEL.APPLICATION'
    CREATE OBJECT G_EXCEL 'EXCEL.APPLICATION'.
    CALL METHOD OF G_EXCEL 'WORKBOOKS' = G_WORKBOOKS.
    CALL METHOD OF G_WORKBOOKS 'ADD' = G_WORKBOOK.
    GET PROPERTY OF G_WORKBOOK 'Worksheets' = G_WORKSHEETS.
    GET PROPERTY OF G_EXCEL 'ACTIVESHEET' = G_WORKSHEET.
    SET PROPERTY OF G_EXCEL 'DISPLAYALERTS' = 0.
    GET PROPERTY OF G_WORKSHEETS 'Count' = l_cnt.
    L_CNT = L_CNT - 1.
    * Delete unwanted worksheets
    DO L_CNT TIMES.
    GET PROPERTY OF G_EXCEL 'ACTIVESHEET' = G_WORKSHEET.
    CALL METHOD OF G_WORKSHEET 'DELETE'.
    ENDDO.
    ENDFORM. " OPEN_EXCEL
    *& Form CLOSE_EXCEL
    FORM CLOSE_EXCEL.
    SET PROPERTY OF G_EXCEL 'VISIBLE' = 1.
    CALL METHOD OF G_WORKBOOK 'SAVEAS'
    EXPORTING #1 = P_FILENM.
    * quit Excel and free all OLE objects
    * call method of g_excel 'QUIT'.
    FREE OBJECT G_INTERIOR.
    FREE OBJECT G_BORDERS.
    FREE OBJECT G_FONT.
    FREE OBJECT G_CELL.
    FREE OBJECT G_CELL1.
    FREE OBJECT G_CELL2.
    FREE OBJECT G_CELLRANGE.
    FREE OBJECT G_EXCEL.
    FREE OBJECT G_WORKBOOKS.
    FREE OBJECT G_WORKBOOK.
    FREE OBJECT G_WORKSHEETS.
    FREE OBJECT G_WORKSHEET.
    ENDFORM. " CLOSE_EXCEL
    *& Form ADD_WORKSHEET
    FORM ADD_WORKSHEET USING I_NAME.
    * Add new worksheet
    IF G_FIRST_WS <> 'N'.
    G_FIRST_WS = 'N'.
    GET PROPERTY OF G_EXCEL 'ACTIVESHEET' = G_WORKSHEET.
    ELSE.
    CALL METHOD OF G_WORKSHEETS 'Add' = G_WORKSHEET.
    ENDIF.
    SET PROPERTY OF G_WORKSHEET 'NAME' = I_NAME.
    G_ROW = 1.
    G_COL = 1.
    ENDFORM. " ADD_WORKSHEET
    *& Form ADD_WORKSHEET1
    FORM ADD_WORKSHEET1.
    PERFORM ADD_WORKSHEET USING 'Test 1'.
    * fill line in EXCEL sheet with headerlines of table columns
    G_COL = 1.
    PERFORM FILL_CELL USING G_ROW G_COL 'My First Worksheet' 'X' ''
    PERFORM MERGE_CELL USING G_ROW 1 G_ROW 4.
    PERFORM SET_BORDER USING G_ROW 1 G_ROW 4 4 ''.
    ADD 1 TO G_ROW.
    G_COL = 1.
    PERFORM FILL_CELL USING G_ROW G_COL 'ID'(001) 'X' '' '' '' ''.
    PERFORM FILL_CELL USING G_ROW G_COL 'Name'(002) 'X' '' '' '' ''.
    PERFORM FILL_CELL USING G_ROW G_COL 'Telephon'(003) 'X' '' '' '' ''.
    PERFORM FILL_CELL USING G_ROW G_COL 'Rabatt'(004) 'X' '' '' '' ''.
    * loop at customr table and print values into EXCEL sheet
    ADD 1 TO G_ROW.
    LOOP AT T_SHEET1.
    G_COL = 1.
    PERFORM FILL_CELL USING G_ROW G_COL T_SHEET1-COL1 '' '' '' '' ''.
    PERFORM FILL_CELL USING G_ROW G_COL T_SHEET1-COL2 '' '' '' '' ''.
    ADD 1 TO G_ROW.
    ENDLOOP.
    G_COL = 4.
    PERFORM SET_BORDER USING 1 1 G_ROW G_COL '' 4.
    ENDFORM. " ADD_WORKSHEET1
    *& Form ADD_WORKSHEET2
    FORM ADD_WORKSHEET2.
    PERFORM ADD_WORKSHEET USING 'Test 2'.
    * fill line in EXCEL sheet with headerlines of table columns
    G_COL = 1.
    PERFORM FILL_CELL USING G_ROW G_COL 'My Second Worksheet' 'X' ''
    PERFORM MERGE_CELL USING G_ROW 1 G_ROW 4.
    PERFORM SET_BORDER USING G_ROW 1 G_ROW 4 1 'X'.
    PERFORM SET_COLOR USING G_ROW 1 G_ROW 4 'LT'.
    ADD 1 TO G_ROW.
    G_COL = 1.
    PERFORM FILL_CELL USING G_ROW G_COL 'ID'(001) 'X' '' '' '' ''.
    PERFORM FILL_CELL USING G_ROW G_COL 'Name'(002) 'X' '' '' '' ''.
    PERFORM FILL_CELL USING G_ROW G_COL 'Telephon'(003) 'X' '' '' '' ''.
    PERFORM FILL_CELL USING G_ROW G_COL 'Rabatt'(004) 'X' '' '' '' ''.
    * loop at customr table and print values into EXCEL sheet
    ADD 1 TO G_ROW.
    LOOP AT T_SHEET2.
    G_COL = 1.
    PERFORM FILL_CELL USING G_ROW G_COL T_SHEET2-COL1 '' '' '' '' ''.
    PERFORM FILL_CELL USING G_ROW G_COL T_SHEET2-COL2 '' '' '' '' ''.
    ADD 1 TO G_ROW.
    ENDLOOP.
    G_COL = 4.
    PERFORM SET_BORDER USING 1 1 G_ROW G_COL 2 'X'.
    ADD 4 TO G_ROW.
    G_COL = 1.
    PERFORM FILL_CELL USING G_ROW G_COL 'This is a wrap text' 'X' ''
    'X' 'C' 'T'.
    PERFORM FILL_CELL USING G_ROW G_COL 'Vertical - Bottom' 'X' ''
    '' 'L' 'T'.
    ADD 4 TO G_ROW.
    G_COL = 1.
    PERFORM FILL_CELL USING G_ROW G_COL 'Amount 1' 'X' '' '' '' ''.
    PERFORM FILL_CELL USING G_ROW G_COL '100.04' '' 'X' '' '' ''.
    ADD 1 TO G_ROW.
    G_COL = 1.
    PERFORM FILL_CELL USING G_ROW G_COL 'Amount 2' 'X' '' '' '' ''.
    PERFORM FILL_CELL USING G_ROW G_COL '200.01' '' 'X' '' '' ''.
    ADD 1 TO G_ROW.
    G_COL = 1.
    PERFORM FILL_CELL USING G_ROW G_COL 'Total' 'X' '' '' '' ''.
    PERFORM FILL_CELL USING G_ROW G_COL '=SUM(B13:B14)' 'X' 'X' '' '' ''.
    PERFORM FILL_CELL USING G_ROW G_COL '0.00' 'X' 'X' '' '' ''.
    PERFORM COPY_CELL USING G_ROW 2 17 5 25 8.
    ENDFORM. " ADD_WORKSHEET2
    *& Form MERGE_CELL
    FORM MERGE_CELL USING I_ROW1 I_COL1
    I_ROW2 I_COL2.
    CALL METHOD OF G_EXCEL 'Cells' = G_CELL1
    EXPORTING #1 = I_ROW1
    #2 = I_COL1.
    CALL METHOD OF G_EXCEL 'Cells' = G_CELL2
    EXPORTING #1 = I_ROW2
    #2 = I_COL2.
    CALL METHOD OF G_EXCEL 'Range' = G_CELLRANGE
    EXPORTING #1 = G_CELL1
    #2 = G_CELL2.
    CALL METHOD OF G_CELLRANGE 'Merge'.
    ENDFORM. " MERGE_CELL
    *& Form SET_BORDER
    FORM SET_BORDER USING I_ROW1 I_COL1
    I_ROW2 I_COL2
    I_THICKNESS
    I_ALLBORDERS.
    CALL METHOD OF G_EXCEL 'Cells' = G_CELL1
    EXPORTING #1 = I_ROW1
    #2 = I_COL1.
    CALL METHOD OF G_EXCEL 'Cells' = G_CELL2
    EXPORTING #1 = I_ROW2
    #2 = I_COL2.
    CALL METHOD OF G_EXCEL 'Range' = G_CELLRANGE
    EXPORTING #1 = G_CELL1
    #2 = G_CELL2.
    IF I_ALLBORDERS IS INITIAL.
    CALL METHOD OF G_CELLRANGE 'BorderAround'
    EXPORTING #1 = 1 "Continuous line
    #2 = I_THICKNESS. "Thickness: 1 - Normal, 4 - Thick
    ELSE.
    GET PROPERTY OF G_CELLRANGE 'Borders' = G_BORDERS.
    SET PROPERTY OF G_BORDERS 'LineStyle' = '1'.
    SET PROPERTY OF G_BORDERS 'Weight' = I_THICKNESS.
    ENDIF.
    ENDFORM. " SET_BORDER
    *& Form SET_COLOR
    FORM SET_COLOR USING I_ROW1 I_COL1
    I_ROW2 I_COL2
    I_COLOR.
    DATA: L_COLORINDEX TYPE I.
    CASE I_COLOR.
    when 'BK'.
    L_COLORINDEX = 1. "Black
    when 'BR'.
    l_colorindex = 53. "Brown
    when 'OG'.
    l_colorindex = 52. "Olive Green
    when 'DG'.
    l_colorindex = 51. "Dark Green
    when 'DT'.
    l_colorindex = 49. "Dark Teal
    when 'DB'.
    L_COLORINDEX = 11. "Dark Blue
    WHEN 'ID'.
    L_COLORINDEX = 55. "Indigo
    when 'G4'.
    l_colorindex = 56. "Gray 80%
    when 'DR'.
    L_COLORINDEX = 9. "Dark Red
    when 'OR'.
    l_colorindex = 46. "Orange
    when 'DY'.
    l_colorindex = 12. "Dark Yellow
    when 'GR'.
    l_colorindex = 10. "Green
    when 'TL'.
    L_COLORINDEX = 14. "Teal
    WHEN 'BL'.
    L_COLORINDEX = 5. "Blue
    WHEN 'BY'.
    L_COLORINDEX = 47. "Blue Gray
    when 'G3'.
    l_colorindex = 16. "Gray 50%
    when 'RD'.
    L_COLORINDEX = 3. "Red
    when 'LO'.
    l_colorindex = 45. "Light Orange
    when 'LI'.
    l_colorindex = 43. "Lime
    when 'SG'.
    l_colorindex = 50. "Sea Green
    when 'AQ'.
    L_COLORINDEX = 42. "Aqua
    WHEN 'LB'.
    L_COLORINDEX = 41. "Light Blue
    WHEN 'VL'.
    L_COLORINDEX = 13. "Violet
    when 'G2'.
    l_colorindex = 48. "Gray 40%
    when 'PK'.
    L_COLORINDEX = 7. "Pink
    when 'GD'.
    l_colorindex = 44. "Gold
    when 'YL'.
    L_COLORINDEX = 6. "Yellow
    when 'BG'.
    L_COLORINDEX = 4. "Bright Green
    WHEN 'TQ'.
    L_COLORINDEX = 8. "Turquoise
    WHEN 'SB'.
    L_COLORINDEX = 33. "Sky Blue
    WHEN 'PL'.
    L_COLORINDEX = 54. "Plum
    when 'G1'.
    l_colorindex = 15. "Gray 25%
    when 'RS'.
    l_colorindex = 38. "Rose
    when 'TN'.
    l_colorindex = 40. "Tan
    when 'LY'.
    l_colorindex = 36. "Light Yellow
    when 'LG'.
    l_colorindex = 35. "Light Green
    when 'LT'.
    L_COLORINDEX = 34. "Light Turquoise
    WHEN 'PB'.
    L_COLORINDEX = 37. "Pale Blue
    WHEN 'LV'.
    L_COLORINDEX = 39. "Lavender
    when 'WH'.
    L_COLORINDEX = 2. "White
    WHEN OTHERS.
    L_COLORINDEX = 2. "White
    ENDCASE.
    CALL METHOD OF G_EXCEL 'Cells' = G_CELL1
    EXPORTING #1 = I_ROW1
    #2 = I_COL1.
    CALL METHOD OF G_EXCEL 'Cells' = G_CELL2
    EXPORTING #1 = I_ROW2
    #2 = I_COL2.
    CALL METHOD OF G_EXCEL 'Range' = G_CELLRANGE
    EXPORTING #1 = G_CELL1
    #2 = G_CELL2.
    GET PROPERTY OF G_CELLRANGE 'Interior' = G_INTERIOR.
    SET PROPERTY OF G_INTERIOR 'ColorIndex' = L_COLORINDEX.
    ENDFORM. " SET_COLOR
    *& Form COPY_CELL
    FORM COPY_CELL USING I_CROW I_CCOL
    I_PROW1 I_PCOL1
    I_PROW2 I_PCOL2.
    CALL METHOD OF G_EXCEL 'Cells' = G_CELL
    EXPORTING #1 = I_CROW
    #2 = I_CCOL.
    CALL METHOD OF G_CELL 'Copy'.
    CALL METHOD OF G_EXCEL 'Cells' = G_CELL1
    EXPORTING #1 = I_PROW1
    #2 = I_PCOL1.
    CALL METHOD OF G_EXCEL 'Cells' = G_CELL2
    EXPORTING #1 = I_PROW2
    #2 = I_PCOL2.
    CALL METHOD OF G_EXCEL 'Range' = G_CELLRANGE
    EXPORTING #1 = G_CELL1
    #2 = G_CELL2.
    CALL METHOD OF G_WORKSHEET 'Paste'
    EXPORTING #1 = G_CELLRANGE.
    ENDFORM. " COPY_CELL
    *& Form OPEN_TEMPLATE_FILE
    FORM OPEN_TEMPLATE_FILE.
    CALL METHOD OF G_WORKBOOKS 'Open' = G_TMP_WORKBOOK
    EXPORTING #1 = G_PC_TEMPLATE
    #2 = 2
    #3 = 0
    #4 = 1
    #5 = 0
    #6 = 0
    #7 = 1.
    CALL FUNCTION 'FLUSH'
    EXCEPTIONS
    OTHERS = 0.
    GET PROPERTY OF G_TMP_WORKBOOK 'Worksheets' = G_TMP_WORKSHEETS.
    GET PROPERTY OF G_TMP_WORKSHEETS 'Item' = G_TMP_WORKSHEET1
    EXPORTING #1 = 1.
    GET PROPERTY OF G_TMP_WORKSHEETS 'Item' = G_TMP_WORKSHEET2
    EXPORTING #1 = 2.
    CALL METHOD OF G_TMP_WORKSHEET1 'Copy'
    EXPORTING #1 = G_WORKSHEET.
    CALL METHOD OF G_TMP_WORKSHEET2 'Copy'
    EXPORTING #1 = G_WORKSHEET.
    * call method of g_tmp_workbook 'Close'.
    CALL FUNCTION 'FLUSH'
    EXCEPTIONS
    OTHERS = 0.
    ENDFORM. " OPEN_TEMPLATE_FILE
    Edited by: Gunasekhar B on Apr 16, 2009 3:19 PM
    Edited by: Gunasekhar B on Apr 16, 2009 3:19 PM

Maybe you are looking for