SAP Function Modules

Share |

DYNP_VALUES_READ SAP Function module - Read screen field values before PAI field transport

Pattern for FM DYNP_VALUES_READ - DYNP VALUES READ
Associated Function Group: SHL2
Released Date: 10.01.1995
CALL FUNCTION 'DYNP_VALUES_READ' "Read screen field values before PAI field transport
  EXPORTING
    dyname =                    " d020s-prog    Program Name
    dynumb =                    " d020s-dnum    Screen Number
*   translate_to_upper = SPACE  "               Conversion of upper case for field contents
*   request = SPACE             " d020s-type    Return ready-for-input
*   perform_conversion_exits = SPACE  "         Call output conversion exit
*   perform_input_conversion = SPACE  "         Call input conversion exit
*   determine_loop_index = SPACE  " char1       Determine Index of a Line in the Loop for All Fields
*   start_search_in_current_screen = SPACE  " char1  Search for DYNAME/DYNUMB starts in current (sub)screen
*   start_search_in_main_screen = SPACE  " char1  Search for DYNAME/DYNUMB starts in main dynpro
*   start_search_in_stacked_screen = SPACE  " dynpro_id  Search for DYNAME/DYNUMB starts in specified main screen in the screen stack
*   start_search_on_scr_stackpos = SPACE  " sytabix  Search for DYNAME/DYNUMB starts at the specified position in the screen stack
*   search_own_subscreens_first = SPACE  " char1  Search through own screens before the stack is searched
*   searchpath_of_subscreen_areas = SPACE  " string  Path of subscreen areas that is searched from the start screen
  TABLES
    dynpfields =                " dynpread      Table for Reading Current Screen Values
  EXCEPTIONS
    INVALID_ABAPWORKAREA = 1    "               No valid work area
    INVALID_DYNPROFIELD = 2     "               No valid screen field
    INVALID_DYNPRONAME = 3      "               No valid screen name
    INVALID_DYNPRONUMMER = 4    "               Invalid screen number
    INVALID_REQUEST = 5         "               General request error
    NO_FIELDDESCRIPTION = 6     "               No field description
    INVALID_PARAMETER = 7       "               Internal system function parameters have incorrect values
    UNDEFIND_ERROR = 8          "               Undefined error
    DOUBLE_CONVERSION = 9       "               Double conversion required
    STEPL_NOT_FOUND = 10        "               Could not determine line in the loop
    .  "  DYNP_VALUES_READ

SAP Documentation for FM DYNP_VALUES_READ

Function module: DYNP_VALUES_READ
Purpose: Read field contents on screen and transport field to help
processor

Function group: SHL2 - Help functions

Release: released for customers
Documentation

Functionality

This function module reads screen field contents that are to
be processed by the help modules.

Example:

  • data: dyname like d020s-prog value 'TESTPROG',

  • dynumb like d020s-dnum value '100'.

  • data: begin of dynpfields occurs 3.

  • include structure dynpread.

  • data: end of dynpfields.

  • move 'TABNAME' to dynpfields-fieldname.

  • append dynpfields.

  • move 'FIELDNAME' to dynpfields-fieldname.

  • append dynpfields.

  • call function 'DYNP_VALUES_READ'

  • exporting

  • dyname = dymame

  • dynumb = dynumb

  • translate_to_upper = 'X'

  • tables

  • dynpfields = dynpfields

  • exceptions

  • invalid_abapworkarea = 01

  • invalid_dynprofield = 02

  • invalid_dynproname = 03

  • invalid_dynpronummer = 04

  • invalid_request = 05

  • no_fielddescription = 06

  • undefind_error = 07.


  • Notes:
    The field contents read into DYNPFIELDS are being used by the following function modules for the external Help
    HELP_VALUES_GET_WITH_TABLE_EXT
    and
    HELP_VALUES_GET_WITH_DD_NAME
    (also ..NO_DD_NAME). The values are returned via
    DYNP_VALUES_UPDATE.
    
    The field names in DYNPFIELDS can be user-defined as in the above
    example, where fields TABNAME and FIELDNAME occur on the screen. A Data Dictonary reference of these fields (... like ...) is not affected.
    All exceptions are caused by the C function HELP_GET_FIELDS.
    To retain the current line in step loops, you must call function module DYNP_GET_STEPL before calling DYNP_VALUES_READ.

    Description of parameters
    Parameter Reference field/structure Default value
    Import parameter
    DYNAME              D020S-PROG
    DYNUMB              D020S-DNUM
    TRANSLATE_TO_UPPER                               SPACE
    
    Table parameter
    DYNPFIELDS          DYNPREAD
    
    Exceptions:
    INVALID_ABAPWORKAREA
    INVALID_DYNPROFIELD
    INVALID_DYNPRONAME
    INVALID_DYNPRONUMMER
    INVALID_REQUEST
    NO_FIELDDESCRIPTION
    UNDEFINED_ERROR
    

    Parameter documentation

  • Import parameter:

  • DYNAME: Name of program (of calling screen)
  • Meaning: Name of program from which the function module is
    called. Do not set any SY-fields, because these
    are filled dynamically during the call of function
    modules.
    Value set: None
    Preallocation: None
    
  • DYNUMB: Number of calling screen
  • Meaning:   Number of screen from which the function module is
    called. Do not set SY-DYNNR.
    sy-dynnr gesetzt werden.
    Value set: None
    Preallocation: None
    
  • TRANSLATE_TO_UPPER: For conversion to upper case
  • Meaning:   If set, then the field contents read will be
    converted to upper case letters, even if lower case
    id defined for the domain in the Data Dictionary.
    If not set, then the field contents will be treated
    according to the definition of the domain in the
    Data Dictionary.
    
  • Table parameter:

  • DYNPFIELDS: Table to read the current screen values.
  • Meaning:   Before the call of the function module, the table
    contains the name of the screen fields to be read.
    After the call, it also contains the values read
    and the step loop lines, if it is a step loop
    screen.
    
  • Exceptions:

  • INVALID_ABAPWORKAREA: No work area
  • Meaning:   No valid ABAP/4 work area exists.
    
  • INVALID_DYNPROFIELD: No valid screen field
  • Meaning:   The specified field does not exist on the screen.
    
  • INVALID_DYNPRONAME: No valid screen name.
  • Meaning:    The specified program does not exist.
    
  • INVALID_DYNPRONUMMER: No valid screen number
  • Meaning:    The specified screen does not exist or has
    not been generated.
    
  • INVALID_REQUEST: General request error
  • Meaning: An error occurred during the system function call to
    read the screen.
    
  • NO_FIELDDESCRIPTION: No field description exists
  • Meaning: There is no description for the specified screen
    field.
    
  • UNDEFINED_ERROR: Undefined error
  • Meaning: An unknown error occurred during the system function
    call.
    
    Documentation extract taken from SAP system, Copyright (c) SAP AG






    Share |