[Selection Screen] Select-Options populate mult. values & Green pushbutton

Hi,
I programmatically fill a SELECT-OPTIONS on event AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_us-low.
As I use a FM ('RHP0_POPUP_F4_SEARK') that allows me to select several entries in a single step, the right pushbtton stays unchanged. I have to press enter to make it go green.
I tried thinks like:
    ls_dynpfield-fieldname = '%_S_US_%_APP_%-VALU_PUSH'.  " 'S_US-LOW'.
    ls_dynpfield-fieldvalue = ICON_DISPLAY_MORE.
    APPEND ls_dynpfield TO lt_dynpfields.
    CALL FUNCTION 'DYNP_VALUES_UPDATE'
      EXPORTING
        dyname               = sy-repid
        dynumb               = sy-dynnr
      TABLES
        dynpfields           = lt_dynpfields
      EXCEPTIONS
        invalid_abapworkarea = 1
        invalid_dynprofield  = 2
        invalid_dynproname   = 3
        invalid_dynpronummer = 4
        invalid_request      = 5
        no_fielddescription  = 6
        undefind_error       = 7
        OTHERS               = 8.
and it works but it's not that nice !
Any idea how to avoid this behaviour and directly set it green?
Thanks in advance.
Best regards,
Guillaume

Hi
Guillaume Garcia
U can try following code. it may help you.when I press f4. Colour will change to Green.
REPORT  ztest.
tables: mara.
CONSTANTS : tp_mara type C VALUE 'X'.
select-OPTIONS: matnr for mara-matnr..
at SELECTION-SCREEN on VALUE-REQUEST FOR matnr-low.
matnr-sign = 'I'.
matnr-option = 'BT'.
matnr-low  = '1'.
matnr-high = '2'.
append matnr.
matnr-sign = 'I'.
matnr-option = 'BT'.
matnr-low  = '4'.
matnr-high = '5'.
append matnr.
SUBMIT ZTEST VIA SELECTION-SCREEN WITH matnr IN matnr.
START-OF-SELECTION.
BREAK-POINT.
END-of-SELECTION.
Many thanks,
Suyog.

