Selection screen list values initiating problem

Hi All,
I have designed a selection screen with list and initiating that list in initialization event. When i run the report through se38 the list is populated with values. But if i run the report through T-CODE the list is not populated with values.
why?
Thanx in advance

Hello,
My understanding says that initialization event is triggered before selection screen gets generated.
So, i would suggest you write the code in At selection screen Output.
I have came across same problem and this thing worked in my case.
Regards,
Jacky.

Similar Messages

  • Selection screen list box with run time values

    Hi,
    I have to create a selection screen list box with with values at run time.
    This is actually for a maintanence view.
    Please help.
    Thanks
    Vimalraj

    Have a search in SDN and elsewhere for the function module 'VRM_SET_VALUES'... for example there's one at:
    Re: Listbox with Function code in Table control
    wherein the 2nd listbox contents are driven from the option selected in the first listbox.
    Jonathan

  • Problem in at selection-screen on value request

    hi friends ,
          i want to display f4 help for a field in a popup. this i can do, but this popup comes based on values
    i entered in other screen fields . but these values are not updated to screen values when i trigger f4.

    Hi,
    DATA: T_DYNPRO TYPE TABLE OF DYNPREAD,
          WA_DYNPRO LIKE LINE OF T_DYNPRO,
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PARAM.
    WA_DYNPRO-FIELDNAME = 'Screen Field Name'.
    APPEND WA_DYNPRO TO T_DYNPRO.
    CALL FUNCTION 'DYNP_VALUES_READ'
      EXPORTING
        DYNAME                               = SY-REPID
        DYNUMB                               = SY-DYNNR
       TRANSLATE_TO_UPPER                   = 'X'
      TABLES
        DYNPFIELDS                           = T_DYNPRO
    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 <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    READ TABLE T_DYNPRO INTO WA_DYNPRO WITH KEY FIELDNAME = 'Screen Field Name'.
    TEMP = WA_DYNPRO-FIELDVALUE.
    " Select the values based on Temp and populate your internal table for F4 help using the Screen value Temp
    "Call 'F4IF_INT_TABLE_VALUE_REQUEST' and display the pop up.

  • Problem using At Selection Screen on value request for *"Select Fieldname"*

    Hi All,
    I Have a requirement of passing mutiple paraters value or selection option values in selection screen.
    For Eg :I Have -
    *--- Selection Screen
        Select-options :  s1  for vbak-vbeln ,
                                              s2  for vbap-posnr.
    *--- At Selection Screen     
        At Selection Screen on value request for s1-low.
         i need to pass S1-low as well as S2-low ...
         i.e first item of the Sales Document.
        Value is getting passed in S1-low but not in S2-low
        Can anybody help me on this ...
       Thanks in Advance ..

    Hi,
    Make use of the FM "F4IF_INT_TABLE_VALUE_REQUEST" for the value request for the first field.
    Use the "FIELD_MAPPING" in the tables parameter of the above FM.
    Please go through the FM documentation.
    Hope this will help you.
    Regards,
    Smart Varghese

  • At selection-screen on value-request

    Hi experts,
    Pls see the below code.
    When ever plant is enterd in screen i have to get material no. and material group based on that plant dynamically.
    I am getting F4 list of values for the first one.But For the second one i am not getting.
    What may be teh problem?
    *& Report  ZRA_SELECTIONSCTREEN                                        *
    REPORT  ZRA_SELECTIONSCTREEN                    .
    tables: mara,marc.
    parameters: p_werks like marc-werks,
                p_matnr like marC-matnr,
                p_matkl like mara-matkl.
    data: begin of it_matnr occurs 0,
          matnr like mara-matnr,
          end of it_matnr.
    data: begin of it_matkl occurs 0,
          matkl like mara-matkl,
          end of it_matkl.
    at selection-screen on value-request for p_matnr.
    select matnr into table it_matnr from marc where werks = p_werks.
    if not it_matnr[] is initial.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
      DDIC_STRUCTURE         = ' '
        RETFIELD               = 'MATNR'
      PVALKEY                = ' '
       DYNPPROG               = SY-CPROG
       DYNPNR                 = SY-DYNNR
       DYNPROFIELD            = 'p_matnr'
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
       VALUE_ORG              = 'S'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
      TABLES
        VALUE_TAB              = it_matnr
      FIELD_TAB              =
      RETURN_TAB             =
      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.
    ENDIF.
    select matkl from mara into table it_matkl for all entries IN it_matnr
    WHERE MATNR = IT_MATNR-MATNR.
    if not it_matkl[] is INITIAL.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
      DDIC_STRUCTURE         = ' '
        RETFIELD               = 'MATKL'
      PVALKEY                = ' '
       DYNPPROG               = SY-CPROG
       DYNPNR                 = SY-DYNNR
       DYNPROFIELD            = 'p_matkl'
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
       VALUE_ORG              = 'S'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
      TABLES
        VALUE_TAB              = IT_MATKL
      FIELD_TAB              =
      RETURN_TAB             =
      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.
    ENDIF.
    Regards
    Ravi.

    hi
    good
    i tried your report, f4 help is coming for all the fields but dynamic field selection is ot coming because ther eis a prob with your select statment,
    you select the data from the database table for the another two fields as the value you r entering for werks(plant).
    thanks
    mrutyun^

  • AT SELECTION-SCREEN ON VALUE-REQUEST FOR

    Experts,
    I have two selection parameters on Selection_Screen as subscreen, as below:
    Custom Selection Screen 1010
    selection-screen begin of screen 1010 as subscreen.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
    SELECT-OPTIONS :
         s_matnr FOR mara-matnr  MODIF ID sc1,     "Material
         s_grid FOR mara-J_3APGNR MODIF ID sc6,    "Grid values   "pkb001
    SELECTION-SCREEN END OF BLOCK b2.
    selection-screen end of screen 1010.
    Now i want to populate  s_grid (Grid value) based on the values enterd for s_matnr  (material ).
    but when i want use:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_grid,  
    I'm not getting the values eneterd in s_matnr..
    is the problem beacuse of subcreen?
    Answers are highly appriciated.
    Thanks.

    Yes that is correct, Once I hit enter key, then only the value for s_matnr populates, but it is not a good Idea to expect the user to hit the enter key. is there any way i can imitate/simulate "enter" key in the program?
    also I'm using the FM:'DYNP_VALUES_READ'  but that is also not getting me any value..
    below is the code I'm using,
    FORM sub_get_grid .
      Refresh: t_mara.
      data: lin type i.
      data: l_dyname type standard table of dynpread,
      w_dynpread type dynpread.
      clear w_dynpread.
      w_dynpread-fieldname = 'S_MATNR'.
      append w_dynpread to l_dyname.
      clear w_dynpread.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname     = sy-repid
          dynumb     = sy-dynnr
        TABLES
          dynpfields = l_dyname.
    *Do not allow to select more than 1 material at a time.
      SELECT
        MARA~MATNR
        INTO TABLE t_mara
        FROM MARA
        WHERE MARA~MATNR IN s_matnr.
      describe table t_mara LINES lin.
      If lin > 1.
        Refresh: s_matnr.
        MESSAGE i000 WITH text-033.
        LEAVE LIST-PROCESSING.
    *    LEAVE TO SCREEN 100.
      endif.
    ENDFORM.   

  • Selection screen field value capturing

    Hi,
    I have developed a report for displaying amendment changes in a purchse order. The input are purchase order
    and plant. Now they have asked for an additional input of version field, which should also have F4 field-value help.
    For version field, default there is no F4 key. So, i have written code like after entering the PO number when we press the enter key, for the corresponding PO, it brings the version no in input field. But my problem is it is displaying the values for version field, but when i select some value it is not getting updated in selection-screen version field. I have attached my code below... please help me
    in the below code my problem is only between
    AT SELECTION-SCREEN on value-request for P_REVNO.
    and
    start-of-selection event...
    TABLES : ekko,
    ekpo,
    cdhdr,
    cdpos,
    MEPO1325,
    t001,
    t166c,
    t166t,
    adrc,
    komp, " net rate of header
    konv, " net value of purchase order
    zammendpodet.
    TYPES : BEGIN OF ts_cdpos,
    ebeln TYPE ekbe-ebeln,
    ebelp TYPE ekbe-ebelp,
    matnr type ekpo-matnr,
    maktx type makt-maktx,
    prdat type ekpo-prdat,
    belnr TYPE ekbe-belnr,
    budat TYPE ekbe-budat,
    tkey(70),
    txz01 TYPE ekpo-txz01,
    ctxnr TYPE t166c-ctxnr,
    desp(20) type C,
    MEINS LIKE MARA-MEINS,
    chtxt TYPE t166t-chtxt.
    INCLUDE STRUCTURE cdpos.
    TYPES : END OF ts_cdpos.
    data : begin of it_makt occurs 0,
    matnr like makt-matnr,
    maktx like makt-maktx,
    end of it_makt.
    data : begin of it_maRA occurs 0,
    matnr like maRA-matnr,
    mEINS like maRA-mEINS,
    end of it_maRA.
    *Internal table declartion
    DATA : it_erev TYPE TABLE OF erev WITH HEADER LINE,
    it_ekko1 type table of ekko with header line,
    it_konv2 type table of konv with header line,
    it_ekpo TYPE TABLE OF ekpo WITH HEADER LINE,
    it_ekpo1 TYPE TABLE OF ekpo WITH HEADER LINE,
    it_cdhdr TYPE TABLE OF cdhdr WITH HEADER LINE,
    it_t166c TYPE TABLE OF t166c WITH HEADER LINE,
    it_ekbe TYPE TABLE OF ekbe WITH HEADER LINE,
    IT_AMMEND TYPE TABLE OF ZAMMENDPODET WITH HEADER LINE,
    IT_AMMEND1 TYPE TABLE OF ZAMMENDPODET WITH HEADER LINE,
    it_komp TYPE TABLE OF KOMP WITH HEADER LINE,
    it_konv type table of konv with header line,
    it_konv1 type table of konv with header line,
    it_cdpos TYPE TABLE OF ts_cdpos WITH HEADER LINE.
    data : BEGIN OF it_erev1 occurs 0,
    revno TYPE erev-revno.
    data : end of it_erev1.
    data : begin of it_cdpos1 occurs 0.
    include structure cdpos.
    data : ebeln like ekko-ebeln,
    item like ekpo-ebelp,
    aedat like ekpo-aedat,
    matnr like ekpo-matnr,
    txz01 like ekpo-txz01,
    desp(20) type C,
    MEINS LIKE MARA-MEINS,
    item1 like ekpo-netpr.
    data : end of it_cdpos1.
    types : dy_temp TYPE lips-lgort.
    DATA : dyfields LIKE dynpread OCCURS 1 WITH HEADER LINE, dy_value TYPE dy_temp.
    DATA: progname TYPE sy-repid,
    dynnum TYPE sy-dynnr,
    dynpro_values TYPE TABLE OF dynpread,
    field_value LIKE LINE OF dynpro_values.
    *Work variable declaration
    DATA : v_revno TYPE erev-revno,
    revno1 type zammendpodet-revno,
    w_version TYPE erev-revno,
    w_erdat TYPE erev-erdat,
    w_eruhr TYPE erev-eruhr,
    wv_eruhr TYPE erev-eruhr,
    v_tabkey TYPE cdpos-tabkey,
    v_temp(5),
    v_olddate(8),
    v_newdate(8),
    v_value_old TYPE cdpos-value_old,
    V_OLD TYPE EKPO-BRTWR, " OLD VALUE FOR PURCHASE ORDER
    l_ind TYPE i,
    temp value 0 type i,
    temp1 type i,
    temp2 type i,
    temp3 type i,
    wa_cdpos like line of it_cdpos,
    wa_cdpos1 like line of it_cdpos1,
    v_tabkey1 TYPE cdpos-tabkey.
    PARAMETERS : p_ebeln TYPE ekko-ebeln,
    p_ebelp TYPE ekpo-ebelp.
    p_bukrs TYPE t001-bukrs,
    p_revno type erev-revno.
    INITIALIZATION.
    AT SELECTION-SCREEN on value-request for P_REVNO.
    CLEAR: dyfields[], dyfields.
    dyfields-fieldname = 'P_REVNO'.
    APPEND dyfields.
    CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
    dyname = sy-cprog
    dynumb = sy-dynnr
    TABLES
    dynpfields = dyfields.
    READ TABLE dyfields INDEX 1.
    SELECT revno
    FROM erev
    INTO TABLE it_erev1 WHERE edokn = p_ebeln.
    IF sy-subrc = 0.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    retfield = 'REVNO'
    dynpprog = progname
    dynpnr = dynnum
    dynprofield = 'P_REVNO'
    value_org = 'S'
    TABLES
    value_tab = it_eREV1
    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.
    ENDIF.
    START-OF-SELECTION.
    SELECT SINGLE *
    FROM t001
    WHERE bukrs EQ p_bukrs.
    IF sy-subrc EQ 0.
    SELECT SINGLE *
    FROM adrc
    WHERE addrnumber EQ t001-adrnr.
    ENDIF.
    SELECT SINGLE *
    FROM ekko
    WHERE ebeln
    EQ p_ebeln
    AND frgke = 2.
    select * from konv into corresponding fields of table it_konv where knumv eq ekko-knumv.
    useful informations will be rewarded.
    thanks and regards,
    subbu.,

    Hi ,
           Use this function module
        call function 'DYNP_VALUES_UPDATE'
          exporting
            dyname               = sy-repid
            dynumb               = sy-dynnr
          tables
            dynpfields           = t_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.
    where t_dynpfields would contain name of field and value you want to update.
    Please reward if useful.

  • Selection screen field value

    Hi All,
    I am facing a problem with selection screen parameter.
    I have one file parameter p_fname TYPE rlgrap-filename OBLIGATORY.When I enter some file path and excute I will get the result and once again when I start to execute the program I expect the previous value(file path) should be available for this file parameter that has entered on the selection screen but I am not getting that.
    I dont find any parameter id for this field data element.
    Please let me know how to do this?
    Best Regards
    Ramesh

    Hi,
    You should have..
    DATA: FLNAME TYPE STRING.
    PARAMETERS: FILENAME TYPE RLGRAP-FILENAME.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILENAME.
      CALL FUNCTION 'F4_FILENAME'
       IMPORTING
         FILE_NAME           = FILENAME.
    Find the demo code below, it uses the file :
    report ZDS_BDC_MM01_2
           no standard page heading line-size 255.
    *include bdcrecx1.
    *parameters: dataset(132) lower case.
    ***    DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
    *   If it is nessesary to change the data section use the rules:
    *   1.) Each definition of a field exists of two lines
    *   2.) The first line shows exactly the comment
    *       '* data element: ' followed with the data element
    *       which describes the field.
    *       If you don't have a data element use the
    *       comment without a data element name
    *   3.) The second line shows the fieldname of the
    *       structure, the fieldname must consist of
    *       a fieldname and optional the character '_' and
    *       three numbers and the field length in brackets
    *   4.) Each field must be type C.
    *** Generated data section with specific formatting - DO NOT CHANGE  ***
    data: begin of record OCCURS 0,
    * data element: MATNR
            MATNR_001(018),
    * data element: MBRSH
            MBRSH_002(001),
    * data element: MTART
            MTART_003(004),
    * data element: XFELD
            KZSEL_01_004(001),
    * data element: MAKTX
            MAKTX_005(040),
    * data element: MEINS
            MEINS_006(003),
    * data element: MTPOS_MARA
            MTPOS_MARA_007(004),
          end of record.
    DATA: FLNAME TYPE STRING.
    *** End generated data section ***
    DATA:   BDCDATA LIKE BDCDATA    OCCURS 0 WITH HEADER LINE.
    *** MESSAGE******
    DATA: BEGIN OF MESSTAB OCCURS 0.
            INCLUDE STRUCTURE BDCMSGCOLL.
            DATA: MATNR TYPE MARA-MATNR,
          END OF MESSTAB.
    ****END OF MESSAGE****
    PARAMETERS: FILENAME TYPE RLGRAP-FILENAME.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILENAME.
      CALL FUNCTION 'F4_FILENAME'
       IMPORTING
         FILE_NAME           = FILENAME.
    start-of-selection.
    *perform open_dataset using dataset.
    perform open_group.
    FLNAME = FILENAME.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = FLNAME
        FILETYPE                      = 'DAT'
    *   HAS_FIELD_SEPARATOR           = ' '
    *   HEADER_LENGTH                 = 0
    *   READ_BY_LINE                  = 'X'
    *   DAT_MODE                      = ' '
    *   CODEPAGE                      = ' '
    *   IGNORE_CERR                   = ABAP_TRUE
    *   REPLACEMENT                   = '#'
    *   CHECK_BOM                     = ' '
    *   VIRUS_SCAN_PROFILE            =
    *   NO_AUTH_CHECK                 = ' '
    * IMPORTING
    *   FILELENGTH                    =
    *   HEADER                        =
      TABLES
        DATA_TAB                      = record
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT record.
      DATA:
        CNT TYPE I.
        CNT = CNT + 1.
        REFRESH BDCDATA.
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-MTART'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RMMG1-MATNR'
                                  record-MATNR_001.
    perform bdc_field       using 'RMMG1-MBRSH'
                                  record-MBRSH_002.
    perform bdc_field       using 'RMMG1-MTART'
                                  record-MTART_003.
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                  record-KZSEL_01_004.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-MAKTX_005.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-MEINS'.
    perform bdc_field       using 'MARA-MEINS'
                                  record-MEINS_006.
    perform bdc_field       using 'MARA-MTPOS_MARA'
                                  record-MTPOS_MARA_007.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    *perform bdc_transaction using 'MM01'.
    CALL TRANSACTION 'MM01' USING BDCDATA
                            MODE 'N'
                            UPDATE 'A'
                            MESSAGES INTO MESSTAB.
    READ TABLE MESSTAB INTO MESSTAB INDEX CNT.
       IF MESSTAB-MSGTYP = 'E'.
         MESSTAB-MATNR = RECORD-MATNR_001.
         MODIFY MESSTAB INDEX CNT FROM MESSTAB. " TRANSPORTING MATNR.
       ENDIF.
    ENDLOOP.
    FORM OPEN_GROUP.
      CALL FUNCTION 'BDC_OPEN_GROUP'
             EXPORTING  CLIENT   = SY-MANDT
                        GROUP    = 'MM01'
                        USER     = SY-UNAME
                        KEEP     = 'X'.
    ENDFORM.
    FORM BDC_INSERT.
      CALL FUNCTION 'BDC_INSERT'
       EXPORTING
         TCODE                  = 'MM01'
    *     POST_LOCAL             = NOVBLOCAL
    *     PRINTING               = NOPRINT
    *     SIMUBATCH              = ' '
    *     CTUPARAMS              = ' '
        TABLES
          DYNPROTAB              = BDCDATA
       EXCEPTIONS
         INTERNAL_ERROR         = 1
         NOT_OPEN               = 2
         QUEUE_ERROR            = 3
         TCODE_INVALID          = 4
         PRINTING_INVALID       = 5
         POSTING_INVALID        = 6
         OTHERS                 = 7
      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.
    END-OF-SELECTION.
    LOOP AT MESSTAB.
        IF MESSTAB-MSGTYP = 'E'.
          WRITE:/ 'ERROR OCCURED ON MATNR = ',MESSTAB-MATNR , 'MESSAGE : MATNR ALREADY EXISTS IN MARA!!!'.
        ENDIF.
      ENDLOOP.
    perform close_group.
    *perform close_dataset using dataset.
    *&      Form  close_group
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM close_group .
    CALL FUNCTION 'BDC_CLOSE_GROUP'
    EXCEPTIONS
       NOT_OPEN          = 1
       QUEUE_ERROR       = 2
       OTHERS            = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    " close_group
    *&      Form  bdc_dynpro
    *       text
    *      -->P_0270   text
    *      -->P_0271   text
    FORM bdc_dynpro  USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.                    " bdc_dynpro
    *&      Form  bdc_field
    *       text
    *      -->P_0275   text
    *      -->P_0276   text
    FORM bdc_field  USING  FNAM FVAL.
      IF FVAL <> ' '.
        CLEAR BDCDATA.
        BDCDATA-FNAM = FNAM.
        BDCDATA-FVAL = FVAL.
        APPEND BDCDATA.
      ENDIF.
    ENDFORM.                    " bdc_field
    HTH
    Regards,
    Dhruv Shah

  • AT SELECTION-SCREEN ON VALUE-REQUEST FOR D

    I have four Select options A,B,C,D
    For A value is entered
    For B value is entered
    For C value is entered
    For D , i need to create a custom search help.i will develop that in the event
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR D.while generating the search help here
    i need to access the values that  are entered in A,B,C.
    Plz any help ?

    Hi,
    You can use the Function module 'F4IF_INT_TABLE_VALUE_REQUEST'  to display your custom values in search help. Refer the below sample code on how to use this function module.
    REPORT ZTAB_SHELP.
    parameters: p_ebeln type ekko-ebeln.
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko,
          it_return type STANDARD TABLE OF DDSHRETVAL,
          wa_return like line of it_return.
    *at selection-screen
    at selection-screen on value-request for p_ebeln.
    select *
      up to 10 rows
      from ekko
      into CORRESPONDING FIELDS OF TABLE it_ekko.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
      DDIC_STRUCTURE         = 'EKKO'
        RETFIELD               = 'EBELN'
      PVALKEY                = ' '
       DYNPPROG               = sy-repid
       DYNPNR                 = sy-dynnr
      DYNPROFIELD            = 'EBELN'
      STEPL                  = 0
        WINDOW_TITLE           = 'Ekko Records'
      VALUE                  = ' '
        VALUE_ORG              = 'S'
       MULTIPLE_CHOICE        = 'X'  "allows you select multiple entries from the popup
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             = ld_ret
      TABLES
        VALUE_TAB              = it_ekko
       FIELD_TAB              = lt_field
        RETURN_TAB             = it_return
      DYNPFLD_MAPPING        =
    EXCEPTIONS
       PARAMETER_ERROR        = 1
       NO_VALUES_FOUND        = 2
       OTHERS                 = 3.
    READ TABLE it_return into wa_return index 1.
    p_ebeln = wa_return-fieldval.
    Regards,
    Murali
    Edited by: murali krishnan Rajendran on Jan 27, 2011 8:03 AM

  • AT SELECTION-SCREEN ON VALUE-REQUEST FOR not input value in input field

    Dear All,
    I make search help for field ARBPL in selection screen are not excepted selected value.
    Code is
    SELECT-OPTIONS:  p_arbpl FOR zdmde-arbpl MODIF ID two.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_arbpl-low.
    REFRESH sh_arbpl.
    SELECT * from crhd into CORRESPONDING FIELDS OF TABLE sh_arbpl.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
         RETFIELD               = 'P_ARBPL'
         DYNPROFIELD            = 'P_ARBPL'
         VALUE_ORG              = 'S'
       TABLES
         VALUE_TAB              = sh_arbpl.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_arbpl-high.
    REFRESH sh_arbpl.
    SELECT * from crhd into CORRESPONDING FIELDS OF TABLE sh_arbpl.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
         RETFIELD               = 'P_ARBPL'
         DYNPROFIELD            = 'P_ARBPL'
         VALUE_ORG              = 'S'
       TABLES
         VALUE_TAB              = sh_arbpl.
    Please tell how to input selected field from search help into input field in both low and high.
    Would appreciate your reply .
    Regards,
    Pooja

    Hi Pooja,
    For getting the response back from the user selection , please get the return code too. Before that instead of directly using the table crhd structure.. please do create a type declaration of that table , make sure that the field that you wanted to get using search help be specified at last of declaration type like this
    TYPES: BEGIN OF ty,
       OBJTY TYPE CR_OBJTY,
            ARBPL TYPE ARBPL,
    END OF ty.
    this is because the return parameter t_rtn will holds the last value of type which been selected by user.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD               = 'P_ARBPL'
          DYNPROFIELD            = 'P_ARBPL'
          VALUE_ORG              = 'S'
        TABLES
          VALUE_TAB              = sh_arbpl
          return_tab             = t_rtn.
    LOOP AT  t_rtn INTO x_rtn .
       ENDLOOP.
    try executing this code.
    TABLES crhd.
    TYPES: BEGIN OF ty,
       OBJTY TYPE CR_OBJTY,
            ARBPL TYPE ARBPL,
       END OF ty.
    DATA: sh_arbpl TYPE TABLE OF ty.
           DATA: dynpfields TYPE TABLE OF DYNPREAD,
    x_dynpfields TYPE dynpread,
    t_rtn TYPE STANDARD TABLE OF DDSHRETVAL ,
    x_rtn TYPE  DDSHRETVAL.
    SELECT-OPTIONS:  p_arbpl FOR crhd-ARBPL MODIF ID two.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_arbpl-low.
    REFRESH sh_arbpl.
    SELECT  * from crhd into CORRESPONDING FIELDS OF TABLE sh_arbpl WHERE werks eq '1000'.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD               = 'P_ARBPL'
          DYNPROFIELD            = 'P_ARBPL'
          VALUE_ORG              = 'S'
        TABLES
          VALUE_TAB              = sh_arbpl
          return_tab             = t_rtn.
    LOOP AT  t_rtn INTO x_rtn .
       ENDLOOP.
    x_dynpfields-fieldname = 'P_ARBPL-LOW' .
       x_dynpfields-fieldvalue = x_rtn-fieldval.
       APPEND x_dynpfields TO dynpfields.
       CALL FUNCTION 'DYNP_VALUES_UPDATE'
         EXPORTING
           dyname                     = sy-cprog
           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
    *     UNDEFIND_ERROR             = 7
    *     OTHERS                     = 8
    Regards,
    Sivaganesh

  • AT SELECTION-SCREEN ON VALUE-REQUEST needed

    hi,
    i want code for atselection-screen for one parameter.
    pls check the code i am sending.i am not understanding that if any one knows pls explain me.and it is correct or not.
    parameters: P_LDCTY(2).
    DATA: BEGIN OF IHELP_FIELDS OCCURS 20.
            INCLUDE STRUCTURE HELP_VALUE.
    DATA: END OF IHELP_FIELDS.
    DATA: BEGIN OF HELPTAB OCCURS 100,
           FELD(50),
    END OF HELPTAB.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_LDCTY matchcode object ZSDOTC_VOYAGE.
    REFRESH IHELP_FIELDS.
      MOVE 'VBAK'  TO IHELP_FIELDS-TABNAME.
      MOVE 'ZZLOADCTY1' TO IHELP_FIELDS-FIELDNAME.
      MOVE 'X'     TO IHELP_FIELDS-SELECTFLAG.
      APPEND IHELP_FIELDS.
       REFRESH HELPTAB.
      SELECT *
             FROM ZPORT
             ORDER BY ZZCNTRY INTO IHELP_FIELDS.
        MOVE ZPORT-ZZCNTRY TO HELPTAB.
        APPEND HELPTAB.
        ENDSELECT.
      CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
        EXPORTING
          DISPLAY                   = ' '
          FIELDNAME                 = 'ZZCNTRY'
          TABNAME                   = 'ZPORT'
        IMPORTING
          SELECT_VALUE              = SELECTED_VALUE
        TABLES
          FIELDS                    = IHELP_FIELDS
          VALUETAB                  = HELPTAB
        EXCEPTIONS
          FIELD_NOT_IN_DDIC         = 01
          MORE_THEN_ONE_SELECTFIELD = 02
          NO_SELECTFIELD            = 03.
      IF SELECTED_VALUE <> SPACE.
        P_LDCTY = SELECTED_VALUE.
      ENDIF.
    pls help mein this issue.
    points will be awarded for right answer,
    thanks and regards
    suneetha

    Hi suneetha,
    1. we have to juse like this.
    2. a) use FM F4IF_INT_TABLE_VALUE_REQUEST
       b) syntax is : AT SELECTION-SCREEN ON VALUE-REQUEST FOR MYFIELD.
    3. just copy paste in new program.
    4.
    Hi prakash,
    1. sample code (just copy paste)
    2.
    REPORT ABC.
    DATA : BEGIN OF ITAB OCCURS 0,
    UNAME LIKE USR01-BNAME,
    END OF ITAB.
    data : RETURN_TAB LIKE DDSHRETVAL occurs 0 .
    data : RETURN_wa LIKE DDSHRETVAL .
    PARAMETERS : A(12) TYPE C.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR A.
    ITAB-UNAME = 'U01'. APPEND ITAB.
    ITAB-UNAME = 'U02'. APPEND ITAB.
    ITAB-UNAME = 'U03'. APPEND ITAB.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    DDIC_STRUCTURE = ' '
    retfield = 'ITAB-UNAME'
    PVALKEY = ' '
    DYNPPROG = SY-REPID
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'A'
    STEPL = 0
    WINDOW_TITLE =
    VALUE = ' '
    VALUE_ORG = 'S'
    MULTIPLE_CHOICE = ' '
    DISPLAY = ' '
    CALLBACK_PROGRAM = ' '
    CALLBACK_FORM = ' '
    MARK_TAB =
    IMPORTING
    USER_RESET =
    tables
    value_tab = ITAB
    FIELD_TAB = FTAB
    RETURN_TAB = return_tab
    DYNPFLD_MAPPING =
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3
    break-point.
    regards,
    amit m.

  • AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_locat.

    Experts,
    In BW, does anybody have some simple code for when on your selection-screen you have an input parameter for the location of the file you want to upload. In SAP/R3 there use to be "Perform get_local_path" to drill down thru your hard drive to find the file you want to select to upload. I am not sure what to use in BW to execute a drill down process for getting the file in a drop down window.
                 Thank-You!

    Are you trying to browse the local PC or the appliation server. 
    Implement the program above,  give it a try.  When you hit F4, you will get a file open dialog,  selection your file, then click open, this will fill the pathfile into your parameter on the selection screen.  IS this whay you are looking for?
    You don't need to provide anything, but you can if you want.  There are import parameters.
    report zrich_0001.
    data: ifile type filetable.
    data: xfile like line of ifile.
    data: return type i.
    parameters: p_file type localfile.
    at selection-screen on value-request for p_file.
      call method cl_gui_frontend_services=>file_open_dialog
      EXPORTING
    <b>     WINDOW_TITLE            = 'Please choose a file'
    *     DEFAULT_EXTENSION       =
         DEFAULT_FILENAME        = 'Test.xml'
    *    FILE_FILTER             =
         INITIAL_DIRECTORY       = 'C:'
    *    MULTISELECTION          =</b>
        changing
          file_table              = ifile
          rc                      = return.
      read table ifile into xfile index 1.
      p_file = xfile-filename.
    Regards,
    Rich Heilman

  • AT SELECTION-SCREEN ON VALUE-REQUEST  - what has the user entered so far?

    Hi,
    the online help says to
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_xyz.
    With the events for the field and input help, no data is transported between the selection screen and the ABAP program
    p_xyz is indeed empty at this event, but is there really no way to find out what the user had entered so far?

    Did you try a call to FM DYNP_VALUES_READ (Check at [Input Help in Dialog Modules|http://help.sap.com/SAPhelp_nw70/helpdata/en/9f/dbaac935c111d1829f0000e829fbfe/frameset.htm])
    Regards,
    Raymond

  • Add a New Field to Selection Screen of VL10 Transactions problem

    Hello,
    i have tried to add a selection field in the VL10G. I have used the docu from Gaurav Jagya (Thanks to Gaurav) an followed the steps. Here you can find the docu: Link: [http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e07c282f-e2b4-2c10-e4b3-a314fc17b6a1]
    In the Step 2 , Point 4 i declare the Select option ST_MTART and use it later in Step 5  in the form USEREXIT_SELECT_OPTIONS_TRANSF.
    Step 2.
    4. Write the declaration of new select-option inside include ZV50RSEL_MTART.
    DATA: V_MTART TYPE MARA-MTART.
    SELECT-OPTIONS: ST_MTART for V_MTART.
    Step 5. Transfer values from selection screen to range.
    For this step, again an access key is required to modify include V50R_USEREXIT_TRANSF.
    1. Open include V50R_USEREXIT_TRANSF in change mode. It will ask for an access key. Enter the same and proceed.
    2. Write following line of code inside form USEREXIT_SELECT_OPTIONS_TRANSF:
    CX_SELECT_OPTIONS-MTART = ST_MTART[].
    When i start the VL10G it works fine, but when i start another VL10* transaction i get a dump. Example VL10:
    Runtime Errors         SYNTAX_ERROR
    Date and Time          20.04.2010 13:54:00
    Short text
         Syntax error in program "RVV50R10C ".
    What happened?
         Error in the ABAP Application Program
         The current ABAP program "SAPLV50R_PRE" had to be terminated because it has
         come across a statement that unfortunately cannot be executed.
         The following syntax error occurred in program "RVV50R10C " in include
          "V50R_USEREXIT_TRANSF " in
         line 18:
         "field "ST_MTART unknown. .."
    It dumped, because the form V50R_USEREXIT_TRANSF is used in EVERY VL10* transaction and the select-option is declared ONLY in my Z-include.
    Is the someone out there, who has solved the problem? Is the an error in the docu or am i wrong?
    Thanks!
    Andreas

    Has there been any further information on this issue in this or any other threads. I am encountering the same issue as identified by Andreas.
    Thanks,
    Brian

  • Selection screen - two values optional mandatory

    Hello,
    is there a way to make two data fields obligatory in a selection-screen that the user only has to enter either one OR the other value, meaning at least one of these two data fields have to be entered?
    Thanks
    Anne

    Hi anne,
    As you want the message as a pop-up,use type 'I' message
    Try this code;-
    PARAMETERS:
    p_1(20) TYPE c,
    p_2(20) TYPE c.
    AT SELECTION-SCREEN.
    IF p_1 IS INITIAL AND p_2 IS INITIAL.
    CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
      EXPORTING
    *   TITEL              = ' '
        textline1          = 'Enter data'.
    *   TEXTLINE2          = ' '
    *   START_COLUMN       = 25
    *   START_ROW          = 6ENDIF.
    endif.
    -Bhumika

Maybe you are looking for

  • Can anyone suggest a select case statement in place of my if statements?

    I am having a little trouble switching my if statements to select case. Any help would be appreciated Option Strict On Option Explicit On Public Class Form1 Private Player1 As String Private Player2 As String Private Player1Wins As Integer = 1 Privat

  • ITunes cannot open files in the "MP3 Audio File" format

    Lately I've been getting this error that iTunes can't open MP3 files. It happens when I try to double click on an MP3, however, if I click and drag the MP3 into my iTunes library it opens fine. Not a huge problem....just a nuisance. Running iTunes 10

  • Export import problem

    Please see the attached log file from my running of a test import this morning. There were over one million 'unrecognized statement in the export file' error messages by the time I killed my test import were like IMP-00051: Direct path exported dump

  • Four finger swiping between spaces doesn't work in Mountain Lion

    I have my magic trackpad settings to include 3 finger dragging which means that activating Mission Control, or swiping between full screen apps and spaces requires 4 fingers.  I have a MBP running Mountain Lion and it works fine, but on a MBA connect

  • Why Photoshop is slow when using tools like brush or clone stamp?

    I'm on a Dell XPS laptop, Win 8.1, Core 7i, 16 Gb RAM, SSD. Working on a 1 Gb 16 bit file that has aroudnd 20 layers. When i'm using any painting or retouching tools, it takes a long until my brush stroke actually appear on the image instead seeing i