Selection-Screen  - F4

my requirement is
<b>in my program i have 2 select-options
1.Company code (s_bukrs)
2.Portfolios (s_pfolio)</b>
these two are maintained in a Ztable
a)if we press F4 on Company code it has to show d values from Ztable-company code, and also
b)
i)if we press F4 on Portfolios by entering company code ,it has to show d values from Ztable-portfolios related to that company code,
ii)if we press F4 on Portfolios without entering company code ,it has to show d all values from Ztable-portfolios
code i written is..
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_pfolio-low.
PERFORM f4_for_portfolios.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_pfolio-high.
PERFORM f4_for_portfolios.
FORM f4_for_portfolios.
l_dynpro = sy-repid.
l_dynnar = sy-dynnr.
for parameters/one single value(low/high) of select-option this is OK,
If i give 'S_BUKRS' it is giving dump.
it_dynpfields-fieldname = 'S_BUKRS-LOW'.
APPEND it_dynpfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = l_dynpro
dynumb = l_dynnar " '1000'
translate_to_upper = 'X'
TABLES
dynpfields = it_dynpfields.
READ TABLE it_dynpfields INDEX 1.
i have declard one range in my program..
REFRESH r_bukrs.
IF NOT it_dynpfields-fieldvalue IS INITIAL.
r_bukrs-low = it_dynpfields-fieldvalue.
r_bukrs-sign = 'I'.
r_bukrs-option = 'EQ'.
APPEND r_bukrs.
ENDIF.
SELECT abukrs aportfolio b~xportb
INTO TABLE it_plo
FROM ( zlt_mandate AS a
INNER JOIN twpob AS b
ON abukrs = bbukrs
AND aportfolio = brportb )
WHERE a~bukrs IN r_bukrs . "= it_dynpfields-fieldvalue.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'PORTFOLIO'
dynpprog = l_dynpro
dynpnr = l_dynnar
dynprofield = 'S_PFOLIO-LOW'
value_org = 'S'"C
display = 'F'
TABLES
value_tab = it_plo.
ENDFORM. "get_portfolios
<b>if i want get all the valuse which are delacred in SELECT-OPTION 'S_BUKRS',,,,,
,,,,,,,,,,,,What is the procedure ?</b>
ENDFORM.
Regards,
Ramesh.

tables: mkpf.
select-options : p_mblnr for mkpf-mblnr.
TYPES: BEGIN OF TY_MBLNR,
       MBLNR TYPE MKPF-MBLNR,
       MJAHR TYPE  MKPF-MJAHR,
       END OF TY_MBLNR.
data: t_mblnr type standard table of TY_mblnr,
      t_DDSHRETVAL type standard table of DDSHRETVAL.
at selection-screen on value-request for p_mblnr-high.
select mblnr
       MJAHR
       from mkpf up to 5000 rows
       into TABLE t_mblnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
  EXPORTING
  DDIC_STRUCTURE         = ' '
    RETFIELD               = 'MBLNR'
  PVALKEY                = ' '
   DYNPPROG               = SY-REPID
   DYNPNR                 = '1000'
   DYNPROFIELD            = 'P_MBLNR-HIGH'
  STEPL                  = 0
  WINDOW_TITLE           = WINDOW_TITLE
   VALUE                  = 'P_MBLNR-HIGH'
   VALUE_ORG              = 'S'
   MULTIPLE_CHOICE        = 'X'
  DISPLAY                = ' '
   CALLBACK_PROGRAM       = sy-repid
  CALLBACK_FORM          = ' '
  MARK_TAB               = MARK_TAB
IMPORTING
  USER_RESET             = USER_RESET
  TABLES
    VALUE_TAB              = T_MBLNR
  FIELD_TAB              = FIELD_TAB
   RETURN_TAB             = t_DDSHRETVAL
  DYNPFLD_MAPPING        = DYNPFLD_MAPPING
