Values from alv hierarchical list display

hi all,
i need to display sme values from vbak and vbap tables in ALV hierarchical list display.if i click on the sales order of the header, it should directly go to the second screen of transaction VA03 with the sales details displayed..
   i got the parameter id, how can i assign the selected sales order value to this parameter id?...
regards,
Hamsa Priya

Hi,
Check this example..Marked in bold..
TYPE-POOLS: slis.
DATA: BEGIN OF itab OCCURS 0,
        vbeln TYPE vbeln,
        expand,
      END OF itab.
DATA: BEGIN OF itab1 OCCURS 0,
        vbeln TYPE vbeln,
        posnr TYPE posnr,
        matnr TYPE matnr,
        netpr TYPE netpr,
      END OF itab1.
DATA: t_fieldcatalog TYPE slis_t_fieldcat_alv.
DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
s_fieldcatalog-col_pos = '1'.
s_fieldcatalog-fieldname = 'VBELN'.
s_fieldcatalog-tabname   = 'ITAB'.
s_fieldcatalog-rollname  = 'VBELN'.
s_fieldcatalog-outputlen = '12'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '1'.
s_fieldcatalog-fieldname = 'VBELN'.
s_fieldcatalog-tabname   = 'ITAB1'.
s_fieldcatalog-rollname  = 'VBELN'.
s_fieldcatalog-outputlen = '12'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '2'.
s_fieldcatalog-fieldname = 'POSNR'.
s_fieldcatalog-tabname   = 'ITAB1'.
s_fieldcatalog-rollname  = 'POSNR'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '3'.
s_fieldcatalog-fieldname = 'MATNR'.
s_fieldcatalog-tabname   = 'ITAB1'.
s_fieldcatalog-rollname  = 'MATNR'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '4'.
s_fieldcatalog-fieldname = 'NETPR'.
s_fieldcatalog-tabname   = 'ITAB1'.
s_fieldcatalog-rollname  = 'NETPR'.
s_fieldcatalog-do_sum    = 'X'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
DATA: s_layout TYPE slis_layout_alv.
s_layout-subtotals_text            = 'SUBTOTAL TEXT'.
s_layout-key_hotspot = 'X'.
s_layout-expand_fieldname = 'EXPAND'.
SELECT vbeln UP TO 100 ROWS
       FROM
       vbak
       INTO TABLE itab
       WHERE vbeln > '0060000040'.
IF NOT itab[] IS INITIAL.
  SELECT vbeln posnr matnr netpr
         FROM vbap
         INTO TABLE itab1
         FOR ALL ENTRIES IN itab
         WHERE vbeln = itab-vbeln.
ENDIF.
DATA: v_repid TYPE syrepid.
v_repid = sy-repid.
DATA: s_keyinfo TYPE slis_keyinfo_alv.
s_keyinfo-header01 = 'VBELN'.
s_keyinfo-item01   = 'VBELN'.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
     EXPORTING
          i_callback_program      = v_repid
<b>          i_callback_user_command = 'USER_COMMAND'</b>
          is_layout               = s_layout
          it_fieldcat             = t_fieldcatalog
          i_tabname_header        = 'ITAB'
          i_tabname_item          = 'ITAB1'
          is_keyinfo              = s_keyinfo
     TABLES
          t_outtab_header         = itab
          t_outtab_item           = itab1
     EXCEPTIONS
          program_error           = 1
          OTHERS                  = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
<b>FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
  IF ucomm = '&IC1' AND selfield-fieldname = 'VBELN'.
    READ TABLE itab INDEX selfield-tabindex.
    IF sy-subrc = 0.
document
      SET PARAMETER ID 'AUN' FIELD itab-vbeln.
      CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
    ENDIF.
  ENDIF.
ENDFORM.</b>
Thanks,
Naren