Similar Messages

  • Search Help for selection screen select-option

    Hi Friends,
              I want have search help for KSCHL with only the condition types starting with Z. I need your help to do that.
    Thanks in Advance.

    hi,
    chek a sample code, for restricting the serach help.
    REPORT Z_CONECT_A.
    Include type pool SSCR
    TYPE-POOLS sscr.
    TABLES : marc.
    defining the selection-screen
    select-options :
      s_matnr for marc-matnr,
      s_werks for marc-werks.
    Define the object to be passed to the RESTRICTION parameter
    DATA restrict TYPE sscr_restrict.
    Auxiliary objects for filling RESTRICT
    DATA : optlist TYPE sscr_opt_list,
               *** type sscr_***.
    INITIALIZATION.
    Restricting the MATNR selection to only EQ and 'BT'.
      optlist-name = 'OBJECTKEY1'.
      optlist-options-eq = 'X'.
      optlist-options-bt = 'X'.
      APPEND optlist TO restrict-opt_list_tab.
      ***-kind = 'S'.
      ***-name = 'S_MATNR'.
      ***-sg_main = 'I'.
      ***-sg_addy = space.
      ***-op_main = 'OBJECTKEY1'.
      APPEND *** TO restrict-***_tab.
    Restricting the WERKS selection to CP, GE, LT, NE.
      optlist-name = 'OBJECTKEY2'.
      optlist-options-cp = 'X'.
      optlist-options-ge = 'X'.
      optlist-options-lt = 'X'.
      optlist-options-ne = 'X'.
      APPEND optlist TO restrict-opt_list_tab.
      ***-kind = 'S'.
      ***-name = 'S_WERKS'.
      ***-sg_main = 'I'.
      ***-sg_addy = space.
      ***-op_main = 'OBJECTKEY2'.
      APPEND *** TO restrict-***_tab.
      CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
       EXPORTING
        restriction                  = restrict
       EXCEPTIONS
         TOO_LATE                     = 1
         REPEATED                     = 2
         SELOPT_WITHOUT_OPTIONS       = 3
         SELOPT_WITHOUT_SIGNS         = 4
         INVALID_SIGN                 = 5
         EMPTY_OPTION_LIST            = 6
         INVALID_KIND                 = 7
         REPEATED_KIND_A              = 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.
      ENDIF.
    regards
    anver
    <b><i>if helped pls mark points</i></b>

  • When we execute   transcation selection-screen should come with some values

    hi gurus,
    My requirement is whenever user executes a particular transaction,
    selection screen should appear with some values by default.
    can you suggest me in solving this problem.
    its urgent.
    thanks,
    Bhanu.R

    Hi,
    for that do like:
    A transaction with a variant can have its own transaction code, which you can then use to execute the transaction with the appropriate variant.
    To create a variant transaction, proceed as follows:
    Choose Goto ® Create vari. trans. from the initial transaction variant maintenance screen.
    Enter a transaction name and corresponding short text. Transaction type Variant transaction is already set. The following screen already contains default values for the name of the calling transaction, the variant name, and the client-specific or cross-client variant checkbox.
    Save your entries.
    Example:
    Variant ABC has been defined for transaction Z000. We now want to create the variant transaction ZVAR.
    Name of the new transaction: ZVAR
    Name of the calling transaction: Z000
    Name of the variant: ABC
    Transaction ZVAR starts transaction Z000 with variant ABC.
    If the variant specified for a variant transaction does not exist (in the current client), then the calling transaction will be started without variant.
    Regards,
    Renjith Michael.

  • The selection screen cannot choose the multiple values at first instance?

    Hi All,
       I have 2 select-options on the selection screen as follows>>
    SELECT-OPTIONS :
                       s_subusr FOR pa0105-usrid NO INTERVALS OBLIGATORY,   
                      s_period FOR vbak-erdat   NO-EXTENSION OBLIGATORY.   
    When I try to enter multiple values by clicking the multiple option button when noting is entered as input on the selection screen.I get a error"Make entry in all required fields".
    But when I enter a value on the selection screen input for s_subusr and then enter value in s_period and then click on multiple option button I am able to see the multi-option Popup.Now I can enter multiple Values.
    Please can anyone help me to enter the values on the multiple option Pop-up whenever the user want?
    Regards,
    Shashank.

    HI
    OBLIGATORY means you have to enter the values , with out filling that values and if you click any thing it will show an error message saying that fill alla required fields
    so if you want you can remove that
    or if you want to keep that OBLIGATORY then fill some values 1st in that select-options and clcik on multiple entries button then it won't show any error
    <b>Reward if usefull</b>

  • Selection Screen - How to populate more than 1 field with help input

    Hello all,
    I have a selection screen in which 4 fields are defined.
    Help input is available for the first field. On selecting the entry in the popup, I would like the 4 fields to be populated with the corresponding values.
    Try transaction CV01 for a sample of what I want:
      Selecting from the popup will populate all 4 fields.
    Thanks in advance,
    Alain Cyr.

    Please see the following program,  it should show you exactly what you need to do.
    report zrich_0002 .
    parameters: p_bukrs type t001-bukrs,
                p_butxt type t001-butxt,
                p_ort01 type t001-ort01,
                p_land1 type t001-land1.
    data: dynfields type table of dynpread with header line.
    data: return type table of ddshretval with header line.
    at selection-screen on value-request for p_bukrs.
      call function 'F4IF_FIELD_VALUE_REQUEST'
           exporting
                tabname           = 'T001'
                fieldname         = 'BUKRS'
                dynpprog          = sy-cprog
                dynpnr            = sy-dynnr
                dynprofield       = 'P_BUKRS'
           tables
                return_tab        = return
           exceptions
                field_not_found   = 1
                no_help_for_field = 2
                inconsistent_help = 3
                no_values_found   = 4
                others            = 5.
      read table return with key fieldname = 'P_BUKRS'.
    * Add it back to the dynpro.
      dynfields-fieldname = return-retfield.
      dynfields-fieldvalue =  return-fieldval.
      append dynfields.
    * Get the company code from db and add to dynpro
      data: xt001 type t001.
      clear xt001.
      select single * into xt001
             from t001
            where bukrs = return-fieldval.
      dynfields-fieldname = 'P_BUTXT'.
      dynfields-fieldvalue = xt001-butxt.
      append dynfields.
      dynfields-fieldname = 'P_ORT01'.
      dynfields-fieldvalue = xt001-ort01.
      append dynfields.
      dynfields-fieldname = 'P_LAND1'.
      dynfields-fieldvalue = xt001-land1.
      append dynfields.
    * Update the dynpro values.
      call function 'DYNP_VALUES_UPDATE'
           exporting
                dyname     = sy-cprog
                dynumb     = sy-dynnr
           tables
                dynpfields = dynfields
           exceptions
                others     = 8.
    start-of-selection.
    Welcome to SDN!  Please remember to award points for helpful answers and mark you post as solved when solved completely.  Thanks.
    Regards,
    Rich Heilman

  • Issue In Providing 255 Charcters From The Selection Screen Select-Option

    Dear Guru,
    I am searching for table field with having length = 255 character.
    which i want to use in select-option for proving data from the selection screen.
    I have found the table myhlp and it associated field allvals which is having length = 255.
    I am using it as below in my selection screen for the value to be provided 255 character long.
    SELECTION-SCREEN : BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    SELECT-OPTIONS   : s_mlbody FOR myhlp-allvals  NO INTERVALS.
    SELECTION-SCREEN : END OF BLOCK b3.
    Now when i am going for the multiple selection option --> It is providing me the Multiple selection popup and giving me the provision of provide multiple line .
    But the issue is that --> For a particular single value line in the popup i am able to enter only 45 charcters not 255 character.
    But i need to put 255 charcter for particular line in a single value..
    Please give me some guideline how resolve this or any other alternative way of reading the 255 charcter from the selection screen
    Thanks & regards
    Saifur Rahaman

    Hi,
         As said by A@s selction screen with table control will be a good option.
    design a custom screen with SUBSCREEN as screeen attribute using tcode se51.
    For table control sample - go through Tcode ABAPDOCU - abap user dialogs-screens-complex screen- table control
    Try Following,
    REPORT Zsample .
    controls: tc type tableview using screen 200.
    parameters: p_user type myhlp-username.
    data: begin of itab occurs 50,
          field1(255) type c,
          end of itab.
    data: i_out type standard table of myhlp.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK MAX FOR 22 LINES.
    SELECTION-SCREEN TAB (25) TABS1 USER-COMMAND UCOMM1
             DEFAULT SCREEN 200.
    SELECTION-SCREEN END OF BLOCK MAX.
    start-of-selection.
    select * from myhlp into table i_out for all entries in itab
              where username eq p_user
                    and allvals = itab-field1.
    MODULE READ_ITAB INPUT.
    insert itab index tc-current_line.
    ENDMODULE.                 " READ_ITAB  INPUT

  • Selection screen to retain in put values

    hi frnd,
    i want to retain my selection screen after giving some errror message
    means for example  there are lotof select options r there but after entering all end executing
    at 1 select option the in put value is wrong then it will  give error message ,upto this iam ok but after that when we click on ok on error message my selection screen is blank all the parameters entered r cleared
    i want to retain them
    can any one help in this
    thanks
    vk

    If SO is your select option you have to include your code in the section AT SELECTION SCREEN ON ...
    Try this.
    INITIALIZATION.
    AT SELECTION ON SO.
    >put your code for check here.
    >at the end your value must not be erased.
    START OF SELECTION.
    Edited by: julien schneerberger on Mar 8, 2010 3:29 PM

  • Match code in report selection screen does not show any values for 0FISCPER

    Hi Experts,
    I have problem with selection screen in several reports. When I use match code for fiscal period selection I get only # as a possible value. I have checked the master data they seem to be correct. I work with 7.0 BW system. Can you please give me any hint what I should check?
    Thank you,
    Michal

    Hi,
    maybe I ask different way - how do you add characteristic values for a characteristic in the BEx? Is it automated somehow in SAP (e.g. from master data)? For the fiscal period I use custommer exit to fill in the default value, which is the current fiscal period. But this is something different, right?
    <removed by moderator>
    Michal
    Edited by: Arun Varadarajan on Nov 14, 2008 3:55 PM

  • Selection Screen Variant (optionally default) -I dont think it's possible!?

    I have spent a lot of time looking at this issue - researching forums/sap help/on the system  - so any help appreciated...
    On the selection screen (for tx me59n) is it actually possible for users to set a variant as default on the selection screen?  It's actually that I want "Test Run" to be defaulted.
    This is the ideal scenario:
    - The selection criteria variant is created centrally (or even individually by the user)
    - The user can then optionally set this variant as their default selection criteria for the transaction
    - Next time the user runs the transaction, the defualt variant is used
    What I do not want is:
    - User having to select the variant each time they run the transaction
    - The variant always being default (it should only be default when user decides they want it as such)
    Any ideas?  I can't see that it's possible....?
    thanks in advance,
    Matt

    I've been trying SHD0 alot, but doesnt seem to work - again, i've spent time reading and trying it out but with no luck.
    This is how I'm doing it to try to default "Test Run" checkbox for ME59n
    - Run transaction SHD0
    - Input "ZDefault" into Transaction Variant field
    - Click create
    - ME59n loads
    - I tick "Test Run" (which is what I want defaulting for the transaction)
    - Click save
    - It prompts me to create screen variant
    - I input ZTEST_VARIANT and click save
    - I get a pop-up box which I enter ZTEST_VARIANT to name field but dont make any other changes
    - Get message saying ZTEST_VARIANT saved
    - Click back to Transaction Variant screen
    - Save it as a local object
    - Get message saying "Trans Variant and Screen Variant Saved"
    - Click back to initial SHD0 screen
    - Click TEST to try it out.
    - ME59n loads, but "Test Run" is not checked - the variant appears not to have been loaded at all.
    I run ME59n independently and still nothing seems to get loaded when I run the transaction. Although the new screen variant is availbale in the variant list, which if I select it it works perfectly.  But I want make it default??? How do I do it?
    Any ideas what i'm missing?
    Usually I can figure these things out pretty quickly, but this one has me stumped!
    thanks
    Matt

  • Selection Screen - From ...on Value Request  To ... Output (PBO) ?

    Hallo,
    I have the following problem:
    I want to jump after a SelectionScreen On Value-Request Block to the SelectionScreen Output Block. But Abap doesn´t go there afterwards.
    My "trigger" for the value Request is a normal edit field, so unfortunately I can´t give a User-Command with it.
    My intended action is: If I get new information in the value request part, I´d like to set a checkbox initial (remove the check). I can implement this code in the value request block, but it doesn´t work. It only works in the Output Block.
    Does somebody have an idea?
    TIA and Regards

    Hi
    The event AT SELECTION-SCREEN ON VALUE_REQUEST can update the field managed by the event, if you need to update other field in according to the selected value u need to use the fm DYNP_VALUES_UPDATE:
    parameters: p_1,
                p_2.
    at selection-screen on value-request for p_1.
      DATA: DYNAME LIKE  D020S-PROG,
            DYNUMB LIKE  D020S-DNUM,
            DYNPFIELDS TYPE TABLE OF DYNPREAD WITH HEADER LINE.
      DYNAME = sy-repid.
      DYNUMB = sy-dynnr.
      DYNPFIELDS-FIELDNAME  = 'P_2'.
      DYNPFIELDS-FIELDVALUE = 'X'.
      APPEND DYNPFIELDS.
      CALL FUNCTION 'DYNP_VALUES_UPDATE'
        EXPORTING
          DYNAME     = DYNAME
          DYNUMB     = DYNUMB
        TABLES
          DYNPFIELDS = DYNPFIELDS.
    Max

  • Selection Screens with optional selections

    How do you deal with selection screens that have optional selections?  I guess my question is do you have a select statement for each possible combinations or is there a way to dynamically create the select statements depending on the user's choices on the selection screen.
    Regards,
    Davis.

    Hi,
    We create select satement dynamically.
    Please review RPLICO10 report for more on dynamic selections, it is one of the best and easiest report o go through.
    Regards,
    Amit
    Reward all helpful replies.

  • Using AD connector to populate multi-valued attributes  to OIM

    Could anybody share the expirience of provisioning multi-valued attributes from AD to OIM 11.1.15?
    What is the best approach?
    Thanks.

    mc2,
    you can use http://docs.oracle.com/cd/E23104_01/download_readme_ps4/download_readme_ps4.htm#BABDABDA and http://docs.oracle.com/cd/E21764_01/install.1111/e12002/install.htm#CIHGAEFI as a staring point. This gives you pointers to all software needed and steps to follow.
    Kevin was referring in fact to BP1 11.1.1.5.1, Patch# [12748351|https://updates.oracle.com/download/12748351.html] , not PS1. PS1 is in fact 11.1.1.5.
    Florin

  • Attaching a search help to a selection screen "Select-options"

    Hello ABAPers,
    I have  a requirement to attach a search help to "select-options" .
    When I checked the table corresponding to the field of select-options,I found that there is no search help assigned for that field.
    I have tried using AT Selection-screenON VALUE-REQUEST and Matchcode Object .
    However, Matchcode Object requests for standard search help name.
    On value-request assign shelp only for the lower linit,but on pressing F4, gives no values found.
    Tried using  the FM F4IF_INT_TABLE_VALUE_REQUEST also. But this is for the POV event.
    Could anyone please suggest a solution for this problem?

    Hi,
       As you are using this Z search help in select options there is no way of interfering with standard SAP table.
    You can declare it as:
    Select-options QNAME for TQRFCOUT-QNAME matchcode object <Z search help name>.

  • Selection screen: SELECT SPREADSHEET

    Helle experts,
    I would like to download a report. The popup, which appears "SELECT SPREADSHEET" have been marke with "ALWAYS USE THIS FORMAT". Now this pop-up do not appear. But I need it for the following down-loads.
    Do somsbody knows how I can reset this mark?
    Thanks for a quick answer.
    Black

    Hi,
    When you are in the ALV output, right-click mouse on the report and select 'Speadsheet...'. Afterwards, the pop-up will be back again (unless you set default once more).
    Regards,
    Eli

  • How to default date values in Selection Screen

    Hi everyone,
    I would like to display the 1st day of the previous month into the I_GSTRP-LOW field and the last day of the current month into the I_GSTRP-HIGH field.
    For example, this in the 5th month of the year (May), therefore, in the selection screen it should appear like this:
    Basic Date: <u>01.04.2006</u>    to   <u>31.05.2006</u>
    How do i do it?
    *& SELECTION-SCREEN                                                    *
    SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS:
      I_AUFNR FOR AFIH-AUFNR,                           "ORDER NUMBER
      I_GSTRP FOR AFKO-GSTRP,                           "BASIC DATE
      I_BUDAT FOR AUFM-BUDAT,                           "POSTING DATE
      I_IWERK FOR AFIH-IWERK DEFAULT '6010' OBLIGATORY, "PLANNING PLANT
      I_ARBPL FOR CRHD-ARBPL,                           "WORK CENTER
      I_ERNAM FOR AUFK-ERNAM,                           "CREATED BY
      I_MATNR FOR RESB-MATNR,                           "MATERIAL
      I_KTEXT FOR AUFK-KTEXT.                           "EQUIPMENT
    SELECTION-SCREEN END OF BLOCK 1.

    Here is the code to populate default values,as per your requirement.
    data : V_date type sy-datum,
           v_month(2) type c,
           v_low_value(8) type c,
           v_high_value(8) type c,
           v_month1(2) type n,
            V_NO_OF_DAYS type T009B-BUTAG,
           v_curr_month type T009B-BUMON,
           v_curr_year  type T009B-BDATJ.
           select-options : i_gstrp for sy-datum.
    initialization.      
    v_date = sy-datum.
    v_month1 = v_date+4(2) - 1.
    write v_month1 to v_month.
    concatenate v_date+0(4)
    v_month
    '01'
    into v_low_value.
    I_GSTRP-LOW = v_low_value.
    v_curr_month = sy-datum+4(2).
    v_curr_year  = sy-datum+0(4).
    CALL FUNCTION 'NUMBER_OF_DAYS_PER_MONTH_GET'
      EXPORTING
        par_month       = v_curr_month
        par_year        = v_curr_year
    IMPORTING
       PAR_DAYS        = V_NO_OF_DAYS
    concatenate sy-datum+0(6)
    V_NO_OF_DAYS
    into v_high_value.
    I_GSTRP-HIGH = v_high_value.
    I_GSTRP-sign = 'I'.
    I_GSTRP-OPTION = 'EQ'.
    APPEND I_GSTRP.
    regards
    srikanth

