Add % Sign to Values in report VBA

Hi Gurus,
i'm trying to Add the sign to the Values in the workbook. problem is that excel calculate the values into percent
the code is as follow
For x = 2 To f_clmn
   For y = 18 To 21
       If resultArea.Cells(x, y).Value <> "" Then
       resultArea.Cells(x, y).Value = resultArea.Cells(x, y).Value & "%"
        End If
    Next y
Next x´
can somone help?
regards,
Younes

Multiply your numerators in your formula with 100 and use %A percentage functions. You will get %sign in all your results
Create formulas like this
(X*100)%A ( Y )
when X = 10 and Y = 20
You will get (10*100)/20 = 50%

Similar Messages

  • Read Values of Report Filters through VBA

    Hi,
    I am actually trying to read the values of report filters through VBA. In the image below I want to read the values for the Report Filter State and Team. Can you please help me with some sample code.
    Any help in this regard will be highly appreciated.
    Thanks,
    Bhawna
    Bhawna.

    Hi Bhawna,
    If you still need to use VBA method to achieve this requirement, I would suggest you open a new thread in
    Excel for Developer forum for better support.
    Excel for Developers: http://social.msdn.microsoft.com/Forums/office/en-US/home?forum=exceldev
    Thanks for your understanding and support.
    Elvis Long
    TechNet Community Support

  • How to add only highest values in the column

    Hello All,
    We have report where I need to add only highest values in 'Price' column.
    Ex:
    Group  Mat      Price
    Grp1    Mat1    50
               Mat2    75
               Mat3    100
    Grp2    Mat1    50
               Mat2    100
    I need my result as 200...
    Any input is appreciated!
    Thanks in advance !!
    Venu.

    Sriman/Surendra,
    Unfortunately, this approach does not work because the Calculate Result As --> Maximum applies not only to the subtotals but also to the grand total. Therefore, the result in Venu's example will be:
    MAX(Grp1) = 100
    MAX(Grp2) = 100
    MAX(All Grps) = 100
    We have the same requirement as Venu, but have not found a satisfactory solution yet. The only way we have solved such problems in the past is to use VBA in workbooks, but the report we are using now is a Web report.
    Hope this helps to clarify the issue...
    Bob

  • How can I add form field value to the file name in save as dialog box

    I do not want the form to be saved automatically, just want the form to auto populate the "file name" only.
    A little background on the forms I want to use:  My company has 70 retail outlets, I'll use one of our pdf forms called an "Incident Report" as an example.  I would like for a store manager to be able to complete the form, then email the form to the main office (I already have javascript to add field values and form name to the email subject line), once the main office receives it, I want for them to be able to file the pdf electronically on our server.  We have mutliple forms that we use so I do not want any of the forms to automatically save anywhere, (at this time anyway) I just want the office personnel to be able to click "save as" (or whatever they will need to click) and the form automatically add certain field values from the pdf they have received, of which will be different each time the form is sent to the office (Date, store #, employee name etc.) in addition to the name of the form in the "File name" of the "Save As" dialog box.  The main office employees will decide into which server file the pdf should be saved.
    I'm using Acrobat 8 professional, the stores and office personnel use Adobe reader.
    One little note:  We currently print and file a lot of paper on a daily bases, as soon as I can get this to work, we are going green.
    Me and a lot of trees in this will really apprecitate any help you can give with this!  :-)

    You might want to take a look at the document "Developing Acrobat Applications Using JavaScript" (js_developer_guide.pdf) which is part of the Adobe Acrobat SDK, which can be downloaded here. Read the "Privileged versus non-privileged context" (p. 45ff.). You will find an example for "Executing privileged methods in a non-privileged context". Should be almost exactly what you are looking for.
    Small Outline: For security reasons ("the user always has to know what's going on") you are not allowed to use the "Doc.saveAs"-method without the user permission (--> in a non-privileged context). In order to reach the goal of a privileged context you can use a trusted function. You do this by creating a JavaScript file (*.js) in either the Application-JavaScript-Folder (default location on Windows systems: "%ProgramFiles%\Adobe\Acrobat 10.0\Acrobat\Javascripts") or the User-JavaScript-Folder (default location on Windows systems: "%AppData%\Adobe\Acrobat\10.0\JavaScripts"). Add the following content to the new file:
    myTrustedBrowseForDoc = app.trustedFunction( function ( oArgs ) {
         app.beginPriv();
              var myTrustedRetn = app.browseForDoc( oArgs );
         app.endPriv();
         return myTrustedRetn;
    myTrustedSaveAs = app.trustedFunction( function ( doc, oArgs ) {
         app.beginPriv();
              var myTrustedRetn = doc.saveAs( oArgs );
         app.endPriv();
         return myTrustedRetn;
    The developer guide actually wants you to add this content to the existing "config.js" file. I recommend creating a new file, since its easier to deploy in a network. Either way, every client/user who needs to be able to save documents this way, needs this JavaScript Code in his Application/User-JavaScript-Folder.
    Within the Acrobat Document, which you want to obtain a certain file name, you can now use the trusted functions "myTrustedBrowseForDoc" and "myTrustedSaveAs" to store the file. To call the trusted functions and deliver the file name you can either you use a form field (button) or you add a new menu item. Add the following JavaScript Action to the button/menu item and change "Roller Coaster" to the name of the field which contains the value which you want to become the new file name:
    var fileName = this.getField("Roller Coaster").valueAsString;
    try {
         var oRetn = myTrustedBrowseForDoc({bSave: true, cFilenameInit: fileName + ".pdf"});
         try {
              myTrustedSaveAs(this, { cPath: oRetn.cPath, cFS:oRetn.cFS });
         catch(e) {
              console.println("Save not allowed, perhaps readonly.");
    catch(e) {
    console.println("User cancelled Save As dialog box");
    Good Luck!

  • Add fields in KOB2 & KSB2 report in selection screen as well as output

    Dear All,
    I have an issue in which i have to add fields in KOB2 & KSB2 report.
    i need to add below fields to KSB2 report.
    1) Internal order
    2) Vendor
    3) Purchasing group
    I also need to add profit centre in selection screen for KSB2
    Similarly for KOB2 i need to add below fields
    1) Cost centre
    2) Vendor
    3) Purchasing group
    I also need to add cost centre as input for KOB2 report.
    I have gone through note 325546 "CO line item reports: Creating a user-defined field" which can be helpful.
    However i am not sure as to how do i add fields in input screen as required.
    Other alternative is to create a Z report however when i try and copy the report both KOB2 & KSB2 call same report "RKAEP000".
    I am not able to get as to how do i differentiate the call of different screens when ZKOB2 is called or when ZKSB2 is called.
    I could identify " c_item_group" field having different values however i couldnot get a proper logic as to how correct screen can be called based on input
    Please suggest .
    Thanks,
    Ronak

    Hi Raymond,
    The note 747588 is good as soon as you are adding fields from the same table only.
    When I have added additional table into KAEP_SCOVP selection view below COVP (just because the extra fields I need are not in COVP) they will show up in KOB1 as selection criteria, but not getting saved.
    Any idea if any ABAP should be regenerated or what extra steps are required when adding more tables into Selection View?
    Thank you!

  • How to add two columns in OBIEE report?

    Hi to All,
    Can anyone tell me how to add two columns in OBIEE report and get that result in a new column?
    Thanks in Advance,
    Thenmozhi

    Assume you already have two columns SalesAmt1 and SalesAmt2, and you want to derive 3rd column say SalesAmt3 which would be the sum of SalesAmt1 and SalesAmt2.
    For this, as I mentioned above pull SalesAmt1 and SalesAmt2 columns in Report. Now pull another column (say SalesAmt1) and open the fx. Clear the contents of fx. Now locate the columns button in the bottom of the fx. From Here, first select SalesAmt1 and + sign and the select SalesAmt2.
    Now in this new column, the fx should look like SalesAmt1 + SalesAmt2.
    Let me know if you are looking for something else.
    Thanks

  • How to add a default value in a prompt list?

    I have a prompt list that I'm getting from the database, I want to add a deafult value in the top of the list. Ei "ALL", my current list is:
    "AMERICAS"
    "EMEA"
    "ASIA"
    I want a list like:
    "ALL"
    "AMERICAS"
    "EMEA"
    "ASIA"
    This is the code I have:
    @Select(Country Region\Regionname)IN @Prompt('Enter the region','A',{'All'}distinct 'Country Region\Regionname',Multi,Constrained)
    It is displaying only "All". Does someone know how to merge text with a database list in a promp variable?
    Thank you!
    Marcela

    please find this post
    i've solved this problem with someone before
    Optional User prompt
    ok, lets get back to our problem
    since you are in sybase databases i dont know weather there is a DUAL table like oracle or not,
    anyway forget about it and follow those steps
    1. import the universe to the desginer
    2. Right Click any empty space on the Stage to Create a derived table.
    3. Give The derived table any Dummy Name lets say "ALL_table"
    4. write a small SQL statment in the derived table "Enter SQL Expression"
    select 'ALL' from anytable you have in the database.
    lets say the countries table itself
    SELECT 'ALL' FROM USER.COUNTRIES
    validate the SQL and Click ok.
    5.you will have a derived table called "ALL_table" with field name "ALL"
    6.Drag the Field Name ALL to the Same Class whicn you "Country Name" in.
    7.Get back to your "Country Name" Dimension and Double Click it to get its properties, then go to the Properties tab.
    8.in the peroperties tab. "Associate List of Values" ,, Click "Edit" Button.
    9.you will find your "Country Name" Dimension, click "Combine Queies" icon in the bar, to have another queries union with the first one.
    10. you will have another query with "U" beside itm Drag the "ALL" dimension in it, and remove the "Country Name"
    so you will have 2 union queries one with the "Country Name" and another on with "ALL"
    gooooooood.
    11.Click "Save and Close"
    12.Check Export with universe and "Automatically Refresh before use"
    13.now you can hide the "ALL" dimension we have created before, to make it invisible for the users. (do you have problem hiding this dimension?)
    14.export your universe
    15.open WebI
    16.Create Report on this universe.
    17.put the "Country Name" Dimension on the filter and make it prompt,
    18.Run the query,
    19. tell me what you see?
    good luck
    Amr

  • XL reporter error-requried COM add-in program for XL reporter has not ben l

    Dear All,
    I am getting this error could anyone please let me know the solution:
    "A requried COM add-in program for XL reporter has not been Loded and prohibuit Microsoft Excel from running.

    Hi,
    try to use the solution from the SAP note 893307:
    XLR - Activation of Other Microsoft Excel Add-Ins
    Symptom
    When Microsoft Excel is launched from within the XL Reporter application, other add-ins selected in Microsoft Excel's Add-Ins window are not automatically loaded into Microsoft Excel upon start.
    Other terms
    XLR, Business One, Addins, deactivated
    Reason and Prerequisites
    When Microsoft Excel is started through Automation (COM), Add-ins are not loaded by default. This is by design and XL Reporter follows this behaviour.
    The following is a workaround solution that is avalible in SAP Add-On XL Reporter 2004 SP02 patch 2 and SAP Add-On XL Reporter 2005 SP00 patch 1 and subsequent releases.
    Solution
    If you need to have other add-ins automatically loaded upon start, a workaround solution is now possible:
    In the Microsoft Registry Editor on your client machine, change the following settings in your system registry: in the registry tree underHKEY_CURRENT_USER/Software/iLytix/XLReporter/Settings/SBOOEM, add a key with the following name: StartExcelAddins. The key can have two values: the value, 1, which activates other add-ins upon start, and the default value, 0, which leaves the other add-ins inactivated.
    Incorrectly editing the registry may damage your system. System registry changes should therefore only be performed by an advanced user who is prepared to both edit and restore the registry. For details about the system registry, please refer to Microsoft Registry Editors help system
    if not solve yet, just let me know
    JimM

  • Add New Column in ALV Report of Standard SAP ME28.

    Hi anybody,
    I want add new column in alv report of standard SAP Program ME28 Screen.
    Add Last PO Price column inside ALV Report ME28 Screen.
    Can u please anybody tell me how to add new column in ME28 Screen.
    Thanks
    S.Muthu.

    Try to find any BADI for the same
    Follow the below steps to find out what all BADI's are called when you press any button in any transaction.
    1) Goto se24 (Display class cl_exithandler)
    2) Double click on the method GET_INSTANCE.
    3) Put a break point at Line no.25 (CASE sy-subrc).
    Now
    4) Execute SAP standard transaction
    5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
    6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
    7) This way you will find all the BADIs called on click of any button in any transaction.
    OR
    Also one more option is to copy ME28 and, make modifications to the copied program.

  • Display In Between  Prompts Value in Report Title

    Hi All,
    I want to show the in between dashboard prompt value in Report.
    So that when user download the report he will come to know the date range.
    I have gone through the couple of links but it does not work.
    I tries the below one but when ever i am selected the to_date it reset the from date also.
    http://obiee101.blogspot.com/2009/03/obiee-between-dates-prompt.html
    Thanks
    Nawneet

    I would add one thing to Saichand's solution which I use for the situation you describe. If you create two dashboard prompts one for the "from" date and the other for the "to" date and then modify your filter on the date column to be:
    datecolumn >= @{From_Date} AND datecolumn <= @{To_Date}
    ...then you just need to add two more columns to your report to house the presentation variables. Make these columns the first two so that in your Narrative View you can reference them as "Between @1 and @2"
    You don't need another report to place on top of your current one, just add the Narrative View to your existing report.

  • How to add search help to a report.

    How to add search help to a report.

    Hi
    It can use the event AT SELECTION-SCREEN ON VALUE REQUEST:
    PARAMETERS: P_FIELD LIKE ....
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FIELD.
    * Here it needs to insert the abap code to call the search help,
    * for example it can call fm F4IF_FIELD_VALUE_REQUEST
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
           EXPORTING
               TABNAME        = SPACE
                SEARCHHELP = <SEARCH HELP>
                DYNPPROG     = SY-REPID
                DYNPNR          = SY-DYNNR
                DYNPROFIELD = 'P_FIELD'.
    Max

  • How to add the parameters onto the reports while calling from forms

    Hi all,
    I am using oracle forms 10g. I want to call a report from the form.
    But i dont know how to add parameters to the url while using
    web.show_document();
    i have a sample code. But it does not add the forms values onto the url.
    DECLARE
    v_host varchar2(100);
    v_port varchar2(10);
    v_parameter_string varchar2(4000);
    v_username varchar2(50);
    v_password varchar2(50);
    v_database varchar2(50);
    BEGIN
    -- Get the full domain name of the server from the formsweb.cfg
    tool_env.getvar('SERVER_URL',v_host);
    -- Get the username/password and database from the .env file
    tool_env.getvar('APPLICATION_USERNAME',v_username);
    tool_env.getvar('APPLICATION_PASSWORD',v_password);
    tool_env.getvar('APPLICATION_DATABASE',v_database);
    -- If it is localhost then we are running on windows and need to use the windows port, otherwise we
    -- are on AIX and need to use the AIX port
    IF v_host = 'localhost' THEN
         v_port := '8889';
    ELSE
         v_port := '7778';
    END IF;
    -- Now build the parameter string for running the report      
    v_parameter_string := 'server=rep_fsprod';
    v_parameter_string := v_parameter_string||'&report=AAP_TOTAL_CONTRACT_VALUE_RPT.rdf';
    v_parameter_string := v_parameter_string||'&userid='||v_username||'/'||v_password||'@'||v_database;
    v_parameter_string := v_parameter_string||'&execution_mode=batch';
    v_parameter_string := v_parameter_string||'&comm_mode=synchronous';
    v_parameter_string := v_parameter_string||'&destype=cache';
    v_parameter_string := v_parameter_string||'&desformat=pdf';
    -- Now run the report
    web.show_document('http://'||v_host||':'||v_port||'/reports/rwservlet?'||v_parameter_string,'_blank');
    END;
    Are we able to add the text values in the form from to the URL.
    Please let me know....
    thanks in advance....
    Naveen

    hello
    read the following white paper http://www.oracle.com/technology/products/forms/pdf/10g/frm10gsrw10g.pdf
    cheers
    Q

  • I want to add some fields in the report of FBL5N, Can anybody tell me how ?

    I want to add some fields in the report of FBL5N, Can anybody tell me how to do it?
    The fields are sales order, delivery, order quantity, net value and others.
    I can only find the shipment number in FI document.
    Thank you very much.

    Dear Jie,
    Billing document number can be displayed in customer line item display
    (FBL5N) and not in G/L line item display (FBL3N).
    The value of VBELN is saved in table BSEG. So, this means, you
    have to define the field BSEG-VBELN as a special field in table
    T021S. Then you can use it in FBL3N, because then the report looks
    directly in BSEG-VBELN.
    For further information,please read the SAP note 207436. You don't have to
    implement the coding corrections, if they are already in your system
    with the hotpackage. But it explains very detailed the system
    behaviour. The example in the note with field EBELN could be
    replicated on your field VBELN.
    About the MEINS field, please refer to 1-U_MEINS (bseg-meins field).
    The SAP note 215798 may also be helpful.
    Mauri

  • Add fields in s_p00_07000134 standard report

    Hi all,
    I have a requirement to add a few fields in report S_P00_07000134. So what should I do? I already appended the structure and now I do not know where I have to create logic to extract the data in that report?

    Hi,
    After the add the fields in structure, Check that program get the value through view, If it's then add the field in that view according to your condition, Otherwise you can do it through implicit enhancement.
    Regards,
    John.

  • How to add Traffic Lights to a Report?

    Hi,
    How do U create a Traffic Light? and how to you change the Light? That's all I need.
    Thanks,
    Kishan

    hi dude,
    This is the way u add lights to ur alv report.
    I'm following this method and i'm getting lights. This will work for sure.
    In data declaration along with your alv display structure as a field named lights(any name).
    DATA : BEGIN OF wa_srr,
    vbeln LIKE vbak-vbeln, "Sales Order number
    posnr LIKE vbap-posnr, "Item nunmber
    matnr LIKE makt-matnr, "Material number Desc
    maktx LIKE makt-maktx, "Material Description
    gbstk LIKE vbuk-gbstk, "Completion status
    bukrs LIKE knb1-bukrs, "Company Code
    butxt LIKE t001-butxt, "Company Code description
    vkorg LIKE vbak-vkorg, "Sales organization
    vtext LIKE tvkot-vtext, "Sales Org description
    vtweg LIKE vbak-vtweg, "Distribution Channel
    dtext LIKE tvtwt-vtext, "Dist Channel description
    spart LIKE vbak-spart, "Division
    dvtxt LIKE tspat-vtext, "Division Description
    kunnr LIKE vbak-kunnr, "Customer Number
    name1 LIKE kna1-name1, "Customer Name
    land1 LIKE kna1-land1, "Country
    regio LIKE kna1-regio, "State
    ort01 LIKE kna1-ort01, "City
    erdat LIKE vbak-erdat, "Creation Date
    vdatu LIKE vbak-vdatu, "Due date
    kwmeng LIKE vbap-kwmeng, "Material Quantity
    netpr LIKE vbap-netpr, "unit net price
    netwr LIKE vbap-netwr, "Price
    wavwr LIKE vbap-wavwr, "Cost price
    bzirk LIKE vbkd-bzirk, "Sales District
    bztxt LIKE t171t-bztxt, "Sales District Discription
    lights, "Diplaying Status
    END OF wa_srr.
    While you are building the field cat do as follows
    FORM build_layout CHANGING l_wa_layout TYPE slis_layout_alv.
    l_wa_layout-zebra = cb_zebr. "Set alterante colored line
    l_wa_layout-colwidth_optimize = cb_colop. "Optimize column width
    l_wa_layout-no_vline = cb_novli. "No vertical line
    l_wa_layout-no_colhead = cb_nocol. "no column Header
    l_wa_layout-lights_fieldname = 'LIGHTS'. "Set light field
    (assigning the field u have added in ur structure here as light field in alv report)
    ENDFORM. " BUILD_LAYOUT
    Then as per the logic, u make green, yellow or red light
    Example,
    FORM build_light .
    LOOP AT it_srr INTO wa_srr. "for all entries in the table
    IF wa_srr-gbstk = 'C'. "If status is 'completed',
    wa_srr-lights = '3'. "Show green signal light
    ELSEIF wa_srr-gbstk = 'B'. "If status is 'Partial'
    wa_srr-lights = '2'. "Show yellow signal light
    ELSE. "If status is 'incomplete'
    wa_srr-lights = '1'. "Show red signal light
    ENDIF.
    MODIFY it_srr FROM wa_srr. "Update to table
    ENDLOOP.
    ENDFORM. " build_light
    after building ur layout, Pass it to ur alv function module like this.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    i_callback_top_of_page = 'TOP_OF_PAGE'
    i_background_id = 'ALV_BACKGROUND'
    i_grid_title = text-011
    pass ur layout structure here********
    is_layout = wa_layout
    it_fieldcat = it_fcat
    it_sort = it_sort
    i_save = v_save
    is_variant = wa_variant
    is_print = wa_print
    TABLES
    t_outtab = it_srr
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE i001. "List cannot be displayed
    ENDIF.
    wat all i did to add light is,
    1) adding an extra field in the main structure.
    2)create internal table with this structure as data table for alv report
    3) add 'field name' field in layout
    4) I have passed values(3, 2, 1) for green, yellow and red light resp, to the field(LIGHTS) in the internal table that is passed to alv function module.(Based on some condition)
    5) pass the layout structure layout to alv function module
    Thats it. If u do all this teps, u r done with it.
    Lemme know u solved it by giving points.
    with regards,
    praveen.

Maybe you are looking for