Similar Messages

  • How do I make a drop down list of text in numbers as it is made in the example spreadsheet for comparing cars for buying where you can choose a value from a dropdown list for each car?

    how do I make a drop down list of text in numbers as it is made in the example spreadsheet for comparing cars for buying where you can choose a value from a dropdown list for each car?

    Where is this example spreadsheet? Without seeing it I can only guess at what you are asking.
    To make a drop-down list (a pop-up menu in Numbers-speak), format the cell as a pop-up then edit and add to the list of items.
    If the example spreadsheet is pulling in a dollar value based on what car you chose in the pop-up, it is probably using LOOKUP or one of the other lookup functions, getting the information from another table (a lookup table). If, instead, these dollar values are what you are choosing in the pop-up, then you need to create a pop-up with these values in it.
    The Help menu includes a link to a page where you can download the Numbers Users Manual. It also has a link to the Formulas and Functions guide. Both are useful to new users.

  • Displaying Average of Columns in ALV Blocked List Display

    Hi,
    I am using ALV Blocked List Display. For the 1st block, I need to display the average of certain columns.
    I am using the following code in the field catalog of the RATE column to display the average , but it is not displayed.
    wa_disptab_field-col_pos = 8.
      wa_disptab_field-fieldname = 'RATE''.
      wa_disptab_field-ref_tabname = 'IT_DISPTAB'.
      wa_disptab_field-seltext_m = 'RS PER KL'.
      wa_disptab_field-do_sum  =  'C'.
      wa_disptab_field-datatype  = 'QUAN'.
      append wa_disptab_field to it_disptab_field.
      clear wa_disptab_field.
    For the same column, the sum is displayed with the same code if I change this part:
    wa_disptab_field-do_sum  =  'C'.   To   wa_disptab_field-do_sum  =  'X'.
    Please Help..

    Hi Debarati,
    go For function/pattern [reuse_alv_grid_display_lvc]
    do the following as mentioned in the previous reply's.
    And  To find the Average of your requirement, pass the field names as per the requirement. 
    gs_sort-fieldname = 'RATE'.
    gs_sort-tabname = 'T_DISPTAB' "Final Internal table
    gs_sort-subtot = 'X'.
    APPEND gs_sort TO gt_sort.
    gs_sort-fieldname = 'RATE1'.
    gs_sort-tabname = 'T_DISPTAB' "Final Internal table
    gs_sort-subtot = 'X'.
    APPEND gs_sort TO gt_sort.
    gs_sort-fieldname = 'RATE2'.
    gs_sort-tabname = 'T_DISPTAB' "Final Internal table
    gs_sort-subtot = 'X'.
    APPEND gs_sort TO gt_sort.
    gs_sort-fieldname = 'RATE3'.
    gs_sort-tabname = 'T_DISPTAB' "Final Internal table
    gs_sort-subtot = 'X'.
    APPEND gs_sort TO gt_sort.
    CALL FUNCTION ' REUSE_ALV_GRID_DISPLAY_lvc'
       EXPORTING
          i_callback_program      = sy-cprog
          i_callback_user_command = 'USER_COMMAND'
          is_layout               = gs_layout
          it_fieldcat              = wa_disptab
          it_events               = gt_events
          it_sort                   = gt_sort
          i_default               = 'X'
          i_save                  = 'U'
        TABLES
          t_outtab                = gt_final
       EXCEPTIONS
         program_error                  = 1
         OTHERS                         = 2
      IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    i think this will  workout.
    Thanks & Regards,
    Abhisek
    Edited by: Abhisek Pradhan on Sep 29, 2011 7:55 PM

  • Is it possible to select multiple values from an enumerated list?

    I have a Category with an Attribute defined as an enumerated list. Is it possible to select more than one value from the enumerated list? If not, does anyone have a recommended approach for configuring Categories or Attributes that often have more than one of the Attribute values selected? Do I just use multiple Categories and/or Attributes with the same enumerated list? If so, is there an efficient way (API, maybe) to copy the enumerated list values from one Attribute to a new one (or one Category to another)?
    Thanks for any ideas!
    ~Mark

    Boy, this is something we're struggling with too. So we'd like to hear others' ideas on this also.
    thank you,
    iggy

  • Reuse alv hierseq list display pgm doubt

    can anyone tell me s my coding s write or not becos in the report output i cannot view the line item details but it s gettign populated in the itab
    REPORT ZTEST_1.
    TABLES: KNB1,BSID.
    TYPE-POOLS: SLIS.
    *TYPES:BEGIN OF TYP_OUTPUT.
    INCLUDE STRUCTURE ZRFPOSXEXT.
    *TYPES:END OF TYP_OUTPUT.
    TYPES:BEGIN OF TYP_BSEG,
    bukrs like bsid-bukrs,
    kunnr like bsid-kunnr,
    zuonr like bsid-zuonr,
    belnr like bsid-belnr,
    bldat like bsid-bldat,
    xblnr like bsid-xblnr,
    blart like bsid-blart,
    dmbtr like bsid-dmbtr,
    aufnr like bsid-aufnr,
    vbel2 like bsid-vbel2,
    posn2 like bsid-posn2,
    END OF TYP_BSEG.
    TYPES:BEGIN OF TYP_VBRP,
    VBELN LIKE VBRP-VBELN,
    AUBEL LIKE VBRP-AUBEL,
    AUPOS LIKE VBRP-AUPOS,
    VKGRP LIKE VBRP-VKGRP,
    TDNAME LIKE STXH-TDNAME,
    TDLINE LIKE TLINE-TDLINE,
    END OF TYP_VBRP.
    data: wa_vbrp type typ_vbrp.
    DATA:
    *GT_HEADER_TABLE TYPE TYP_OUTPUT OCCURS 0 WITH HEADER LINE,
    GT_ITEM_TABLE TYPE TYP_VBRP OCCURS 0 WITH HEADER LINE.
    DATA: IT_BSEG TYPE TYP_BSEG OCCURS 0 WITH HEADER LINE.
    Define fieldcatalog
    DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    Callback program
    DATA: G_REPID LIKE SY-REPID.
    List layout description
    DATA: GS_LAYOUT TYPE SLIS_LAYOUT_ALV.
    Group order criterium
    DATA: GS_KEYINFO TYPE SLIS_KEYINFO_ALV.
    Layout *
    Definition for field choice screen **
    GS_LAYOUT-HEADER_TEXT = 'HEADER'.
    GS_LAYOUT-ITEM_TEXT = 'ITEM'.
    GS_LAYOUT-DEFAULT_ITEM = 'X'.
    Initialization fieldcatalog ***
    G_REPID = SY-REPID.
    PERFORM FIELDCAT_INIT USING GT_FIELDCAT[].
    Data selection ***
    PERFORM SELECT_DATA.
    Define keyinfo as sort group definition ***
    CLEAR GS_KEYINFO.
    GS_KEYINFO-HEADER01 = 'BELNR'. "idenify header and item
    GS_KEYINFO-ITEM01 = 'VBELN'.
    Call function to list display (hier-seq) ***
    CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = G_REPID
    IS_LAYOUT = GS_LAYOUT
    IT_FIELDCAT = GT_FIELDCAT[]
    I_TABNAME_HEADER = 'GT_HEADER_TABLE'
    I_TABNAME_HEADER = 'IT_BSEG'
    I_TABNAME_ITEM = 'GT_ITEM_TABLE'
    I_STRUCTURE_NAME_HEADER = <STRUCTURE_NAME_HEADER>
    I_STRUCTURE_NAME_ITEM = <STRUCTURE_NAME_ITEM>
    IS_KEYINFO = GS_KEYINFO
    TABLES
    T_OUTTAB_HEADER = GT_HEADER_TABLE
    T_OUTTAB_HEADER = IT_BSEG
    T_OUTTAB_ITEM = GT_ITEM_TABLE
    EXCEPTIONS
    PROGRAM_ERROR = 1.
    FORMS ***
    FORM FIELDCAT_INIT USING RT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    Deviations of group fields to be merged *
    Initialize group field(s) of header table **
    CLEAR LS_FIELDCAT.
    ls_fieldcat-col_pos = 1.
    LS_FIELDCAT-TABNAME = 'IT_BSEG'.
    LS_FIELDCAT-FIELDNAME = 'BLART'.
    LS_FIELDCAT-KEY = 'X'. " sets key field
    LS_FIELDCAT-SELTEXT_M = 'DOC TYPE'.
    LS_FIELDCAT-OUTPUTLEN = 2.
    APPEND LS_FIELDCAT TO gt_fieldcat.
    CLEAR LS_FIELDCAT.
    ls_fieldcat-col_pos = 2.
    LS_FIELDCAT-TABNAME = 'IT_BSEG'.
    LS_FIELDCAT-FIELDNAME = 'BLDAT'.
    LS_FIELDCAT-KEY = 'X'. " sets key field
    LS_FIELDCAT-SELTEXT_M = 'DOC DATE'.
    LS_FIELDCAT-OUTPUTLEN = 8.
    APPEND LS_FIELDCAT TO gt_fieldcat.
    CLEAR LS_FIELDCAT.
    ls_fieldcat-col_pos = 3.
    LS_FIELDCAT-TABNAME = 'IT_BSEG'.
    LS_FIELDCAT-FIELDNAME = 'BELNR'.
    LS_FIELDCAT-KEY = 'X'. " sets key field
    LS_FIELDCAT-SELTEXT_M = 'ACC DOC NO'.
    LS_FIELDCAT-OUTPUTLEN = 10.
    APPEND LS_FIELDCAT TO gt_fieldcat.
    CLEAR LS_FIELDCAT.
    ls_fieldcat-col_pos = 4.
    LS_FIELDCAT-TABNAME = 'IT_BSEG'.
    LS_FIELDCAT-FIELDNAME = 'XBLNR'.
    LS_FIELDCAT-KEY = 'X'. " sets key field
    LS_FIELDCAT-SELTEXT_M = 'REFERENCE'.
    LS_FIELDCAT-OUTPUTLEN = 16.
    APPEND LS_FIELDCAT TO gt_fieldcat.
    CLEAR LS_FIELDCAT.
    ls_fieldcat-col_pos = 5.
    LS_FIELDCAT-TABNAME = 'IT_BSEG'.
    LS_FIELDCAT-FIELDNAME = 'ZUONR'.
    LS_FIELDCAT-KEY = 'X'. " sets key field
    LS_FIELDCAT-SELTEXT_M = 'ASSGNMENT NO'.
    LS_FIELDCAT-OUTPUTLEN = 19.
    APPEND LS_FIELDCAT TO gt_fieldcat.
    CLEAR LS_FIELDCAT.
    ls_fieldcat-col_pos = 6.
    LS_FIELDCAT-TABNAME = 'IT_BSEG'.
    LS_FIELDCAT-FIELDNAME = 'DMBTR'.
    LS_FIELDCAT-KEY = 'X'. " sets key field
    LS_FIELDCAT-SELTEXT_M = 'AMT N LOC CURR'.
    LS_FIELDCAT-OUTPUTLEN = 13.
    APPEND LS_FIELDCAT TO gt_fieldcat.
    Initialize keyfield(s) of item table **
    CLEAR LS_FIELDCAT.
    ls_fieldcat-col_pos = 7.
    LS_FIELDCAT-TABNAME = 'GT_ITEM_TABLE'.
    LS_FIELDCAT-FIELDNAME = 'AUPOS'.
    LS_FIELDCAT-TECH = 'X'. " sets technical field
    LS_FIELDCAT-SELTEXT_M = 'LINE ITEM'.
    LS_FIELDCAT-OUTPUTLEN = 6.
    APPEND LS_FIELDCAT TO gt_fieldcat.
    CLEAR LS_FIELDCAT.
    ls_fieldcat-col_pos = 8.
    LS_FIELDCAT-TABNAME = 'GT_ITEM_TABLE'.
    LS_FIELDCAT-FIELDNAME = 'TDLINE'.
    LS_FIELDCAT-TECH = 'X'. " sets technical field
    LS_FIELDCAT-SELTEXT_M = 'OI NOTES'.
    LS_FIELDCAT-OUTPUTLEN = 132.
    APPEND LS_FIELDCAT TO gt_fieldcat.
    Hidden field(s) of tables (header and/or item) **
    CLEAR LS_FIELDCAT.
    ls_fieldcat-tabname = '<header/item_table_name>'.
    LS_FIELDCAT-FIELDNAME = '<GROUP_FIELD_NAME>'.
    LS_FIELDCAT-NO_OUT = 'X'. "sets hidden field
    APPEND LS_FIELDCAT TO RT_FIELDCAT.
    ENDFORM. "fieldcat_init
    FORM SELECT_DATA.
    data: begin of wa_olino,
    tdname like stxh-tdname,
    tdline like tline-tdline,
    end of wa_olino.
    data: it_olino like wa_olino occurs 0 with header line.
    data: begin of wa_stxh,
    tdname like stxh-tdname,
    end of wa_stxh.
    data: it_stxh like wa_stxh occurs 0 with header line.
    data: begin of wa_lines.
    include structure ztline.
    data: end of wa_lines.
    data: IT_LINES LIKE wa_lines OCCURS 0 WITH HEADER LINE.
    select bukrs kunnr zuonr belnr bldat xblnr blart dmbtr aufnr vbel2
    posn2
    from bsid
    into table it_bseg
    where kunnr in so_wlkun
    and bukrs in so_wlbuk.
    select vbeln aubel aupos vkgrp
    from vbrp
    into table gt_item_table
    for all entries in it_bseg
    where vbeln = it_bseg-belnr.
    sort gt_item_table by aubel aupos.
    loop at gt_item_table into wa_vbrp.
    concatenate wa_vbrp-aubel wa_vbrp-aupos into wa_olino-tdname.
    wa_vbrp-tdname = wa_olino-tdname.
    modify gt_item_table from wa_vbrp.
    append wa_olino to it_olino.
    endloop.
    select tdname from stxh into corresponding fields of table it_stxh
    for all entries in it_olino
    where tdobject = 'VBBP'
    and tdname = it_olino-tdname
    and tdid = '0002'
    and tdspras = 'EN'.
    data: j type i,k_lines type i..
    sort it_stxh by tdname.
    *sort it_output by tdname.
    describe table GT_ITEM_TABLE lines k_lines.
    *loop at it_output into wa_output. "where blart = '1Z'.
    loop at gt_item_table into wa_vbrp.
    loop at it_stxh where tdname = wa_vbrp-tdname.
    read table it_stxh.
    CALL FUNCTION 'ZREAD_TEXT_1'
    EXPORTING
    CLIENT = SY-MANDT
    ID = '0002'
    LANGUAGE = SY-LANGU
    NAME = IT_STXH-tdname
    OBJECT = 'VBBP'
    ARCHIVE_HANDLE = 0
    LOCAL_CAT = ' '
    IMPORTING
    HEADER =
    TABLES
    LINES = IT_LINES
    EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    NOT_FOUND = 4
    OBJECT = 5
    REFERENCE_CHECK = 6
    WRONG_ACCESS_TO_ARCHIVE = 7
    OTHERS = 8
    *data: I type i.
    if sy-subrc = 0.
    loop at it_lines.
    it_lines-tdname = wa_vbrp-tdname.
    modify it_lines. "from wa_lines.
    endloop.
    loop at it_lines.
    *i = sy-tfill.
    wa_vbrp-tdline = it_lines.
    if sy-tabix = 1.
    modify gt_item_table from wa_vbrp.
    else.
    append wa_vbrp to gt_item_table.
    endif.
    clear it_lines-tdline.
    endloop.
    endif.
    endloop.
    if sy-tabix = k_lines.
    exit.
    endif.
    endloop.
    sort it_olino by tdname.
    ENDFORM. " select_data

    Hi,
    Go thru the following Example program. It can solve ur problem..
    *& Report         : ZASSG_ALV_JAYARAM3
    *& Title          : Hierarchical sequential ALV report
    *& Author         :
    *& Created on     : *& Request        :
    *& Desription     : Generates a Hierarchial sequental ALV report to list
                      out Billing details.
    *&                     Modification Log
    *& Mod #    Author               Date         Requested by
    *&       Reason for Change
    *& 00 #
    REPORT ZASSG_ALV_JAYARAM3 NO STANDARD PAGE HEADING
                                         LINE-SIZE 132
                                         LINE-COUNT 64
                                        MESSAGE-ID Z00.
    *..Type Definitions for ALV Report
    TYPE-POOLS SLIS.
    Table/Structure declarations.                                        *
    TABLES : VBRK,   " Billing: Header Data
             VBRP,   " Billing: Item Data
             T001,   " Comapny Codes
             TVKOT,  " Sales Organizations: Texts
             MAKT.   " Material Descriiptions
    *.. Internal Tables declaration                                        *
    *----- Internal table to store billing docs which are not cancelled
    DATA : BEGIN OF IT_VBRK OCCURS 0,
             VBELN LIKE VBRK-VBELN,    " Billing document
             WAERK LIKE VBRK-WAERK,    " SD document currency
             VKORG LIKE VBRK-VKORG,    " Sales organization
             VTEXT LIKE TVKOT-VTEXT,   " Sales organization text
             FKDAT LIKE VBRK-FKDAT,    " Billing date
             BUKRS LIKE VBRK-BUKRS,    " Company Code
             BUTXT LIKE T001-BUTXT,    " Company Code text
             NETWR LIKE VBRK-NETWR,    " Net value in document currency
           END OF IT_VBRK.
    *-----Internal table to stroe ITEM DETAILS
    DATA: BEGIN OF IT_VBRP OCCURS 0,
           VBELN2 LIKE VBRP-VBELN,     " Billing document
            POSNR LIKE VBRP-POSNR,     " Billing item
            FKIMG LIKE VBRP-FKIMG,     " Actual billed quantity
            VRKME LIKE VBRP-VRKME,     " Sales unit
            NETWR LIKE VBRP-NETWR,     " Net value of the billing item
            MATNR LIKE VBRP-MATNR,     " Material number
            ARKTX LIKE VBRP-ARKTX,     " Short text for sales order item
    END OF IT_VBRP.
                       Variable / Flag Declerations                      *
    DATA : FG_COLOR    VALUE ' ',  " FLAG TO CHANGE THE COLOR OF THE RECORD
           FG_NO_DATA  VALUE ' '.  " FLAG TO CHECK THE DATA
    DATA : V_REPID   TYPE SYREPID.
                         ALV Type declaration                            *
    DATA : IT_FIELDCAT TYPE STANDARD TABLE OF
                       SLIS_FIELDCAT_ALV  WITH HEADER LINE.
    DATA : IT_SORT TYPE SLIS_T_SORTINFO_ALV,
           WA_SORT TYPE SLIS_SORTINFO_ALV.
    DATA : IT_EVENT TYPE SLIS_T_EVENT,
           WA_EVENT LIKE LINE OF IT_EVENT.
    DATA : IT_HEADINGS TYPE STANDARD TABLE OF
                       SLIS_LISTHEADER WITH HEADER LINE.
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA : WA_KEYINFO TYPE SLIS_KEYINFO_ALV.
    Selection Screen.                                                    *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS :  S_VBELN FOR VBRK-VBELN,            " Billing doc no
                      S_FKDAT FOR VBRK-FKDAT OBLIGATORY, " Billing date
                      S_MATNR FOR VBRP-MATNR.            " Material no
    SELECTION-SCREEN END OF BLOCK B1.
    Event:Initialization                                                 *
    INITIALIZATION.
      V_REPID = SY-REPID.
      S_FKDAT-LOW  = SY-DATUM - 200.
      S_FKDAT-HIGH = SY-DATUM.
      APPEND S_FKDAT.
    AT Selection Screen.                                                 *
    AT SELECTION-SCREEN.
      PERFORM VALIDATE_VBELN.
      PERFORM VALIDATE_MATNR.
    Event: Start-of-Selection                                            *
    START-OF-SELECTION.
      PERFORM GET_VBRK_DATA.
      PERFORM GET_VBRP_DATA.
    Event: End-of-Selection                                            *
    END-OF-SELECTION.
      PERFORM GET_EVENTS.
      PERFORM FIELDCATALOG.
      PERFORM LIST_DISPLAY.
                             FORM DEFINITIONS                            *
    *&      Form  list_display
          text
    -->  p1        text
    <--  p2        text
    FORM LIST_DISPLAY.
      WA_LAYOUT-INFO_FIELDNAME = 'COLOR'.
      WA_LAYOUT-TOTALS_TEXT = 'GRAND TOTAL'.
      WA_LAYOUT-ZEBRA = 'X'.
      WA_LAYOUT-KEY_HOTSPOT = 'X'.
      WA_KEYINFO-HEADER01 = 'VBELN'.
      WA_KEYINFO-ITEM01 = 'VBELN2'.
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
        EXPORTING
       I_INTERFACE_CHECK              = ' '
          I_CALLBACK_PROGRAM             = V_REPID
       I_CALLBACK_PF_STATUS_SET       = ' '
       I_CALLBACK_USER_COMMAND        = ' '
          IS_LAYOUT                      = WA_LAYOUT
          IT_FIELDCAT                    = IT_FIELDCAT[]
       IT_EXCLUDING                   =
       IT_SPECIAL_GROUPS              =
          IT_SORT                        = IT_SORT
       IT_FILTER                      =
       IS_SEL_HIDE                    =
       I_SCREEN_START_COLUMN          = 0
       I_SCREEN_START_LINE            = 0
       I_SCREEN_END_COLUMN            = 0
       I_SCREEN_END_LINE              = 0
       I_DEFAULT                      = 'X'
       I_SAVE                         = ' '
       IS_VARIANT                     =
       IT_EVENTS                      =
       IT_EVENT_EXIT                  =
          I_TABNAME_HEADER              = 'IT_VBRK'
          I_TABNAME_ITEM                = 'IT_VBRP'
       I_STRUCTURE_NAME_HEADER        =
       I_STRUCTURE_NAME_ITEM          =
          IS_KEYINFO                    = WA_KEYINFO
       IS_PRINT                       =
       IS_REPREP_ID                   =
       I_BUFFER_ACTIVE                =
       I_BYPASSING_BUFFER             =
    IMPORTING
       E_EXIT_CAUSED_BY_CALLER        =
       ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB_HEADER               = IT_VBRK
          T_OUTTAB_ITEM                 = IT_VBRP
    EXCEPTIONS
       PROGRAM_ERROR                  = 1
       OTHERS                         = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " list_display
    *&      Form  fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCATALOG.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
          I_PROGRAM_NAME             = V_REPID
          I_INTERNAL_TABNAME         = 'IT_VBRK'
      I_STRUCTURE_NAME             =
      I_CLIENT_NEVER_DISPLAY       = 'X'
          I_INCLNAME                 = V_REPID
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
        CHANGING
          CT_FIELDCAT                = IT_FIELDCAT[]
       EXCEPTIONS
         INCONSISTENT_INTERFACE      = 1
         PROGRAM_ERROR               = 2
         OTHERS                      = 3
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *..Changing the fieldcatlog as required
      LOOP AT IT_FIELDCAT.
        CASE IT_FIELDCAT-FIELDNAME.
          WHEN 'VBELN'.
            IT_FIELDCAT-SELTEXT_L = 'Billing doc no'.
            IT_FIELDCAT-SELTEXT_M = 'Bill No'.
            IT_FIELDCAT-SELTEXT_S = 'Bill'.
            IT_FIELDCAT-OUTPUTLEN = '15'.
            MODIFY IT_FIELDCAT TRANSPORTING SELTEXT_L
                                            SELTEXT_M
                                            SELTEXT_S
                                            OUTPUTLEN
                                      WHERE FIELDNAME = 'VBELN'.
          WHEN 'WAERK'.
            IT_FIELDCAT-SELTEXT_L = 'SD document Currency'.
            IT_FIELDCAT-SELTEXT_M = 'Document Currency'.
            IT_FIELDCAT-SELTEXT_S = 'Currency'.
            IT_FIELDCAT-OUTPUTLEN = '15'.
            MODIFY IT_FIELDCAT TRANSPORTING SELTEXT_L
                                            SELTEXT_M
                                            SELTEXT_S
                                      WHERE FIELDNAME = 'WAERK'.
          WHEN 'VKORG'.
            IT_FIELDCAT-SELTEXT_L = 'Sales Organisation'.
            IT_FIELDCAT-SELTEXT_M = 'Sales Org'.
            IT_FIELDCAT-SELTEXT_S = 'S,Org'.
            IT_FIELDCAT-OUTPUTLEN = '15'.
            MODIFY IT_FIELDCAT TRANSPORTING SELTEXT_L
                                            SELTEXT_M
                                            SELTEXT_S
                                      WHERE FIELDNAME = 'VKORG'.
          WHEN 'VTEXT'.
            IT_FIELDCAT-SELTEXT_L = 'Sales Organisation Name'.
            IT_FIELDCAT-SELTEXT_M = 'Sales Org Text'.
            IT_FIELDCAT-SELTEXT_S = 'S,Org'.
            IT_FIELDCAT-OUTPUTLEN = '30'.
            MODIFY IT_FIELDCAT TRANSPORTING SELTEXT_L
                                            SELTEXT_M
                                            SELTEXT_S
                                      WHERE FIELDNAME = 'VTEXT'.
          WHEN 'FKDAT'.
            IT_FIELDCAT-SELTEXT_L = 'Billing Date'.
            IT_FIELDCAT-SELTEXT_M = 'Bill.Date'.
            IT_FIELDCAT-SELTEXT_S = 'BDate'.
            IT_FIELDCAT-OUTPUTLEN = '15'.
            MODIFY IT_FIELDCAT TRANSPORTING SELTEXT_L
                                            SELTEXT_M
                                            SELTEXT_S
                                      WHERE FIELDNAME = 'FKDAT'.
          WHEN 'BUKRS'.
            IT_FIELDCAT-SELTEXT_L = 'Company Code'.
            IT_FIELDCAT-SELTEXT_M = 'Company'.
            IT_FIELDCAT-SELTEXT_S = 'Comp'.
            IT_FIELDCAT-OUTPUTLEN = '15'.
            MODIFY IT_FIELDCAT TRANSPORTING SELTEXT_L
                                            SELTEXT_M
                                            SELTEXT_S
                                      WHERE FIELDNAME = 'BUKRS'.
          WHEN 'BUTXT'.
            IT_FIELDCAT-SELTEXT_L = 'Company Name'.
            IT_FIELDCAT-SELTEXT_M = 'Comp Text'.
            IT_FIELDCAT-SELTEXT_S = 'Comp'.
            IT_FIELDCAT-OUTPUTLEN = '25'.
            MODIFY IT_FIELDCAT TRANSPORTING SELTEXT_L
                                            SELTEXT_M
                                            SELTEXT_S
                                      WHERE FIELDNAME = 'BUTXT'.
          WHEN 'NETWR'.
            IT_FIELDCAT-SELTEXT_L = 'Net value in docu currency'.
            IT_FIELDCAT-SELTEXT_M = 'Net value in currency'.
            IT_FIELDCAT-SELTEXT_S = 'Net Value'.
            IT_FIELDCAT-OUTPUTLEN = '20'.
            IT_FIELDCAT-DO_SUM    = 'X'.
            MODIFY IT_FIELDCAT TRANSPORTING SELTEXT_L
                                            SELTEXT_M
                                            SELTEXT_S
                                            DO_SUM
                                      WHERE FIELDNAME = 'NETWR'.
        ENDCASE.
      ENDLOOP.
      PERFORM FIELDCAT_SECLIST.
    ENDFORM.                    " fieldcatalog
    *&      Form  sort_tab
          text
    -->  p1        text
    <--  p2        text
    FORM SORT_TAB.
      CLEAR WA_SORT.
      WA_SORT-FIELDNAME = 'VBELN'.
      WA_SORT-SPOS = '1'.
      WA_SORT-UP = 'X'.
      WA_SORT-SUBTOT = 'X'.
      APPEND WA_SORT TO IT_SORT.
    ENDFORM.                    " sort_tab
    *&      Form  get_events
          text
    -->  p1        text
    <--  p2        text
    FORM GET_EVENTS.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                I_LIST_TYPE     = 1
           IMPORTING
                ET_EVENTS       = IT_EVENT
           EXCEPTIONS
                LIST_TYPE_WRONG = 1
                OTHERS          = 2.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE IT_EVENT INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
      WA_EVENT-FORM = 'DISPLAY_HEADER'.
      MODIFY IT_EVENT FROM WA_EVENT INDEX SY-TABIX.
    ENDFORM.                    " get_events
    *&      Form  DISPLAY_HEADER
          text
    -->  p1        text
    <--  p2        text
    FORM DISPLAY_HEADER.
      WRITE : /3   'Date : ',
               10  SY-DATUM USING EDIT MASK '__/__/____',
               35  'Intelligroup Asia Pvt. Ltd',
               80  'Time : ',
               90  SY-UZEIT,
              /3   'User : ',
               10  SY-UNAME,
               30  SY-TITLE,
               80  'Page  : ',
               90 SY-PAGNO.
    ENDFORM.                    " DISPLAY_HEADER
    *&      Form  VALIDATE_VBELN
          text
    -->  p1        text
    <--  p2        text
    FORM VALIDATE_VBELN.
    Validating Billing doc no
      SELECT VBELN
        INTO VBRK-VBELN
       UP TO 1 ROWS
        FROM VBRK
       WHERE VBELN IN S_VBELN.
      ENDSELECT.
      IF SY-SUBRC NE 0.
        MESSAGE E010. " Invalid billing doc no
      ENDIF.
    ENDFORM.                    " VALIDATE_VBELN
    *&      Form  VALIDATE_MATNR
          text
    -->  p1        text
    <--  p2        text
    FORM VALIDATE_MATNR.
    Validating material no
      SELECT MATNR
        INTO VBRP-MATNR
       UP TO 1 ROWS
        FROM VBRP
       WHERE MATNR IN S_MATNR.
      ENDSELECT.
      IF SY-SUBRC NE 0.
        MESSAGE E018.    " Invalid material number
      ENDIF.
    ENDFORM.                    " VALIDATE_MATNR
    *&      Form  GET_VBRK_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM GET_VBRK_DATA.
    To get Billing doc detials based on selections
      SELECT V~VBELN
             V~WAERK
             V~VKORG
             V~FKDAT
             V~BUKRS
             V~NETWR
             T~VTEXT
             C~BUTXT
        INTO CORRESPONDING FIELDS OF TABLE IT_VBRK
        FROM VBRK AS V
       INNER JOIN VBRP AS P
          ON VVBELN = PVBELN
       INNER JOIN TVKOT AS T
          ON VVKORG = TVKORG
       INNER JOIN T001 AS C
          ON VBUKRS = CBUKRS
       WHERE V~VBELN IN S_VBELN
         AND V~FKDAT IN S_FKDAT
         AND P~MATNR IN S_MATNR.
      SORT IT_VBRK.
      DELETE ADJACENT DUPLICATES FROM IT_VBRK COMPARING VBELN.
      IF SY-SUBRC NE 0.
        FG_NO_DATA = 'X'.
      ENDIF.
    ENDFORM.                    " GET_VBRK_DATA
    *&      Form  GENERATE_SECLIST
          text
    -->  p1        text
    <--  p2        text
    FORM GENERATE_SECLIST USING R_UCOMM     LIKE SY-UCOMM
                                RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN '&IC1'. "DOUBLE CLICK
          READ TABLE IT_VBRK INDEX RS_SELFIELD-TABINDEX.
      ENDCASE.
    ENDFORM.                    " GENERATE_SECLIST
    *&      Form  FIELDCAT_SECLIST
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCAT_SECLIST.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
         EXPORTING
            I_PROGRAM_NAME           = V_REPID
            I_INTERNAL_TABNAME       = 'IT_VBRP'
      I_STRUCTURE_NAME             =
      I_CLIENT_NEVER_DISPLAY       = 'X'
            I_INCLNAME               = V_REPID
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
          CHANGING
            CT_FIELDCAT              = IT_FIELDCAT[]
         EXCEPTIONS
           INCONSISTENT_INTERFACE    = 1
           PROGRAM_ERROR             = 2
           OTHERS                    = 3
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *..Changing the fieldcatlog as required
      LOOP AT IT_FIELDCAT.
        CASE IT_FIELDCAT-FIELDNAME.
          WHEN 'VBELN2'.
             IT_FIELDCAT-NO_OUT = 'X'.
             IT_FIELDCAT-KEY = SPACE.
             MODIFY IT_FIELDCAT TRANSPORTING NO_OUT
                                             KEY
                                      WHERE FIELDNAME = 'VBELN2'.
          WHEN 'POSNR'.
            IT_FIELDCAT-SELTEXT_L = 'Billing Iem no'.
            IT_FIELDCAT-SELTEXT_M = 'Bill Item No'.
            IT_FIELDCAT-SELTEXT_S = 'Item No'.
            IT_FIELDCAT-OUTPUTLEN = '15'.
            MODIFY IT_FIELDCAT TRANSPORTING SELTEXT_L
                                            SELTEXT_M
                                            SELTEXT_S
                                            OUTPUTLEN
                                      WHERE FIELDNAME = 'POSNR'.
          WHEN 'FKIMG'.
            IT_FIELDCAT-SELTEXT_L = 'Actual billed quantity'.
            IT_FIELDCAT-SELTEXT_M = 'Billed Quantity'.
            IT_FIELDCAT-SELTEXT_S = 'Bill.Qty'.
            IT_FIELDCAT-OUTPUTLEN = '15'.
            MODIFY IT_FIELDCAT TRANSPORTING SELTEXT_L
                                            SELTEXT_M
                                            SELTEXT_S
                                      WHERE FIELDNAME = 'FKIMG'.
          WHEN 'VRKME'.
            IT_FIELDCAT-SELTEXT_L = 'Sales Unit'.
            IT_FIELDCAT-SELTEXT_M = 'Sale unit'.
            IT_FIELDCAT-SELTEXT_S = 'S.Unit'.
            IT_FIELDCAT-OUTPUTLEN = '15'.
            MODIFY IT_FIELDCAT TRANSPORTING SELTEXT_L
                                            SELTEXT_M
                                            SELTEXT_S
                                      WHERE FIELDNAME = 'VRKME'.
          WHEN 'NETWR'.
            IT_FIELDCAT-SELTEXT_L = 'Net value in docu currency'.
            IT_FIELDCAT-SELTEXT_M = 'Net value in currency'.
            IT_FIELDCAT-SELTEXT_S = 'Net Value'.
            IT_FIELDCAT-OUTPUTLEN = '20'.
            IT_FIELDCAT-DO_SUM    = 'X'.
            MODIFY IT_FIELDCAT TRANSPORTING SELTEXT_L
                                            SELTEXT_M
                                            SELTEXT_S
                                            DO_SUM
                                     WHERE FIELDNAME = 'NETWR'.
          WHEN 'MATNR'.
            IT_FIELDCAT-SELTEXT_L = 'Material Number'.
            IT_FIELDCAT-SELTEXT_M = 'Mat. Number'.
            IT_FIELDCAT-SELTEXT_S = 'Mat. No'.
            IT_FIELDCAT-OUTPUTLEN = '30'.
            MODIFY IT_FIELDCAT TRANSPORTING SELTEXT_L
                                            SELTEXT_M
                                            SELTEXT_S
                                      WHERE FIELDNAME = 'MATNR'.
          WHEN 'ARKTX'.
            IT_FIELDCAT-SELTEXT_L = 'Text for sales order item'.
            IT_FIELDCAT-SELTEXT_M = 'Sale Order Text'.
            IT_FIELDCAT-SELTEXT_S = 'SO Item text'.
            IT_FIELDCAT-OUTPUTLEN = '30'.
            MODIFY IT_FIELDCAT TRANSPORTING SELTEXT_L
                                            SELTEXT_M
                                            SELTEXT_S
                                      WHERE FIELDNAME = 'ARKTX'.
        ENDCASE.
      ENDLOOP.
    ENDFORM.                    " FIELDCAT_SECLIST
    *&      Form  GET_VBRP_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM GET_VBRP_DATA.
      SELECT VBELN
             POSNR
             FKIMG
             VRKME
             NETWR
             MATNR
             ARKTX
        INTO TABLE IT_VBRP
        FROM VBRP
         FOR ALL ENTRIES IN IT_VBRK
       WHERE VBELN EQ IT_VBRK-VBELN.
    ENDFORM.                    " GET_VBRP_DATA

  • User command is not getting triggered in interactive ALV with LIST display

    Hi experts,
    I have developed an interactive ALV report with LIST display. Here, the issue is, when i double click a record in the primary ALV list, the control must go to the USER COMMAND event which i have written in my report. But the user command event is not getting triggered at all when i double click any record.
    It gives the following information instead.
    "Choose a valid function".
    (My user command name and its respective form name are same.)
    Here is my code..
    START-OF-SELECTION.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_structure_name         = p_table
          i_callback_user_command  = 'TST1'
          i_callback_pf_status_set = 'SET_PF_STATUS'
        TABLES
          t_outtab                 = <dyn_table>
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
      ENDIF.
    FORM tst1 USING r_ucomm LIKE sy-ucomm
                    rs_selfield TYPE slis_selfield.
    * Local data declaration
      DATA: li_tab TYPE REF TO data,
            l_line TYPE REF TO data.
    * Local field-symbols
      FIELD-SYMBOLS:<l_tab> TYPE table,
                    <l_wa>  TYPE ANY.
    * Create table
      CREATE DATA li_tab TYPE STANDARD TABLE OF (p_table).
      ASSIGN li_tab->* TO <l_tab>.
    * Create workarea
      CREATE DATA l_line LIKE LINE OF <l_tab>.
      ASSIGN l_line->* TO <l_wa>.  CASE r_ucomm.
    *   When a record is selected
        WHEN '&IC1'.
    *     Read the selected record
          READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX
          rs_selfield-tabindex.      IF sy-subrc = 0.
    *       Store the record in an internal table
            APPEND <dyn_wa> TO <l_tab>.
    *       Fetch the field catalog info
            CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
              EXPORTING
                i_program_name         = 'Z_DEMO_PDF_JG'
                i_structure_name       = p_table
              CHANGING
                ct_fieldcat            = i_fieldcat
              EXCEPTIONS
                inconsistent_interface = 1
                program_error          = 2
                OTHERS                 = 3.
    Please advice what is the msitake i have done here..

    Read the following code:
    pass the  i_callback_user_command = g_user_command to the ALV function module and write the FORM user_command USING ucomm    LIKE sy-ucomm
                            selfield TYPE slis_selfield.
    as shown below.
    thanx
    Data for ALV display
    DATA  : gt_fieldcat TYPE slis_t_fieldcat_alv,
            gt_events           TYPE slis_t_event,
            g_variant LIKE disvariant,
            g_user_command      TYPE slis_formname VALUE 'USER_COMMAND',
            g_status            TYPE slis_formname VALUE 'SET_PF_STATUS',
            gt_list_top_of_page TYPE slis_t_listheader,
            g_repid LIKE sy-repid,
            gf_pos TYPE i
    Data for ALV display
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
               EXPORTING
              i_callback_program      = g_repid
                 i_callback_program      = sy-repid
                 it_fieldcat             = gt_fieldcat[]
           it_events               = gt_events[]
              i_callback_user_command = g_user_command
                 i_save                  = 'A'
                 is_variant              = g_variant
               TABLES
                 t_outtab                = it_print.
    FORM user_command USING ucomm    LIKE sy-ucomm
                            selfield TYPE slis_selfield.
      CASE ucomm.
        WHEN '&IC1'.
          CASE selfield-sel_tab_field.
            WHEN '1-KUNNR'.
              READ TABLE it_print INTO wa_print INDEX selfield-tabindex.
              IF sy-subrc = 0.
                SET PARAMETER ID 'BPA' FIELD wa_print-kunnr.
                CALL TRANSACTION 'BP'.
              ENDIF.
            WHEN '1-MATNR'.
              READ TABLE it_print INTO wa_print INDEX selfield-tabindex.
              IF sy-subrc = 0.
                SET PARAMETER ID 'JP_ISS' FIELD wa_print-matnr.
                CALL TRANSACTION 'JP29' AND SKIP FIRST SCREEN..
               GET PARAMETER ID 'WRK' FIELD wa_zprint-werks.
               SET PARAMETER ID 'VKO' FIELD wa_zprint-vkorg.
               SET PARAMETER ID 'VTW' FIELD wa_zprint-vtweg.
               CALL TRANSACTION 'JP29' AND SKIP FIRST SCREEN.
              ENDIF.
    Endcase.
    Endform.

  • How to Change a Default Value from Drop Down Box displayed in Web Dynpro?

    Hi,
    How to Change a Default Value from 'High' to 'Low'  in a Drop Down Box for RANGE field displayed in Standard Web Dynpro Component.  I saw a Default Value set for a RANGE field  in View Context When I select that field and click on Display. I am seeing Default Value set it to 'HI'. Please let me know how to change from HIgh to Low.
    I appreciate your help!
    Thanks,
    Monica

    hi,
    use the set_attribute( ) method now to set the attribute with a particular key eg HIGH in ur case
    // u can use the code wizard( control +f7) this code will be auto generated when u select the
    //radio button to read the context node
    DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
      DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
      DATA ls_cn_node TYPE wd_this->element_cn_node.
    * navigate from <CONTEXT> to <CN_NODE> via lead selection
      lo_nd_cn_node = wd_context->get_child_node( name = wd_this->wdctx_cn_node ).
    * get element via lead selection
      lo_el_cn_node = lo_nd_cn_node->get_element(  ).
    * set single attribute
      lo_el_cn_node->set_attribute(
          name =  `ATTribute name.`
          value = 'LOW' ).
    it will solve ur query ..
    also refer to this component
    wdr_test_events -> view dropdownbyidx and dropdownbykey ->method name onactionselect.
    regards,
    amit

  • How to store the return value from a select list in page item ?

    I'm sorry, I'm sure you will all flame me for this (and its long too :-(. I'm still trying to pick this up and havn't had time to read manual and this forum and up against the clock (as usual), but this must be something thats simple to do, otherwise why have 2 cols on LOV (display text and return value.
    normal kind of thing - master /detail, a master table and a detail table, master.id is PK in master, master.name is the name of the master item. detail.id is pk in detail, detail.mid is foreign key to master.id. I have a tabular report that displays a join of cols from master and detail, with 2 cols being links, one is a link on master.name, that passes master.id to page P1 and it displays a row from master. The other col displays detail.name and passes detail.id to page P3, P3 displays a row of the detail table.
    I want to populate a LOV with possible master.name values, but display the name of the current P3_MID value (from detail.mid). Then a user can pick a different master and it needs to update P3_MID so on submit it updates the row.
    I just can't seem to see in the manual how you can specify where the return value on a LOV goes?
    As I said, sorry for long post and not having had time to read docs correctly - someone just point me at the subject matter somewhere, please.

    Sorry, I was trying to be to complex and obviously APEX is just too damn cleaver - I figured out how this works - basically APEX pulls the LOV and then matchs the mid to it to display the correct name - simple and easy - just me making it difficult

  • From ALV output list to selection screen

    Hi,
    I created one ALV report.
    After executing the program, it displays an ALV list.
    When I click on the back/exit/cancel buttons on the screen, it should take me to the selection screen.
    But that is not happening. it is taking to one screen which shows the report heading. IF i click back/cancel/exit buttons in this screen, it is taking me to the selection screen.
    I checked the program for any write statement, but therre are no write statements.
    Even i tried to remove the end-of-selection event in the program. but not working.
    Can any one help me on this how to overcome this issue.
    Thank you.
    Kumar

    hi check this example...
    REPORT zalv_sel_screen .TABLES: mara.DATA: BEGIN OF i_alv OCCURS 0,
          matnr TYPE mara-matnr,
          mtart TYPE mara-mtart,
          matkl TYPE mara-matkl,
          groes TYPE mara-groes,
          maktx TYPE makt-maktx,
          END OF i_alv.DATA: alv_container  TYPE REF TO cl_gui_docking_container.
    DATA: alv_grid       TYPE REF TO cl_gui_alv_grid.
    DATA: layout    TYPE lvc_s_layo.
    DATA: fieldcat  TYPE lvc_t_fcat.PARAMETERS: p_check.INITIALIZATION.  PERFORM get_data.AT SELECTION-SCREEN OUTPUT.  DATA: variant TYPE  disvariant.
      DATA: repid TYPE sy-repid.  repid = sy-repid.  variant-report = sy-repid.
      variant-username = sy-uname.  layout-zebra = 'X'.
      layout-edit_mode = 'X'.  CHECK alv_container IS INITIAL.  CREATE OBJECT alv_container
                  EXPORTING repid     = repid
                            dynnr     = sy-dynnr
                            side      = alv_container->dock_at_left
                            extension = 1500.  CREATE OBJECT alv_grid
             EXPORTING
                   i_parent          =  alv_container.*  ALV Specific. Data selection.
    Populate Field Catalog
      PERFORM get_fieldcatalog.  CALL METHOD alv_grid->set_table_for_first_display
        EXPORTING
          is_layout        = layout
          is_variant       = variant
          i_save           = 'U'
          i_structure_name = 'I_ALV'
        CHANGING
          it_outtab        = i_alv[]
          it_fieldcatalog  = fieldcat[].
    START-OF-SELECTION.
    FORM GET_DATA
    FORM get_data.  SELECT * INTO CORRESPONDING FIELDS OF TABLE i_alv
            FROM mara
              INNER JOIN makt
                ON maramatnr = maktmatnr
                       UP TO 100 ROWS
                   WHERE makt~spras = sy-langu.  SORT i_alv ASCENDING BY matnr.ENDFORM.                    "get_data***************************************************************
         Form  Get_Fieldcatalog - Set Up Columns/Headers
    FORM get_fieldcatalog.  DATA: ls_fcat TYPE lvc_s_fcat.
      REFRESH: fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Number'.
      ls_fcat-fieldname  = 'MATNR'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '18'.
      ls_fcat-fix_column = 'X'.
      ls_fcat-key        = 'X'.
      ls_fcat-col_pos    = '1'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Type'.
      ls_fcat-fieldname  = 'MTART'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '10'.
      ls_fcat-fix_column = 'X'.
      ls_fcat-key        = 'X'.
      ls_fcat-col_pos    = '2'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Group'.
      ls_fcat-fieldname  = 'MATKL'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '12'.
      ls_fcat-col_pos    = '3'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Size'.
      ls_fcat-fieldname  = 'GROES'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '30'.  ls_fcat-col_pos    = '4'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Description'.
      ls_fcat-fieldname  = 'MAKTX'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '40'.  ls_fcat-col_pos    = '5'.
      APPEND ls_fcat TO fieldcat.ENDFORM.                    "get_fieldcatalog
    regards,
    venkat

  • Using getElementById() to get values from drop down list

    Hi, I am using Netbeans to write this program. I have this .java page that gets the url of the HtmlPage from the .properties page. And when this page is opened in the browser, there are drop down lists that have values I want to get from the user when he/she has selected, and save it to a database. I'm actually using mozilla firefox to open this page, and using firebug to inspect the drop down list element.
    I know getElementById is a javascript code, however, my friend told me to use it in the .java page. This is how part of my code looks like. What I'm not sure is how to implement getElementById() and where.
    HtmlPage pageMain =EBPage;
    WebRequest postRequestSettings = new WebRequest(
    new URL(getProperties("trustAdmin")), HttpMethod.POST);
    *// Set the request parameters*
    postRequestSettings.setRequestParameters(new ArrayList());
    postRequestSettings.getRequestParameters().add(new NameValuePair("component", "edit"));
    postRequestSettings.getRequestParameters().add(new NameValuePair("formids", "unixTime,instance,time,description,message"));
    postRequestSettings.getRequestParameters().add(new NameValuePair("page", "Status"));
    postRequestSettings.getRequestParameters().add(new NameValuePair("service", "direct"));
    postRequestSettings.getRequestParameters().add(new NameValuePair("session", "T"));
    postRequestSettings.getRequestParameters().add(new NameValuePair("submitmode", "submit"));
    postRequestSettings.getRequestParameters().add(new NameValuePair("submitname", ""));
    *// Insert instance of message here*
    postRequestSettings.getRequestParameters().add(new NameValuePair("instance", instance));
    *// Insert content of message here*
    postRequestSettings.getRequestParameters().add(new NameValuePair("message", message));
    *// Insert description of message here*
    postRequestSettings.getRequestParameters().add(new NameValuePair("description", description));
    *// Insert time of message here*
    postRequestSettings.getRequestParameters().add(new NameValuePair("time", time));
    *// Convert time to unix seconds*
    postRequestSettings.getRequestParameters().add(new NameValuePair("unixTime", String.valueOf(System.currentTimeMillis() / 1000)));
    HtmlPage newPage1 = pageMain.getWebClient().getPage(postRequestSettings);
    WebRequest requestSettings = new WebRequest(
    new URL("http://www.google.com"), HttpMethod.GET);
    requestSettings.setRequestParameters(new ArrayList());
    requestSettings.getRequestParameters().add(new NameValuePair("page", "Preview"));
    requestSettings.getRequestParameters().add(new NameValuePair("service", "page"));
    newPage1 = newPage1.getWebClient().getPage(requestSettings);
    And I'm told to insert page.getElementById() in the place shown below:
    HtmlPage page = null;
    page.getElementById()_
    *try {*
    *// Login proxy*
    page = (HtmlPage) jsonBrowser.getPage(getProperties("jsonBrowser"));
    String proxyUrl = page.getForms().get(0).getAttribute("action");
    System.out.println("Proxy Url" + proxyUrl);
    WebRequest requestSettings = new WebRequest(
    new URL(proxyUrl), HttpMethod.POST);
    requestSettings.setRequestParameters(new ArrayList());
    requestSettings.getRequestParameters().add(new NameValuePair("PROXY_SG_PASSWORD", password));
    requestSettings.getRequestParameters().add(new NameValuePair("PROXY_SG_PRIVATE_CHALLENGE_STATE", ""));
    requestSettings.getRequestParameters().add(new NameValuePair("PROXY_SG_REQUEST_ID", ""));
    requestSettings.getRequestParameters().add(new NameValuePair("PROXY_SG_USERNAME", userID));
    *// Get the page*
    page = page.getWebClient().getPage(requestSettings);
    Logger.getLogger(postTrustMessage.class.getName()).log(Level.INFO, "===================================Login in Trust");
    Logger.getLogger(postTrustMessage.class.getName()).log(Level.INFO, page.getWebResponse().getContentAsString());
    *} catch (IOException ex) {*
    Logger.getLogger(postTrustMessage.class.getName()).log(Level.SEVERE, null, ex);
    *} catch (FailingHttpStatusCodeException ex) {*
    Logger.getLogger(postTrustMessage.class.getName()).log(Level.SEVERE, null, ex);
    return page;
    Any help would be greatly appreciated. Thanks.

    I want to value drop down list from seeded page of EBSString picklistvalue = pageContext.getParameter("PickListBeanID"); //PickListBeanID is the ID of the MessageChoiceBean
    Thanks
    --Anil
    http://oracleanil.blogspot.com/

  • Retrieve variable value from local Storage and display on canvas

    Hi
    I'm working on a project that has multiple html files (the projects are split into 12 so 12 different edge projects and im linking them via window.open()). I have a variable that keeps track of correct answers stored in LocalStorage html object. I have managed to get the localStorage variable to increment up by one each time the object is correct however my last step is to get the variable and them display the result on the canvas. I have tried
    var outPut localStorage.getItem(' ') method to retrieve the variable then used the set and get method to display the result however it doesn't work. Im not sure if I need a for loop to go though the localStorage and get the elements
    Code:
    // insert code to be run when the composition is fully loaded here
    yepnope({nope:['jquery-ui-1.10.0.custom.min.js','jquery.ui.touch-punch.min.js'],complete: init}); // load the jquery files
    sym.setVariable("myScore", 0);
    var c = localStorage["myCount"] || 0; //loading from localStorage
    function init(){
    sym.getSymbol("barLimit").$('scrubber').draggable({start: function(e){
    },drag: function(e,ui){ // start: ...  // Find original position of dragged image
    var leftLimitScrubber  = sym.getSymbol('barLimit').$('scrubber').position().left; // position of the scrubber
    var rightLimitScrubber  = sym.getSymbol('barLimit').$('leftLimit').position().left;
    var LimitTwoLeft  = sym.getSymbol('barLimit').$('rightLimit').position().left;
    if(leftLimitScrubber == rightLimitScrubber){
      sym.getSymbol('correctBar1').play('in'); //
      sym.getSymbol('nextButton').play('in');
      sym.getSymbol('incorrectBar1').play('out'); //
      sym.getSymbol('thumbsDown1').play('out'); //
      sym.getSymbol('thumbsUp1').play('in'); //
      sym.getSymbol('congrats').play('in'); //
    localStorage["myCount"] = parseInt(c)+1; //Converting string to number, and then saving it
    console.log("numberOfCorrectAnswers", localStorage["myCount"]);
    var finalScore = sym.getVariable("myScore");
    finalScore = c;
    sym.setVariable("myScore", finalScore);
    sym.$("Score").html(finalScore);
    } else if(leftLimitScrubber == LimitTwoLeft){
    sym.getSymbol('incorrectBar1').play('in');
    sym.getSymbol('correctBar1').play('out');
    sym.getSymbol('thumbsUp1').play('out');
    sym.getSymbol('thumbsDown1').play('in');
    axis: "x",
    containment: "parent"
           //for (var i = 0; i < localStorage.length; i++){ // iterate throught the local storage
             //var getItem = localStorage.getItem(localStorage.key(i));
              //if(getItem == 'numberOfCorrectAnswers' ){
    The above is the code for the 12th project in  this projects it needs to display the variable inside the object localStorage and display on the canvas.
    Any help will mean a lot. Thank You in advance
    P.S edge animate has a lot of bugs hard to code in

    what you need to do is to create a text box and set a default value of zero. Once that is don't you need a code on the stage which grabs the value form the localStorage object. I used the .text() jquery method to display the value on the canvas. So the zero will be replaced with whatever the value of the localStorage is.
    You also need a if statement to check if the localStorage is undefined, if its not then grab the value and display on the canvas.
    e.g
    var number = localStorage['finalValue']; // for the sake of completeness I had to put this line of code
    if( number ! = undefined){ // if not undefined so the object exits then ...
         sym.$(' (text identifier) '). text(number); // note text identifier is the name of the text box you create in edge
    } // Done

  • How to get selected value from one choice list

    Hi All,
    i want to get selected value in onechoice list.how to achive this
    Regards,
    Smaran

    check these
    http://groundside.com/blog/DuncanMills.php?title=adf_the_list_binding_value_problem&more=1&c=1&tb=1&pb=1
    http://blogs.oracle.com/jdevotnharvest/2010/12/reading_the_selected_value_of_an_adf_bound_select_list_in_java.html
    http://www.oracle.com/technetwork/developer-tools/jdev/listbindingvalue-088449.html

  • Get checkbox values from alv grid

    Hi,
    I'm using the function REUSE_ALV_GRID_DISPLAY and I'm showing a table with a field like a checkbox.
    In USER_COMMAND FORM to get selected values do as follow:
        CALL METHOD REF_GRID->CHECK_CHANGED_DATA.
    And then:
    loop at i_pos (my table) with checkbox eq 'X'.
    endloop.
    The first time I execute the ALV every thing is OK but if I do any action (I use the function 'BAPI_GOODSMVT_CREATE' ...), I refresh the data and I raise the alv again. In USER COMMAND FORM the code is the same and I can not get checkbox values.
    Can someone help me please?
    Thanks and regards.

    Hi,
    Check this
        call function 'REUSE_ALV_GRID_DISPLAY'
          exporting
            it_fieldcat                 = pt_grpfcat[]
            it_excluding                = p_grpexcltab2[]
            is_layout                   = pt_grplayout2
            i_callback_program          = sy-repid
            i_callback_html_top_of_page = p_header
            i_callback_pf_status_set    = v_status_set1
            i_callback_user_command     = f_user_command1
            i_screen_start_column       = 25
            i_screen_start_line         = 5
            i_screen_end_column         = 80
            i_screen_end_line           = 20
            it_events                   = i_events[]
          tables
            t_outtab                    = i_grpoutput.
    form f_user_command1 using p_ucomm type sy-ucomm
                         rs_selfield type  slis_selfield.
      data p_ref1 type ref to cl_gui_alv_grid.
      call function 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        importing
          e_grid = p_ref1.
      call method p_ref1->check_changed_data.
      case p_ucomm.
        when 'YCNC'.
          leave to screen 0.
       endcase.
      rs_selfield-refresh = c_x.   " Grid refresh  < You need to fill up this
    endform.                                 " F_user_command1
    aRs

  • Getting Email Value from web.xml and displaying in JSF

    HI,
    I have a web.xml with the entry:
    <env-entry>
            <description>The email address for the Support Team.</description>
            <env-entry-name>support</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>[email protected]</env-entry-value>
    </env-entry>I want to display on the JSF the value *"[email protected]"*. I dont want to Hard Code the Email Id on the JSF hence I am looking for this solution.
    One way would be to get the value of the email in a backing bean and then setting a managedBeanValue which will be accessed in the JSF Display page.
    My question is how do I get the email value in my backing bean ?
    Thanks in advance !!!

    I tried using this code:
        FacesContext context = FacesContext.getCurrentInstance();
        ServletContext servletContext = (ServletContext)context.getExternalContext().getContext();
        String value = (String)(servletContext.getAttribute("support");But when I do a System Out on value I get null
    Please Help.
    Thanks in advance

  • How eliminating duplicated values from selecItem's List...

    Hi guys,
    i've a problem.
    I've a list of selectItem elements.
    private List<SelectItem> names;
    filled with some values.
    In this values there are some duplicated values, so i need to eliminate them.
    How can i do it?
    Please help me,thanks

    thanks very much...
    but i have a problem.
    I need to use ArrayList.
    What i want now is creating a Set and copying in it the arraylist....it should work???
    I've tried in this manner
    Once i've created the arrayList names
    i've defined
    private Set<SelectItem> names2;and i've done
    names2=new HashSet();
    names2.addAll(names);calling in my page names2.
    The problem is that it shows me the same list, with changed order, but without eliminating duplicated values.
    Can you help me?

Maybe you are looking for

  • Proper way to connect external monitors to macbook pro?

    I recently had to have the logic board in my mbp replaced and was wondering if disconnecting an external monitor while computer is on would cause the problem. Should monitors be connected/disconnected with computer powered down?

  • Flash CS5 F1 window doesn't open at all

    Hi, We've just purchased several Adobe web premium suits and encountered a serious problem with flash cs5- We can't open the help window - and we can't click F1 to get immediate actionscipt helps & references like before (in CS3 for example) I should

  • Aperture 3.1.3 Crashes after Opening

    I purchased Aperture 3.1.3 as a download from the AppleStore recently.  It ran fine for a while but recently it hangs after starting (you get the little rotating colered ball of death).  The only solution is to Force Quit the application.  I finally

  • How does processScope restore its state?

    Hi, when a process returns, the process scope is supposed to return to its original state. How does it do that? is it a deep copy? How does it handle mutable objects? also, how does the process scope work with the back button?

  • MX8 IE7 field validation issue

    I'm having a problem with using CFFORM and simple field validation -- by simple, I mean simply setting required="YES" on a CFINPUT field. The JavaScript that CF8 generates is something like: quote: if( !_CF_hasValue(_CF_this['CompanyName'], "TEXT", f