If checkbox is checked, put values in select-options and parameter...

Hello Experts,
Based on my selection-screen below, How do I fill p_eindt and p_monat with values if
the user clicked on the checkbox p_end? Below is my selection-screen:
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-003.
SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-001.
PARAMETER: p_bukrs TYPE bukrs OBLIGATORY.
SELECT-OPTIONS: p_werks FOR wa_ekpo-werks OBLIGATORY NO INTERVALS,
                p_bsart FOR ekko-bsart OBLIGATORY NO INTERVALS,
                p_eindt FOR eket-eindt OBLIGATORY,
                p_ebeln FOR ekko-ebeln.
PARAMETER: p_monat TYPE monat OBLIGATORY,
           p_gjahr TYPE gjahr OBLIGATORY.
SELECTION-SCREEN END OF BLOCK 1.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
PARAMETER: p_end AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF BLOCK b2.
Hope you can help me guys.Thank you and take care!

Hi,
  For F4 help for any input value in selection screen u can use:
Ex:
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_eidnt-LOW.
  SELECT DISTINCT edint INTO TABLE IT_ab FROM <tablename>..
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
   EXPORTING
DDIC_STRUCTURE         =
     RETFIELD               = 'eindt'
    PVALKEY                = ' '
     DYNPPROG               = W_REPID
      DYNPNR                 = W_DYNNR
     DYNPROFIELD            = 'p_eindt-LOW'
    STEPL                  = 0
      WINDOW_TITLE           = 'Plant'
    VALUE                  = ' '
      VALUE_ORG              = 'S'
    MULTIPLE_CHOICE        = 'X'
    DISPLAY                = ' '
    CALLBACK_PROGRAM       = ' '
    CALLBACK_FORM          = ' '
    MARK_TAB               = 'X'
  IMPORTING
    USER_RESET             =
    TABLES
    VALUE_TAB              = it_abc
    FIELD_TAB              =
    RETURN_TAB             = IT_RETURN
    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.
Try this.
Regards,
Vani.

