Dynamically changing a UI caption.text

Hi!
I have a Caption in a View's Layout and i'd like to change its text properties when a user click on a button.
Now i have created the OnAction Event for the button, but i don't know how to point to that Caption!
How can i navigate through ROOTUIELEMENTCONTAINER to this Caption ID ?
Thanks.

Hi Fabio,
The best way for you would be to bind your Captions "text" property to an context attribute & specify your original value over there. By using this approach you can then simply code within your buttons action handler to modify the text by modifying the context attribute using a simple set_attribute( ). This would be the suggested & easy manner.
However am just explaining for your reference as to how you can achieve the same using the dynamic class methods. First obtain & save the reference of your caption into a view level attribute of type ref to CL_WD_CAPTION.
So withing your WDDOMODIFYVIEW you pass your Captions id & obtain its reference:
wd_this->lr_caption = view->get_element( id = 'CAP1' ).
So now within your buttons action handler you can change the text by saying as:
wd_this->lr_caption->set_text( value = 'My new text!' ).
However just please keep it in mind that we are not supposed to save & use the reference of ui elements like in the 2nd approach. We are supposed to modify our layout only within WDDOMODIFYVIEW & SAP wouldn't support any problems that we might run into while following this latter approach.
Regards,
Uday

Similar Messages

  • Dynamic change of wage type texts on salary slip

    Hi Gurus.
    Maybe someone can help with a request.
    I want to do following.
    If someone input a wage type e.g. 6666 in Infotype 0015 I want to open a new input-field.
    In this input field the user should enter a text.
    In the payroll run I want to change the wage type text on the salary slip for wage type 6666 to the text inputted in the new field.
    We are using HRForms (PE51) for the salary slip.
    Does anybody have a solution or some tips how I can implement this?
    Thanks for your answers.
    Regards.
    Stefan

    Hi,
    Do not change the wage types , you have to delimit the wagetypes from a validity date as you have assigned minimum and maximum amounts for your wage types.
    Regards,
    Kapil Kaushal

  • How to dynamically change the text of a TextObject with embedded DataField?

    Hi
    I'm trying to dynamically change the text of a TextObject at runtime, by using the .NET library. My problem is that if one or more DatabaseFieldDefinition is embedded inside my text, I'm unable to change the "static text" only, by keeping the field, e.g. I have :
    Text1 => "Contact Name: {Contact.Name}"
    and I'd like to change it to anything else like:
    Text1 => "Nom du Contact: {Contact.Name}"
    Half of my TextObject is static text while second part comes from the dataset.
    (of course the translation is dynamic - it is called at run-time and the new value to be set depends on the calling application language)
    If I simply modify the Text property of my TextObject, the {Contact.Name} embedded field is not evaluated anymore by the Crystal Engine, but considered as a single text.
    Using formulas or parameters looks quite difficult, because it means having many ones just for translation needs - I cannot control the way my users will create their reports and "force them" to use complex methods just in order to put a text and a value together...
    Anyone knows how to deal with that ?

    Only way I can think of doing this:
    1) Create a formula (call it lang) and enter the string "Contact Name" in it
    2) Place the  {Contact.Name} field next to the string
    3) So now you have:
    ContactName:  {Contact.Name}
    4) Check what localization you are after. If you need "Nom du Contact", change the lang formula so it shows "Nom du Contact" using the code below:
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Shared
    Public Class Form1
    Inherits System.Windows.Forms.Form
    Dim Report As New CrystalReport1()
    Dim FormulaFields As FormulaFieldDefinitions
    Dim FormulaField As FormulaFieldDefinition
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    FormulaFields = Report.DataDefinition.FormulaFields
    FormulaField = FormulaFields.Item(0)
    FormulaField.Text = "[formula text]"
    CrystalReportViewer1.ReportSource = Report
    End Sub
    I realize this may not give you consistent spacing as the translations may have strings of differnt length. Perhaps someone has other idea(s)...

  • Dynamically changing text boxes

    My development staff is new to ABAP and the screen painter, and one of those developers is designing a screen with text boxes on it that need to dynamically change according to what is brought back from the database. How would one accomplish that task?
    Thanks,
    Kevin.

    Since it is an ABAP programming-related question, you might have a better chance of getting it answered if you post it in the ABAP Programming Forum.
    Regards,
    Ivo

  • Can we translate in captivate 7? I Have tried and changed the Caption and Notes. Can we change the on screen text of te normal slides, interactive call out boxes, screen recording slides and quizzes? If yes, please let me know the process.

    Can we translate in captivate 7? I Have tried and changed the Caption and Notes. Can we change the on screen text of te normal slides, interactive call out boxes, screen recording slides and quizzes? If yes, please let me know the process.

    Of course! Here ya go
    For the record, I did create a new project with only two slides to try and duplicate the issue. I had the same problem. I unchecked the Mouse Click Sound check box, republished and the slide auto advanced. I'm wondering if a default sound file was somehow moved or deleted? I discussed uninstalling and reinstalling C7 onto my laptop, but that's a frustrating solution haha

  • Dynamically change text field type

    Hello all
    I have a form which displays a decimal field. However when certain conditions are met, I need to change its type to Text, so the user can enter any alphanumeric character.
    How do I achieve that with Javascript code? Is it even possible?

    Actually, you can dynamically change a textfield.type. AS2.0
    You need two elements.
    txt.type = "input";
    txt.selectable = true;
    However, if you have the textfield in a btn you will need to
    delete the onRelease function before you can make the tf function correctly.
    btn.onRelease = function()
    delete this.onRelease;
    this.txt.type = "input";
    this.txt.selectable = true;

  • Dynamically changing internal table in 'gui_download'

    Hi Experts,
                     i have to download 4 internal tables, each with different structures, to the presentation server using 'gui_download', based on which radio-button is selected in the selection screen. I am hoping to use a single 'form' and 4 'perform' calls. how can I dynamically change the tables in the 'gui_download' function modules.
    plz help.....................

    Hi ,
    Build the field catalog dynamically based on the internal table structure based on the radio button selected.Use the dynamic internal table generated from the filedcatalog and use in GUI_DOWNLOAD.
    See the below code:
    *& Report  ZRAJESH02
    REPORT  zrajesh02.
    Dynamic internal table
    TYPE-POOLS: slis.
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                  <dyn_wa>.
    DATA: alv_fldcat TYPE slis_t_fieldcat_alv,
          it_fldcat TYPE lvc_t_fcat.
    DATA: lv_monate TYPE f,
          lv_months TYPE i,
          lv_date TYPE sy-datum,
          p_check1 type n value '1'.
    lv_date = sy-datum + 360.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_check TYPE c.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
      CALL FUNCTION 'MONTHS_BETWEEN_TWO_DATES'
        EXPORTING
          i_datum_bis   = lv_date
          i_datum_von   = sy-datum
          i_kz_incl_bis = ' '
        IMPORTING
          e_monate      = lv_monate.
      lv_months = lv_monate.
      PERFORM f_fcat USING 'AUFNR' 'CHAR' '12'.
      PERFORM f_fcat USING 'POSNR' 'CHAR' '06'.
      while p_check1 LE p_check.
      PERFORM f_fcat USING p_check1 'CHAR' '1'.
      p_check1 = p_check1 + 1.
      endwhile.
      PERFORM build_dyn_itab.
      LOOP AT <dyn_table> INTO <dyn_wa>.
        WRITE:/ <dyn_wa>.
      ENDLOOP.
    FORM f_fcat USING fieldname dattyp length.
      DATA:wa_it_fldcat TYPE lvc_s_fcat.
      CLEAR wa_it_fldcat.
      wa_it_fldcat-fieldname = fieldname.
      wa_it_fldcat-datatype = dattyp.
      wa_it_fldcat-intlen = length.
      APPEND wa_it_fldcat TO it_fldcat .
    ENDFORM.                    "f_fcat
    *&      Form  build_dyn_itab
          text
    FORM build_dyn_itab.
      DATA: new_table TYPE REF TO data,
      new_line TYPE REF TO data.
    wa_it_fldcat TYPE lvc_s_fcat.
    CLEAR wa_it_fldcat.
    wa_it_fldcat-fieldname = 'AUFNR'.
    wa_it_fldcat-datatype = 'CHAR'.
    wa_it_fldcat-intlen = 12.
    APPEND wa_it_fldcat TO it_fldcat .
    CLEAR wa_it_fldcat.
    wa_it_fldcat-fieldname = 'POSNR'.
    wa_it_fldcat-datatype = 'CHAR'.
    wa_it_fldcat-intlen = 6.
    APPEND wa_it_fldcat TO it_fldcat .
    Create dynamic internal table and assign to FS
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = it_fldcat
        IMPORTING
          ep_table        = new_table.
      ASSIGN new_table->* TO <dyn_table>.
    Create dynamic work area and assign to FS
      CREATE DATA new_line LIKE LINE OF <dyn_table>.
      ASSIGN new_line->* TO <dyn_wa>.
    ENDFORM.                    "build_dyn_itab
    Thanks,
    Rajesh.

  • IBooks Author: How do you get the inset margins applied to the caption text of gallery widgets to preview correctly?

    Currently the inset margins I set for caption text in the gallery widget reset to zero when previewed on different iPads. These galleries have multiple images and the captions are set to "individual caption per image" on the widget interaction panel. BUT the inset margins preview correctly if the gallery caption is set to "same caption for all images" in the gallery widget interaction panel. How does one fix this in iBooks Author? Would appreciate any advice or work arounds or suggestions.
    Thanks!

    The arrows don't show up on the iPad, they are only to aid navigation within iBA. You can use boxes in the background to frame your galleries (as the background is off). I believe it's also possible to change the colour of the dots beneath the gallery too, although I forget how to do that right now.
    About Apple's rigid UX – I agree that it can be frustrating. Apple intended iBA to be used by everyone, and the sort of design options and customisability we might want may confuse the less experienced user. Apple also wanted the UI for every book to be the same – from the point of view of the new user, once you've used one iBA ebook (or iBook, I'm not sure what Apple want us to call it), you can use them all. Otherwise end users would to get used to a slightly different UI on each book, which kind of works against the idea that ideally UI should be intuitive enough to be invisible. I can see the point in that. I have created a 'How to use' section in every iBA file I've made. It get's old quickly.
    Oh, and (you probably know this, but…) you can choose your own custom icon for audio. It's limited, as it's only a placeholder image that allows you to play an audio file, there's no ability to pause the audio or stop it once you choose the view as thumbnail choice. Something I'd like to see changed.
    Here's a link to Apple feedback page for iBA. Feel free to hammer it with your suggestions.
    https://www.apple.com/feedback/ibooks-author.html

  • Dynamic character count info as text box resizes

    Not knowing Javascript, does anyone think this is scriptable?
    When clicked inside a text box the info panel tells you how many characters are in view in that text box and how many are overset... it doesn't however display that info if you are resizing a text box by dragging one of the handles... do you think there may be a way of getting it or having onother info panel that displays how many character are inside the text box and how many are overset and it dynamically changes the read out as the user resizes the text box.
    Regards, Tim

    I don't think Javascript can do stuff "dynamically" -- you'd have to press a button to get the updated values. This sort of things is possible with InDesign, but it'd require writing a full plugin. Writing plugins is not for the meek, the faint-hearted, or the kind of people that enjoy their sanity.
    (OTOH I've been wrong a few times: APID, Rorohiko's script extensions -- http://www.rorohiko.com/ -- can perform a few tricks that used to be plugin-only. Check their website to see if there is something that sounds like your request.)

  • Dynamically Changing Labels for Multi Row Block Buttons

    Forms [32 Bit] Version 9.0.4.1.0 (Production)
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
    On my local: Windows 7 OS
    I am having a difficult time in doing the following in forms, and not sure if it can be done?
    I have a multi row block,based on DB table, which displays filename and another column from the table.
    It also has a push button on each row, which opens and displays the physical file from its source, when clicked. The filename thus can have 3 diff statuses depending on its sources and accordingly corresponding button should display appropriate label:
    a) View Image (its is in content server and successfully imaged. In this case I display the file in the browser, from the content server, when the button is clicked)
    b) View File (Display the file from file system)
    c) View Error (Display imaging error message from the table, as file failed to make it to the imaging server)
    I have this logic currently coded in the post query trigger, at the block level, and tried using set_item_property(button_id, label, <button_lable>), where I programmatically set the button lable, based on the file status (imaged, not imaged or has error) in that row. This wroks well, only if all the files in the multi row block have the same status. If each of them have diff statuses, then only last processed files's status gets reflected into the button label. For eg: The file in the first row of the block is imaged, and one in the second row has an imaging error. The button label for the first row should say 'View Image' and button for the second row should say 'View Error'. But now buttons for both the rows display 'View Error', as thats what got processed last!
    I __can not use set_item_instance property for 'label'__ (which lets us dynamically change the label on the push buttons).
    Is there any way to do this for ORacle forms? I am now playing with having 3 diff button items in that block, laying them on top of each other and showing only those that are appropriate and hiding the others... But I am not sure it is going to give me what I need? I think I am going to end up facing the same issues as in above case!!
    Any expert advice is highly appreciated.
    Thanks in advance for your time:
    Libran_Girl
    Edited by: libran on Aug 30, 2011 8:04 AM
    Edited by: libran on Aug 30, 2011 8:05 AM

    <p>I have just updated this existing PJC, that was originally constructed to handle Text Fields. You can, now, also handle buttons with it.
    Set the Button's Implementation Class property to : oracle.forms.fd.MultiButton.
    </p>
    This is the code you have to put one triggers of your based block:
    When-New-Record-Instance trigger: (based on the EMP table)
    declare
         LN$Pos  pls_integer ;
         LN$Rec  pls_integer := Get_Block_Property('EMP', CURRENT_RECORD) ;
         LN$Max  pls_integer := Get_Block_Property('EMP', RECORDS_DISPLAYED) ;
         LC$C    Varchar2(15) ;
    Begin     
         LN$Pos :=  LN$Rec - (trunc(LN$Rec/LN$Max) * LN$Max) ;
         If LN$Pos = 0 Then LN$Pos := LN$Max ; End if ;
         If LN$Pos > 0 Then
              Set_Custom_Property('EMP.BT', LN$Pos, 'SET_LOG', 'true' );
              -- Add the new item --
              Set_Custom_Property('EMP.BT', LN$Pos, 'SET_NEW_REC', to_char(LN$Rec) );
              -- Set some properties --
              Set_Custom_Property('EMP.BT', LN$Pos, 'SET_LABEL', to_char(LN$Rec) || ',' || :EMP.ENAME );
              If :EMP.JOB = 'MANAGER' Then
                Set_Custom_Property('EMP.BT', LN$Pos, 'SET_FONT', to_char(LN$Rec) || ',Arial,bold,14' );
                Set_Custom_Property('EMP.BT', LN$Pos, 'SET_FGCOLOR', to_char(LN$Rec) || ',0,0,255' );
              End if ;
              If :GLOBAL.I > 250 Then :GLOBAL.I := 5 ;
              Else  :GLOBAL.I := :GLOBAL.I + 5 ;
              End if ;     
              LC$C := To_Char(LN$Rec) || ','
                   || To_Char(255) || ','
                   || To_Char(255-:GLOBAL.I) || ','
                   || To_Char(255-:GLOBAL.I) ;    
              Set_Custom_Property('EMP.BT', LN$Pos, 'SET_BGCOLOR', LC$C );
              Synchronize;
         End if ;
    end;When-Create-Record trigger:
    declare
         LN$N    pls_integer ;
         LN$Rec  pls_integer := :system.cursor_record ;
         LC$C    Varchar2(15) ;
    Begin     
         if get_block_property('EMP',TOP_RECORD) > 1 Then
              LN$n := :system.cursor_record - get_block_property('EMP',TOP_RECORD) + 1 ;
         else
              LN$N := :system.cursor_record ;
         end if;
         If LN$N > 0 Then
              Set_Custom_Property('EMP.BT', LN$n, 'SET_LOG', 'true' );
              -- Add the new item --
              Set_Custom_Property('EMP.BT', LN$n, 'SET_NEW_REC', to_char(LN$Rec) );
         End if ;
    end;Post-Query trigger:
    declare
         LN$Pos  pls_integer ;
         LN$Rec  pls_integer := Get_Block_Property('EMP', CURRENT_RECORD) ;
         LN$Max  pls_integer := Get_Block_Property('EMP', RECORDS_DISPLAYED) ;
         LC$C    Varchar2(15) ;
    Begin     
         LN$Pos :=  LN$Rec - (trunc(LN$Rec/LN$Max) * LN$Max) ;
         If LN$Pos = 0 Then LN$Pos := LN$Max ; End if ;
         If LN$Pos > 0 Then
              Set_Custom_Property('EMP.BT', LN$Pos, 'SET_LOG', 'true' );
              -- Add the new item --
              Set_Custom_Property('EMP.BT', LN$Pos, 'SET_NEW_REC', to_char(LN$Rec) );
              -- Set some properties --
              Set_Custom_Property('EMP.BT', LN$Pos, 'SET_LABEL', to_char(LN$Rec) || ',' || :EMP.ENAME );
              If :EMP.JOB = 'MANAGER' Then
                Set_Custom_Property('EMP.BT', LN$Pos, 'SET_FONT', to_char(LN$Rec) || ',Arial,bold,14' );
                Set_Custom_Property('EMP.BT', LN$Pos, 'SET_FGCOLOR', to_char(LN$Rec) || ',0,0,255' );
              End if ;
              If :GLOBAL.I > 250 Then :GLOBAL.I := 5 ;
              Else  :GLOBAL.I := :GLOBAL.I + 5 ;
              End if ;     
              LC$C := To_Char(LN$Rec) || ','
                   || To_Char(255) || ','
                   || To_Char(255-:GLOBAL.I) || ','
                   || To_Char(255-:GLOBAL.I) ;    
              Set_Custom_Property('EMP.BT', LN$Pos, 'SET_BGCOLOR', LC$C );
              Synchronize;
         End if ;
    end;Don't forget to copy the multirecord.jar file in your /forms/java folder, then add it to the archive and archive_jini tags of your /forms/server/formsweb.cfg file.
    Enjoy it,
    Francois

  • How to change the screen field text in runtime

    Hi ,
      I want to change the screen button text in runtime IN ABAP dynpro screens. if anybody know this please post some helpful answer
    Regards,
    Anil kumar G

    Hi Anil..
    We can change the Text of a Pushbutton dynamically.
    For this:
    1. Declare a Global variable with the Same name as the Button in TOP include
      Eg:   Data: Button1(30).
    2. In the PBO module of the Screen assign the Text to this variable:
       Eg:
        Module set_text OUTPUT.
            Button1 = 'This is the text'.
        ENDMODULE.
    <b>REWARD IF HELPFUL.</b>

  • Change in Work item Text for Approval Workflow WS14000133

    Hi,
    I need to change the work item text for Shopping Cart Approval Workflow WS14000133.
    I have created an Attribute in Business Object BUS2121 and called the same attribute in work item text.
    In PFTC -> Redefine Work item text - > and i have defined the work item text as well called the attribute from the container.
    what  the problem over here is - when I am passing the attribute in the work item text in the task, I am unable to see the work item text with the Dynamic Attribute but I am able to see the work item alone (not with the Dynamic attribut)
    But when i debug the workflow from SWI1 then i can see the dynamic attribute in the Container of the workflow but nt in the approver's inbox in portal..
    Can you please tell me - that why is this a strange behaviour that i can see the Dynamic attributed created initially in the workflow container of the Business Object but nt in the Approvers inbox either in Backend nor in the front end...
    Thanks,

    Hi,
    Maybe this SAP note/KBA will help :
    1470761 - How to change the text of the SRM approval links in inbox or UWL
    Kind regards,
    Siobhan

  • How to change JTable column header text

    How do you set the text in the JTable column headers? I know you can create a JTable specifying the text in an array:
    <li>JTable(Object[][] rowData, Object[] columnNames)
    But if you create the JTable specifying a TableModel,
    <li>JTable(TableModel dm)
    the header text defaults to "A", "B", "C", etc. I cannot figure out how to access the text in the header names so it can be changed to something useful. I know how to get the JTableHeader for the table, but it does not seem to have methods for actually setting header values.

    I'm sure that model allows you to specify header values so you don't have to do so manually. I would be very surprised if it didn't override the default getColumnName() method to provide a reasonable names.She wasn't writing the class, but [url http://forums.oracle.com/forums/thread.jspa?messageID=9200751#9200751]outlining a design for me to implement. And, based on a previous comment I had made, I think she assumed I wanted the new design to look as much like the old as possible. There were no headers in the original design, which wasn't even a table.
    Anyway, this works:
        final static String statisticsColumnNames[] = {
         "Type", "Count",
         "Red QE", "Green QE", "Blue QE", "Average QE",
         "Distance"
         qErrors = new QEBeanTableModel();
         JTable errorTable = new JTable(qErrors);
         TableColumnModel tcm = errorTable.getColumnModel();
         for (int col = 0; col < statisticsColumnNames.length; col++)
             tcm.getColumn(col).setHeaderValue(statisticsColumnNames[col]);
    It looks like setHeaderValue() on the TableColumn is what I was looking for.Again, only used if you are dynamically changing the values at run time or you don't like the defaults provided by the Bean-aware model.I coded the above before I read your last post. The QEBeanTableModel is extremely specific to my program. I.e. I cannot imagine it being used anywhere else. Would it still be better to implement a getColumnName() within the table model? Looking at your [url http://www.camick.com/java/source/RowTableModel.java]RowTableModel.java source, I can see that it would not be difficult to do so.
    Just decided to add the getColumnName() method. This whole sub-project is based on implementing a clean modern design (and learning about Java Beans). You've clearly stated twice that the method I have implemented is for dynamic header values only, which has already answered what I asked last paragraph.

  • Dynamic change the ALV layout

    Alle experts:
    In ALV layout report, how to dynamic change the layout int ABAP porgram?
    e.g. I have save 5 layout, I need to change them base the my selection in ABAP program? How to do this?
    Thanks in advance!

    Try to call fieldcatlog dymnamically. Refer tofollowing code. Reward if helpful.
    REPORT  zfir0001 MESSAGE-ID ztax.
                               Tables
    TABLES : glt0, t001, skat.
                          Internal Tables
    DATA: BEGIN OF itab OCCURS 0,
            racct               LIKE   glt0-racct,    "Account number
            txt20               LIKE   skat-txt20,    "G/L account short text
            co_1000          LIKE     glt0-hslvt,     "Balance carried forward for company code 1000
            co_1100          LIKE     glt0-hslvt,     "Balance carried forward for company code 1100
            co_1200          LIKE     glt0-hslvt,     "Balance carried forward for company code 1200
    DATA : BEGIN OF itab1 OCCURS 0,
             bukrs LIKE glt0-bukrs,
             waers LIKE t001-waers,
           END OF itab1.
    DATA : BEGIN OF it_itab1 OCCURS 0.
            INCLUDE STRUCTURE glt0.
    DATA : END OF it_itab1.
                          Data Declarations
    DATA : w_total   LIKE glt0-hslvt,
           w_count   LIKE glt0-bukrs,
           w_flg     TYPE c,
           lv_count  TYPE i.
          w_slash   TYPE c VALUE ' '.
                          Selection screen
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE tit1.
    SELECT-OPTIONS : s_bukrs FOR glt0-bukrs OBLIGATORY,
                     s_racct FOR glt0-racct OBLIGATORY,
                     s_ryear FOR glt0-ryear OBLIGATORY,
                     s_rldnr FOR glt0-rldnr OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    INITIALIZATION.
      tit1 = 'Please select:'(004).
      TYPE-POOLS: slis.                                 "ALV Declarations
      DATA: i_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
            gd_tab_group TYPE slis_t_sp_group_alv,
            gd_layout    TYPE slis_layout_alv,
            gd_repid     LIKE sy-repid.
    ********Geting the selected company code in table itab1****
    START-OF-SELECTION.
      IF NOT s_bukrs-high IS INITIAL.
        itab1-bukrs = s_bukrs-low.
        APPEND itab1.
        w_count = s_bukrs-low.
        DO.
          IF s_bukrs-high = w_count.
            EXIT.
          ELSE.
            w_count =  w_count + 1.
          ENDIF.
          SELECT SINGLE * FROM t001
              WHERE bukrs = w_count.
          IF sy-subrc = 0.
            itab1-bukrs = w_count.
            APPEND itab1.
            CLEAR itab1.
          ENDIF.
        ENDDO.
      ELSE.
        itab1-bukrs = s_bukrs-low.
        APPEND itab1.
      ENDIF.
      SELECT * FROM glt0 INTO CORRESPONDING FIELDS OF TABLE it_itab1
              WHERE rldnr   IN s_rldnr
              AND   bukrs   IN s_bukrs
              AND   ryear   IN s_ryear
              AND   racct   IN s_racct.
      SORT it_itab1 BY bukrs.
      LOOP AT it_itab1.
        AT END OF racct.
          w_flg = 'X'.
        ENDAT.
        SELECT SINGLE txt20 INTO (itab-txt20) FROM skat
                  WHERE spras = sy-langu
                  AND   saknr = it_itab1-racct.
        PACK it_itab1-racct TO it_itab1-racct.
        itab-racct = it_itab1-racct.
        w_total = it_itab1-hsl01 + it_itab1-hsl02 + it_itab1-hsl03 + it_itab1-hsl04 +
                  it_itab1-hsl05 + it_itab1-hsl06 + it_itab1-hsl07 + it_itab1-hsl08 +
                  it_itab1-hsl09 + it_itab1-hsl10 + it_itab1-hsl11 + it_itab1-hsl12 +
                  w_total        + it_itab1-hslvt.
        IF w_flg = 'X'.
          READ TABLE itab1 WITH KEY bukrs = it_itab1-bukrs.
          IF sy-subrc = 0.
            SELECT SINGLE * FROM t001
                WHERE bukrs = itab1-bukrs.
            IF t001-waers = 'JPY' OR
               t001-waers = 'HUF'.
              w_total =  w_total * 100.
            ENDIF.
            CASE it_itab1-bukrs.
              WHEN '1000'.
                itab-co_1000 = w_total.
              WHEN '1100'.
                itab-co_1100 = w_total.
              WHEN '1200'.
                itab-co_1200 = w_total.
            ENDCASE.
            COLLECT itab.
            CLEAR: itab, w_flg, w_total.
          ENDIF.
        ENDIF.
      ENDLOOP.
      SORT itab BY racct.
      IF NOT itab[] IS INITIAL.
        PERFORM field_cat1.
        lv_count = 1.
        LOOP AT itab1.
          PERFORM field_cat USING itab1-bukrs.
        ENDLOOP.
        PERFORM display_alv_report .
      ELSE.
        MESSAGE s000 WITH 'No records Found'(003).
      ENDIF.
    *&      Form  display_alv_report
          text
    FORM display_alv_report .
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = gd_repid
          is_layout          = gd_layout
          it_fieldcat        = i_fieldcat[]
          i_save             = 'X'
        TABLES
          t_outtab           = itab
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
    ENDFORM.                    "display_alv_report
    *&      Form  field_cat1
          text
    FORM field_cat1 .
      i_fieldcat-col_pos     =  0.
      i_fieldcat-fieldname   = 'RACCT'.
      i_fieldcat-seltext_m    = 'Account'(001).
      i_fieldcat-fix_column = 'X'.
    i_fieldcat-emphasize   = 'X'.
      APPEND  i_fieldcat TO i_fieldcat.
      CLEAR  i_fieldcat.
      i_fieldcat-col_pos     =  1.
      i_fieldcat-fieldname   = 'TXT20'.
      i_fieldcat-seltext_m    = 'Description'(002).
      APPEND  i_fieldcat TO i_fieldcat.
      CLEAR  i_fieldcat.
    ENDFORM.                                                    "field_cat1
    *&      Form  field_cat
          text
         -->XV_BURKS   text
    FORM field_cat USING xv_burks TYPE char4.
      lv_count = lv_count + 1.
      i_fieldcat-col_pos     = lv_count.
      CONCATENATE 'CO_' xv_burks INTO i_fieldcat-fieldname.
      i_fieldcat-seltext_m    = xv_burks.
    i_fieldcat-just = 'C'.
    i_fieldcat-no_zero = 'X'.
    i_fieldcat-do_sum = 'X'.
      APPEND  i_fieldcat TO i_fieldcat.
      CLEAR  i_fieldcat.
    ENDFORM.   "field_cat
    Edited by: dhanashree wadkar on Apr 30, 2008 6:00 AM

  • How can I dynamically change a Grids ro color

    Hi,
    I am using a grid within a component in my Flex application.
    I have an XML dataProvider, and I want to change the row
    colour of my Grid depending on a value coming form my dataProvider
    – but I cant seem to get this to work :(
    can anyone help / advise me on how I can dynamically change the
    colour of my grid row depending on a value coming from my XML
    DataProvider????
    For example:
    Within my component I have the following grid within an
    “MXML” component called myGrid.mxml:
    [CODE]<mx:Grid id="GGrid">
    <mx:GridRow backgroundColor="0xCFD8DA">
    <mx:GridItem>
    <mx:Label id=”name_lbl”/>
    </mx:GridItem>
    </mx:GridRow>
    <mx:GridRow backgroundColor="0xCFD8DA">
    <mx:GridItem>
    <mx:Label id=”expiryDate_lbl”/>
    </mx:GridItem>
    </mx:GridRow>
    <mx:GridRow id=”statusRow”>
    <mx:GridItem>
    <mx:Label id=”status_lbl”/>
    </mx:GridItem>
    </mx:GridRow>
    </mx:Grid>[/CODE]
    I am setting/declaring my results/variables form my
    dataProvider in the main Application (“MXML”) file:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
    xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns="*"
    creationComplete="initApp()" >
    <mx:HTTPService
    id="myResults"
    url="
    http://localhost/myResults.xml"
    resultFormat="e4x"
    result="myResultHandler(event)" />
    [CODE]<mx:Script>
    <![CDATA[
    import mx.core.Application;
    [Bindable]
    public var myDataFeed:XML;
    public function initApp():void
    myResults.send();
    public function myResultHandler(event:ResultEvent):void
    myDataFeed = event.result as XML;
    Application.application.myGrid.name_lbl.text =
    myDataFeed.name;
    Application.application.myGrid.expiryDate_lbl =
    myDataFeed.expiry;
    Application.application.myGrid.status_lbl.text =
    myDataFeed.status;
    if(myDataFeed.status == “OK”)
    Application.application.statusRow.backgroundColor="0xCFD8DA";
    else if (myDataFeed.status == “WARNING”)
    Application.application.statusRow.backgroundColor="0xFF9900";
    else if (myDataFeed.status == “CRITICAL”)
    Application.application.statusRow.backgroundColor="0xFF0000";
    ]]>
    </mx:Script>
    </mx:Application>[/CODE]
    however, I cannot access the property
    “backgroundColor” of the gridRow in this way:
    [CODE]Application.application.statusRow.backgroundColor[/CODE]
    As I get the following error:
    [CODE]Severity and Description Path Resource Location
    Creation Time
    Id 1119:
    Access of possibly undefined property backgroundColor through
    a reference with static type mx.containers:GridRow.
    enterpriseDB_new enterpriseDB_new.mxml
    line 721 1194443056449 19295[/CODE]
    can anyone help / advise me on how I can dynamically change the
    colour of my grid row depending on a value coming from my XML
    DataProvider????
    Thanks,
    Jon.

    quote:
    Originally posted by:
    ljonny18
    Hi,
    I am using a grid within a component in my Flex application.
    I have an XML dataProvider, and I want to change the row
    colour of my Grid depending on a value coming form my dataProvider
    – but I cant seem to get this to work :(
    can anyone help / advise me on how I can dynamically change the
    colour of my grid row depending on a value coming from my XML
    DataProvider????
    Thanks,
    Jon.
    Hi,
    a few hours ago I stumbled across this cookbook entry - it
    didn't solve MY problem, but maybe it provides a way to solve your
    problem?
    http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postId=61&product Id=2&loc=en_US
    From the article:
    quote:
    Changing the background color of a DataGrid cell is not as
    simple as changing some style because the default renderer for a
    DataGrid cell does not have a backgroundColor. Therefore, to do
    this simple task, you have to create a custom itemRenderer where
    you draw your own background in the updateDisplayList function.
    HTH
    Uwe

Maybe you are looking for

  • Nokia Lumia 1520 ,experience full of dissapointmen...

    First of all, I was very eager to switch to Windows Phone and I am not a hater. It is a gem in a lump of coal. Buying a phone is not that easy for me from financial reasons. Since Lumias are hard to get to in my country I got my hands on an unbranded

  • Nokia N95 - problems with Adobe PDF

    Acrobat PDF was working right until recently and now it doesn't open. I've tried to reinstall it by using the N80 version (since both phones are S60 3rd) but it won't let me install since it says that the app is already installed. I've updated to the

  • Images on web page not clear

    Just got a MacBook Air, running 10.7.3 and noticing that on many web sites (firefox and safari are the same), the images just are not clear. They are a bit fuzzy, and some have some sort of weird border around them. I have attached a screen shot of t

  • Separate search box instead of this stinking "new address/search box in safari 6 .

    why can I NOT have a separate search box instead of this stinking "new address/search box in safari 6 that aint progress to me  dang it. Just can't leave well enough alone fer cry eye>

  • Select a 30 second sample for my website?

    Once I've shared my file with iTunes and it's now an mp3, how do I select about 30 seconds from the middle of my song? I want to add this to my website as a sample track. I'm using garage band 09 also. Thanks for your help!