WD4A with ALV, populating the header with values from the table

I have WDA application that list schedule agreement headers in one ALV and when you select one the line items show in the second ALV2 below. We show quantity and net value  in 13 monthly buckets beginning with the validity data. The function returns the month text in columns I want to change the header based on the months returned. So instead of QNTY1, QNTY2 it would be 01/2008, 01/2008 etc. But ALV2 is initialized when the page is built and if I change the ALV2 settings after the line item function call they are not updated. On the page. Is there anyway I can do this???
It tried put the code in the EXECUTE function method, and I tried WDMODIFYVIEW but the ALV is not refreshed.
Thanks
David

Thanks for your help, I know I am probably doing something dumb but it is driving me crazy.
I have debugged I can see the text change in the debugger but it doesn't show up on the screen. I removed the code from from the WDDOINIT. So am doing everything in the ONACTIONGETDETAIL to ensure that it is not being overwritten. I can change the 'number of lines', remove print button, change a field to an icon etc, but the column header doesn't change. If I put the same code in the WDDOINIT the column header does change. Everything else works in both places.
*First ALV config
    l_ref_cmp_usage =   wd_this->wd_cpuse_alv( ).
    IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
      l_ref_cmp_usage->create_component( ).
    ENDIF.
    DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table.
    lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
    DATA lo_value TYPE REF TO cl_salv_wd_config_table.
    lo_value = lo_interfacecontroller->get_model( ).
*activate extended functions of the alv.
    cl_salv_wd_model_table_util=>if_salv_wd_table_util_stdfuncs~set_all(
       r_model = lo_value ).
    lo_value->if_salv_wd_table_settings~set_visible_row_count( '10' ).
    lo_value->if_salv_wd_table_settings~set_selection_mode( '06' ).
    lo_value->if_salv_wd_std_functions~set_pdf_allowed( abap_false ).
    DATA lr_column_settings TYPE REF TO if_salv_wd_column_settings.
    DATA lr_column TYPE REF TO cl_salv_wd_column.
    DATA lr_column_header TYPE REF TO cl_salv_wd_column_header.
    lr_column_settings ?= lo_value.
    lr_column = lr_column_settings->get_column( 'VBTYP' ).
    lr_column->delete_header( ).
    lr_column_header = lr_column->create_header( ).
    lr_column_header->set_ddic_binding_field( if_salv_wd_c_column_settings=>ddic_bind_none ).
    lr_column_header->set_text( '200708' ).
*change column to icon
    lr_column = lo_value->if_salv_wd_column_settings~get_column( 'AUART_DESC' ).
    CREATE OBJECT lr_image.
    lr_image->set_source_fieldname( 'AUART_DESC' ).
    lr_column->set_cell_editor( lr_image ). "Display images in column
Thanks again.
David

