How to Expand/Collapse Select Option Tray

Hi,
I have a View in which I have dynamically created a select-option Tray and then added select-options within the Tray using:
DATA lr_cost_ctr            TYPE REF TO data.
DATA lr_interfacecontroller TYPE REF TO iwci_wdr_select_options.
DATA lr_select_options      TYPE REF TO if_wd_select_options.
* Initialise the selection screen.
  lr_interfacecontroller = wd_this->wd_cpifc_select_options_search( ).
  lr_select_options =
           lr_interfacecontroller->init_selection_screen( ).
* Add a tray.
  lr_select_options->add_block(
    i_id           = 'TRY_ACCT_***'
    i_block_type   = if_wd_select_options=>mc_block_type_tray
    i_title        = 'Account Assignment' ).
* Add a Select Option.
  lr_cost_ctr = lr_select_options->create_range_table( 'KOSTL' ).
  lr_select_options->add_selection_field(
    i_id              = 'COST_CTR'
    i_within_block    = 'TRY_ACCT_***'
    it_result         = lr_cost_ctr ).
This works fine, but how do I dynamically expand and collapse the select-option Tray ?  There are plenty of examples for expanding/collapsing normal Trays by binding the "expanded" attribute at design time or dynamically.  But with a Tray created as a select-option block I do not have a reference to the Tray.
I have searched high and low but cannot find how to do this.
I don't want to create the Tray at design time because there will be select-options above and within the Tray.
Any help will be appreciated.
Thanks & regards,
Grogan

Hi,
My Approch is:
---Initially set the webBean property in processReq
Hgrid.setAutoQuery(false);
---On Button click navigate to the same page n set the webBean properties..
put var in session.
pageContext.forwardImmediatelyToCurrentPage(null, true, null);
---in process req get teh value of var from session.
if(pageContext.getSessionValue(var)!= null)
Hgrid.setAutoQuery(true);
Hope it will helps..:)
Note:
---We cant modify the webBean properties in processformReq and processformdata.
Regards
Meher Irk