Similar Messages

  • Pass select option and parameter with submit

    Hello,
    I have two programs and what i have to do is to use the selection screen information from program A and submit it to program B so that this second program will generate a report with this information.
    After program B is executed it creates some files in a server, which i will have to use later in program A. I cannot modify the program B since its not part of the requirement.
    But the thing is that i am having problems when submiting a select option and a parameter together.
    It would be really useful if someone could give some examples of this.
    Example of what i want to do:
    SUBMIT PROGRAM_B
    WITH S_MATNR EQ S_MATNR      ->pass all the values from a select option.
    WITH P_WERKS EQ P_WERKS    ->pass a single value from a parameter.
    AND RETURN
    Regards,
    Roberto

    Hi,
    Try this for select-options:
    SUBMIT PROGRAM_B
    WITH S_MATNR *IN* S_MATNR ->pass all the values from a select option.
    WITH P_WERKS EQ P_WERKS ->pass a single value from a parameter.
    AND RETURN
    Hope it helps.
    Regards,
    Gilberto Li
    Edited by: Gilberto Li on Feb 2, 2009 10:24 PM
    Edited by: Gilberto Li on Feb 2, 2009 10:33 PM
    Edited by: Gilberto Li on Feb 2, 2009 10:33 PM

  • Select option and parameter.

    I have select options and parameters in my selection screen. While extracting the data I am using both the select option and a parameter in where condition.  But that select statement is not returning any data. Could any body tell me what might be the reason.
    Thanks,
    bsv.

    Hi,
      See this example code it works.
    tables spfli.
    parameters p_carrid type spfli-carrid obligatory.
    select-options s_connid for spfli-connid.
    data itab type table of spfli with header line.
    select *
       from spfli into table itab
    where carrid eq p_carrid
       and connid in s_connid.
    loop at itab.
      write: / itab-carrid,
               itab-connid.
    endloop.
    Note : Dont leave blank for parameters because it take as space and when you select from table it is unsuccessful.
    Plzz Reward if it is useful,
    Mahi.

  • Select options and parameter

    We have a parameter and select option in Selection Screen, by using the parameter and select option in the select query, with out passing the any values to the Parameter and SO, how we will get the records?

    hi check this..
    if the parameter is empty if will not work in the select statement..you can get the values for the select options with empty structures..
    check this..
    tables:mara .
    data: begin of itab occurs 0,
    matnr like mara-matnr,
    end of itab .
    parameters:p_matnr like mara-matnr.
    select matnr  from mara into table itab
    where matnr  = p_matnr.
    loop at itab.
    write:/ itab-matnr.
    endloop.
    it will not fetch data..
    for select-options
    tables:mara .
    data: begin of itab occurs 0,
    matnr like mara-matnr,
    end of itab .
    select-options:s_matnr for mara-matnr.
    select matnr  from mara into table itab
    where matnr  in s_matnr.
    loop at itab.
    write:/ itab-matnr.
    endloop.
    it will fetch data..
    regards,
    venkat

  • Reading all select-option and parameter fields

    Hello All,
        I have a reaquire ment like ' i Will take a report name as input from user , and i  need to read all the fields declared with PARAMETERS and SELECT-OPTIONS. '
         one thing i can read the program and go line by line or scan the program.
    apart from this is there any other way to get all such fields declared with PARAMETERS and SELECT-OPTIONS
    Thanks & Regards
    Amarender Reddy B

    Hi,
      You can fetch it from table TVARV
    Regards,
    Prashant

  • How to put values from selection screen to  ztable

    hi all,
    i have created a ztable.
    now i want to put data through se38.
    i have given 5 parameters in selection screen same as there in ztable.
    now if i put values in selection screen then it should put that values to my ztable .
    how can i put values into my ztable.
    i used insert but not workiing.

    Hi,
    Try this.
    TABLES : ztable.
    SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
    PARAMETER : p_field1 TYPE field1_in_ztable,
                            p_field2 TYPE field2_in_ztable.
                            p_field3 TYPE field3_in_ztable.
                            p_field4 TYPE field4_in_ztable.
                            p_field5 TYPE field5_in_ztable.
    SELECTION-SCREEN:END OF BLOCK b1.
    DATA : itab TYPE TABLE ztable,
                 wa_itab TYPE ztable.
    AT SELECTION-SCREEN.
          MOVE p_field1 TO wa_itab-field1.
          MOVE p_field2 TO wa_itab-field2.
          MOVE p_field3 TO wa_itab-field3.
          MOVE p_field4 TO wa_itab-field4.
          MOVE p_field5 TO wa_itab-field5.
    INSERT ztable FROM wa_itab.
    IF sy-subrc = 0.
    MESSAGE 'Successfully saved' TYPE 'I'.
    ENDIF.
    Thanks,
    Sri.
    Edited by: Sri on Jul 28, 2009 4:15 PM

  • Change values of select option in fuction of the variant

    Hi abappers,
    I want change the data that contain several select-options.
    I have a table internal (c_varint) that I obtain with the next code:
    CALL FUNCTION 'RS_VARIANT_CONTENTS'
         EXPORTING
              report                = '/1BCDWB/DBBKPF'
              variant               = p_varint
    *         MOVE_OR_WRITE         = 'W'
    *         NO_IMPORT             = ' '
    *         EXECUTE_DIRECT        = ' '
    *    IMPORTING
    *         SP                    =
         tables
    *         L_PARAMS              =
    *         L_PARAMS_NONV         =
    *         L_SELOP               =
    *         L_SELOP_NONV          =
              valutab               = c_varint
    *         OBJECTS               =
    *         FREE_SELECTIONS_DESC  =
    *         FREE_SELECTIONS_VALUE =
    *    EXCEPTIONS
    *         VARIANT_NON_EXISTENT  = 1
    *         VARIANT_OBSOLETE      = 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.
    and my select-options:
    SELECT-OPTIONS I1 FOR BKPF-BUKRS.
    SELECT-OPTIONS I2 FOR BKPF-BELNR.
    SELECT-OPTIONS I3 FOR BKPF-GJAHR.
    SELECT-OPTIONS I4 FOR BKPF-BLART.
    SELECT-OPTIONS In ...
    Now I want change the values but I got not him to changed it to me :
    loop at c_varint where selname eq i1.
       MOVE-CORRESPONDING c_varint to i1.
    endloop.
    loop at c_varint where selname eq i2.
       MOVE-CORRESPONDING c_varint to i2.
    endloop.
    loop at c_varint where selname eq i3.
       MOVE-CORRESPONDING c_varint to i3.
    endloop.
    loop at c_varint where selname eq i4.
       MOVE-CORRESPONDING c_varint to i4.
    endloop.
    but I dont obtain the data
    Can you help me, please?
    Cordial greetings.

    Hi,
    the documentation of the fm you´re using says:
    RS_VARIANT_CONTENTS
    This function module checks whether any parameters or select options of the variant have changed. If they have, it outputs an error message (variant obsolete).
    have you checked fm RS_CHANGE_CREATED_VARIANT instead?
    the documentation of this fm says:
    RS_CHANGE_CREATED_VARIANT
    Functionality
    This function module enables modification of a variant without processing the selection screen. In the table VARI_CONTENTS, you must supply all select-options and parameters of the variant with values. Any selection criteria missing from this table are set to their initial values in the variant. If no value is specified for the structure description (parameter VARI_DESC), all fields - except the name of the last user to make the change, the time of the change, the version and the language - are set to their initial values. The table VARI_TEXT is optional
    Best regards

  • Values of select-option in various variants

    Hi all,
    does anybody know a report to determine the values of a specific select-option in various variants of a program?
    I know the function module RS_VARIANT_CONTENTS to get the values of select-options in one variant of a program (TABLES-parameter VALUTAB), but I need it for many variants (like a prgram which calls the function module for all variants of a program).
    Does anybody know a possibility?
    Thanks
    Daniel

    You will probably have to write your own code for this. You could still check the where-used-list of RS_VARIANT_CONTENTS (or related function modules in the same function group) to see if there is any available standard program for your purpose.
    If you find one, please let us know here in this thread.
    Thomas

  • I am trying to sync a playlist to my Nano,  but when I click on the Music tab at the top, it will not allow me to select the option Selected Playlist, Artists, etc.  I cannot un-check the Entire Music library option and check the Selected Artist - on

    I am trying to sync a playlist to my Nano,  but when I click on the Music tab at the top,
    it will not allow me to select the option Selected Playlist, Artists, etc.  I cannot un-check the Entire Music library
    option and check the Selected Artist … one.
    I have changed the Sync option to Manually sync, but that does not help.
    How can I change this to the second option?
    Thanks.

    There is a checkbox above those two options for how to sync.  It says Sync Music; it enables automatic syncing.  That box needs to be checked before you can select from the two options for how automatic syncing is performed.
    NOTE:  If the iPod is current set up to Manually manage music [and videos], checking that Sync Music box replaces its current content with content from your iTunes library, based on how automatic syncing is set up on that screen.
    So, if your goal is to add ONE playlist to an iPod that is managed manually, you do not want to do this because iTunes will erase the iPod's current content and replace it with just that ONE selected playlist (and whatever else you select on that Music settings screen).
    Instead, if the iPod currently uses the manual setting, you need to add playlists manually to the iPod (not use the automatic syncing setting).  Please post back with more details about your situation. 

  • Combining a Select-Option and a Checkbox

    Hi All,
    I have a requirement wherein I need to display some select-options on the screen and have check boxes against each of the select options and based on the selection of the checkboxes, I will do further processing.
    Is it possible to have a checkbox across a select-option like this?
    Please help me on this.
    Thanks in Advance.
    Regards,
    Keerthi

    yes it is possible.
    selection screen begin of line.
    "write ur code here
    selection screen end of line.
    Have a look at below link:
    http://help.sap.com/saphelp_nw04/helpdata/EN/9f/dba7e235c111d1829f0000e829fbfe/frameset.htm

  • How to assign list of default value for select-option variable???

    Hi every one
    This is Deepak,
    I want to know how to assign list of default value to select-option variable ? please any body tel me solution
    for example
    select-option matnr for mara-matnr default ..............and here i want to give more than 1 values that will be default value and use can choose any one at the time of input .
    Thank you in advance
    Deepak

    Hi.
    Check the following sample code.
    REPORT ztn_test.
    " It is example for list populating.
    TABLES:knvp.
    data: BEGIN OF itab OCCURS 10,
          kunnr like knvp-kunnr,
          END OF itab.
    data: wa_itab like itab.
    TYPE-POOLS: vrm.
    DATA: name TYPE vrm_id,
    list TYPE vrm_values,
    value LIKE LINE OF list.
    PARAMETERS: s_kunnr(20) type c  as LISTBOX VISIBLE LENGTH 40 .
    AT SELECTION-SCREEN OUTPUT.
    SELECT kunnr from knvp  into  CORRESPONDING FIELDS OF TABLE itab WHERE parvw = 'SP'. " SP for ur requirement
    " I have used loop to populate some values from table
    loop at itab into wa_itab.
      name = 'S_KUNNR'.
      value-key = sy-tabix.
      value-text = wa_itab-kunnr.
      append value to list.
      clear wa_itab.
    endloop.
    " If u want individaully assign the values change the code as
    name = 'S_KUNNR'." Select option name
      value-key = 1." Index
      value-text = 'VAL1'.
      append value to list.
    name = 'S_KUNNR'." Select option name
      value-key = 2." Index
      value-text = 'VAL2'.
      append value to list.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING id = name
    values = list.
    Edited by: tahir naqqash on Feb 21, 2009 4:38 PM

  • Getting values from select option

    Hi,
    I have a requirement where the user is going to pass values in select-option  in low and high. lets say s_bwart(movement types).
    now i have to fetch this bwart values into an internal table.
    my internal table will be having only one field that is bwart. so how do i populate my internal table with those values. could any body help me in this.
    Thanks in advance
    neha

    Hi, when using SELECT-OPTIONS, use can pretty much do any kind of selection he wants, including ranges, and excluding values, so the best way to handle it is to select from the data base when the user executes the report.  for example.
    data: begin of ibwart occurs 0,
          bwart type mseg-bwart,
          end of ibwart.
    select-options: s_Bwart for mseg-bwart.
    start-of-selection.
    select bwart into table ibwart
               from <b>T156</b>
                     where bwart in s_bwart.
    Regards,
    Rich Heilman

  • How to get the values of Select-options from the screen.

    The value of parameter can be obtained by function module 'DYNP_VALUES_READ' but How to get the values of Select-options from the screen? I want the F4 help values of select-options B depending on the values in Select-option A.So I want to read the Select-option A's value.

    Hi,
    Refer this following code..this will solve your problem...
    "Following code reads value entered in s_po select options and willprovide search
    "help for s_item depending upon s_po value.
    REPORT TEST.
    TABLES : ekpo.
    DATA: BEGIN OF itab OCCURS 0,
    ebelp LIKE ekpo-ebelp,
    END OF itab.
    SELECT-OPTIONS   s_po FOR ekpo-ebeln.
    SELECT-OPTIONS s_item FOR ekpo-ebelp.
    INITIALIZATION.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_item-low.
      DATA:
      dyn_field TYPE dynpread,
      temp_fields TYPE TABLE OF dynpread,
      zlv_dynpro TYPE syst-repid.
      zlv_dynpro = syst-repid.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname     = zlv_dynpro
          dynumb     = syst-dynnr
          request    = 'A'
        TABLES
          dynpfields = temp_fields
        EXCEPTIONS
          OTHERS     = 0.
      LOOP AT temp_fields INTO dyn_field.
        IF dyn_field-fieldname EQ 'S_PO-LOW'.
            SELECT * INTO CORRESPONDING fields OF TABLE itab FROM ekpo
            WHERE ebeln EQ dyn_field-fieldvalue.
            EXIT.
        ENDIF.
      ENDLOOP.

  • How to set default value in select option for ABAP query

    Hi experts,
    What is the way to set up default values for select-options in ABAP query.
    e.g.
    I have one field 'Year' in my ABAP query selection screen.
    I want value of current year to be appeared here whenever user execute report
    Thanks in Advance
    -Harkamal

    Hi Harkamal,
    execute your Query via SQ01. On Selection-Screen
    goto save Variant. Mark your field
    as selection variable an press Button election variable.
    Take variable from TVARV and use it.
    Than save the Variant.
    Look at TVARV if the 'Year' is updated to the actualYear!
    regards, Dieter

  • How many entries can we put in the select options

    Hi all,
    As per  my requirement I am trying to store the data in the select-option( s_kunnt)  as below
    select kunnr from kna1 into (l_kunnr) where
                and spart in p_spart.
      move 'I'         to s_kunnr-sign.
      move 'BT'        to s_kunnr-option.
      move l_kunnr to s_kunnr-low.
      move l_kunnr  to s_kunnr-high.
      append s_kunnr.
    endselect.
    Using s_kunnr in the select statement to fetch the data.
    When the customer numbers are more than 1800 in the s_kunnr, select statment going to the dump. Is number of entries in the select options are restricted for some count( around 1800)?.
    How many entries can we put in the select options?
    Thanks
    Regards
    Raj.

    Firstly, there is an error in your code. You should do the following instead:
    move 'I' to s_kunnr-sign.
    move 'EQ' to s_kunnr-option.
    move l_kunnr to s_kunnr-low.
    append s_kunnr.
    To answer your original question, the limit depends on the field width you are using in the ranges. If the field width is small, you can have thousands of entries in the range table.
    The limitation is in the length of the SQL statement string generated by the ABAP OPEN SQL engine. With the way I defined it above, the statement would have WHERE KUNNR IN ( 'value1', 'value2', 'value3'). With way you defined it, it would have WHERE KUNNR BETWEEN 'value1' and 'value1' and KUNNR BETWEEN 'value2' and 'value2'.
    When the range table is so large that it results in a short dump, you should look into FOR ALL ENTRIES option of SQL.

