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

Similar Messages

  • 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 values

    Hi,
    I created a selection screen with 2 fields.
    SELECTION-SCREEN begin of block selscr1 with frame title text-s01.
    example-
    PARAMETERS: p_ptr type BU_PARTNER,
                             p_typ type BU_TYPE.    
    SELECTION-SCREEN begin of block selscr2 with frame title text-s02
    My  question is -
    when user selects BP value  (like example 1000000005 - then i want to display corresponding values in bp type field(p_typ) ( i don’t want to display all the values, i want to scrutinize the values and then display.)
    can any one tell me how i can do this?
    Thanks.
    Sandhya.

    hi,
    use at selection-screen output.
    change the second field acording to u'r requirment.
    The assignments to input fields in the event block AT SELECTION-SCREEN OUTPUT always affect the selection screen and overwrite the user inputs from previous displays of the same selection screen. .
    regards,
    chandu
    Edited by: CHANDRASEKHAR KONDAPANENI on Mar 26, 2008 11:47 PM

  • To transfer Selection Screen field value from a program to another Program

    Hello,
    Program Z_ABC having Select Option Field XYZ.
    I need to transfer all the values entered on Selection Option Field XYZ  to another Program Dialog Z_DIALOG.

    Hi,
    Try to use the function module 'RS_REFRESH_FROM_SELECTOPTIONS'.
    For ex:
    CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
           EXPORTING
                curr_report     = sy-repid
           TABLES
                selection_table = it_soptions
           EXCEPTIONS
                not_found       = 1
                no_report       = 2
                OTHERS          = 3.
      IF sy-subrc <> 0.
        EXIT.
      ENDIF.
    SUBMIT riaufk20 WITH dy_selm = 'D'
                      WITH SELECTION-TABLE it_soptions
                      AND RETURN.
    Hope it solves your issue.
    Regards,
    Chenthamarai.

  • How to schedule the background job using current selection screen field val

    Hello Friends,
    How to schedule the background job using current selection screen field values.
    after completion of the job the spool should be sent as a mail to SAP Inbox.
    Is there any way to create the variant dynamically by reading the current selection screen values.
    Thanks,
    Ravi

    Hi,
    To get the variant details you can use teh following FM.
    'RS_VARIANT_CONTENTS'.
    Regards,
    Ankur Parab

  • How can we read the screen field values from the report selection screen wi

    Hi expart,
    How can we read the screen field values from the report selection screen with out having an ENTER button pressed  .
    Regards
    Razz

    use this code...
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_posnr.
    **Read the Values of the SCREEN FIELDs
    CALL FUNCTION 'DYNP_VALUES_READ'

  • 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

  • How to populate f4 values to standard pnp selection screen fields

    Hi Experts,
    my question is how to populate f4 values to standard pnp selection screen field. i am using LDB PNP for a report , it displays several fields with f4 values, i need to remove all the stadard f4 values and want to place my  f4 values in the selection screen

    Hi Venkat,
    To put ur own values in the F4 help of any field...all u have to do is.
    1st fetch all the records that u need to display in F4 help list...in one internal table.
    and then use the function module  'F4IF_INT_TABLE_VALUE_REQUEST'
    call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
    retfield =
    value_org =
    tables
    value_tab =
    return_tab =
    exceptions
    parameter_error = 1
    no_values_found = 2
    others = 3.
    where retfield is the field for which u need to give the F4 help.
    and valu_tab is the internal table in which u have the list of records to be displayed.
    this would do the work...
    I dont have the system in front of me...as soon as i have...will try to send a piece of code, to make ur work easy.
    Till then hope this helps u...all the best
    Regards,
    Radhika

  • How to get values of selection screen fields in the POV event

    I have two radio buttons r1,r2 and a field file_name on  selection screen.
    I have written At selection screen on value-request for the field file_name. Based on the selection of radio buttons I have to display different screens when f4 for field_name is pressed.
    Unfortunately the values of r1 or r2 are not populated in the AT selection screen on value-request event.
    Can any one tell me if there is a way to obtain the values of r1 or r2 in the AT selection  screen on value-request event.

    Hi..
    Try out this.
    REPORT  ZH_TEST4                                .
    CONSTANTS : c_x                TYPE char01 VALUE 'X',
                c_rg1(4)        TYPE c      VALUE 'RG1',
                c_gr2(3)        TYPE c      VALUE 'GR2',
                c_gr3(3)        TYPE c      VALUE 'GR3',
                c_zero          TYPE n      VALUE '0',
                c_neg(2)        TYPE c      VALUE '-1'.
    data: w_sscrfields_ucomm1   TYPE sscrfields-ucomm.
    SELECTION-SCREEN : BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    PARAMETERS       : p_back   RADIOBUTTON GROUP rg1
                                     USER-COMMAND pc,
                       p_fore   RADIOBUTTON GROUP rg1
                                          DEFAULT 'X'.
    SELECTION-SCREEN : END OF BLOCK blk1.
    SELECTION-SCREEN : BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
    PARAMETERS : p_phif LIKE rlgrap-filename  MODIF ID gr2,
                 p_ahif LIKE rlgrap-filename  MODIF ID gr3.
    SELECTION-SCREEN : END OF BLOCK blk2.
    AT SELECTION-SCREEN OUTPUT.
      IF p_fore EQ c_x.
        w_sscrfields_ucomm1 = c_rg1.
      ELSE.
        w_sscrfields_ucomm1 = space.
      ENDIF.
      LOOP AT SCREEN.
        IF w_sscrfields_ucomm1 EQ space.
          IF screen-group1 = c_gr2.
            screen-active = c_zero.
          ENDIF.
        ELSE.
          IF screen-group1 = c_gr3.
            screen-active = c_zero.
          ENDIF.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    also try out function module POPUP_WITH_TABLE_DISPLAY.
    Plz reward points if this helps by clicking on star!1
    Good Luck!!
    Cheers,
    Rajeev

  • Selection screen fields in which values have been entered

    Hi All,
    Is there any standard function module which enables us to determine which fields on the selection screen have values entered for them. In other words, I wish to determine which selection screen fields are no longer initial.
    Thanks and Regards,
    Vidya.

    Hi,
    Why cant you simply use in this way?
    if sel_screen_field1[] is not initial.  "for selet-options
    endif.
    if sel_screen_field1 is not initial.  "for parameters
    endif.
    is it not suitable for your case?
    //Kothand

  • Default value for selection screen field

    Hi all,
      I am using LDB PNPCE. I want to give default value for field Personnel area on selection screen.
    How can I do it?
    Thanks
    Rahul

    Hi Rahul,
    In the INITIALIZATION event we can set the default values for selection screen fields.
    INITIALIZATION.
    loop at screen.
    if screen-name = 'S_MATNR-LOW'.
    CLEAR S_MATNR.
    s_matnr-low = '1234'.
    s_matnr-option = 'EQ'.
    s_matnr-sign = 'I'.
    append s_matnr.
    CLEAR S_MATNR.
    s_matnr-high = '5678'.
    s_matnr-option = 'EQ'.
    s_matnr-sign = 'I'.
    append s_matnr
    clear s_matnr.
    endif.
    endloop.
    Hope it helps.
    Mark if useful
    Regards,
    Saumya

  • Pop up to select a value onto selection-screen field

    Hi folks
    I have a custom field on the SELECTION-SCREEN. Now how can I get my desired values on F4 function key click display n get the selected value in the field. 
    IN A CLASSICAL n ALV scenarioes.
    Can u plz Gimme a sample code on that.
    Thanks in advance.
    Regards,
    Ram

    Hi Ram,
    Refer to the code below.
    Suppose you have a field called priority on  the screen for which u need F4 help.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_priok-low.
    SELECT priok
            INTO TABLE i_priok
            FROM t356_t
            WHERE artpr EQ c_cr.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
      DDIC_STRUCTURE         = ' '
          retfield               = 'PRIOK'
      PVALKEY                = ' '
          dynpprog               = sy-cprog
          dynpnr                 = sy-dynnr
          dynprofield            = 'S_PRIOK-LOW'
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
       value_org              = 'S'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
        TABLES
          value_tab              = i_priok
      FIELD_TAB              =
      RETURN_TAB             =
      DYNPFLD_MAPPING        =
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 2
      OTHERS                 = 3
    Regards,
    Pankaj Sharma

  • Regarding Search help on selection-screen field

    Hi there,
    I am working on custom tables.
    I have a requirement to maintain search pattern on a selection-screen field.
    selection-screen parameter: p_name which is company name filed from Z table.
    By giving a string like Holl* and by  pressing F4 on the field p_name it has to popup a dialogbox having list of company names starting with Holl.
    Thanks in advance.
    -Tulasi

    Hi
    Go through the link given below :
    How to create a search help for my own fields in selection screen
    F4 search help on report selection screen
    also try :
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    DDIC_STRUCTURE = ' '
    RETFIELD = 'VKORG'
    PVALKEY = ' '
    DYNPPROG = SY-REPID
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'P_VKORG'
    STEPL = 0
    WINDOW_TITLE =
    VALUE = ' '
    VALUE_ORG = 'C'
    TABLES
    VALUE_TAB = T_TABLE1
    FIELD_TAB = field_tab
    RETURN_TAB = RET_TAB
    DYNPFLD_MAPPING = DYN_TAB
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3
    With Regards
    Nikunj shah

  • Selection screen field problem

    Hello experts..
    i have a selection screen , in that i have a field   s_bwart for mseg-bwart.
    some times the user will input the data in the field and sometimes he wont. we have fixed movement types combination like
    11-21 , 13-24 , 13-56 , 101-543 , 101-544 etc.
    if the user did not input any thing in the selection screen , i am populating s_bwart in at-selection screen event with all the mvt types. after executing the report when user presses the back button to come to the selection screen, there the s_bwart field is containing all the mvt types in single values ie in the select options screen. So the user dont want that, if he comes back nothing should be there in the selection screen field s_bwart if he has not inputted anything. if he inputs only 11 mvt type then when he comes back after executing the report he should see only 11 in the select screen field ie s_bwart. Please send the replies on how to solve the problem.

    hi,
    in ur program try to display values for users in START-OF-SELECTION event as it triggers after the selection screen displayed for users. if user doesn't give any input then display default values in this event. and also create a variable
    for ex:
    data: ws_flag type c,
             p_value type i.
    after u display default values for users in selection screen assign the flag as ' X '
    ws_flag = 'X'.
    before leaving ur program based on flag try to do like this.
    if ws_flag = ' X '.
        clear s_data. // s_data is the select options for u.
    else.
         s_data = p_value. // the value which user gave in selection screen as i/p.
    endif.
    if helpful reward some points.
    with regards,
    Suresh Aluri.

  • F4 Help for the selection screen field

    Hi Gurus,
    I have to display F4 help for a selection screen field. i am using following code:
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
             EXPORTING
                  retfield        = 'CODE'
                  dynpprog        = lw_repid
                  dynpnr          = sy-dynnr
                  VALUE_ORG       = 'S'
             TABLES
                  value_tab       = gi_text
                 field_tab       = li_fields_tab
                  return_tab      = pi_return_tab
             EXCEPTIONS
                  parameter_error = 1
                  no_values_found = 2
                  OTHERS          = 3.
    My internal table gi_emp has two fields CODE & TEXT. When i select 1 particular value, it returns the CODE value in the pi_return_tab table.
    But my requirement is i have to capture the corresponding TEXT value for the Returned CODE. Ex: following is the F4 help being displayed: -
    001    test
    001    test1
    but is i select code 001(First Value), i also need to capture it's corresponding Text value. In return table pi_return_tab i have only Code value.
    Please help me out.
    Note: Based on return code i can't search into the internal table gi_code, because as shown in the example, code has multiple text.

    Sachin,
    I think this is what you need. The following code will return the key and the text (OR any other columns), if both columns are in the selection screen the selected values (both columns) will also be passed to the corresponding parameters. If you only need the text to be in the return table and not passed to the selection screen then set the parameter for text with NO-DISPLAY option.
    REPORT zktest01 .
    DATA :
      BEGIN OF value_tab OCCURS 0,
        field  LIKE e070-trkorr,
        text   LIKE e07t-as4text,
      END OF value_tab.
    DATA: t_fldtab LIKE dfies OCCURS 0 WITH HEADER LINE,
          t_rettab LIKE ddshretval OCCURS 0 WITH HEADER LINE,
          t_dynmap LIKE dselc OCCURS 0 WITH HEADER LINE.
    PARAMETERS : p_field  LIKE value_tab-field,
                 p_text   LIKE value_tab-text. "NO-DISPLAY.
    INITIALIZATION.
      t_fldtab-tabname   = 'VALUE_TAB'.
      t_fldtab-fieldname = 'FIELD'.
      t_fldtab-langu     = 'E'.
      t_fldtab-position  = 1.
      t_fldtab-offset    = 0.
      t_fldtab-fieldtext = 'Key'.
      t_fldtab-reptext   = 'Key'.
      t_fldtab-leng      = 20.
      t_fldtab-intlen    = 20.
      t_fldtab-outputlen = 20.
      t_fldtab-datatype  = 'CHAR'.
      t_fldtab-inttype   = 'C'.
      t_fldtab-headlen   = 20.
      t_fldtab-keyflag   = 'X'.
      t_fldtab-lowercase = ' '.
      APPEND t_fldtab.
      t_fldtab-tabname   = 'VALUE_TAB'.
      t_fldtab-fieldname = 'TEXT'.
      t_fldtab-position  = 2.
      t_fldtab-offset    = 20.
      t_fldtab-fieldtext = 'Text'.
      t_fldtab-reptext   = 'Text'.
      t_fldtab-leng      = 60.
      t_fldtab-intlen    = 60.
      t_fldtab-outputlen = 60.
      t_fldtab-headlen   = 60.
      t_fldtab-keyflag   = ' '.
      t_fldtab-lowercase = ' '.
      APPEND t_fldtab.
      value_tab-field = '101'.
      value_tab-text = 'dddd'.
      APPEND value_tab.
      value_tab-field = '202'.
      value_tab-text = 'aaaa'.
      APPEND value_tab.
      t_dynmap-fldname = 'FIELD'.
      t_dynmap-dyfldname = 'P_FIELD'.
      APPEND t_dynmap.
      t_dynmap-fldname = 'TEXT'.
      t_dynmap-dyfldname = 'P_TEXT'.
      APPEND t_dynmap.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_field.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'FIELD'
                dynpprog        = 'ZKTEST01'
                dynpnr          = '1000'
                dynprofield     = 'P_FIELD'
                value_org       = 'S'
           TABLES
                field_tab       = t_fldtab
                value_tab       = value_tab
                return_tab      = t_rettab
                dynpfld_mapping = t_dynmap
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc EQ 0.
      ENDIF.
    START-OF-SELECTION.
    Jeffrey Satriadi

Maybe you are looking for

  • BADI for PRODUCT tab in CRM_MKTPL

    Hi, we have to control the entered products and maybe delete after this check in Product tab in transaction <b>CRM_MKTPL</b> - trade promotion. I need a BADI when the products are entered in this tab. I find the badi definitions like <b>PRODUCT_ID_R3

  • What is the value of the 'Name' attribute of an Instance of Resource Type IPv6 Adress?

    See subject. I'm writing a Powershell script which is supposed to return the configured hostname and IP Address for a service associated with a role on a failover cluster. I'm using, e.g.. the following to retrieve the IPv4 Address: $a1 = Get-Cluster

  • How to stop the gray wheel from spinning after logging out

    how to stop the gray wheel from spinning after logging out?

  • IE8 compatibility mode error?

    Greetings, I built this page a few weeks back: http://www.brightwork.com/overview and recently I've been told there's a bug where all the text on the first page wont display. It merely appears as Undefined. From other errors I've weeded out I know th

  • SQL Loader - Also posted in Database-General forum

    Hi All, I am using Oracle 9i and am new to it. I created a new user and I am not very sure if I assigned all the priveleges and roles correctly. Problem is that I cannot log into SQL Plus and neither can I use SQL Loader. Am working in Windows XP env