WD application-selection screen - Parameter passing error

Hi,
In my WD application selection screen I am using a parameter(COSP-VERSN)
When i read this using read context i am getting an error saying "Could not find attribute KOKRS"
In context I have created a node with COSP-VERSN. My Kokrs will be contstant everytime.
For getting my version I need to pass KOKRS values.How can overcome this issue?
Here is the read context for versn which I have created in context Create-> NODE Option
DATA lo_nd_pversn TYPE REF TO if_wd_context_node.
      DATA lo_el_pversn TYPE REF TO if_wd_context_element.
      DATA ls_pversn TYPE wd_this->element_pversn.
*     navigate from <CONTEXT> to <PVERSN> via lead selection
      lo_nd_pversn = wd_context->get_child_node( name = wd_this->wdctx_pversn ).
*     get element via lead selection
      lo_el_pversn = lo_nd_pversn->get_element(  ).
*     get all declared attributes
      lo_el_pversn->get_static_attributes(
        IMPORTING
          static_attributes = ls_pversn ).
Rgds
Vara

Resolved myself by creating a custom Dropdownbykey.
Rgds
vara

Similar Messages

  • Calling another  report by passing selection screen parameter

    Hi,
    I have created a report "ZREPA" with selection screen parameter say, "creator".
    Nw, i hv to call that report "ZREPA" from another report say "ZREPB" by passing an value to the selection screen field "creator".
    Can anyone tell me how to resolve this??
    Thanks,
    Aaru.

    Hi,
    You can call one selection screen from other selection screen program using SUBMIT command.
    The syntax is as follows -
    codeSUBMIT... VIA SELECTION-SCREEN
    USING SELECTION-SET <var>
    WITH <sel> <criterion>
    WITH FREE SELECTIONS <freesel>
    WITH SELECTION-TABLE <rspar>.[/code]
    e.g.
    The following executable program (report) creates a selection screen containing the parameter PARAMET and the selection criterion SELECTO:
    codeREPORT demo_program_submit_rep1.
    DATA number TYPE i.
    PARAMETERS paramet(14) TYPE c.
    SELECT-OPTIONS selecto FOR number.[/code]
    The program DEMO_PROGRAM_SUBMIT_REP1 is called by the following program using various parameters:
    REPORT demo_program_submit_sel_screen NO STANDARD PAGE HEADING.
    DATA: int TYPE i,
    rspar TYPE TABLE OF rsparams,
    wa_rspar LIKE LINE OF rspar.
    RANGES seltab FOR int.
    WRITE: 'Select a Selection!',
    SKIP.
    FORMAT HOTSPOT COLOR 5 INVERSE ON.
    WRITE: 'Selection 1',
    / 'Selection 2'.
    AT LINE-SELECTION.
    CASE sy-lilli.
    WHEN 4.
    seltab-sign = 'I'. seltab-option = 'BT'.
    seltab-low = 1. seltab-high = 5.
    APPEND seltab.
    SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
    WITH paramet eq 'Selection 1'
    WITH selecto IN seltab
    WITH selecto ne 3
    AND RETURN.
    WHEN 5.
    wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
    wa_rspar-sign = 'E'. wa_rspar-option = 'BT'.
    wa_rspar-low = 14. wa_rspar-high = 17.
    APPEND wa_rspar TO rspar.
    wa_rspar-selname = 'PARAMET'. wa_rspar-kind = 'P'.
    wa_rspar-low = 'Selection 2'.
    APPEND wa_rspar TO rspar.
    wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
    wa_rspar-sign = 'I'. wa_rspar-option = 'GT'.
    wa_rspar-low = 10.
    APPEND wa_rspar TO rspar.
    SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
    WITH SELECTION-TABLE rspar
    AND RETURN.
    ENDCASE.
    => To leave a called program, you can use SUBMIT .... AND RETURN. by choosing F3 or F15 from list level 0 of the called report.
    Regards,
    Omkaram.

  • How do I add a selection screen parameter to get a application server file

    Hi All..
    Can you please suggest how can we add a selection screen parameter to get a application server file ?
    Thanx in Advance...
    Regards,
    Deepak

    <b>Parameter def :</b>
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 02(30) text-005 FOR FIELD p_xlfil.
    PARAMETERS: p_xlfil LIKE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    <b>Browse</b>
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_xlfil.
      PERFORM ws_get_filename USING p_xlfil.
    FORM ws_get_filename USING p_xlfil.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                def_path         = 'C:'
                mask             = ',Excel,*.xls,All,*.*.'(100)
                mode             = 'O'
                title            = 'Title'(101)
           IMPORTING
                filename         = p_xlfil
           EXCEPTIONS
                inv_winsys       = 1
                no_batch         = 2
                selection_cancel = 3
                selection_error  = 4
                OTHERS           = 5.
      IF sy-subrc NE 0.
        CLEAR p_xlfil.
      ENDIF.
    ENDFORM. " WS_GET_FILENAME
    Regards
    <b>Oops i did not read "application server"</b>
    Use FM F4_FILENAME_SERVER and not F4_FILENAME/WS_GET_FILENAME.
    Message was edited by:
            Raymond Giuseppi

  • F4 help for a selection screen parameter with filename created dynamically

    Hi All,
              I have a requirement where in an F4 help should be present for a selection screen parameter. After selecting the filepath and clicking OK button on the Dialog, the filename should be dynamically get created in the selection screen parameter field. For example:
    if the path is D:\DOCS then at the end of DOCS the filename should automatically get populated.
    Like below string:
    D:\DOCS\new.txt
    Is there any function module or method which does this kind of activity.
    Thanks in advance,
    Deepak

    this code will help:
    FORM get_filename  CHANGING p_filename.
      DATA      : lv_filename  TYPE string,
                  lv_rc TYPE i,
                  li_filetable TYPE filetable.
      CONSTANTS : lc_fname TYPE string VALUE 'ZRPP4000.XLS',
                  lc_fpath TYPE string VALUE 'C:\',
                  lc_extn TYPE string VALUE 'XLS'.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          default_filename        = lc_fname
          initial_directory       = lc_fpath
          default_extension       = lc_extn
        CHANGING
          file_table              = li_filetable
          rc                      = lv_rc
        EXCEPTIONS
          file_open_dialog_failed = 1
          cntl_error              = 2
          error_no_gui            = 3
          not_supported_by_gui    = 4
          OTHERS                  = 5.
    IF  sy-subrc = 0 .
        READ TABLE li_filetable INTO lv_filename INDEX 1.
        IF sy-subrc = 0.
          p_filename = lv_filename.
        ENDIF.
      ENDIF.
      REFRESH li_filetable.
      CLEAR:lv_filename.
    ENDFORM.                    "get_filename
    " p_filename is selection screen parameter

  • How to Remove the underline from the selection screen parameter

    How to remove the underline from a selection screen parameter ?

    >
    Anoop Menon wrote:
    > hi Avinash,
    >
    > I am not able to understand the use of the 'comment line properly.
    >
    > The last part of the statement which says modif id is confusing.
    >
    > Please clarify..... I am unable to activate my code when I put the selection screen commebnt statement.
    Use this and update it to your requierement !
    SELECTION-SCREEN begin of line.
    SELECTION-SCREEN COMMENT 1(30) comm.
    PARAMETERS test(1) type c.
      SELECTION-SCREEN end of line.
    INITIALIZATION.
      comm = 'test'.

  • Selection screen parameter

    hi friends,
    for the below given description i have to create selection screen parameter .
    can u suggest how to solve this.
    <b>#times excess qty
         Default value: If “control class-pseudo no.1”  = "NonCtrl” then value = 3 Else value = 2. User able to change the default value.</b>
    regards,
    siri.

    HI Raj,
    fromm the below PSEUDO CODE i have retrived ALNUM . but the values of this ALNUM  has to be moved to the parameter in selction screen. my doubt is how can i do this  one is in AT SELECTION SCREEN AND  ONE IN DATA SELECTION IS IN START-OF-SELECTION. 
    1.     “Control Class”: Write “Ctr Vault” if MAEX-ALNUM(export control class) = ("CNTROL2" or "CNTROL2N") and Write “Ctrl Cage” if MAEX-ALNUM = ("CNTROL3" or "CNTROL3N" or "CNTROL4" or "CNTROL5") else Write “NonCtrl” where MATNR=VBAP-MATNR and match with the user-specified input in selection criteria (see section 5).
    REGARDS,
    SIRI.

  • Selection screen parameter validation using search help/check table

    Hi experts,
    I have a select-option that is tied to a search help and check table (type tq80-qmart). Is there a way to automatically validate the field based on what comes up in the F4 search help? What I mean is, when the user hits F4 on the parameter, the list pops up with several records that the user can choose. When the program is executed, I want the program to show an error if the value is NOT in that F4 list.
    I know this can be done in AT SELECTION SCREEN event with a select, but I was wondering if there was a way ABAP does it automatically. Any help will be greatly appreciated.
    Thanks,
    Juan

    Hello Juan,
    SAP does have a standard way of allowing the the user to select from the list via LISTBOX.
    But list box is restricted to parameters only, you cannot attach list boxes to select-options.
    I think the best place to do this validation would be th AT SELECTION-SCREEN event & from your original post it seems you know what code to write

  • Selection Screen Disappearing on error

    Hi
    I am new to ABAP.
    Below is the driver program for Smartform,
    after:
    Step-1 Entering data at selection screen
    Step-2 Pressing Execution Button
    An error is displaying 'Document no. not found' but the problem is, as soon as the error appears, selection screen goes blank, its not staying.
    Please suggest correction.
    With warm regards.
    Yogesh.
    *& Report  Z_MM_GPASS
    REPORT  Z_MM_GPASS.
    tables: MSEG,ADRC,T001W,MAKT .
    data: FM_NAME TYPE RS38L_FNAM.
    *& Selection Screen
    Selection-screen: begin of block b1 with frame title t1.
    Parameter:   Docno   like      MSEG-MBLNR ,
                 YEAR    like      MSEG-MJAHR .
    selection-screen: end of block b1.
    *& Comment on selection screen
    At selection-screen output .
    t1 = 'Selection-Screen' .
    *& Data validation at selection screen
    At selection-screen .
    select single * from MSEG where MBLNR = docno and MJAHR = YEAR .
    if sy-subrc <> 0.
    message 'Document no. not found' type 'E'.
    endif.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME                 = 'Z_MM_PASS'
    *   VARIANT                  = ' '
    *   DIRECT_CALL              = ' '
    IMPORTING
       FM_NAME                  = FM_NAME
    EXCEPTIONS
       NO_FORM                  = 1
       NO_FUNCTION_MODULE       = 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.
    CALL FUNCTION FM_NAME
      EXPORTING
    *   ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
    *   CONTROL_PARAMETERS         =
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
    *   OUTPUT_OPTIONS             =
    *   USER_SETTINGS              = 'X'
        DOCNO                      = DOCNO
        YEAR                       = YEAR
    * IMPORTING
    *   DOCUMENT_OUTPUT_INFO       =
    *   JOB_OUTPUT_INFO            =
    *   JOB_OUTPUT_OPTIONS         =
    * EXCEPTIONS
    *   FORMATTING_ERROR           = 1
    *   INTERNAL_ERROR             = 2
    *   SEND_ERROR                 = 3
    *   USER_CANCELED              = 4
    *   OTHERS                     = 5
    IF SY-SUBRC <> 0.
    *MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Code Formattted by: Alvaro Tejada Galindo on Jan 7, 2009 2:30 PM

    *I have replaced
    if sy-subrc <> 0.
    message 'Document no. not found' type 'E'.
    endif.
    with
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    INTO mtext
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    write:/1 mtext.
    ENDIF.
    *Program sintactically correct.
    *but still I'm facing the same problem, for your kind knowledge I don't know what is return code
    Edited by: Yogesh Pathak on Jan 7, 2009 9:45 AM
    Messege posted more than one time due to "SERVER ERROR" while posting., sorry for inconvenience.
    Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 2:34 PM

  • Need to validate selection screen parameter valus

    Hi all,
    we have a requirement to validate parameter values ,
    parameter values should be less than or equal to 12 and should accept 2 decimals .
    how to declare parameter?
    eg: 11.34, 12.00
    regards
    sridhar

    should accept 2 decimals .
    PARAMETERS : p1 type p DECIMALS 2.
    this automatically comes with validation.
    and for less than 12, keep logic in at selection-screen event.
    both AT SELECTION-SCREEN. and AT SELECTION-SCREEN. on p1 works.
    AT SELECTION-SCREEN.
      IF p1 > 12.
        MESSAGE 'Provide values less than 12' type 'E'.
      ENDIF.
    and
    AT SELECTION-SCREEN ON p1.
      IF p1 > 12.
        MESSAGE 'Provide values less than 12' type 'E'.
      ENDIF.
    the difference between these tow is the later displays the error on that particular field (useful when you have multiple fields in selection screen)
    hope this helps.
    Somu
    Edited by: soumya prakash mishra on Jul 31, 2009 8:01 AM

  • Getting parameter id in the selection screen parameter

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

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

  • How to put a value in a selection screen parameter

    how do i forcefully put a value to a field in the selection screen.
    i mean during runtime.
    and it's a parameter not a selection-option.
    thanks

    Hi,
    Check this sample code.It can help you.Basically you need to use 'DYNP_VALUES_READ' in at selection-screen on value-request for s_posnr-low.
    tables : vbap.         " Sales Document: Item Data
                         Constant Declaration                                      *
    CONSTANTS:
      C_X TYPE C VALUE 'X'.     " Translate to Uppercase
                         Variable Declaration                                      *
    Variable for Table index
      data v_sytabix like sy-tabix.
    Variable for Program name
      data L_NAME LIKE SYST-REPID.
    Range for getting values form selection screen
    DATA: BEGIN OF range1 OCCURS 0,
             SIGN(1),
             OPTION(2),
             LOW  LIKE vbap-vbeln,
             high like vbap-vbeln,
          END OF range1.
    Internal table for Report output
      data: begin of i_vbap occurs 0,
              vbeln like vbap-vbeln,            " Sales Document
              posnr like vbap-posnr,            " Sales Document item
            end of i_vbap.
    Internal table for output to the F4 help
      data: begin of I_DISPLAY occurs 0,
              vbeln like vbap-vbeln,            " Sales Document
              posnr like vbap-posnr,            " Sales Document item
            end of I_DISPLAY.
    Internal table for return value form function module
      DATA: BEGIN OF I_RETURNVAL OCCURS 0.
              INCLUDE STRUCTURE DDSHRETVAL.     " Interface Structure Search
      DATA: END OF I_RETURNVAL.
    Internal table for F4 help field heading
      DATA: I_FIELDTAB LIKE DFIES OCCURS 0 WITH HEADER LINE.
    Internal table for getting screen values from selection screen
      data L_SCR_FIELDS LIKE DYNPREAD OCCURS 1 WITH HEADER LINE.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME title text-001.
      select-options:
            S_VBELN for vbap-vbeln no intervals,
            S_POSNR for vbap-posnr no intervals.
    SELECTION-SCREEN end OF BLOCK B1.
    at selection-screen on value-request for s_posnr-low.
      clear: L_SCR_FIELDS, I_FIELDTAB, i_display, I_RETURNVAL.
      refresh: L_SCR_FIELDS, I_FIELDTAB, i_display, I_RETURNVAL.
      L_NAME = SYST-REPID.
      MOVE 'S_VBELN-LOW' TO L_SCR_FIELDS-FIELDNAME.
      APPEND L_SCR_FIELDS.
    Call the Function module DYNP_VALUES_READ to get the values form
    selection screen
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          DYNAME                         = L_NAME
          DYNUMB                         = SYST-DYNNR
          TRANSLATE_TO_UPPER             = C_X         " X
        TABLES
          DYNPFIELDS                     = L_SCR_FIELDS
       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 eq 0.
        LOOP AT L_SCR_FIELDS.
          range1-sign = 'I'.
          range1-option = 'EQ'.
          range1-low = L_SCR_FIELDS-FIELDVALUE.
          range1-high = space.
          append range1.
        ENDLOOP.
      ENDIF.
    F4 help Field headings
      I_FIELDTAB-TABNAME = 'I_DISPLAY'.
      I_FIELDTAB-FIELDNAME = 'VBELN'.
      I_FIELDTAB-POSITION = '1'.
      I_FIELDTAB-OUTPUTLEN = '10'.
      I_FIELDTAB-INTTYPE = 'C'.
      I_FIELDTAB-INTLEN = '10'.
      APPEND I_FIELDTAB.
      I_FIELDTAB-FIELDNAME = 'POSNR'.
      I_FIELDTAB-POSITION = '2'.
      I_FIELDTAB-OFFSET = '10'.
      I_FIELDTAB-OUTPUTLEN = '6'.
      I_FIELDTAB-INTTYPE = 'N'.
      I_FIELDTAB-INTLEN = '6'.
      APPEND I_FIELDTAB.
    Retrieve sales document, Sales document item from table Sales
    Document: Item Data(VBAP).
    Primary keys used for selection: VBELN
      select vbeln posnr from vbap
                   into table i_display
                   where vbeln in range1.
    Call the function module F4IF_INT_TABLE_VALUE_REQUEST for F4 values
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD               = 'POSNR'
          WINDOW_TITLE           = 'Line Item'
          VALUE_ORG              = 'S'
          MULTIPLE_CHOICE        = C_X           " (for muliple selection)
        TABLES
          VALUE_TAB              = I_DISPLAY
          FIELD_TAB              = I_FIELDTAB
          RETURN_TAB             = I_RETURNVAL
        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.
      ELSE.
    Star for For single values
      READ TABLE I_RETURNVAL INDEX 1.
       S_POSNR-LOW = I_RETURNVAL-FIELDVAL.
    End for the single values
    Start For multiple selection
       loop at i_returnval.
         s_posnr-sign = 'I'.
         s_posnr-option = 'EQ'.
         s_posnr-low = I_RETURNVAL-FIELDVAL.
         append s_posnr.
       endloop.
       sort s_posnr.
       read table s_posnr index 1.
    End for multiple selection
      ENDIF.
                         Start-of-selection                                        *
    start-of-selection.
    Retrieve sales document, Sales document item from table Sales
    Document: Item Data(VBAP).
    Primary keys used for selection: VBELN
      select vbeln posnr from vbap
                        into table i_vbap
                        where vbeln in s_vbeln
                          and posnr in s_posnr.
    if the above selection is successful continue the process else exit *
    form the report
      if sy-subrc ne 0.
       message e002 with 'No data to display'.
      endif.
    end-of-selection.
      if not i_vbap[] is initial.
        loop at i_vbap.
          write:/ i_vbap-vbeln, i_vbap-posnr.
        endloop.
      endif.

  • To fill selection screen parameter with user's parameter id

    Hi,
    I need to display PLANT on the selection screen of a report as SELECT-OPTIONS.
    When launching the transaction for the report, the program must fill the PLANT by default with the user's own parameter id (WRK) .
    How can it be done?
    Regards
    Nishant

    HI nishant,
    in INITIALIZATION EVENT.
    1. first get the parameter id value
       in some variable of type plant.
       (eg p1)
    2. then (suppose the select option name is myplant)
      MYPLANT-SIGN = 'I'.
      MYPLANT-OPTION = 'EQ'.
      MYPLANT-LOW =  p1 . "<---- from above variable in point 1
    APPEND MYPLANT.
    regards,
    amit m.

  • Validation on selection screen parameter.

    I have select options in my selection screen.
    1) s_a
    2) s_b
    Requirement:-
    1) If I run the program and click the arrow on the "s_a" field, it should open multi selection screen. From that I can make multi entry or upload data from excel file.
    2) If "s_a" and "s_b" is empty it sud throw an error message.
    Can I do this validation in AT SELECTION-SCREEN n how?

    hi Abhijeet,
    u can do the first by just writing the sel-options as:
    S_A like table-field (say vbak-vbeln). then the multiple selection comes automatically.
    the second - u can do thru at selection-screen by just writing a if condition.
    if s_a-low is initial and s_a-high is initial.
    message e001.
    endif.
    Let me know if you still have any issue.
    /Praveen

  • Adding f4-help to selection screen parameter field

    Hi all.
    I need to add search help to a parameter field on selection screen:
    PARAMETERS:
                 p_reciv LIKE soos7-recnam.
    What is the easiest way?
    tia, regards

    You can give F4 help by two ways:
    1. Using internal table
    2. Refering db table field.
    Following are e.gs:
    F4 help – using internal table example:
    DATA: BEGIN OF LI_FABGRP OCCURS 0,
    FABGRP LIKE ZAPO_FABGRP-FABGRP,
    BEGDA LIKE ZAPO_FABGRP-BEGDA,
    END OF LI_FABGRP.
    DATA : T_RETURN TYPE STANDARD TABLE OF DDSHRETVAL WITH HEADER LINE,
    L_RETFIELD TYPE DFIES-FIELDNAME.
    parameters : S_FABGR like ZAPO_FABGRP-FABGRP.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_FABGR.
    SELECT FABGRP BEGDA FROM ZAPO_FABGRP INTO table LI_FABGRP.
    SORT LI_FABGRP BY FABGRP ASCENDING BEGDA DESCENDING.
    Henter de mulige fabriksgrupper med nyeste BEGDA *indenfor hver
    DELETE ADJACENT DUPLICATES FROM LI_FABGRP COMPARING FABGRP.
    L_RETFIELD = 'FABGRP'.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = L_RETFIELD
    DYNPPROG = SY-REPID
    DYNPNR = '1000'
    DYNPROFIELD = 'S_FABGR'
    VALUE_ORG = 'S'
    MULTIPLE_CHOICE = ' '
    TABLES
    VALUE_TAB = LI_FABGRP
    RETURN_TAB = T_RETURN
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3.
    F4 help – using field example:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_FABGR.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
      EXPORTING
        tabname                   = mara
        fieldname                 = matnr
      SEARCHHELP                = ' '
      SHLPPARAM                 = ' '
      DYNPPROG                  = ' '
      DYNPNR                    = ' '
      DYNPROFIELD               = ' '
      STEPL                     = 0
      VALUE                     = ' '
      MULTIPLE_CHOICE           = ' '
      DISPLAY                   = ' '
      SUPPRESS_RECORDLIST       = ' '
      CALLBACK_PROGRAM          = ' '
      CALLBACK_FORM             = ' '
      SELECTION_SCREEN          = ' '
    IMPORTING
      USER_RESET                =
    TABLES
      RETURN_TAB                =
    EXCEPTIONS
      FIELD_NOT_FOUND           = 1
      NO_HELP_FOR_FIELD         = 2
      INCONSISTENT_HELP         = 3
      NO_VALUES_FOUND           = 4
      OTHERS                    = 5
    Select-options: s_rcode FOR g_grund . "Reason code
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_rcode-low.
    Validation for Reasoncode
    PERFORM sub_get_F4_rcodehelp .
    FORM sub_get_f4_rcodehelp .
    STRUCTURES Declarations
    TYPES: BEGIN OF ty_rcode ,
    grund TYPE mb_grbew,
    grtxt TYPE grtxt,
    END OF ty_rcode.
    *Internal Table declaration
    DATA : li_rcode TYPE STANDARD TABLE OF ty_rcode WITH HEADER LINE.
    SELECT grund grtxt
    INTO TABLE li_rcode
    FROM t157e
    WHERE spras = sy-langu .
    *Help functions for external use
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    retfield = 'fieldname'
    dynpprog = 'programname
    dynpnr = '1000'
    dynprofield = 'S_PCODE'
    value_org = 'S'
    TABLES
    value_tab = li_rcode
    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.
    ENDFORM. " sub_get_F4_rcodehelp

  • Dynamic selection screen parameter

    Hello All,
    I am facing problem in dynamic parameter declaration in selection screen. My requirement is as below,
    Want to have 2 parameters in selection screen and based on first parameter (table fields) selected value, the second parameter (display the value of the selected table field) should display value of the selected field.
    The problem is the second paramter type should be of first parameter selected field.
    How to declare parameter dynamically after getting the first parameter selected field.
    Thanks in Advance.
    Regards,
    Suganya.

    hi
    You may use the Runtime Type Information(RTTI)/ RTTS to get the parameter type at runtime
    Process would be :
    > create a variable: l_var type ref to CL_ABAP_ELEMDESCR.
    >  l_var ?= cl_abap_typedescr=>describe_by_data(parameter).
    > loop at l_var->components into wa
    > process.
    > endloop
    shiva

Maybe you are looking for

  • Other alternatives to JMF to open AVI files

    The codecs I use for compressing AVI files are not supported by JMF. There me another simpler option like using an external player as all I need to be able to do is to open the avi file in the player and then makes calls to tell it to go to certain f

  • Best way to resise redo logfiles?!!

    Hi, I have Oracle 10g installed on AIX 5.2, and when I was checking average timing of logs switches; I found that a log switch is happening every 179 min.; which, as per Oracle, is too long interval for a log switch to occur (it should be between 20-

  • IPhoto images reverting spontaneously (edits lost)

    I'm not sure if I'm following protocol here. I started a discussion about "iPhoto Library Locked" and in attempting to solve the problem realized I have a different problem. I'm going to go ahead and post under the new heading in the hopes that it wi

  • Install Error: failed to register

    Flash 11.3 for ie9 on windows 7 64 bit won't install. I have tried subinacl with reset_fp11.bat,  hand registering the ocx files (regsevr32), made a new admin account and tried to register flash there.... also tried .exe and .msi installers... No joy

  • I have 182GB of hidden files in iPhotos how do I delete them permanently

    I have 182GB of hidden files in iPhotos how do I delete them permanently - Help I have searched in finder images and cannot find them there or in iPhotos - please help thanks