SAP Tutorials Blog


 

TABLES: zemployee.

CONSTANTS: c_view  TYPE   char30  VALUE 'ZEMPLOYEE',

           c_u     TYPE   char1   VALUE 'U',

           c_and   TYPE   char3   VALUE 'AND'.

DATA: gt_seltab    TYPE STANDARD TABLE OF vimsellist.

DATA: g_fieldname  TYPE vimsellist-viewfield.

DATA: gt_exclude   TYPE TABLE OF vimexclfun,

      gwa_exclude  TYPE vimexclfun.


SELECT-OPTIONS: s_id    FOR zemployee-id,

                s_name  FOR zemployee-name,

                s_place FOR zemployee-place.


*Add ID column to selection criteria of Table maintenanace view

g_fieldname = 'ID'.


CALL FUNCTION 'VIEW_RANGETAB_TO_SELLIST'

  EXPORTING

    fieldname          = g_fieldname

    append_conjunction = c_and

  TABLES

    sellist            = gt_seltab

    rangetab           = s_id.


*Add Name column to selection criteria of Table maintenanace view

g_fieldname = 'NAME'.


CALL FUNCTION 'VIEW_RANGETAB_TO_SELLIST'

  EXPORTING

    fieldname          = g_fieldname

    append_conjunction = c_and

  TABLES

    sellist            = gt_seltab

    rangetab           = s_name.


*Add Place column to selection criteria of Table maintenanace view

g_fieldname = 'PLACE'.


CALL FUNCTION 'VIEW_RANGETAB_TO_SELLIST'

  EXPORTING

    fieldname          = g_fieldname

    append_conjunction = c_and

  TABLES

    sellist            = gt_seltab

    rangetab           = s_place.


* Call to the 'VIEW_MAINTENANCE_CALL' function module

CALL FUNCTION 'VIEW_MAINTENANCE_CALL'

  EXPORTING

    action         = c_u

    view_name      = c_view

  TABLES

    dba_sellist    = gt_seltab.


Serkan AKKAVAK

Computer Engineer BSc

SAP Department Deputy Manager

Contact : serkurumsal@yandex.com