F4 help for the screen fields in module pool program

Hi All,
  I have a requirement that, i want to provide F4 help for the 2 fields in module pool program. the fields are document number and fiscal year from rbkp table.
i could provide search help for two fields.
but how to select matching fiscal year for that document number.
problem: i am getting fiscal year as first four digits of document number.
please help me to solve this problem.
Thanks & Regards,
Namratha.V

Hi,
   If your requirement is after selecting the document no from f4 help then the corresponding year should be updated in the document year field then use FM --> DYNP_VALUES_UPDATE
In  this function module pass the screen no program & field for which u want to update value

Similar Messages

  • F4 help for the Date field in Module-Pool program

    Hi,
    I have a requirement wherein the user shud be allowed to choose a date on the calendar using F4 help and after choosing, it shud get displayed as dd.mm.yyyy format in the field. Is there any functional module to implement this.
    Thanks in Advance,
    Saranya.

    Hi,
    Please try the below code in your prgm.
    You have to write the below code in the POV of the required field.
    ***INCLUDE MZDATE_POV_DATEI01 .
    *&      Module  pov_date  INPUT
          text
    module pov_date input.
    DATA: li_ret_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname = ' '
    fieldname = ' '
    searchhelp = 'BU_DATE_CHAR'
    TABLES
    return_tab = li_ret_tab
    EXCEPTIONS
    field_not_found = 1
    no_help_for_field = 2
    inconsistent_help = 3
    no_values_found = 4
    OTHERS = 5.
    IF sy-subrc IS INITIAL.
    READ TABLE li_ret_tab INDEX 1.
    IF sy-subrc IS INITIAL.
    wrk_date = li_ret_tab-fieldval. "The required field
    ENDIF.
    ENDIF.
    endmodule.                 " pov_date  INPUT
    Hope it suits ur requirement.
    Reward points if useful.
    Thanks and regards,
    Litta.

  • How to keep f4 help for a particular field in module pool problem-urgent

    hi all,
    i am displaying output using alv list display. here i am showing my pf status here. in this status i have one button called position. when i click this button it is showing pop up inside this pop up  i am showing appln
    for this i need keep f4 help. anybody can tell me how to keep f4 help fo this field.
    thanks,
    maheedhar.t

    Hi Maheedhar,
    You need to use function module POPUP_GET_VALUES.
    If you want see sampl eprogram for this check the program RSSPO410.
    Execute this program and input Example2 = X in the selection screen.
    Code from the above Program:
    DATA: BEGIN OF FIELDS OCCURS 1.
            INCLUDE STRUCTURE SVAL.
    DATA: END OF FIELDS,
          RETURNCODE(1)       TYPE C,
          POPUP_TITLE(30)     TYPE C.
      POPUP_TITLE       = 'Nachrichten anzeigen'(200).
      CLEAR FIELDS.
      FIELDS-TABNAME    = 'T100'.
      FIELDS-FIELDNAME  = 'ARBGB'.
      FIELDS-FIELDTEXT  = 'Arbeitsgebiet'(202). "Text nicht aus DTEL
      APPEND FIELDS.
      CALL FUNCTION 'POPUP_GET_VALUES'
           EXPORTING POPUP_TITLE     = POPUP_TITLE
           IMPORTING RETURNCODE      = RETURNCODE
           TABLES    FIELDS          = FIELDS.
      IF RETURNCODE = 'A'.
        If Cancel is clicked
      ELSE.
        If OK is clicked.
        Table FIELDS congtains the input data.
      ENDIF.
    Thank you
    Ramakrishna

  • Providing F4 help for the same field on selection screen

    Hello Experts,
    My requirement is :
    There are 2 radio buttons and a parameter "p_file" on my selection scree.
    1. rb_appl
    2. rb_pres
    If the radio button rb_appl = 'X', I need to place the logic of F4 help of application server for the field p_file. Else if the rb_pres = 'X', then I need to place the logic of F4 help of presentation server for the same field p_file.
    I have written the code in the below manner
    PARAMETERS: rb_appl RADIOBUTTON GROUP rad DEFAULT 'X',
                             rb_pres RADIOBUTTON GROUP rad ,
                             p_file   TYPE ibipparms-path.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      IF rb_appl = 'X'.
          PERFORM f_applictn_server_filenm.
      ELSEIF rb_pres = 'X'.
        PERFORM f_presentation_filenm.
      ENDIF.
    But I am getting the F4 help for only the radio button for which i have placed the default value in the parameters.
    So please let me know how to define the F4 help for the same field based on the radio buttons.

    Hi,
    You can acheive the same by the addition of [USER-COMMAND fcode].
    RADIOBUTTON GROUP group [USER-COMMAND fcode] - The addition USER-COMMAND can be used to assign a function code fcode to the first parameter in a radio button group. The function code fcode must be specified directly, and have a maximum length of 20 characters. When the user selects any radio button of the radio button group on the selection screen, the runtime environment triggers the event AT SELECTION-SCREEN and transfers the function code fcode to the component ucomm of the interface work area sscrfields.
    So you code should be altered as
    PARAMETERS: rb_appl  RADIOBUTTON GROUP rad
                         USER-COMMAND radclick    "Addition which you have to make.
                         DEFAULT 'X',
                rb_pres  RADIOBUTTON GROUP rad ,
                p_file   TYPE ibipparms-path.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      IF rb_appl = 'X'.
        PERFORM f_applictn_server_filenm.
      ELSEIF rb_pres = 'X'.
        PERFORM f_presentation_filenm.
      ENDIF.
    Thanks & Regards,
    Harish

  • How to get the screen groups for the screen field which are on selectionscn

    hiiii Experts,
                   How to know the screen groups for the screen field which are on selection screen.
    Thanks and regards,
    kasyap

         NAME                                             PNPABKRS-LOW
            GROUP1                                             SEL
            GROUP2                                             DBS
            GROUP3                                             LOW
            GROUP4                                             180
    to get this use this:
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        if screen-name CS 'ABKRS'.
          BREAK-POINT.
        endif.
      ENDLOOP.

  • F1 help on a field in module pool programming

    I want to create f1 help on a field in module pool programming. How to use POH event. where should i write the help documentation. Before using this f1 help on a field i have to set some properties on GUI interface Editor. Please clearly mention the steps i have to follow.

    PROCESS ON HELP-REQUEST.
    FIELD P_LFA1 MODULE HELP_F1_LIFNR.
    MODULE HELP_F1_LIFNR INPUT.
    PERFORM SHOW_HELP_F1 USING 'ZFAG_DOC1'.
    ENDMODULE. " help_f1_lifnr INPUT
    FORM SHOW_HELP_F1 USING P_OBJECT.
    Dati testo help
    DATA: T_LINE LIKE TLINE OCCURS 0,
    XHEAD LIKE THEAD,
    HELP_INFO LIKE HELP_INFO,
    TEXC LIKE SY-UCOMM OCCURS 0,
    V_OBJECT LIKE DOKHL-OBJECT.
    Costante
    DATA: PREF_SIMG(4) VALUE 'SIMG',
    DOCID_HY LIKE DOKHL-ID VALUE 'HY'.
    Testo
    CONCATENATE PREF_SIMG P_OBJECT INTO V_OBJECT.
    Estrazione testo
    CALL FUNCTION 'DOCU_GET_FOR_F1HELP'
    EXPORTING
    ID = DOCID_HY
    LANGU = SY-LANGU
    OBJECT = V_OBJECT
    IMPORTING
    HEAD = XHEAD
    TABLES
    LINE = T_LINE
    EXCEPTIONS
    RET_CODE = 1
    OTHERS = 2.
    CASE SY-SUBRC .
    WHEN 0.
    Visualizzazione testo
    GET CURSOR FIELD HELP_INFO-DYNPROFLD.
    HELP_INFO-DOCUID = DOCID_HY.
    HELP_INFO-DOCUOBJECT = V_OBJECT.
    HELP_INFO-SPRAS = SY-LANGU.
    HELP_INFO-PROGRAM = SY-REPID.
    HELP_INFO-DYNPRO = SY-DYNNR.
    HELP_INFO-DYNPPROG = SY-REPID.
    HELP_INFO-PFKEY = SY-PFKEY.
    HELP_INFO-FIELDNAME = HELP_INFO-DYNPROFLD.
    CALL FUNCTION 'HELP_DOCULINES_SHOW'
    EXPORTING
    HELP_INFOS = HELP_INFO
    OVERLAY_HEADER = XHEAD
    TABLES
    EXCLUDEFUN = TEXC
    HELPLINES = T_LINE.
    WHEN OTHERS. MESSAGE S720(SH).
    ENDCASE.
    ENDFORM. " SHOW_HELP_F1

  • How to delete the row in table control with respect to one field in module pool programming?

    Hi,
    Can I know the way to delete the row in table control with respect to one field in module pool programming
    Regards
    Darshan MS

    HI,
    I want to delete the row after the display of table control. I have created push button as delete row. If I click on this push button, the selected row should get deleted.
    I have written this code,
    module USER_COMMAND_9000 input.
    DATA OK_CODE TYPE SY-UCOMM.
    OK_CODE = SY-UCOMM.
    CASE OK_CODE.
         WHEN 'DELETE'.
            LOOP AT lt_source INTO ls_source WHERE mark = 'X'.
                APPEND LS_SOURCE TO LT_RESTORE.
                DELETE TABLE LT_SOURCE FROM LS_SOURCE.
                SOURCE-LINES = SOURCE-LINES - 1.
            ENDLOOP.
    But I'm unable to delete the selected rows, It is getting deleted the last rows eventhough I select the other row.
    So I thought of doing with respect to the field.

  • Search help for screen fields in module pool

    Hi All,
    I have a screen in Module pool which has 3 input fields, each input field is attached to the same search help.
    These fields are from ztable . I have created a search help USING these 3 fields. All the 3 fields are marked for IMPORT and EXPORT.
    So whenever i click F4 on any of the above 3 fields, It will display search help popup and returns some rows...But the values are transfered back only for 1 fields ..i.e for the first field only .
    I want that ...as soon as i select any of the row from Search hit list..all the 3 columns should get populated with corresponding fields from that row.
    I require it this way as user wants to select based on * selection.Ex: as then every this related to that should be popped up.
    Pls help ASAP
    Thanks,

    This is how i got.
    data:l_shlp type SHLP_DESCR,
    l_rc type sy-subrc,
    w_DDSHRETVAL type DDSHRETVAL ,
    ls_shintf LIKE LINE OF l_shlp-interface,
    t_DDSHRETVAL type TABLE OF DDSHRETVAL.
    DATA: dyname LIKE d020s-prog,
    dynumb LIKE d020s-dnum.
    DATA: BEGIN OF dynpfields OCCURS 3.
    INCLUDE STRUCTURE dynpread.
    DATA: END OF dynpfields.
    CALL FUNCTION 'F4IF_GET_SHLP_DESCR'
    EXPORTING
    SHLPNAME = 'YTESTDMSSB'
    SHLPTYPE = 'SH'
    IMPORTING
    SHLP = l_shlp .
    ls_shintf-valfield = 'X'.
    MODIFY l_shlp-interface FROM ls_shintf TRANSPORTING valfield
    WHERE shlpfield = 'SNNTX'.
    MODIFY l_shlp-interface FROM ls_shintf TRANSPORTING valfield
    WHERE shlpfield = 'SBRTX'.
    MODIFY l_shlp-interface FROM ls_shintf TRANSPORTING valfield
    WHERE shlpfield = 'SBSTX'.
    MODIFY l_shlp-interface FROM ls_shintf TRANSPORTING valfield
    WHERE shlpfield = 'ENPTX'.
    MODIFY l_shlp-interface FROM ls_shintf TRANSPORTING valfield
    WHERE shlpfield = 'PLANT_CODE'.
    CALL FUNCTION 'F4IF_START_VALUE_REQUEST'
    EXPORTING
    SHLP = l_shlp
    DISPONLY = ' '
    MAXRECORDS = 500
    MULTISEL = 'X'
    CUCOL = SY-CUCOL
    CUROW = SY-CUROW
    IMPORTING
    RC = l_rc
    TABLES
    RETURN_VALUES = t_DDSHRETVAL
    IF l_rc = 0.
    LOOP AT t_DDSHRETVAL INTO w_DDSHRETVAL.
    CASE w_DDSHRETVAL-fieldname.
    WHEN 'SNNTX'. "W_SNNTX = w_DDSHRETVAL-fieldval.
    dyname = sy-repid.
    dynumb = sy-dynnr.
    dynpfields-fieldname = 'W_SNNTX'.
    dynpfields-fieldvalue = w_DDSHRETVAL-fieldval.
    APPEND dynpfields.
    WHEN 'SBRTX'. "W_SBRTX = w_DDSHRETVAL-fieldval.
    dyname = sy-repid.
    dynumb = sy-dynnr.
    dynpfields-fieldname = 'W_SBRTX'.
    dynpfields-fieldvalue = w_DDSHRETVAL-fieldval.
    APPEND dynpfields.
    WHEN 'SBSTX'. "W_SBSTX = w_DDSHRETVAL-fieldval.
    dyname = sy-repid.
    dynumb = sy-dynnr.
    dynpfields-fieldname = 'W_SBSTX'.
    dynpfields-fieldvalue = w_DDSHRETVAL-fieldval.
    APPEND dynpfields.
    WHEN 'ENPTX'. "W_ENPTX = w_DDSHRETVAL-fieldval.
    dyname = sy-repid.
    dynumb = sy-dynnr.
    dynpfields-fieldname = 'W_ENPTX'.
    dynpfields-fieldvalue = w_DDSHRETVAL-fieldval.
    APPEND dynpfields.
    WHEN 'PLANT_CODE'. "W_ENPTX = w_DDSHRETVAL-fieldval.
    dyname = sy-repid.
    dynumb = sy-dynnr.
    dynpfields-fieldname = 'W_WERKS'.
    dynpfields-fieldvalue = w_DDSHRETVAL-fieldval.
    APPEND dynpfields.
    ENDCASE.
    ENDLOOP.
    CALL FUNCTION 'DYNP_VALUES_UPDATE'
    EXPORTING
    dyname = dyname
    dynumb = dynumb
    TABLES
    dynpfields = dynpfields.
    ENDIF.

  • Need some help in creating Search Help for standard screen/field

    I need some help in adding a search-help to a standard screen-field.
    Transaction Code - PP01,
    Plan Version - Current Plan (PLVAR = '01'),
    Object Type - Position ( OTYPE = 'S'),
    Click on Infotype Name - Object ( Infotype 1000) and Create.
    I need to add search help to fields Object Abbr (P1000-SHORT) / Object Name (P1000-STEXT).
    I want to create one custom table with fields, Position Abb, Position Name, Job. Position Abb should be Primary Key. And when object type is Position (S), I should be able to press F4 for Object Abb/Object Name fields and should return Position Abbr and Position Name.
    I specify again, I have to add a new search help to standard screen/field and not to enhance it.
    This is HR specific transaction. If someone has done similar thing with some other transation, please let me know.
    There is no existing search help for these fields. If sm1 ever tried or has an idea how to add new search help to a standard screen/field.
    It's urgent.
    Thanks in advace. Suitable answers will be rewarded

    Hi Pradeep,
    Please have a look into the below site which might be useful
    Enhancing a Standard Search Help
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/daeda0d7-0701-0010-8caa-
    edc983384237
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee93446011d189700000e8322d00/frameset.htm
    A search help exit is a function module for making the input help process described by the search help more flexible than possible with the standard version.
    This function module must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE. The search help exit may also have further optional parameters (in particular any EXPORTING parameters).
    A search help exit is called at certain timepoints in the input help process.
    Note: The source text and long documentation of the above-specified function module (including the long documentation about the parameters) contain information about using search help exits.
    Function modules are provided in the function library for operations that are frequently executed in search help exits. The names of these function modules begin with the prefix F4UT_. These function modules can either be used directly as search help exits or used within other search help exits. You can find precise instructions for use in the long documentation for the corresponding function module.
    During the input help process, a number of timepoints are defined that each define the beginning of an important operation of the input help process.
    If the input help process is defined with a search help having a search help exit, this search help exit is called at each of these timepoints. If required, the search help exit can also influence the process and even determine that the process should be continued at a different timepoint.
    timepoints
    The following timepoints are defined:
    1. SELONE
    Call before selecting an elementary search help. The possible elementary search helps are already in SHLP_TAB. This timepoint can be used in a search help exit of a collective search help to restrict the selection possibilities for the elementary search helps.
    Entries that are deleted from SHLP_TAB in this step are not offered in the elementary search help selection. If there is only one entry remaining in SHLP_TAB, the dialog box for selecting elementary search helps is skipped. You may not change the next timepoint.
    The timepoint is not accessed again if another elementary search help is to be selected during the dialog.
    2. PRESEL1
    After selecting an elementary search help. Table INTERFACE has not yet been copied to table SELOPT at this timepoint in the definition of the search help (type SHLP_DESCR_T). This means that you can still influence the attachment of the search help to the screen here. (Table INTERFACE contains the information about how the search help parameters are related to the screen fields).
    3. PRESEL
    Before sending the dialog box for restricting values. This timepoint is suitable for predefining the value restriction or for completely suppressing or copying the dialog.
    4. SELECT
    Before selecting the values. If you do not want the default selection, you should copy this timepoint with a search help exit. DISP should be set as the next timepoint.
    5. DISP
    Before displaying the hit list. This timepoint is suitable for restricting the values to be displayed, e.g. depending on authorizations.
    6. RETURN (usually as return value for the next timepoint)
    The RETURN timepoint should be returned as the next step if a single hit was selected in a search help exit.
    It can make sense to change the F4 flow at this timepoint if control of the process sequence of the Transaction should depend on the selected value (typical example: setting SET/GET parameters). However, you should note that the process will then depend on whether a value was entered manually or with an input help.
    7. RETTOP
    You only go to this timepoint if the input help is controlled by a collective search help. It directly follows the timepoint RETURN. The search help exit of the collective search help, however, is called at timepoint RETTOP.
    8. EXIT (only for return as next timepoint)
    The EXIT timepoint should be returned as the next step if the user had the opportunity to terminate the dialog within the search help exit.
    9. CREATE
    The CREATE timepoint is only accessed if the user selects the function "Create new values". This function is only available if field CUSTTAB of the control string CALLCONTROL was given a value not equal to SPACE earlier on.
    The name of the (customizing) table to be maintained is normally entered there. The next step returned after CREATE should be SELECT so that the newly entered value can be selected and then displayed.
    10. APP1, APP2, APP3
    If further pushbuttons are introduced in the hit list with function module F4UT_LIST_EXIT, these timepoints are introduced. They are accessed when the user presses the corresponding pushbutton.
    Note: If the F4 help is controlled by a collective search help, the search help exit of the collective search help is called at timepoints SELONE and RETTOP. (RETTOP only if the user selects a value.) At all other timepoints the search help exit of the selected elementary search help is called.
    If the F4 help is controlled by an elementary search help, timepoint RETTOP is not executed. The search help exit of the elementary search help is called at timepoint SELONE (at the
    F4IF_SHLP_EXIT_EXAMPLE
    This module has been created as an example for the interface and design of Search help exits in Search help.
    All the interface parameters defined here are mandatory for a function module to be used as a search help exit, because the calling program does not know which parameters are actually used internally.
    A search help exit is called repeatedly in connection with several
    events during the F4 process. The relevant step of the process is passed on in the CALLCONTROL step. If the module is intended to perform only a few modifications before the step, CALLCONTROL-STEP should remain unchanged.
    However, if the step is performed completely by the module, the following step must be returned in CALLCONTROL-STEP.
    The module must react with an immediate EXIT to all steps that it does not know or does not want to handle.
    Hope this info will help you.
    ***Reward points if found useful
    Regards,
    Naresh

  • 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

  • F4 help for the batch field in VL02N transaction

    We have upgraded our system from 4.6 to ecc 6.0 .In 4.6 the f4 help for the batch had " Batch selection via plant/Material/Storage location/Batch " which is not there in ECC 6.0.
    Please tell us the procedure to add in the existing  search help H_MCHA in ECC 6.0
    Thanks
    Aruna

    Hi Aruna.
      Create ur own search help using se11 tcode for required fields.
      Thanks & Regards,
    Kiran.
    Plz give rewards if and only if it is helpfull.

  • Assign search help for a screen field in standard program?

    Hi All,
    Is there any other way to assign search help to a standard SAP screen field? (to be precise i want to assign search help to Recipient field in table control of components tab in transaction IW32/IW31)
    I know we can do this by assigning search help through screen painter (by changing standard program, which is my last option).
    Any advice/help will be greatly appreciated.

    Hi,
    I think you will find solution in below <b>threads</b>:
    Re: Search Help for standard field
    How to assign a search help
    Search help for Standard SAP field
    <b>Reward if helpful</b>
    Rgds,

  • Problem in Screen field position ( Module pool )

    Hi Experts,
    We changed the screen field position ( GUI ) of SAP standard module pool program.  we had taken the access key from SAP and modified the layout.
    Our Problem :   We had transported  these change request to Quality and Pre Production. The changes are transferred correctly in Quality .  when coming to Pre Production the changes are not visible on  the screen.
    Checks Performed :  1. We had analyzed the Transport request - They are imported correctly.
                                        2. We had rechecked the layout that we had changed its good and correct.
    Can you experts help me out in identify the exact solution for this problem.
    - Best Regards,
    Sudhakar Puppala
    Edited by: CRM Sudhakar on Sep 16, 2010 11:25 AM

    Hi, no idea can be given without having a look..
    but just check the screen layout in the pre-production itself..instead checking transport..

  • Automatic population of search help value to another field in module pool

    Hello there,
    I am developing a module pool screen, in which i have a table control field with fields PERNR and ARBPL along with other fields.
    I have to give a search help for Pernr first field for which i have given a search help with the use of PM02 search help, given in the screen field level, in the same search help there is another field ARBPL, when the pernr is selected i have to get the corresponding Arbpl field value in the search help hit list and pass it to my field arbpl in my table control.
    I tried with POV event as well with FM f4if_field_value_request but the return structure always filling one value only PERNR.
    Is there any chance to get the both field values from the search help.
    Thank you in advance.
    Regards,
    Kumar.

    Try the following logic in your table control, in table control you have get the selected index using function DYNP_GET_STEPL.
    TYPE-POOLS: shlp.
    PARAMETERS:p_matnr TYPE marc-matnr,
               p_werks TYPE marc-werks,
               p_ekgrp type marc-ekgrp.
    TYPES:BEGIN OF ty_marc,
          matnr TYPE marc-matnr,
          werks TYPE marc-werks,
          ekgrp TYPE marc-ekgrp,
          END OF ty_marc.
    DATA:i_marc TYPE TABLE OF ty_marc,
         i_val TYPE TABLE OF ddshretval,
         wa_val TYPE ddshretval.
    DATA:wa_dynpfields TYPE dynpread,
        i_dynpfields LIKE STANDARD TABLE OF dynpread.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_matnr.
      SELECT matnr werks ekgrp FROM marc INTO TABLE i_marc UP TO 100 ROWS.
      CHECK i_marc[] IS NOT INITIAL.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield         = 'MATNR'
          value_org        = 'S'
          callback_program = sy-repid
          callback_form    = 'CALLBACK_ROUTINE'
          dynpnr           = sy-dynnr
        TABLES
          value_tab        = i_marc
          return_tab       = i_val
        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.
      LOOP AT i_val INTO wa_val.
        IF sy-tabix = 1.
          wa_dynpfields-fieldname    = 'P_MATNR'.
          wa_dynpfields-fieldvalue   = wa_val-fieldval.
        ELSEIF sy-tabix = 2.
          wa_dynpfields-fieldname    = 'P_WERKS'.
          wa_dynpfields-fieldvalue   = wa_val-fieldval.
        ELSEIF sy-tabix = 3.
          wa_dynpfields-fieldname    = 'P_EKGRP'.
          wa_dynpfields-fieldvalue   = wa_val-fieldval.
        ENDIF.
        APPEND wa_dynpfields TO i_dynpfields.
      ENDLOOP.
      CALL FUNCTION 'DYNP_VALUES_UPDATE'
        EXPORTING
          dyname     = sy-repid
          dynumb     = sy-dynnr
        TABLES
          dynpfields = i_dynpfields.
    FORM callback_routine TABLES i_val TYPE ddshreslts
                CHANGING wa_shlp TYPE shlp_descr
                         wa_callcontrol LIKE ddshf4ctrl.
      DATA:
        wa_intf     LIKE LINE OF wa_shlp-interface.
      wa_intf-shlpfield = 'F0002'.
      wa_intf-valfield  = 'X'.
      wa_intf-f4field = 'X'.
      wa_intf-value = '~'.
      APPEND wa_intf TO wa_shlp-interface.
      wa_intf-shlpfield = 'F0003'.
      wa_intf-valfield  = 'X'.
      wa_intf-f4field = 'X'.
      wa_intf-value = '~'.
      APPEND wa_intf TO wa_shlp-interface.
    ENDFORM.                    " CALLBACK_F4

  • I want to go back from mandatory field in module pool program

    Hi
    i am doing tab strip control in module pool program.i want to go back from the selection field, which is a mandatory, to the main program by pressing f3.but i am nt able to get the output.can anybody pls help me.
    Amayika

    Hi
    1. For your BACK or CANCEL button on menu bar, give Button
    Ftype "E".
    2. In PAI : Write below Modules.
    PROCESS AFTER INPUT.
    MODULE CANCEL AT EXIT-COMMAND.
    MODULE BACK AT EXIT-COMMAND.
    double click on it.Inside of modules write below code.
    MODULE CANCEL INPUT.
    IF OK_CODE = 'CANCEL'.
    CLEAR OK_CODE.
    LEAVE PROGRAM.
    ENDIF.
    ENDMODULE.
    MODULE BACK INPUT.
    IF OK_CODE = 'BACK'.
    CLEAR: OK_CODE, INPUT1, INPUT2.
    LEAVE TO SCREEN 100.
    ENDIF.
    ENDMODULE.

Maybe you are looking for

  • How do you set up your iphone?

    Right, so I got a new Iphone 4 and it was bouught unlocked from apple. My iphone sim is O2 and i had to switch my number over to this because i thave a contract. I have put the new sim in the phone, restarted it and connected it to itunes. When i son

  • New Iphone Yellow tinted white, different to my other iphone

    What do I do? Take it back? Or wait? I baught the invisible shield and i dont want to lose out £15. No apple fanboys welcome.. I want someone who knows what they are talking about.

  • Problems locating a wireless network

    I have a PowerBook G4, and I'm having some problems connecting to the internet. I've had the laptop for about a week, and when I first brought it home and tried to access the 'net, the AirPort network automatically found the wireless network my PC's

  • Books not showing in itunes

    I've upgrade to Yosemite and itunes 12.....now I can no longer see my books in itunes. There is a tab for Audiobooks, but not books. When I plug in my ipad I can see the books that were already added but I am unable to add any more. Help.

  • Is there any way to request a firmware update

    As the title says, is there any way I can request a firmware update for my BTHomehub2 as I like to keep things updated to the latest version. Thanks in advanced, ken. Solved! Go to Solution.