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.

Similar Messages

  • 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

  • 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

  • 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 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'.

  • 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

  • How to fill selection screen in background job

    Hi experts,
    I use FM BP_JOB_CREATE to create background job. This job is program with one parameter on selection screen - production order number.
    This job is created when production order is saved.
    How can I fill production order number on selection screen? Do I need to create variant for every production order number?
    Thanks&regards,
    Jirka

    To create variants you can use !
    RS_CREATE_VARIANT
    You can also use
    JOB_OPEN
    JOB_SUBMIT
    JOB_CLOSE.
    to create a job.
    Regards,
    Lalit Mohan Gupta.

  • Dropdown list in selection screen linking with Ztable

    Hi,
    In selection screen, i coded for parameter with dropdownlist with hardcoded values in the list. Client asking me link this list to Z table fields so that whenever they make entries in future just he need to create a variant for the new entries and program should work accordingly.

    Hi,
    Select the required entries from the Ztable and pass them to the function module VRM_SET_VALUES for populating the list box .
    However there is a restriction .
    The maximum  number of possible entries available (less than 40),If ,suppose large number of entries are there in Z table.
    Selection from the drop-down list box menu is hindered by a scroll bar (due to a large number of entries) .
    Also Sorting is not supported in drop-down list box menus, so the user is not offered ny help in managing huge number of values.
    I would better suggest to go for a select-options or parameters attached with F4 help.
    Regards,
    Lakshman

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

  • AT SELECTION-SCREEN and AT USER-COMMAND.

    Hi everyone,
    I am a newbie in ABAP programming please help me out on this problem.
    I need to display a screen dialog (Window) with search results immediately after I entered the search parameter in another dialog box after i clicked the 'execute' icon/button which is on the search screen dialog.
    Any code snippet(s) would be really appreciated, thank you.

    hi
    good
    check out this events
    AT SELECTION-SCREEN-ON FIELD.
    AT SELECTION-SCREEN-ON OUTPUT.
    AT SELECTION-SCREEN-ON HELP REQUEST( F1).
    AT SELECTION-SCREEN-ON VALUE REQUEST(F4).
    thanks
    mrutyun^

  • 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

  • Selection screen issue with hierarchy variable, due to compounding

    Hello people,
    I'm having this odd effect with a Hierarchy variable in the selection screen of a query,  the IObject is 0PROFIT_CTR.
    When I display the hierarchy values and pick up one of them, it returns ok to the sel.screen in this format: CO_AREA + "/" + ProfitCtr Value, example: "CANI/AR03".  (CO_AREA is compounding of 0PROFIT_CTR).
    Now,  if I hit the "check" button in the selection screen, the system converts the value to an different one, by repeating twice the compounding (CO Area) value, therefore creating an incorrect value like this: "CANI/CANIAR03". Note the string after the "/" is supposed to have only the profit center value, however now has also CO Area value (repeated).
    This value goes effectively to the query execution, but because this value does not exist, I get a message "SID value not found" and the effect is that the query does not get filtered by the value I picked up.
    Note, the same happens if I go directly to the query execution without hitting the check button, as it seems internally the system its doing the same conversion before sending the value to the query.
    I can't figure out if this is a problem of the variable, the hierarchy or the selection screen mechanism.... but I cannot find an explanation/solution.
    I trust someone has already facing this!!
    cheers and happy August to everyone.
    Fernando

    Sorry, but actually its the parent that needs tagging with "Never Share", not the level 0 member, so Alt_Entity1 and Alt_Entity2 etc, see Essbase DBA guide
    understanding Implied
    Sharing
    The shared member property defines a shared data relationship explicitly. Some
    members are shared even if you do not explicitly set them as shared. These
    members are said to be implied shared members.
    If you do not want a member to be shared implicitly, mark the parent as Never Share so
    that the data is duplicated, and is not shared. See Understanding Shared Members for an
    explanation of how shared members work.
    So in the example above
    Entity Dimension:
    E1 (user has access)
    E2
    E3(user has access)
    E4
    Alt_Entity
    Alt_Entity1 - Set to "Never Share"E1 (sharedmember)
    Alt_Entity2E2 (sharedmember)
    Alt_Entity3 - Set to "Never Share"E3 (sharedmember)
    Alt_Entity4E4 (sharedmember
    Thanks
    Anthony

  • 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

Maybe you are looking for

  • WRT300N as an Access Point

    Hello, I own a Linksys WAG200G that is connected to the internet and to 2 computers, and I recently adquired a WRT300N router. Can I use my WRT300N as an access point that receves from my WAG200G (via wirelless).

  • Help to get milestones report for all sales documents

    Dear Friends,   Could you please tell me the standard reports for milestone detail i.e combining FPLA and FPLT...   Apprecaite your valuable and quick response. Thanks Siva

  • Non admin accounts

    I can subscribe and download podcasts with itunes easily using the administrator account on Windows. But as soon as I switch accounts to a non administrator account I can no longer download podcasts (I try and subscribe to podcast and nothing much ha

  • Elements 11, Vista Home Premium, Expert Edit Enhance/Adjust Lighting

    I have a Vista Home Premium and Elements 11.  When using Expert Edit Enhance to Adjust Lighting, the edit "tool" box covers a large part of the image.  I can't figure out how to move the box out of the way so I can see the image being edited.  (Every

  • Syncing devices contacts with i cloud and getting different results

    i have 2 iphones and an imac and i am syncing contacts with i cloud and i am getting 3 different counts of contacts on each device. any thoughts on what goes wrong?