How to call HR_DISPLAY_BASIC_LIST

New Site Address: http://abap.mirrorz.com



Home

Definitions
OK Code Values
Other Useful Tips
SAP and ABAP Links
SAP Functions
SAP Reports
SAP Tables
Source Code
Transaction Codes

Site Map (Index)

ABAP Keyword Help


How to call HR_DISPLAY_BASIC_LIST

HR_DISPLAY_BASIC_LIST is an HR function that can be used for any data. You pass it data, and column headers, and it provides a table control with the ability to manipulate the data, and send it to Word or Excel.


HR_DISPLAY_BASIC_LIST Documentation

LIST_LEVEL - List level in the Table Control. This value is useful only if the function module is called several times from a single program. This value must be maintained manually in the program. The main use of the list level is to allow the use of multiple configurations for the Table Control.

ADDITIONAL_OPTIONS - With this parameter further options can be transferred. The following specification is supported:

NO_WORDThe call to MS Word is not offered on the display.
NO_EXCELThe call to MS Excel is not offered on the display.
START_WORDStart MS Word on the local PC
START_EXCELStart MS Excel on the local PC
START_ROWIn the stringer Addition_Options is located to START_ROW:xxxx, whereby xxxx a valid line number of the DATA_TAB
MAILUSER:xxxxxxxThe data are sent darkly as Mail to the indicated Mailuser. The FB is afterwards left directly. It takes place thus no further output.
NO_IMGthis function can be used in connection with the error table ERROR_TAB. In the Additonal_Options if the stringer NO_IMG is specified, then no Moeglichgkeit consists to branch into the Custominzing (IMG) in the error list. o LINESELMODE:1 is set, then only one line in the TableControl can be marked.

WORD_DOCUMENT - If the form letter fields in an existing Word document are to be merged, then the name of the Word of document which can be transferred. The functional module checks whether the indicated document exists. If this file is present, then it is loaded. If the file is not found a selection box is displayed, and a new file name can be input.

The name of the document must be complete i.e. with path specification and ending DOC.


Source Code Listing
REPORT ZKBTST25.

TABLES:
  MARAV.

DATA: BEGIN OF MTAB_MATERIALS OCCURS 0,
        MATNR LIKE MARAV
        VPSTA LIKE MARAV
        PSTAT LIKE MARAV
        MAKTX LIKE MARAV
      END OF MTAB_MATERIALS.

DATA: BEGIN OF MTAB_FIELDNAMES OCCURS 3,
      TITLE(60) TYPE C,
      TABLE(6)  TYPE C,
      FIELD(10) TYPE C,
      TYPE(1)   TYPE C,
      END OF MTAB_FIELDNAMES.

START

  SELECT * UP TO 500 ROWS FROM MARAV INTO CORRESPONDING FIELDS OF TABLE
    MTAB_MATERIALS.

END
  PERFORM SETUP_COLUMN_HEADERS.

  CALL FUNCTION 'HR_DISPLAY_BASIC_LIST'
       EXPORTING
            BASIC_LIST_TITLE     = 'Test of list form MM'
            FILE_NAME            = SY
*         HEAD_LINE1           = ' '
*         HEAD_LINE2           = ' '
*         FOOT_NOTE1           = ' '
*         FOOT_NOTE2           = ' '
*         FOOT_NOTE3           = ' '
*         lay_out              = 0
*         DYN_PUSHBUTTON_TEXT1 =
*         DYN_PUSHBUTTON_TEXT2 =
*         DYN_PUSHBUTTON_TEXT3 =
*         DYN_PUSHBUTTON_TEXT4 =
*         DYN_PUSHBUTTON_TEXT5 =
*         DYN_PUSHBUTTON_TEXT6 =
*         DATA_STRUCTURE       = ' '
*         HEAD_LINE3           = ' '
*         HEAD_LINE4           = ' '
*         CURRENT_REPORT       =
*         LIST_LEVEL           = ' '
*         ADDITIONAL_OPTIONS   = ' '
*         WORD_DOCUMENT        =
*    IMPORTING
*         RETURN_CODE          =
       TABLES
            DATA_TAB             = MTAB_MATERIALS
            FIELDNAME_TAB        = MTAB_FIELDNAMES
*         SELECT_TAB           =
*         ERROR_TAB            =
       EXCEPTIONS
            DOWNLOAD_PROBLEM     = 1
            NO_DATA_TAB_ENTIRIES = 2
            TABLE_MISMATCH       = 3
            PRINT_PROBLEMS       = 4
            OTHERS               = 5.

*
*       FORM SETUP_COLUMN_HEADERS                 *
*
*       ........              *
*
FORM SETUP_COLUMN_HEADERS.

  MTAB_FIELDNAMES
  MTAB_FIELDNAMES
  MTAB_FIELDNAMES
  MTAB_FIELDNAMES
  append MTAB_FIELDNAMES.

  MTAB_FIELDNAMES
  MTAB_FIELDNAMES
  MTAB_FIELDNAMES
  MTAB_FIELDNAMES
  APPEND MTAB_FIELDNAMES.

  MTAB_FIELDNAMES
  MTAB_FIELDNAMES
  MTAB_FIELDNAMES
  MTAB_FIELDNAMES
  APPEND MTAB_FIELDNAMES.

  MTAB_FIELDNAMES
  MTAB_FIELDNAMES
  MTAB_FIELDNAMES
  MTAB_FIELDNAMES
  APPEND MTAB_FIELDNAMES.

ENDFORM.           " SETUP_COLUMN_HEADERS

New Site Address: http://abap.mirrorz.com


Send any hints or tips to ABAP Hints & Tips .
All submissions will be recognized along with the tip.

Get a cool web address
Free subdomains from
ShortURL.com