Similar Messages

  • How can we transfer the header fiedl value to the  item

    we have add the "storage location" field to the sales order head and item, now we need to batch change the item's storage location when we change the head's storage fields ,
    we have use the function module in 'crmc_map' transcation, but with some problems,  when we change the head's field, we can't triger the item's 'SET' event, so we can't change's the item's fields(through the screen is changed, but when we use 'CRM_ORDERADM_I_READ_OW'  to get the value, it stand still);
    we also tried to when we change the head's field,  we use head's set event to change to item's value, but we can't get item's guid, so Now I have no idea to deal with it.
    Any body can help me?
    Thanks a lot!

    Hi,
         Using the set method in this scenario is not reliable. The set methods are triggered only for displayed items, whereas you need to change the value for, I presume, all the items. In the code where you change the header field value, write the code to change values for items as well. The approach will differ depending on whether you are using the BOL method or directly call the maintain APIs.
    Regards,
    Arun Prakash

  • How can we read the screen field values from the report selection screen wi

    Hi expart,
    How can we read the screen field values from the report selection screen with out having an ENTER button pressed  .
    Regards
    Razz

    use this code...
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_posnr.
    **Read the Values of the SCREEN FIELDs
    CALL FUNCTION 'DYNP_VALUES_READ'

  • New install of SQL 2014 Std MSDN. Get "The SQL Server product key is not valid. To proceed, re-enter the product key values from the Certificate of Authenticity (COA) or SQL Server packaging."

    Trying to install a new version of SQL 2014 Std 64 or x86. Installing on Windows 8.1Pro 64bit machine.
    I get:
    "TITLE: SQL Server Setup failure.
    SQL Server Setup has encountered the following error:
    The SQL Server product key is not valid. To proceed, re-enter the product key values from the Certificate of Authenticity (COA) or SQL Server packaging.
    Error code 0x858C0017."
    I looked at the summary log and that is the only error.
    I made sure there were no other instances of SQL on this machine. Uninstalled all VS2013 and sql instances just in case. IF there is somewhere to check if a previous version or license is causing the issue, i would be glad to check.
    Any help would be appreciated.

    Hi,
    Please read this thread with similar issue
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/bdd94577-515c-49fa-be44-008eacece057/installing-sql-server-2012-on-a-new-vm-error-code-0x858c0017?forum=sqlsetupandupgrade
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Articles

  • Retrive the second-highest value from the table using query.

    Hi,
    I am using Oracle 8i...
    I have to retrieve the second-highest salary from the table...for this I need to write a SQL..Can anybody please help me to figure out this problem..Thanks in advance..
    smitha

    Using analytic functions
    SELECT *
    FROM (SELECT other_columns,DENSE_RANK() OVER(ORDER BY salary DESC) sal_rank
          FROM table)
    WHERE sal_rank = 2
    Using Order by and rownum
    SELECT *
    FROM (SELECT other_columns,rownum sal_rank
          FROM (SELECT other_columns,salary
                FROM table
                ORDER BY salary DESC))
    WHERE sal_rank = 2TTFN
    John

  • Exchange Rate: Routine to copy  the "Exchange Rate" value From TCURR table

    Dear experts,
    I have created a cutomised Key Figure (ZEXCHRATE) with the 0currency as the unit and this field is included in my ZCOPA_C21 Infocube.
    In the update rule, it was then appointed with a simple routine below;
    (PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: TCURR.
    DATA: IT_TCURT Type TCURR occurs 0 with header line.
    $$ end of global - insert your declaration only before this line   -
    FORM compute_data_field
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
      USING    COMM_STRUCTURE LIKE /BIC/CSZCOPA_TPL_IS
               RECORD_NO LIKE SY-TABIX
               RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING RESULT LIKE /BIC/VZCOPA_C21T-/BIC/ZEXCHRATE
               RETURNCODE LIKE SY-SUBRC
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal table "MONITOR", to make monitor entries
      SELECT        * FROM  TCURR appending corresponding fields of table
      IT_TCURT
             WHERE  KURST  = 'M'
             AND    FCURR  = 'USD'
             AND    TCURR  = 'IDR'.
          AND    GDATU  = ___.
          AND    UKURS  = ___.
      Sort IT_TCURT by GDATU descending.
      Loop at IT_TCURT.
        Move IT_TCURT-UKURS to RESULT.
        Exit.
      Endloop.
    result value of the routine
    RESULT = space.
    if the returncode is not equal zero, the result will not be updated
      RETURNCODE = 0.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine)
    Which will basically copy all the contents of TCURR into an internal table (IT_TCURT), sort it and then only copy out the UKURS (Exchange rate) data into the customised ZEXCHRATE to get the latest exchange rate value.
    Routine was checked and its fine.
    The problem is, upon checking the update rule, it returned an error message;
    "No Unit maintain for Key Figure Exchange Rate Local".
    Double checked the declaration of ZEXCHRATE, the unit was there.
    My questions;
    1. Is this the correct way of doing it ? I just want to be able to show the exchange rate value in my query (hence the existence of ZEXCHRATE).
    2. Is there an alternative way of achieving the same result ?
    Your help or advice will be greatly appreciated.
    Thanks
    KG

    Hi Sreeni,
    Referring to the " but the conversion from VEF to USD is happening at a rate @0.23256 which is valid till 02/13/2013 only" part in your post, the date given in OB08 for currency rate is valid from and not valid till.  Hence, please check the setting once.  Once you enter the rate from 02/13/2013, the rate is valid till you enter another date later than 02/13/2013.
    Regards,

  • How can I convert (or switch) the RGB percent values from the LR histogram into RGB values which are shown e. g. in PS/CameraRAW?

    In LR 5.5 (same in previous versions) the RGB values in the histogram are shown in percent (relativ) values. I prefere to see the absolute values, but I can`t find any way to switch. Maybe this option is intentional disabled, because LR works in 16-Bit mode this would result in values up to 2^16. But as i compared the relativ values from LR with the absolute values from PS i run into a conversion problem. The following example shows the differences:
    CameraRAW : RGB, 128,0,0
    Lightroom: RGB, 43,8%, 19,0%, 6,2%
    CameraRAW: RGB, 0,128,0
    Lightroom: RGB, 29,8%, 47,5%, 17,5%
    Mainly i have two questions:
    1. Is there any possibility to change the percent RGB values in LR to absolut values?
    2. How can i convert CameraRAW values to LR values (see above)?

    TThe reason that a design decision was made from the beginning of LR to show only the percentage values was that RGB values are dependent on the color space and the LR histogram and numerical readout are derived from the Develop module's display space which is a hybrid color space with ProPhoto RGB primaries and the sRGB TRC. Thus the numerical values in the display would be different from the exported RGB image (in an orthodox space) and it was feared that this would be misleading. When soft proofing was introduced, because it involved converting the display to an orthodox space, it became possible to use the 0-255 scale in that mode.

  • I want to access the "Page Setu " menu item of the "File" menu of the Netscape using Applet or JavaScript so that i can remove the header and footer from the page that will be printed.

    A print command should be given from a button on the page. Hope someone helps me

    If you have secondary hard drives or other writable volumes connected to your Mac, each contains an invisible Trash folder named .Trashes at the root (top) level of the volume, which in turn contains an invisible Trash folder for each user.
    -from -> Solving Trash Problems.
    Clinton

  • I am reading from an instrument a 1D string array of numbers in ascii. I want to be extract the actual data values from the string. How do I do that?

    labview 6i. Using sr785 instrument.

    Two ways. Use Fract/Exp to Number function on the Strin>Strin Number Conversion palette. It accepts both individual or strin array inputs. Wire your string array in an get an array of doubles out. You can also use Scan From String on the String palette inside of a for loop. The for loop will autoindex the string array in and autoindex an array of doubles out.
    Attachments:
    string_to_double.jpg ‏10 KB

  • How to return the same SUM value from two tables

    Hello,
    I have the following data:
    SQL> SELECT * FROM t1;
         T1_ID   T1_VALUE
             1        500
             1        500
    SQL> SELECT * FROM t2;
         T2_ID   T2_VALUE
             1       1000
    SQL> SELECT t1_id, SUM(t1_value), SUM(t2_value)
      2    FROM t1, t2
      3   WHERE t1_id = t2_id
      4   GROUP BY t1_id;
         T1_ID SUM(T1_VALUE) SUM(T2_VALUE)
             1          1000          2000How is it possible that SUM(T2_VALUE) returns also 1000.
    Thank you

    Here's one way:
    with t1 as (select 1 t1_id, 500 t1_value from dual union all
                select 1 t1_id, 500 t1_value from dual),
         t2 as (select 1 t2_id, 1000 t2_value from dual)
    select t3.t3_id, t3.t3_sum, t4.t4_sum
    from   (select t1_id t3_id, sum(t1_value) t3_sum from t1
            group by t1_id) t3,
           (select t2_id t4_id, sum(t2_value) t4_sum from t2
            group by t2_id) t4
    where  t3.t3_id = t4.t4_id

  • Executed  Step outcome  value  from the table

    Hi,
       How to get the Step outcome  value  from the table for the executed workitem.
    Regards,
    Rani.

    Hi Rani,
    For database tables you can refer to tables:
    SWWLOGHIST -      History of a work item
    SWWORGTASK -      Assignment of WIs to Org.Units and Tasks
    SWWUSERWI -      Current Work Items Assigned to a User
    SWWWIHEAD -      Header Table for all Work Item Types
    SWWWIAGENT -      Gets agents assigned to a workitem
    You can you FMs like SAP_WAPI_GET_WORKITEM_DETAIL, SAP_WAPI_CREATE_WORKLIST as per your requirement.
    Hope this helps!
    Regards,
    Saumya

  • Getting the last selected value of the combo  - very very urgent...........

    On my panel i have a jcombobox in upper half(which displays say the address type.) and few text fields on the lower half(which displays the add details). when the user selects a value in the combo box the text fields are populated based on the selection. The user can change the values displayed in the text fields. So before setting the new values in the text fields the last displayed values need to be saved.
    I have an ActionListener for my combo which gives me the currently selected value by calling getSelecetdItem()
    How can i get the last selcted value of the combobox without using any variable of my own.

    To update the last displayed details(the address details say) i need to check what type of address the combo had previousely.....
    when i display the panel first time the home address is set by default and i have a variable to hold this value..as the user changes the selection i update the variable...I don't want to use this variable..instead if i can get the last selcted value from the event that would be great...
    thanks

  • How can i get the all values from the Property file to Hashtable?

    how can i get the all values from the Property file to Hashtable?
    ok,consider my property file name is pro.PROPERTIES
    and it contain
    8326=sun developer
    4306=sun java developer
    3943=java developer
    how can i get the all keys & values from the pro.PROPERTIES to hashtable
    plz help guys..............

    The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
    InputStream is = new FileInputStream("tivoli.properties");
    props.load(is);

  • How to get the selected values from the shuttle

    Hi
    Please tell me how to get the selected option values from the shuttle leading list.
    Thanks

    you can also obtain the option values present in the leading and trailing lists using the
    following methods:
    public String[] getLeadingListOptionValues(OAPageContext pageContext, OAWebBean
    webBean)
    public String[] getTrailingListOptionValues(OAPageContext pageContext, OAWebBean
    webBean)For example, the following code sample returns an array of values in the trailing list, ordered according to the
    order in which they appear in the list:
    String[] trailingItems =
    shuttle.getTrailingListOptionValues(pageContext, shuttle);Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to retrieve query string value from the URL in my portlet

    Hi,
    When user clicks on "Advance Search", i am redirecting to page in the community. At the same i am adding some more values to the query string (to the URL).
    My URL will look like this.
    http://ctp-mc0149/portal/server.pt?space=CommunityPage&parentname=CommunityPage&parentid=0&in_hi_userid=200&cached=true&control=SetCommunity&PageID=202&CommunityID=200&searchType=2
    Now in one of my portlet in that page, i want to retrieve the query string values from the URL.
    Please help me regarding this.
    Thanks in advance.
    Thanks,
    sreekanth.

    Hi,
    Look at the following threads,
    For programmatically getting the iview properties,
    Programmatically getting iView Properties
    Also,
    Get Properties of IView Programmatically
    Permanent change of iView property programmatically
    Hope these threads help u.
    Regards
    Srinivasan T

  • I want to cut out a head from a photo and insert it into another photo again. In the head hair flying in the wind and the blue sky can be seen between the hairs. This blue sky I want to remove, so I can only use the head with hair flying in another photo.

    I want to cut out a head from a photo and insert it into another photo again. In the head hair flying in the wind and the blue sky can be seen between the hairs. This blue sky I want to remove, so I can only use the head with hair flying in another photo. Is it possible to simply delete this blue color of the sky?

    Make your selection and then use Refine Edge.
    See this video tutorial from Bob Gager.
    https://www.youtube.com/watch?v=xrl3Qwg6zSc

Maybe you are looking for