Similar Messages

  • In BI how to filter the selection options based on inputs on top field

    Hi Friends,
    In BI, How to filter the selection options based on inputs on top field.
    The system should automatically filter the lower level drop downs based on the selection of a higher level.
    For e.g. :
    If a user selects a Country then the States drop down should only display the State's belongs to the Country. Similarly when a State is selected, the District drop down should display only those District's belongs to the State.
    Thanks in Advance.
    Regards
    Jayaram M

    Hi Anil,
    Thanks for reply but I couldn't use Compounding Characteristic here. Need some other solution.
    Regards
    Jayaram M

  • How can i decleare select-options in module pool table control?

    Hi everybody!!
    Can anyone tell me how can I decleare select-options in module pool table control screen?. I have declared it in a screen with a table control but a dump is triggered due to an error when generating the selection screen.
    Regards...

    My suggestion will be try to use fm
        call function 'FREE_SELECTIONS_DIALOG'
    Please search this forum you can find lot of threads related to this.

  • How to hide the select-options fields on radiobutton select in webdynpro

    hi
    Could you please help how to hide the select-option fields in webdynpro
    there are four radio buttons
    for every radiobutton there is corresponding the select_option filed is associated to it
    user as only provision select  one radio button and reset of the select-option fileds should be hidden
    which ever the radio button is selected corresponding the select-options fileld should be displayed
    please find the attachement below

    Hi Nine,
    To hide select options you should use interface method REMOVE_SELECTION_SCREEN_ITEM of IF_WD_SELECT_OPTIONS.
    Sample code :
    Write the below code in the Event handler of Radio Button.
    DATA lv_r_helper_class TYPE REF TO if_wd_select_options.
    lv_r_helper_class = lo_interfacecontroller->init_selection_screen(
    lv_r_helper_Class->REMOVE_SELECTION_SCREEN_ITEM(exporting i_id = 'Select_option1_id1').
    This will hide first select option of your screen.Similarly pass select_option_id2 to hide it and so on.
    Regards,
    Ravikiran.k

  • How to create the select option in the screen

    HI,
    I am developing one module pool program and I have below requirement,
    currently plant is acting like PARAMETER and the now it should be changed to select option.
    how to create the select option in the screen
    Thanks and regarding,
    Malla
    Moderator message - Please search before asking - post locked
    Edited by: Rob Burbank on Dec 16, 2009 1:41 PM

    Try RANGES.
    The RANGES has same structure as that of select-options.

  • Dialog programming - How to place a select-option field in a dialog screen

    Hi all,
    In Dialog Programming, How to place a select-option field in a dialog screen.
    Kindly give me some example code...
    Thanks,
    Jaffer Ali.S

    hi Ali,
    U can add select-options in ur module pool by using  SELECTION-SCREEN BEGIN OF SCREEN <scrn> AS SUBSCREEN  command.
    check this link for reference.....
    http://help.sap.com/saphelp_47x200/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/frameset.htm
    Example Code :
    DATA : ok_code TYPE sy-ucomm.
    SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_rad1 RADIOBUTTON GROUP grp1 DEFAULT 'X',
                p_rad2 RADIOBUTTON GROUP grp1,
                p_rad3 RADIOBUTTON GROUP grp1.
    SELECT-OPTIONS: s_matnr FOR  mara-matnr,
                    s_matkl FOR  mara-matkl,
                    s_mtart FOR  mara-mtart.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN END OF SCREEN 1010.
    START-OF-SELECTION.
      CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    CALL SCREEN 1010 .
    ENDMODULE.                    "status_0100 OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    SCREEN 100 ****************
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      CALL SUBSCREEN sub_1010 INCLUDING sy-repid '1010'.
    <b>***** where sub_1010 is name of sub-screen area</b>
    PROCESS AFTER INPUT.
      CALL SUBSCREEN sub_1010.
      MODULE user_command_0100.
    <<< REMOVED BY MODERATOR >>>
    Harimanjesh AN
    Edited by: Marcelo Ramos on Dec 17, 2008 7:54 PM

  • How to disable the select options button, while audio is playing in the question template in captivate 8?

    How to disable the select options button, while audio is playing in the question template in captivate 8?

    Apologies for late reply.
    I mean "On Question screens audio keeps on playing even after we have selected an option or options depending on the question type and clicked Submit. How do we stop the audio on selecting an option?"

  • How to create the select option for the Plant in screen (Module pool)

    HI,
    I am developing one module pool program and I have below requirement,
    currently plant is acting like PARAMETER and the now it should be changed to select option.
    how to create the select option in the screen
    Thanks and regarding,
    Malla
    Moderator message - Cross post locked
    Edited by: Rob Burbank on Dec 16, 2009 1:41 PM

    Steps to get SELECT-OPTIONS in module pool programs.
    1.Start one dialog program with SAPMZ_001.
    Place the below code in the TOP include of the dialog program.
    TABLES marc.
    SELECTION-SCREEN BEGIN OF SCREEN 3200 AS SUBSCREEN.
    SELECT-OPTIONS: werks FOR marc-werks.
    SELECTION-SCREEN END OF SCREEN 3200. 
    2 .Create one screen 3000.
    Go to Layout of the screen and Define subscreen area on the screen and Name it as l_subscreen.
    Place the below code in the Flow logic of the screen.
    PROCESS BEFORE OUTPUT.
      CALL SUBSCREEN l_subscreen INCLUDING 'SAPMZ_001' '3200'.
    PROCESS AFTER INPUT.
      CALL SUBSCREEN l_subscreen.
    Activate all.
    Create Transaction code for the dialog program .
    Execute the transaction code. You will see the select-option for werks how we see on Selection-screen.

  • Collapase Select Options Tray

    Hi All,
    I am reusing Select Options( WDR_SELECT_OPTIONS ) in my screen.
    Is there a way to collapse the Tray(  if_wd_select_options=>mc_block_type_tray ) of Select Options when the page is initially loaded.
    This is  my code for Adding a tray and adding select option fields using add_selection_field later.
    * create a block
      wd_this->l_handler->add_block(  i_id         = 'ID01'
                                      i_block_type            = if_wd_select_options=>mc_block_type_tray
                                      i_title                      =  ' '
                                      i_width                    = '100%').
    Thanks

    Hi Santosh,
    There is no standard method available to control the behaviour BLOCK  of WDR_SELECT_OPTION.
    You need to do an enhancement in view SELECTION_SCREEN of component and use the post exit of WDDOMODIFYVIEW( ) method.
    Sample code;
      IF FIRST_TIME EQ ABAP_TRUE.
        DATA LO_TRAY TYPE REF TO CL_WD_TRAY.
          LO_TRAY ?= VIEW->GET_ELEMENT('ID01').
      if lo_tray is bound.
          LO_TRAY->SET_EXPANDED( ABAP_FALSE ).
      endif.
      ENDIF.
    Note: the changes made in WDR_SELECT_OPTIONS may impact globally for other applications. Instead you can copy the component WDR_SELECT_OPTION and do the necessary changes.
    Hope this helps you.
    Regards,
    Rama

  • How to hide some select-option of Logical Database in report?

    How to hide select-option of  Logical Database in report?eg . In Logical Database 'PNP' , my code is 'GET  PERNR' , excute the report , select-screen is displayed . I want to hide some select-options , such as PNPPERNR-LOW .
    Edited by: rongrong wang  on Mar 26, 2008 9:31 AM

    U need to write code in initialization as
    initialization.
    loop at screen.
    if screen-name = 'PNPPERNR-LOW'.
    screen-active = '0'.
    modify screen.
    endif.
    if screen-name = 'PNPPERNR-HIGH'.
    screen-active = '0'.
    modify screen.
    endif.
    endloop.

  • How to use the select option to get the multiple bom explosion

    hi friends,
              i have completed the bom exp using parameters to get one material
    input,but i need to adopt select option to give from and to materials
    i ll gives from and to materials with description and bom deails
    i here gave the coding also, pl give me a suggestion how to adpot the select
    optoins instead of parameters ,very urgent
    REPORT PP_BOM_EXPLOSION.
    tables :mara,marc,stpo.
    TYPE-POOLS : SLIS.
    *parameters: p_werks like t001w-werks obligatory.
    SELECT-OPTIONS : p_matnr FOR mara-matnr obligatory.
    **select-options : p_matnr for mara-matnr obligatory.
    PARAMETERS : P_WERKS LIKE T001W-WERKS OBLIGATORY,
            P_MATNR LIKE MARA-MATNR OBLIGATORY.
    *parameters: p_werks like marc-werks obligatory,
    *p_matnr like marc-matnr obligatory.
    constants c_x value 'X'.
    data: begin of it_comp occurs 0,
    matnr like mara-matnr,
    maktl like makt-maktx,
    idnrk like stpox-idnrk,
    ojtxp like stpox-ojtxp,
    menge like stpox-menge,
    meins like stpox-meins,
    matkl like stpox-matmk,
    end of it_comp.
    data : topmat like cstmat.
    data: w_topmat like cstmat.
    DATA : IT_MARA LIKE MARA OCCURS 0 WITH HEADER LINE.
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA : WA_FIELDCAT_LN LIKE LINE OF IT_FIELDCAT.
    DATA : IT_EVENTCAT  TYPE SLIS_T_EVENT.
    DATA : WA_EVENTCAT_LN  LIKE LINE OF IT_EVENTCAT.
    DATA : IT_LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA: S_COL_POS TYPE I.
    start-of-selection.
    perform explode_assembly.
    PERFORM BUILD_FIELDCATALOG.
    PERFORM DATA_DISPLAY.
    *end-of-selection.
    *perform write_report.
    *top-of-page.
    *perform print_header.
    *form print_header.
    *write: /(18) 'Component'(h00),
    *(40) 'Description'(h01),
    *'Mat.Group'(h02),
    *(18) 'Quantity'(h03).
    *uline.
    *endform.
    *form write_report.
    *write: / w_topmat-matnr under text-h00 color col_heading,
    *w_topmat-maktx under text-h01 color col_heading.
    *loop at it_comp.
    *write: /
    *it_comp-idnrk under text-h00,
    *it_comp-ojtxp under text-h01,
    *it_comp-matkl under text-h02,
    *it_comp-menge unit it_comp-meins under text-h03,
    *it_comp-meins.
    *endloop.
    *uline.
    *endform.
    form explode_assembly.
    data: it_stb like stpox occurs 0 with header line,
    it_stb2 like stpox occurs 0 with header line,
    it_stb3 like stpox occurs 0 with header line,
    w_msg(255) type c.
    SELECT MATNR FROM MARA INTO CORRESPONDING FIELDS OF TABLE IT_MARA
                               WHERE MATNR IN P_MATNR.
    Explode highest level:
    *LOOP AT IT_MARA.
    call function 'CS_BOM_EXPL_MAT_V2'
    exporting
    auskz = c_x
    capid = 'PP01'
    cuols = c_x
    datuv = sy-datum
    knfba = c_x
    ksbvo = c_x
    mbwls = c_x
    mdmps = c_x
    BGIXO = c_x
    MKMAT = c_x
    MMAPS = c_x
    FBSTP = c_x
    FTREL = c_x
    mtnrv = P_MATNR
    werks = p_werks
    importing
    topmat = w_topmat
    tables
    stb = it_stb
    exceptions
    alt_not_found = 1
    call_invalid = 2
    material_not_found = 3
    missing_authorization = 4
    no_bom_found = 5
    no_plant_data = 6
    no_suitable_bom_found = 7
    conversion_error = 8
    others = 9.
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
    into w_msg.
    *write: / w_msg.
    exit.
    endif.
    Don't process documents
    delete it_stb where idnrk is initial.
    Don't process valid from furure:
    delete it_stb where datuv >= sy-datum.
    Explode phantom assemblies up to last level
    *do.
    it_stb2[] = it_stb[].
    *delete it_stb2 where dumps is initial.
    *if it_stb2[] is initial.
    *exit.
    *endif.
    *delete it_stb where not dumps is initial.
    delete it_stb where VPRSV <> 'S' OR MMSTA = '61'.
    loop at it_stb2.
    call function 'CS_BOM_EXPL_MAT_V2'
    exporting
    capid = 'PP01'
    auskz = c_x
    cuols = c_x
    datuv = sy-datum
    knfba = c_x
    ksbvo = c_x
    mbwls = c_x
    mdmps = c_x
    FBSTP = c_x
    FTREL = c_x
    mtnrv = it_stb2-idnrk
    werks = p_werks
    tables
    stb = it_stb3
    exceptions
    alt_not_found = 1
    call_invalid = 2
    material_not_found = 3
    missing_authorization = 4
    no_bom_found = 5
    no_plant_data = 6
    no_suitable_bom_found = 7
    conversion_error = 8
    others = 9.
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
    into w_msg.
    *write: / w_msg.
    else.
    delete it_stb3 where idnrk is initial.
    delete it_Stb3 where sobsl = 50.
    loop at it_stb3 .
    multiply it_stb3-menge by it_stb2-menge.
    modify it_stb3 transporting menge.
    endloop.
    append lines of it_stb3 to it_stb.
    endif.
    *ENDLOOP.
    endloop.
    *enddo.
    Build table of components collecting the same components from
    all levels
    loop at it_stb.
    it_comp-matkl = it_stb-matmk.
    it_comp-idnrk = it_stb-idnrk.
    it_comp-ojtxp = it_stb-ojtxp.
    it_comp-menge = it_stb-menge.
      CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT'
        EXPORTING
        INPUT                = IT_STB-MEINS
        LANGUAGE             = SY-LANGU
        IMPORTING
      LONG_TEXT            =
       OUTPUT               = IT_STB-MEINS
      SHORT_TEXT           =
    EXCEPTIONS
       UNIT_NOT_FOUND       = 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.
    it_comp-meins = it_stb-meins.
    collect it_comp.
    clear it_comp.
    endloop.
    *READ TABLE IT_COMP INDEX 1.
    *IF SY-SUBRC = 0.
    IT_COMP-MATNR = w_topmat-matnr.
    IT_COMP-MAKTL = w_topmat-maktx.
    INSERT IT_COMP index 1.
    *ENDIF.
    ENDFORM.
    FORM TO APPEND DATA INTO ALV FORM
    FORM BUILD_FIELDCATALOG.
    PERFORM BUILD_FIELDCAT USING 'MATKL' 'Component'.
    PERFORM BUILD_FIELDCAT USING 'MATKL' 'Component'.
    *loop at it_comp.
       PERFORM BUILD_FIELDCAT USING 'MATNR' 'Material'.
      PERFORM BUILD_FIELDCAT USING 'MAKTL' 'Material Description'.
      PERFORM BUILD_FIELDCAT USING 'IDNRK' 'Component'.
      PERFORM BUILD_FIELDCAT USING 'OJTXP' 'Description'.
      PERFORM BUILD_FIELDCAT USING 'MATKL' 'Material Group'.
      PERFORM BUILD_FIELDCAT USING 'MENGE'  'Quantity'.
      PERFORM BUILD_FIELDCAT USING 'MEINS' 'Unit Of MEASUREMENT'.
    *endloop.
    ENDFORM.
    FORM TO BUILD IN FIELD CATALOG FOR ALV FORM
    FORM BUILD_FIELDCAT USING L_FIELDNAME LIKE DD03L-FIELDNAME S_TEXT LIKE DD03P-SCRTEXT_M.
      CLEAR WA_FIELDCAT_LN.
      ADD 1 TO S_COL_POS.
      WA_FIELDCAT_LN-REF_TABNAME  = 'IT_COMP'.
      WA_FIELDCAT_LN-FIELDNAME    = L_FIELDNAME.
      WA_FIELDCAT_LN-SELTEXT_M    = S_TEXT.
      WA_FIELDCAT_LN-COL_POS      = S_COL_POS.
      WA_FIELDCAT_LN-QFIELDNAME   = SPACE.
      WA_FIELDCAT_LN-HOTSPOT      = SPACE.
      WA_FIELDCAT_LN-JUST         = 'R'.
      APPEND WA_FIELDCAT_LN TO IT_FIELDCAT.
    ENDFORM.
    FORM TO BUILD IN FIELD CATALOG FOR ALV FORM
    FORM DATA_DISPLAY.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      = TEXT-001
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
       IT_FIELDCAT                       = IT_FIELDCAT
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = IT_COMP
       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.
    Thanks in advance
                                                                                    Regards
    senthilkumar D

    tables :mara,marc,stpo.
    parameters: p_werks like t001w-werks obligatory.
    *p_matnr like mara-matnr obligatory.
    *select-options : p_matnr for mara-matnr obligatory.
    select-options : P_matnr for mara-matnr.
    *parameters: p_werks like marc-werks obligatory,
    *p_matnr like marc-matnr obligatory.
    constants c_x value 'X'.
    data: begin of it_comp occurs 0,
    idnrk like stpox-idnrk,
    ojtxp like stpox-ojtxp,
    menge like stpox-menge,
    meins like stpox-meins,
    matkl like stpox-matmk,
    end of it_comp.
    data: w_topmat like cstmat.
    data : begin of itab occurs 0,
            matnr like mara-matnr,
            end of itab.
    *data : itab type table of mara with header line.
    start-of-selection.
    perform explode_assembly.
    end-of-selection.
    perform write_report.
    top-of-page.
    perform print_header.
    form print_header.
    write: /(18) 'Component'(h00),
    (40) 'Description'(h01),
    'Mat.Group'(h02),
    (18) 'Quantity'(h03).
    uline.
    endform.
    form write_report.
    write: / w_topmat-matnr under text-h00 color col_heading,
    w_topmat-maktx under text-h01 color col_heading.
    loop at it_comp.
    write: /
    it_comp-idnrk under text-h00,
    it_comp-ojtxp under text-h01,
    it_comp-matkl under text-h02,
    it_comp-menge unit it_comp-meins under text-h03,
    it_comp-meins.
    endloop.
    uline.
    endform.
    form explode_assembly.
    data: it_stb like stpox occurs 0 with header line,
    it_stb2 like stpox occurs 0 with header line,
    it_stb3 like stpox occurs 0 with header line,
    w_msg(255) type c.
    select matnr from mara into table itab where matnr  between p_matnr-low and p_matnr-high.
    loop at p_matnr.
      itab-matnr = p_matnr-low.
       append itab.
       itab-matnr = p_matnr-high.
       append itab.
       clear itab.
       endloop.
    Explode highest level:
    loop at itab.
    call function 'CS_BOM_EXPL_MAT_V2'
    exporting
    auskz = c_x
    capid = 'PP01'
    cuols = c_x
    datuv = sy-datum
    knfba = c_x
    ksbvo = c_x
    mbwls = c_x
    mdmps = c_x
    BGIXO = c_x
    MKMAT = c_x
    MMAPS = c_x
    FBSTP = c_x
    FTREL = c_x
    mtnrv = itab-matnr
    werks = p_werks
    importing
    topmat = w_topmat
    tables
    stb = it_stb
    exceptions
    alt_not_found = 1
    call_invalid = 2
    material_not_found = 3
    missing_authorization = 4
    no_bom_found = 5
    no_plant_data = 6
    no_suitable_bom_found = 7
    conversion_error = 8
    others = 9.
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
    into w_msg.
    write: / w_msg.
    exit.
    *else.
    endif.
    loop at it_stb.
    it_comp-matkl = it_stb-matmk.
    it_comp-idnrk = it_stb-idnrk.
    it_comp-ojtxp = it_stb-ojtxp.
    it_comp-menge = it_stb-menge.
    it_comp-meins = it_stb-meins.
    collect it_comp.
    clear it_comp.
    endloop.
    endloop.
    endform.
    i got the low and high from selectoption and then move it into itab.
    then i pass itab-matnr into fm. using loop.
    but i got only one output
    but ineet to got from and to output.
    give me a solution
    Regards
    ds

  • How to catch the select-options value in AT SELECTION-SCREEN event?

    Hi,all
    This is my code:
    SELECT-OPTIONS: P_BUKRS FOR T012-BUKRS.
    PARAMETERS: P_BNKA TYPE BANKA.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_BNKA.
    select single bankl from bnka where bukrs = p_bukrs.
    Last statement failed because p_bukrs was null.
    So, How can I got the value of p_bukrs in AT SELECTION-SCREEN event?

    Hi Jie,
    try following code.
    REPORT zanu_test.
    TABLES : t012.
    PARAMETERS: p_bukrs LIKE t012-bukrs.
    PARAMETERS: p_bnka TYPE banka.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_bnka.
      DATA: BEGIN OF dynpfields OCCURS 0.
              INCLUDE STRUCTURE dynpread.
      DATA: END OF dynpfields.
    *---  IT for changing fields on the screen
      DATA : t_dynp_flds LIKE  dynpread OCCURS 0 WITH HEADER LINE,
             t_dynpfields LIKE  dynpread OCCURS 0 WITH HEADER LINE.
      DATA: l_bukrs  LIKE t012-bukrs.
      DATA: BEGIN OF it_bank OCCURS 0,
              banka LIKE bnka-banka,
           END OF it_bank.
      DATA: l_tabix LIKE sy-tabix.
      dynpfields-fieldname = 'P_BUKRS'. APPEND dynpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                dyname               = 'ZANU_TEST'
                dynumb               = sy-dynnr
           TABLES
                dynpfields           = dynpfields
           EXCEPTIONS
                invalid_abapworkarea = 1
                invalid_dynprofield  = 2
                invalid_dynproname   = 3
                invalid_dynpronummer = 4
                invalid_request      = 5
                no_fielddescription  = 6
                invalid_parameter    = 7
                undefind_error       = 8
                double_conversion    = 9
                stepl_not_found      = 10
                OTHERS               = 11.
      IF sy-subrc EQ 0.
        READ TABLE dynpfields WITH KEY fieldname = 'P_BUKRS'.
        IF sy-subrc EQ 0.
          MOVE dynpfields-fieldvalue TO l_bukrs.
        ENDIF.
      ELSE.
        EXIT.
      ENDIF.
      SELECT b~banka INTO CORRESPONDING FIELDS OF TABLE it_bank
      FROM t012 AS a
      INNER JOIN bnka AS b
      ON abanks = bbanks AND abankl = bbankl
      WHERE a~bukrs = l_bukrs.
      CLEAR l_tabix.
      CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
           EXPORTING
                endpos_col   = 85
                endpos_row   = 20
                startpos_col = 50
                startpos_row = 10
                titletext    = text-035
           IMPORTING
                choise       = l_tabix
           TABLES
                valuetab     = it_bank
           EXCEPTIONS
                break_off    = 1
                OTHERS       = 2.
      IF sy-subrc EQ 0.
        READ TABLE it_bank INDEX l_tabix.
        IF sy-subrc EQ 0.
    *---  Clear IT t_dynp_flds
          CLEAR : t_dynp_flds,
                  t_dynp_flds[].
    *---  Append screen values
          t_dynp_flds-fieldname = 'P_BNKA'.
          t_dynp_flds-fieldvalue = it_bank-banka.
          APPEND t_dynp_flds.
          CLEAR  t_dynp_flds.
        ENDIF.
      ENDIF.
    *---  Change screen field contents w/o PBO
      CALL FUNCTION 'DYNP_VALUES_UPDATE'
           EXPORTING
                dyname               = 'ZANU_TEST'
                dynumb               = sy-dynnr
           TABLES
                dynpfields           = t_dynp_flds
           EXCEPTIONS
                invalid_abapworkarea = 1
                invalid_dynprofield  = 2
                invalid_dynproname   = 3
                invalid_dynpronummer = 4
                invalid_request      = 5
                no_fielddescription  = 6
                undefind_error       = 7
                OTHERS               = 8.
    START-OF-SELECTION.
    -Anu

  • How to get dynamic select options from logical database?

    Hi,
    in one of my extended reports (means - overwritten standard SAP functionality in Z-namespace) I'm using LDB 'DDF'. I've been requested to validate some of the dynamic selection options (for example - field HKONT at Document level) and to split the logic depending on the particular value(s).
    Tracking what is happened in the LDB program I found that this select option is added as dynamic WHERE clause to the SELECT statement - in a way:
    WHERE bukrs = p_burks AND ... AND
    (where_tab)
    Is there a way to get values of these LDB dynamic select options into my report and if yes - how?
    Thanks in advance.
    Regards,
    Ivaylo Mutafchiev
    Senior SAP Abap Consultant

    Hi,
    Try to use the following fm in your report and check
      call function 'RS_REFRESH_FROM_DYNAMICAL_SEL'
        exporting
          curr_report        = sy-cprog
          mode_write_or_move = 'M'
        importing
          p_trange           = gt_dyn_trange
        exceptions
          not_found          = 1
          wrong_type         = 2
          others             = 3.
    PS please make a whereused of this fm , how it has been used in LDB's to get dynmic selection values

  • How to set a select option's item as invisible (using a method code)

    Hi there,
    I need to hide parameters and select option fields, but Iu2019m using the select_option component to add all items to the layout using just one View Container Element.
    I could use to hide the View Container Element setting the property visible, but I need to hide fields with certain conditions. I also could add one View Container Element for each select option, but I have many... I wish I could make in other way.
    Iu2019ve checked the Definitions of the Interface IF_WD_SELECT_OPTIONS  and the Ulli Hoffmannu2019s book and I have found no help at all.
    Thanks in advance,
    Filipe Torres
    Edited by: Filipe Torres on Sep 15, 2008 12:34 AM

    Thank you, this helps but will solve just part of my problem. I'm using many views and to pass the values from those select options and parameters I just declare them in the first view... The other answer helps me more that shows how to remove one element. I was looking for a hide feature and not remove, but seems that I have to remove.

  • How to modify a select option without range and mutiple selection??

    hi all,
    i need to modify a select option by removing the range and option for multiple entry. i other words i need to make select option as parameter.( because i cannot use parameter in my program due to some constraints.)
    is it possible to change the select option as per my requirement if yes please let me know how is it possible.
    Thanks in advance.
    Sreekanth.

    hi,
            Yes u can use code like following way..
    select-options : s_matnr for mara-matnr no-extension no intervals.
    Reward if helpful.
    Regards
    Gagan

Maybe you are looking for

  • PI 7.11: IDoc Message mapping

    Hi there, I'm currently working on a graphical message mapping using IDoc HRMD_A06 as source structure (HR master data transferred via PFAL). In my result structure I have to fill a field CostCenter with the following logic: If field KOSTL (cost cent

  • Invoice posting  is not triggering idoc message in EBP to FI backned ECC6

    Hi , We are working on classic scenario with SRM 5 having EBP and SUS on separate clients on same srm system. Now we are extending standlone scenario for selected product categories . We have created product master ,product category & vendor master i

  • External Back up drive disappeared

    I noticed that TIme Machine had stopped backing up, so I looked to see what was happening and I was getting an error saying that the external hard drive I am using for my back up was having problems (sorry I can't remember the specifics right now) an

  • Error in the ABAP code

    Hello all, I am getting error in ABAP code . The error is:Field "0" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. I have statement as calmonth = sy-datum + 0(6). Any ideas are always welcome Thanks, JB

  • Central European Languages in id3-t

    Is there any way how to display Central European Languages (Slovak, Czech, Polish, Hungarian) in id3-tags in Creative MuVu TX player correctly? As I see... [Creative MediaSource Organizer -> Settings -> Language] this is only possible for Chinese, Ja