SAP Function Modules

Share |

DYNP_VALUES_UPDATE SAP Function module - Change screen field contents w/o PBO

Pattern for FM DYNP_VALUES_UPDATE - DYNP VALUES UPDATE
Associated Function Group: SHL2
Released Date: 10.01.1995
CALL FUNCTION 'DYNP_VALUES_UPDATE' "Change screen field contents w/o PBO
  EXPORTING
    dyname =                    " d020s-prog    Program Name
    dynumb =                    " d020s-dnum    Screen number
  TABLES
    dynpfields =                " dynpread      Screen field value reset table
  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
    UNDEFIND_ERROR = 7          "               Undefined error
    .  "  DYNP_VALUES_UPDATE

SAP Documentation for FM DYNP_VALUES_UPDATE

Function module: DYNP_VALUES_UPDATE
Function: Reset selected screen field contents
Function group: SHL2 - Help functions
Person responsible: KRAFTT
Release: -
DOCUMENTATION

Functionality

You can use this function module to reset selected help processor field contents in the corresponding screen fields

Example

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

  • dynumb like d020-dnum value '100'.

  • data: begin of dynpfields occurs 3.

  • include structure dynpread.

  • data: end of dynpfields.

  • move 'TABNAME' to dynpfields-fieldname.

  • move 'Testtable' to dynpfields-fieldvalue.

  • append dynpfields.

  • move 'FIELDNAME' to dynpfields-fieldname.

  • move 'Testfield' to dynpfields-fieldvalue.

  • append dynpfields.

  • call function 'DYNP_VALUES_UPDATE'

  • exporting

  • dyname = dyname

  • dynumb = dynumb

  • 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
    This function module should be used in the user-programmed help if one or more screen fields are to be given selected values, e.g. if the values are to be reset after calling HELP_VALUES_GET_WITH_TABLE_EXT. automatic value reset, as performed e.g. by the function module HELP_VALUES_GET_EXTEND, can also be overwritten.
    Screen field contents are read by the function module DYNP_VALUES_READ.
    The field names in DYNPFIELDS can be defined by the user, as in the above example,where the fields TABNAME and FIELDNAME occur on the screen. A Dictionary reference of these fields (... like...) is unaffected.
    The module DYNP_GET_STEPL must first be called in strp-loop or table control to set the correct step-loop.
    All exceptions are called by the system function HELP_GET_FIELDS.

    Parameter description
    Parameter Ref.field/structure Default value
    Import parameters
    DYNAME              D020S-PROG
    DYNUMB              D020S-DNUM
    
    Table parameters
    DYNPFIELDS          DYNPREAD
    
    Exceptions:
    INVALID_ABAPWORKAREA
    INVALID_DYNPROFIELD
    INVALID_DYNPRONAME
    INVALID_DYNPRONUMMER
    INVALID_REQUEST
    NO_FIELDDESCRIPTION
    UNDEFINED_ERROR
    

    Parameter documentation

  • Import parameters:

  • DYNAME: Program name (of the calling screen)
  • Meaning:   Name of the program from which the function
    module is called. Set sy-prog here, rather than
    sy-repid. Reason: the value of
    sy-repid is the main program of the help processor
    function group.
    Value range: none
    Default    : none
    
  • DYNUMB: Number of the calling screen
  • Meaning  : Number of the screen, from which the call was
    made. sy-dynnr can be set here.
    Value range: none
    Default    : none
    
  • Table parameters:

  • DYNPFIELDS: Table for reading the current screen values.
  • Meaning:   Before the function module call, the
    table contains the names of the screen fields
    to be read, and the values read, as well as
    the step-loop lines, if it is a
    step-loop screen.
    
  • Exceptions:

  • INVALID_ABAPWORKAREA: No work area
  • Meaning:   No valid ABAP work area exists.
    
  • INVALID_DYNPROFIELD: No valid screen field
  • Meaning:   The screen does not contain the
    specified screen field.
    
  • 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
    in generated form.
    
  • INVALID_REQUEST: General call error
  • Meaning:   A system function call error occurred in
    the screen read request.
    
  • NO_FIELDDESCRIPTION: No field description exists
  • Meaning:   No description exists for the
    specified screen field.
    
  • UNDEFINED_ERROR: Undefined error
  • Meanin:    An unknown error occurred when calling
    the system function.
    
    Documentation extract taken from SAP system, Copyright (c) SAP AG






    Share |