Help values - Selection Screen

Hi All,
I have a selection screen as below.
Parameters:
P_WERKS LIKE MARC-WERKS,
P_MATNR LIKE  MATNR.
Now I require help for materail when Press F4, the materail should be only that belongs to the Plant entered in the selection screen.
Please suggest.
Regards,
Helpful answers are surely rewarded

Hi,
First get the plant from the screen,
Then according to the palnt you get , do the select statment.
Last using FM: F4IF_INT_TABLE_VALUE_REQUEST.
Do you use dialog program or general program?
If you use dialog program, you can use POV.
process on value-request.
  field p_matnr  module mod_get_F4.
module mod_get_F4.
select matnr from MARC into table it_matnr
where WERKS = P_WERKS .
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
      retfield              = 'MATNR'
     dynpprog               = 'ZTEST'          " program name
     dynpnr                 = '1000'             " screen number
     dynprofield            = 'P_MATNR'
     VALUE_ORG              = 'S'
    tables
      value_tab              = it_matnr
exceptions
   parameter_error        = 1
   no_values_found        = 2
   others                 = 3
if you use general program:
at selection-screen on value-request for p_matnr.
select matnr from MARC into table it_matnr
where WERKS = P_WERKS .
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
      retfield              = 'MATNR'
     dynpprog               = 'ZTEST_C'          " program name
     dynpnr                 = '1000'             " screen number
     dynprofield            = 'P_MATNR'
     VALUE_ORG              = 'S'
    tables
      value_tab              = it_matnr
exceptions
   parameter_error        = 1
   no_values_found        = 2
   others                 = 3
Hope it helps.
Regards,
Chris Gu