EXCEPTIONS
  PARAMETER_ERROR        = 1
  NO_VALUES_FOUND        = 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.
Ramesh try this here u can select more than one mblnr, and then read table   t_DDSHRETVAL agnst return_tab.
and popluate your select-option..
have u any doubts ask me agn
regards,
santhosh

Similar Messages

  • Regarding Selection Screen field making display field  in ALV report

    Hi All,
               In ALV Report,  at runtime how can i make the field as Display Field in selection screen .
    Thks & Regds
    Shailesh

    hii,
    Go to se38 and give the below progra name execute.... check the source code it is very easy to understand.
    1.demo_dynpro_modify_simple
    2.demo_dynpro_modify_screen
    if tou are using grid,u can refer to foll link
    sequencing / choosing fields in report screen at runtime,
    Display the Columns in the grid at run time
    rgrds,
    Shweta

  • Help Needed in At selection screen output

    Hi Experts,
    I need your help in AT SELECTION SCREEN OUTPUT event. My issue is i have 4 radio button and with each radio button couple of parameters that need to be filled in selection screen of report. My requirement is that sometimes user enters details in second radio button parameters but forgot to change the radio button to second one so kindly suggest a solution so that radio button gets selected as per user input in parameter like if user clicks on certain parameter to enter value then automatically corresponding radio button gets selected.
    Thanks in advance for all your help.

    example from a checkbox in one of my progs..but you can do same approach with radio butts
    parameters p_test as checkbox default abap_on user-command test.
    at selection-screen.
        if sy-ucomm = 'TEST'.
          perform birth_mnth_chck.
        endif.

  • Help needed in selection screen - Urgent

    Hi Experts,
    I have a selection screen. I have three radi buttons in that selection screen. Based on the selection of the radio buttons I need to activate corresponding selection screen parameters.
    e.g : if radiobutton1 is selected, njo activation needed,
           if radiobutton2 is selected, activate selection screen parameter p_one,
           if radiobutton3 is selected, activate selection screen parameter p_two.
    All three radiobuttons are attached to the same radio button group.
    I have assigned the parameters p_one, p_two, p_three to MODIF ID as follows.
    p_one - NULL
    p_two - t01
    p_three - t02.
    on the selection of a radio button I want the corresponding parameter to get activated.
    please help me.
    Regards,
    Arul jothi A.

    hi
    jothi
    AT SELECTION-SCREEN OUTPUT.                                      
      CASE SY-TCODE.                                                 
        WHEN 'ZEDI6'.                                                
          LOOP AT SCREEN.                                             
            CASE SCREEN-GROUP4.                                      
              WHEN '001'.                  "Sales order select       
                SCREEN-ACTIVE = '1'.       "1=Active, 0=Don't display
                MODIFY SCREEN.                                       
              WHEN '002'.                  "Delivery select          
                SCREEN-ACTIVE = '0'.       "1=Active, 0=Don't display
                MODIFY SCREEN.                                        
              WHEN '003'.                  "Invoice select           
                SCREEN-ACTIVE = '0'.       "1=Active, 0=Don't display
                MODIFY SCREEN.                                       
              WHEN '004'.                  "PO Select                
                SCREEN-ACTIVE = '0'.       "1=Active, 0=Don't display
                MODIFY SCREEN.                                       
    regards
    praveen

  • Compare the input filename in the selection screen

    In the selection screen input field
    there is an option of selecting the directory and file name and not the extension .
    This is used to download the datas
    Extension can be selected by using the option button
    rtf
    csv.
    the user has to give only  the filename and not the extension.
    suppose if the user input is C:\temp\file1.rtf.
    Either i should take only the filename
    or i should display the message give only the filename and not the extension . its already been selected!!!!
    I want to compare the input string contains  .doc
    how to do the comparison and to get the above results mentiond
    Thanks in advance

    Because the requirment is there are two option buttion for selecting the download file format
    But unknowingly if the user gives the filename along with the extension. I need to handle that error
    giving some error message or information message
    By comparing the last 4 letters of the filename.. either.doc or rtf or csv or watever
    so how to do that
    then after comparing that i should give the user a msg doc type is already selected give only the filename
    I hope u understand my req

  • Change selection screen in LDB (KDF logical database - NOT HR)

    Hi All,
    Iu2019d like to use KDF logical database to keep the dynamic selections since user wants to use it but I need to change the selection screen itself. The existing variants for KDF donu2019t meet the user requirements. Some fields I need to hide some add. Like I want to u201Cremoveu201D the field u2018Posting periodu2019 (MONAT) (which is available in dynamic selection screen) and put it on the u201Cmainu201D selection screen.
    Do I need to create my own logical database or there is a way around?
    Could someone give me a practical advice or sample of solution?
    Thanks a lot.

    Thanks Himanshu,
    I did as you suggested but problem is that it does not allow me to hide the whole block.
    I have 3 filelds actually on block KD_0 I need to hide (its from selection screen of KDF logical database.)
      SELECT-OPTIONS: KD_LIFNR FOR LFA1-LIFNR MATCHCODE OBJECT KRED.
      SELECT-OPTIONS: KD_BUKRS    FOR  LFB1-BUKRS.
    SELECTION-SCREEN END OF BLOCK KD_0.
    PARAMETERS KD_INDEX AS SEARCH PATTERN FOR TABLE LFA1.
    What I did is below.  I used sp instead of  u201C=u201D since it has many screen for field KD_LIFNR(for frame, text etc).
    And when I did just for KD_LIFNR it was hidden but when I did the same for KD_BUKRS it was not hidden . The field has stars u201C*********u201D in it.
    Same happen with KD_INDEX. The name of the field is hidden but field not and it filled with ********. Do you have any ideas what it can be?
    I debugged it to catch all screen names but no luck
      loop at screen.
        if screen-name cp 'KD_LIFNR' or
        screen-name cp 'KD_BUKRS' or
        screen-name cp 'KD_INDEX' or
        screen-name = '%B000003_BLOCK_1000' or       
        screen-name = 'SSCRTEXTS-FRAME_TEXT' or
        screen-name = 'SSCRTEXTS-MCID_TEXT' or
        screen-name = 'SSCRTEXTS-STRNG_TEXT' or
        screen-name = 'SSCRFIELDS-SEARCH_BTN' or
        screen-name =  '%B025008_BLOCK_1000' or
        screen-name =  '%F021010_1000' or
        screen-name =  'ALCUR' or
        screen-name =  '%F022012_1000' or
        screen-name =  'EXCDT' or
        screen-name = 'SSCRFIELDS-UCOMM'.
          screen-invisible = '1'.
          modify screen.
        endif.
      endloop.

  • How to define our own selection screen for logical database  in abap-hr?

    Hi Friends,
    Can u please help me
    How to define your own selection screens for  logical database.
    we use to do like(goto->attributes-HRReportcatagerious ).but How to desin using  customer table like t599c, t599f and how to add to my logical database?
    Thanks in advance
    charan

    check out this online help
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/dba65c35c111d1829f0000e829fbfe/frameset.htm
    Regards
    Raja

  • Need to restrict selection screen entries in logical database in HR report

    After creating custom HR Report Category using Logical database, I need to restrict the options available in the in the selection Screen
    for example- for company code i m getting 182 entries, but after running the program, selection-options for company code, i need only first 3 entries, don't want remailing entries
    how can i do this?

    Hi
    You can retrieve the required entries into an internal table and use FM F4IF_INT_TABLE_VALUE_REQUEST to provide them under F4 help.
    Regards
    Raj

  • Selection Screen in Report Painter

    Dear Experts,
    I have an issue in the report painter. While executing the report from GRR2, selection screen is not displayed but report is coming as I expected.
    I want to create the selection screen for this report. I have created this report without copying from the standard report.
    Thanks in Advance.
    Regards,
    Aswimn

    Hi,
    Please refer following links.
    <Link farm removed by moderator>
    Regards,
    Renuka S.
    Edited by: Vinod Kumar on May 25, 2011 10:12 AM

  • HR ABAP - PNP selection screen

    Hi Friends,
    I am executing the standard report with PNP logical database .
    But in the selection screen when I click on further selection and select the parameter company code.
    Now I entered the company code "0060", but I am getting the out put for both company code 0060 and 0020,
    here I need the out put only for the person which are belongs to company code 0060, but I think the selection screen company code was not controlling the out put.
    Also I checked the Infotype internal table p0001, here I am able to see both the company codes, and for that person the process is continuing and I am getting the out put for the company code 0020, bcz the current/valid record for this person is 0020.
    Request to let me know any issue there?
    Magesh.S

    Hi,
    You need to set "person selection period" dates, in order to list values with selected parameters.
    Daniel

  • Logical database : user defined selection screen

    Hi Experts,
                 I am working with HR-ABAP. The logical databases provide a selection screen......but i want to use a selection screen of my own and not that of the LDB.
    Plz help...............

    hi do like this....
    go to attributes-->hr report catagory-->master data...here use the value _____000(5underscores and 000 )..
    you wii get that..
    regards,
    venkat

  • Logical database sdf in custom program not triggering selection screen?

    I added logical Database SDF (screen 905) to a custom program - but the selection screen is not getting triggered.
    Do I have to associate these somewhere?
    Thanks,
    Ven

    HI,
    Declare this statement after the Report Statement in the program.
    TABLES : SKA1, SKB1.
    You will get the selection screen now.

  • Unable to save the ALV layout variant and display of selection screen on F4

    Hi All,
    The end user wants to directly select the layout variant (SLIS_VARI). I have used the following code to display the layout variant on selection screen. But, I am unable to save the variant on ALV. Whenever I am trying to select the layout variants (by doing F4 on selection screen) its displaying "No Layout found".
    Following is the code for displaying layout variant:
    PARAMETERS: p_var TYPE slis_vari.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_var.
      PERFORM f4_variant CHANGING p_var.
    FORM f4_variant  CHANGING c_variant TYPE slis_vari.
      DATA: ls_variant TYPE disvariant,
                l_exit     TYPE char1.
      ls_variant-report = sy-repid.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant = ls_variant
          i_save     = 'A'
        IMPORTING
          e_exit     = l_exit
          es_variant = ls_variant
        EXCEPTIONS
          not_found  = 2.
      IF sy-subrc = 2.
        MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        IF l_exit EQ space.
          c_variant = ls_variant-variant.
        ENDIF.
      ENDIF.
    ENDFORM.                    " f4_variant
    and following is the code for displaying the ALV:
    FORM edition_alv.
      ws_variant2 = ls_variant.
    * Call ALV editor in list mode
      IF p_list = 'X'.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
          EXPORTING
            i_callback_program      = ws_extract1-report
            i_callback_user_command = ws_user_command
            is_layout               = ws_layout
            it_fieldcat             = wt_fieldcat
            it_sort                 = wt_sort
            i_save                  = 'A'
            is_variant              = ws_variant2
            it_events               = wt_events[]
          TABLES
            t_outtab                = wt_edition.
    * Call ALV editor in grid mode
      ELSE.
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            i_callback_program      = ws_extract1-report
            i_callback_user_command = ws_user_command
            it_fieldcat             = wt_fieldcat
            it_sort                 = wt_sort
            i_save                  = 'A'
            is_variant              = ws_variant2
            it_events               = wt_events[]
          TABLES
            t_outtab                = wt_edition.
      ENDIF.
    ENDFORM.  
    I am not sure whats going wrong, but I am unable to save variants.
    Please help.
    Thanks,
    Vishal.

    The F4 will display you the existing layouts only. So you need to save the layout first & then execute the report again & check if you are getting F4 values for that field.
    The Layout needs to get stored with variant.
    Regards,
    Mahesh

  • Unable to retreive values from selection screen built using WDR_SELEC_OPTIO

    Hi All,
    I have created a selection screen as below
    lr_field = wd_this->m_handler->create_range_table( 'YFMTFLOW' ).
    *  ASSIGN lr_field->* TO <fs_range>.
    *  ls_date-sign   = 'I'.
    *  ls_date-option = 'EQ'.
    *  ls_date-low    = 'US'.
    *  APPEND ls_date TO <fs_range>.
    * Add the select-option to the group
      wd_this->m_handler->add_selection_field(
        i_id           = 'FLOW'
        i_within_block = 'PROC'
        i_no_intervals = abap_true
        it_result      = lr_field ).
    If i enter some value  and click a button to retireve the values as below
    DATA
        lt_sel_item TYPE if_wd_select_options=>tt_selection_screen_item.
    types: ty_flow type range of yfmtflow.
      FIELD-SYMBOLS:
        <fs_sel_item> LIKE LINE OF lt_sel_item,
        <fs_process>   TYPE yfmtprocess,
        <fs_flow>   TYPE ty_flow.
    * Get the selection-screen items
      l_handler->get_selection_screen_items(
        IMPORTING et_selection_screen_items = lt_sel_item ).
    * Retrieve the values from the select-options items
      LOOP AT lt_sel_item ASSIGNING <fs_sel_item>.
        CASE <fs_sel_item>-m_id.
          WHEN `PROCESS`.
            ASSIGN <fs_sel_item>-m_value->* TO <fs_process>.
          WHEN 'FLOW'.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_flow>.
        ENDCASE.
      ENDLOOP.
    <fs_flow> is empty
    but after I enter value and then press enter and then click the button to retrieve the values I am able to get low value <fs_flow> not the sign and option
    Is it the standard functionality ,if yes how can we overcome
    Thanks
    Bala Duvvuri

    Am giving clear coding of select options.
    nOTE: S_CARR_ID IS THE DATA ELEMENT OF CARR ID  FIELD,
    FOR THAT I AM APPLYING SELECT OPTIONS IN BELOW CODING.
    WRITE THE BELOW CODE IN WDDOINT( ) METHOD OF
    REQUIRED VIEW
    Data: lt_range_table type ref to data,
         read_only type abap_bool.
    WD_THIS->M_WD_SELECT_OPTIONS = WD_THIS-
    >WD_CPIFC_SELECT_OPTIONS( ).
    WD_THIS->M_HANDLER = WD_THIS->M_WD_SELECT_OPTIONS-
    >INIT_SELECT_SCREEN( ).
    WD_THIS->M_HANDLER->SET_GLOBAL_OPTIONS(
         I_DISPLAY_BTN_CANCEL = ABAP_FALSE
         I_DISPLAY_BTN_CHECK = ABAP_FALSE
         I_DISPLAY_BTN_RESET = ABAP_FALSE
         I_DISPLAY_BTN_EXECUTE = ABAP_FALSE ).
    LT_RANGE_TABLE = WD_THIS->M_HANDLER-
    >CREATE_RANGE_TABLE( I_TYPENAME = 'S_CARR_ID' ).
    WD_THIS->M_HANDLER->ADD_SELECTION_FIELD(
              I_ID = 'S_CARR_ID'
              IT_RESULT = LT_RANGE_TABLE
              I_READ_ONLY = READ_ONLY ).
    BELOW CODE IN REQUIRED ACTION( SAY IN SOME BUTTON
    ACTION WHICH WILL RETRIEVE THE DATA FROM DATABASE TABLE
    USING SELECTI OPTIONS VALUES)
    fIRST THE GET REFERENCE TO NODE( CTRL F7--->READ
    CONTEXTB---FLIGHT NODE )
    ***THEN BELOW CODE
    DATA: RT_CARRID TYPE REF TO DATA.
    DATA:IS_FLIGHT TYPE TABLE OF SFLIGHT.
    FIELD_SYMBOLS: <FS_CARRID> TYPE TABLE.
    RT_CARRID = WD_THIS-> M_HANDLER-
    >GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_CARR_ID' ).
    ASSIGN RT_CARRID-> TO <FS_CARRID>.*
    SELECT * INTO CORRRESPONDING FIELDS OF TABLE IS_FLIGHT
       FROM SFLIGHT WHERE CARRID IN <FS_CARRID>
    NODE_FLIGHT->BIND_TABLE( IS_FLIGHT ).

  • Need Different Selection screen for different Queries in a Workbook

    Hi,
    I have created a workbook with Multiple tabs in BI 7.0.  Each Tab has different Queries and each query has different Selection screens (Variable Selections).
    When i open the workbook and refresh it, the selection screen is appearing only for one query.  All the queries are refreshed by this single selection screen, though each query has different Variable selections.  What i need is a seperate selection screen i.e seperate Variable selection appearing for each queries, when i refresh each one of them.
    Is it possible to do this?  If anybody has tried this, help me in solving this issue.  Thanks for ur time.
    Regards,
    Murali

    Murali,
    If you un-check the 'Display Duplicate Variables Only Once' this WILL solve your problem.
    When you Refresh, you should be presented with a single variable selection dialog box, but it should contain an area for each Query (DataProvider) that is embedded in the Workbook.
    This is the case if the queries are all on the same tab, or on different tabs.
    However, if you have multiple tabs each with a query on it, each query must have it's own DataProvider. If all queries are based on the same DataProvider, it will not work as the Workbook only 'sees' one Query for which it needs variable input.
    If you REALLY want multiple variable selection dialog boxes, then maybe the best way to do this is to have the queries in separate Workbooks.
    If you don't want the User to have to open 5 queries manually, you could use a Macro in each Workbook that runs on opening, to open the next Workbook in the sequence.
    I hope this makes sense!
    Regards
    Steve

  • Getting parameter id in the selection screen parameter

    Hi,
    There are few fields in my selection screen. I need to set the parameter id of warehouse number such that the value in the user profile should get displayed by default when the user executes the report.. The parameter id is /scwm/lgn . How do I get it? Please advise.
    I have my parameter as follows:
    parameter: p_lgnum   TYPE  /sapapo/matio_wm-lgnum obligatory.
    Moderator message: please read F1-help for "parameters", section "value options".
    Edited by: Thomas Zloch on Jan 19, 2012

    not enough research..
    Parameter: p_lgnum TYPE /sapapo/matio_wm-lgnum MEMORY ID /scwm/lgn .
    press F1 and see how it works

Maybe you are looking for

  • How can i get a the music from an old ipod classic onto my mac?

    when i sync it the only option the mac gives me is to delete the music from the ipod... any ideas? thanks...

  • Using "getf" command in Scilab-LabVIEW Gateway

    I am having trouble using the "getf" command in the Scilab-LabVIEW Gateway. I would like to load an external Scilab function using the LabVIEW script node and perform an operation with it. In Scilab, the following code works correctly:              

  • Executing DB2 API (without JDBC)

    I'm trying to call a DB2 API (e.g. sqlbgtss) from a Java program. I do not want to use JDBC. Can someone help me?

  • Compiling mod_perl for Solaris 10 ....  grrrrrr

    I've got a scenario where I need to run MySQL in a cluster, and the application requires curl be compiled into php. After chasing my tail for weeks trying to get things to play nicely together, I decided to just compile everything from scratch. I hav

  • How to deactivate my photoshop elements 9

    how to deactivate my photoshop elements 9, first time I tried, and it shows error. so I uninstalled it, thought it would solve the problem. What do I need to do now to deactivate it?