Maybe you are looking for

  • TRY OPEN DNS OR GOOGLE'S NAMEBENCH TO RESOLVE SAFARI 5 ISSUES

    HI, 2 DAYS AGO, I EXPERIENCED ALL THE PROBLEMS YOU GUYS ARE HAVING WITH THE SAFARI 5 UPGRADE. I THEN SAW A POST ABOUT OPEN DNS CODES CLICKED ON THE ARTICLE ABOUT IT AND PLUGGED IN THE APPROPRIATE NUMBERS. HAS WORKED FINE SINCE. SOMEONE ELSE POSTED AB

  • Where can I find the full flash iPhone documentation?

    Hi, does anyone know if there's full documentation of all methods available for  the iPhone APIs, I've downloaded the PDF that's floating around, but there are many things missing. It must be documented somewhere. People in this forum seem to be conf

  • Outer join issue in ODI

    Hello Everyone, I have two tables : A (col1, col2, col3) and B (col1, col2, col3) in two databases. My objective is to do a left outer join between these tables, apply an additional filtering criteria using a where clause, and finally populate the re

  • What do i do if callers cannot not hear me when I call them

    After iOS 5 update, callers cannot hear me. I tried the voice recorder and it does not pick up my voice. also I used Tango and the caller could hear me but with Skype they could not. the only way callers can hear me is if I have the phone on speakerp

  • Moving contacts from Outlook 2007 to Mac Address Book

    Hello all, I've tried to email VCard attachments of contacts from an Outlook 2007 / Exchange Server account so I can import them into my MAC Address Book. When I look at my sent folder in Outlook, the attachment shows a VCF attachment. When I pick up