Function modules: Reports and Dynpros

  1. Selection-screen
  2. Exporting lists
  3. Dynpros
  4. Other

 

Selection-screen

Example: 


  data:
    begin of t_values occurs 2,
      value like kna1-begru,
    end of t_values,

    t_return like ddshretval occurs 0 with header line.

  t_values = 'PAR*'.
  append t_values.

  t_values = 'UGG'.
  append t_values.

  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
       exporting
            retfield        = 'BEGRU'
            value_org       = 'S'
       tables
            value_tab       = t_values
            return_tab      = t_return
       exceptions
            parameter_error = 1
            no_values_found = 2
            others          = 3.

  if sy-subrc = 0.
    read table t_return index 1.

    o_begru-low = t_return-fieldval.

    if o_begru-low = 'PAR*'.

      o_begru-option = 'CP'.
    else.
      o_begru-option = 'EQ'.
    endif.

    o_begru-sign = 'I'.

    append o_begru to s_begru.
  else.
    o_begru = i_begru.
  endif. 


Example:

tables: t001w.

DATA: lc_werks      LIKE t001w-werks,
      ltab_fields LIKE help_value OCCURS 0 with header line,

      BEGIN OF ltab_values OCCURS 0,
        feld(40) TYPE c,
      END OF ltab_values.

*-- Set up fields to retrieve data
  ltab_fields-tabname    = 'T001W'.
  ltab_fields-fieldname  = 'WERKS'.

  ltab_fields-selectflag = 'X'.
  APPEND ltab_fields.

  ltab_fields-tabname    = 'T001W'.
  ltab_fields-fieldname  = 'NAME1'.
  ltab_fields-selectflag = space.
  APPEND ltab_fields.

*-- Fill values
  select * from t001w.
    ltab_values-feld = t001w-werks.
    append ltab_values.
    ltab_values-feld = t001w-name1.
    append ltab_values.
  endselect.

CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
     EXPORTING
          fieldname                 = 'WERKS'

          tabname                   = 'T001W'
          title_in_values_list      = 'Select a value'
     IMPORTING
          select_value              = lc_werks
     TABLES
          fields                    = ltab_fields
          valuetab                  = ltab_values
     EXCEPTIONS
          field_not_in_ddic         = 01
          more_then_one_selectfield = 02
          no_selectfield            = 03.
 


Exporting lists

Dynpros

Other

 

Converted from CHM to HTML with chm2web Standard 2.7 (unicode)