Maybe you are looking for

  • Incoming and Outgoing servers for Hotmail

    Hi, I have an N93 and seems to be working well with WLAN and almost everything else. I have been able to configure my ISP's (Verizon) POP3 email servers and it works fine. I have been unable to figure out what the url for my Hotmail email service sho

  • Can't repair disk after upgrade to 10.7.4

    After upgrade to 10.7.4 my MacBook Pro booting properly. But If I try check of disk by disk utility, then this finished by error message (disk need repair). When I boot to repair partion and use disk utility, everything looks OK. But when I booting b

  • HT204017 Email issues after the latest update

    I updated to the latest yosemite update yesterday and it caused email issues.  I can receive emails but when I create and send emails, they just sit in my outbox.  Any ideas or suggestions?  Is there a way to revert back to the previous version of yo

  • Intercompany Billing - pricing procedure

    Hi, Can somebody please explain to me what is the exact pricing procedure in intercompany billing, where would IV condition type fit in and what sort of pricing procedure to use. If somebody can send screenshots of the steps, it would be of immense h

  • Copying keystroke settings from one Logic to another?

    Hi gang, I'm on the road working in an unfamiliar studio.  I have my laptop Logic close by, with Logic 8.02 installed.  They've installed Logic 9.1.4 on their system.  I've set my Logic up the way I want it, keystrokes and all.  If I wanted to duplic