Similar Messages

  • Restricting values F4 help in selection screen-Urgent

    Hi,
    can anyone pls tell how can I ristrict the values for search help in any field in selection screen.
    please tell me the way to hide some values in F4 help in selection screen so that user can not see those data for selection.
    Regards

    i think u can not hide the data.........
    create own f4 help............restrict the data and then pass it the f4 internal table....
    fro exp;;;;;
    types : begin of ty_tab,
              post_code1 like adrc-post_code1,
             end of ty_tab.
      data : it_tab type ty_tab occurs 0.
      data : lt_field type table of dfies,
             lw_field type dfies.
      select post_code1 from adrc into corresponding fields of table it_tab.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
          exporting
            retfield        = 'POST_CODE1'
            dynpprog        = sy-repid
            dynpnr          = sy-dynnr
            dynprofield     = 'LI_LIST1'
            value_org       = 'S'
          tables
            value_tab       = it_tab
         field_tab       = lt_field
          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.
    Regards
    Anbu

  • Display medium text in value selection screen.

    Hello Experts,
    i have an infoObject called Customer in an ODS.Its master data contains the short text, medium length text and long text.i want to display its medium text(which contains First name n last name) in the value selection screen (F4) while executing the web report.
    It is an urgent requirement.
    Please help.
    I promise to return and reward lots of points
    Thankyou soo much
    Regards,
    Priya

    Vishvesh,
    Thanks for ur quick reply.
    i have set those properties but it is still not working.
    Arun,
    are u trying to say that i can show Long text but not medium text ??whr did u change the description to long text and key?
    Do Reply,
    I will award points ..
    Thankyou soo much
    Priya

  • Hi its urgent...help on selection screen parameters

    Hi all,
    I need help on selection screen parameters.
    requirement is that,
    i am having input fields for material, plant ,start date and end date and a check box and an input field for getting the txt file.
    when i select the checkbox, it should ignore the mandatory fileds in the selection screen.
    and when i get the file input, it should take  the input data material, plant, start date and end date from the flat file and populate the corresponding input fields in selection screen.
    How to do this..
    thanks in advance.

    Hi ..
    While declare the Matnr, Plant etc dont use the OBLIGATORY addition.
    instead of the based on the value of check box validate them .
    AT SELECTION-SCREEN.
      IF c_box = ' '.
       << validate for mandatory fields>>
    endif.
    <b>REWARD IF HELPFUL.</b>

  • Search help in selection screens for interactive report

    A search help can only be assigned to DB table.
    So my doubt is can it also be used for seletion screens created for an interactive report?
    If yes what is the procedure.. Please give me one example at least...
    waiting for your valuable suggestions.....
    Thanks,
    regards,
    Chinmay

    Hi Chinmay,
    I suppose your requirement is to give search help to selection screen elements.
    Here is the code.
    REPORT  ZSHAIL_F4HELP                           .
    parameters: name(10) type c .
    TYPES: BEGIN OF VALUES,
             CARRID TYPE SPFLI-CARRID,
             CONNID TYPE SPFLI-CONNID,
           END OF VALUES.
    dATA: PROGNAME LIKE SY-REPID,
          DYNNUM   LIKE SY-DYNNR,
          DYNPRO_VALUES TYPE TABLE OF DYNPREAD,
          FIELD_VALUE LIKE LINE OF DYNPRO_VALUES,
          VALUES_TAB TYPE TABLE OF VALUES.
    at selection-screen on value-request for name.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
      EXPORTING
        tabname                   = 'DEMOF4HELP'
        fieldname                 = 'CARRIER1'
      SEARCHHELP                = ' '
      SHLPPARAM                 = ' '
       DYNPPROG                  = PROGNAME
       DYNPNR                    = DYNNUM
       DYNPROFIELD               = 'CARRIER'
      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
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    AT SELECTION-SCREEN OUTPUT.
    PROGNAME = SY-REPID.
      DYNNUM   = SY-DYNNR.
      CLEAR: FIELD_VALUE, DYNPRO_VALUES.
      FIELD_VALUE-FIELDNAME = 'CARRIER'.
      APPEND FIELD_VALUE TO DYNPRO_VALUES.
    I hope your query is solved.
    If so,please award points.
    Regards,
    Sylendra.

  • Field display on f4 help value selection

    Hi all,
    when ever user choose any value form the f4 help i want to display other two field on selection screen.as per the the f4 help value.
    we can do it using radio button easily...but i want on f4 help value selection...
    please help me...
    Thanks
    -Arun.

    Hi Arun,
    Check the Following.
    "  Implement your own search Help as below
    PARAMETERS : carrid TYPE spfli-carrid,
                 connid TYPE spfli-connid,
                 fldate TYPE sflight-fldate.
    DATA : itab TYPE TABLE OF sflight WITH HEADER LINE.
    DATA : fmap TYPE TABLE OF dselc WITH HEADER LINE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR carrid." If it is a selection Screen
    else in PROCESS ON VALUE REQUEST
      SELECT * FROM sflight INTO TABLE itab.
      SORT itab BY carrid connid fldate.
      DELETE ADJACENT DUPLICATES FROM itab
      COMPARING carrid connid fldate.
      fmap-fldname = 'CARRID'.
      fmap-dyfldname = 'CARRID'.
      APPEND fmap.
      fmap-fldname = 'CONNID'.
      fmap-dyfldname = 'CONNID'.
      APPEND fmap.
      fmap-fldname = 'FLDATE'.
      fmap-dyfldname = 'FLDATE'.
      APPEND fmap.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
         ddic_structure         = 'SFLIGHT'
          retfield               = 'CARIID'
    *     PVALKEY                = ' '
         dynpprog               = sy-repid
         dynpnr                 = sy-dynnr
         DYNPROFIELD            = 'CARRID'
    *     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              =
    *     RETURN_TAB             =
         dynpfld_mapping        = fmap
    *   EXCEPTIONS
    *     PARAMETER_ERROR        = 1
    *     NO_VALUES_FOUND        = 2
    *     OTHERS                 = 3
                ." Just Execute this pilot program and verify
      IF sy-subrc  0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Cheerz
    Ram

  • Value selection screen

    Hello Guyz,
    In the WAD report, for a field slection when we open the value selection screen to choose the value we find key and field value, as per our requirement we need description also in the value selection screen, please let me know whet setting changes  need to  be done.
    Example
    For a field status : when we open the value selection screen we find values for selection like  RELP 1000
                                                                                    APPR         1200 but we are not getting description, what changes need to be done to even get the decription for the status.
    Regards,
    Ravi

    Hi,
    Check this out
    Re: displaying Medium Text in Variable screen (WAD)
    Regards

  • Def a value in sear help of select screen generated by HR  report category

    Hi all,
    Ive developed a HR report in which Ive used LDB  PNP.. Now they are going to use this report for a particular company.
    so in the report selection screen when they choose f4 help of personnel area i.e. field PNPWERKS, I need to default a value X for company code input field(BUKRS). so that the user can select personnel area pertaining to this company (code - X).
    How can I achieve this? (defaulting a selection value in standard search help)
    Thanks,
    Rajan U

    Hi Rajan
    You can still do this in the initialization.
    The memory id for the company code is 'BUK' and for plant it is 'PBR'. So in the Initialization event you can do like below. Here I am defaulting both the company code and plant.
    insert personnel area code from user own data       
      GET PARAMETER ID 'PBR' FIELD werksid.                 
      IF NOT werksid IS INITIAL.                               
        pnpwerks-sign = 'I'. pnpwerks-option = 'EQ'.
        pnpwerks-low = werksid. APPEND pnpwerks
      ENDIF.                                                   
    insert company code from user own data
      GET PARAMETER ID 'BUK' FIELD bukrsid. 
      IF NOT bukrsid IS INITIAL.                          
        pnpbukrs-sign = 'I'. pnpbukrs-option = 'EQ'.
        pnpbukrs-low = bukrsid. APPEND pnpbukrs.
      ENDIF.
    Let me know if this helps.
    Regards,
    Vijay V

  • 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

  • Search help on selection screen.

    I have a selection screen with
    Report name
    Variant name
    Variant fields
    Variant fields is attached to a search help 'Z_Search_variant' and this search help fetches values based on "Report name" "Variant name" on the selection screen.
    I am using
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR Variant_field
    PERFORM f4_help_variant.
    FORM f4_help_variant.
    call function 'F4IF_FIELD_VALUE_REQUEST'
      exporting
       tabname                   = space
       fieldname                 = space
       SEARCHHELP                = 'Z_SEARCH_VARIANT'
      SHLPPARAM                 = 'REPORT'
      DYNPPROG                  = ' '
      DYNPNR                    = ' '
      DYNPROFIELD               = ' '
      STEPL                     = 0
      VALUE                     = Report
      MULTIPLE_CHOICE           = ' '
      DISPLAY                   = ' '
       SUPPRESS_RECORDLIST       = 'X'
       CALLBACK_PROGRAM          = SY-REPID
      CALLBACK_FORM             = ' '
      SELECTION_SCREEN          = ' '
    IMPORTING
      USER_RESET                =
    TABLES
        RETURN_TAB                = return_tab
    EXCEPTIONS
      FIELD_NOT_FOUND           = 1
      NO_HELP_FOR_FIELD         = 2
      INCONSISTENT_HELP         = 3
      NO_VALUES_FOUND           = 4
      OTHERS                    = 5
    How do I pass value to this search help? Currently I do not see this FM allowing this option? Any other options?

    Hi Vinita,
    wat i figured out from your problem is u need how to get values from FM so u can do it in this way..
    READ TABLE it_return INTO wa_return INDEX 1.
      IF sy-subrc = 0.
        wa_output-vkorg = wa_return-fieldval.  
      ENDIF.
      IF wa_output-vkorg IS NOT INITIAL.
        MODIFY it_output FROM wa_output INDEX row_id   * it_output is final ITAB
                  TRANSPORTING vkorg.
      ENDIF.
      CALL METHOD c_alv->refresh_table_display.
      CLEAR: wa_return,it_return[],wa_output.

  • Help On Selection Screen

    Hi...Can any one send a sample code for a header selection screen calling a detail screen and edit the detail.
    Sunil....

    Hi Sunil..
    This is the code:
    *& Report  ZSELFILE1                                                   *
    *& CALLING SELECTION SCREEN AND F4 HELP                                                                    *
    REPORT  zselfile1                               .
    TABLES:sscrfields.
    **Create the Additional Selection screen to input filename
    SELECTION-SCREEN: BEGIN OF SCREEN 10.
    PARAMETERS: p_file TYPE rlgrap-filename.
    SELECTION-SCREEN: END OF SCREEN 10.
    **Create Application Toolbar Button on the Standard selection Screen
    SELECTION-SCREEN FUNCTION KEY 1.   "Its fcode will be FC01
    PARAMETERS : p_werks TYPE marc-werks.
    INITIALIZATION.
      sscrfields-functxt_01 = 'Enter File'.  "Assign the Text to the Button
    AT SELECTION-SCREEN.
      CASE sscrfields-ucomm.  "Check the Fcode
        WHEN 'FC01'.
    **Details Selection Screen
          CALL SELECTION-SCREEN 10 STARTING AT 5 8 ENDING AT 85 20.
      ENDCASE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'    "Local file browser
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
          field_name    = 'P_FILE'
        IMPORTING
          file_name     = p_file.
    START-OF-SELECTION.
    <b>reward if Helpful.</b>

  • 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

  • Need help on search help on selection screen field

    Hi guyz,
    Please tell me how to pass the parameter or restrict the below search help.
    *s_bsart FOR ekko-bsart . " Doc. Type*
    For the above selection screen field i need to display the data only for cat = F if i click search help.
    Thanks,
    Mohamed Kaleel

    Hi,
    Use At selection-screen for value-request for s_bsart.
    SELECT_OTPIONS: s_bsart FOR ekko-bsart.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_bsart.
    CALL SCREEN 100 STARTING AT 10 5
    ENDING AT 50 10.
    MODULE value_list OUTPUT.
    SUPPRESS DIALOG.
    LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
    SET PF-STATUS space.
    NEW-PAGE NO-TITLE.
    s_bsart-low = 'F' / 'CAT=F'.
    write :/ s_bsart-low.
    Hide: s_bsart-low
    clear s_bsart-low.
    ENDMODULE.
    AT LINE-SELECTION.
    LEAVE TO SCREEN 0.
    This will resolve the issue.
    Regards,
    Gurpreet

  • Dynamic Search-help in Selection Screen Parameter

    Hi,
    Please can you provide some solution for the below requirements.
    I have 2 fields ( Organization channel and Team ) in my selection screen. Under one organization channel there can be many teams.
    And I am trying a  dynamic search help on both the fields using event AT selection-screen on Value request and
    FM 'F4IF_INT_TABLE_VALUE_REQUEST'.
    But I am facing the below issue .
    First I am giving some values in field 'Organization channel' . Then I am clicking on F4 button on my  2nd field 'Team' .
    and in debugging mode under the event  'At selection-screen on value request', Select option SO_Team is blank.
    The value provided in the Organiozation channel is not being captured in SO_TEAM-Low
    Please have a look on the below codes.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_team-low .
    if not  so_orgchannel-low  is  initial.      "Here so_orgchannel-low  value is coming as Zeros.
    select  * from HRP1001 into table GT_HRP1001
              where objid = so_orgchannel-low.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
             EXPORTING
                  retfield        = 'ORGID'
                  value_org       = 'S'
                  dynpprog        = 'ZTEST'
                  dynpnr          = '1000'
             TABLES
                  value_tab       = gt_hrp1001
             EXCEPTIONS
                  parameter_error = 1
                  no_values_found = 2
                  OTHERS          = 3.

    Hi,
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_team-low .
    "Add This  Begin
      CLEAR t_dynpfields.
      REFRESH t_dynpfields.
      t_dynpfields-fieldname  = 'SO_ORGCHANNEL-LOW'.
      APPEND t_dynpfields.
      w_repid = sy-repid.
    * reading Screen variables and Values
      CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                dyname     = w_repid
                dynumb     = sy-dynnr
           TABLES
                dynpfields = t_dynpfields
           EXCEPTIONS
                OTHERS.
      READ TABLE t_dynpfields INDEX 1.
      so_orgchannel-low = t_dynpfields-fieldvalue.
    "Add this End
    if not  so_orgchannel-low  is  initial.      "Your code is here
    select  * from HRP1001 into table GT_HRP1001
               where objid = so_orgchannel-low.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
              EXPORTING
                   retfield        = 'ORGID'
                   value_org       = 'S'
                   dynpprog        = 'ZTEST'
                   dynpnr          = '1000'
              TABLES
                   value_tab       = gt_hrp1001
              EXCEPTIONS
                   parameter_error = 1
                   no_values_found = 2
                   OTHERS          = 3.
    Regards,
    Prabhudas

  • Search help for selection screen field

    Hi ,
    steps for creating search help for a key field in selection screen..
    tables is a userdefined from which the field is taken..
    thxs,
    vind

    hi,
    c this.
    REPORT ZXYZ_0002 .
    data: dynfields type table of dynpread with header line.
    data: return type table of ddshretval with header line.
    selection-screen begin of block b1 with frame title text-001 .
    selection-screen begin of line.
    PARAMETERS: P_BUKRS type T001-BUKRS.
    selection-screen comment 30(20) BUTXT for field p_bukrs.
    selection-screen end of line.
    selection-screen end of block b1.
    at selection-screen output.
    if butxt is initial.
       select single butxt into butxt
             from t001
            where bukrs = p_bukrs.
    endif.
    at selection-screen on value-request for p_bukrs.
      call function 'F4IF_FIELD_VALUE_REQUEST'
           exporting
                tabname           = 'T001'
                fieldname         = 'BUKRS'
                dynpprog          = sy-cprog
                dynpnr            = sy-dynnr
                dynprofield       = 'P_BUKRS'
           tables
                return_tab        = return
           exceptions
                field_not_found   = 1
                no_help_for_field = 2
                inconsistent_help = 3
                no_values_found   = 4
                others            = 5.
      read table return with key fieldname = 'P_BUKRS'.
    Add it back to the dynpro.
      dynfields-fieldname = return-retfield.
      dynfields-fieldvalue =  return-fieldval.
      append dynfields.
    Get the company code from db and add to dynpro
      data: xt001 type t001.
      clear xt001.
      select single * into xt001
             from t001
            where bukrs = return-fieldval.
      dynfields-fieldname = 'BUTXT'.
      dynfields-fieldvalue = xt001-butxt.
      append dynfields.
    Update the dynpro values.
      call function 'DYNP_VALUES_UPDATE'
           exporting
                dyname     = sy-cprog
                dynumb     = sy-dynnr
           tables
                dynpfields = dynfields
           exceptions
                others     = 8.
    start-of-selection.
    rgsds
    anver
    if hlped mark points

Maybe you are looking for

  • No Field Copy during creation of  assets Subnumber

    Hello, Is there any way to deactive the some field data during the Creation of Sub number when using the reference assets number. I have already unchecked the copy field in Screen layout setting for Assets master data. But still the Capitalisation da

  • Error while using DBMS_XMLSave package...

    Hi All, I am using DBMS_XMLSave package and when I try to execute the following code, it is giving me error "Java call terminated by uncaught Java exception:" I am executing following code .... declare insCtx DBMS_XMLSave.ctxType; begin insCtx := DBM

  • Advantage of using SAP SRM

    Hi, Could any one please explain the advantages of using SAP SRM over MM module. As per me we can de most of the activities in MM except some vendor related activities (and that even if SUS is used). Thanks in advance. Regards, Lalit

  • Mailto is launching email ok but also launching blank web page

    i am using AS3 on a website. Part of the AS has been setup by an external source and I ma now updating and adapting it. My knowledge of AS is limited but slowly expanding. Currently the site is a main flash file with all the content delivered via a m

  • The iTunes window exceeds the screen size.

    Recently when I open iTunes the window it is deeper than my screen size. This prevents my use of the lower margin with the Sync button and capacity information as well as the opportunity to resize the page. I have tried quiting and re-opening to no a