Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function Module for reading PCL2 - B2 FEHLER table

Former Member
0 Likes
1,164

Hi,

Is there any function module can use to read the FEHLER table messages? There is a standard program called RPTERL00 that used to read the FEHLER messages. However, I wish to simplified and use FM to get all the FEHLER table data in my customise program. I will need to delete some of the entries in FEHLER table after the correction has been done. Do you know how to do this?

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
758

HI,

Yes. Here the FM : HR_TIME_RESULTS_GET

Here the samaple code:


DATA: IT_ZL TYPE PC2B8 OCCURS 0 WITH HEADER LINE.
DATA:  BEGIN OF tgetbuff occurs 0,
          x(10),
       END OF tgetbuff.

  CALL FUNCTION 'HR_TIME_RESULTS_GET'
    EXPORTING
      GET_PERNR     = PERNR
      GET_PABRJ     = YEAR
      GET_PABRP     = MONTH
    TABLES
      GET_TBUFF     = TGETBUFF
      GET_FEHLER    = IT_FEHLER
    EXCEPTIONS
      NO_PERIOD_SPECIFIED   = 1
      WRONG_CLUSTER_VERSION = 2
      NO_READ_AUTHORITY     = 3
      CLUSTER_ARCHIVED      = 4
      TECHNICAL_ERROR       = 5
      OTHERS                = 6.

Regards,

3 REPLIES 3
Read only

Former Member
0 Likes
759

HI,

Yes. Here the FM : HR_TIME_RESULTS_GET

Here the samaple code:


DATA: IT_ZL TYPE PC2B8 OCCURS 0 WITH HEADER LINE.
DATA:  BEGIN OF tgetbuff occurs 0,
          x(10),
       END OF tgetbuff.

  CALL FUNCTION 'HR_TIME_RESULTS_GET'
    EXPORTING
      GET_PERNR     = PERNR
      GET_PABRJ     = YEAR
      GET_PABRP     = MONTH
    TABLES
      GET_TBUFF     = TGETBUFF
      GET_FEHLER    = IT_FEHLER
    EXCEPTIONS
      NO_PERIOD_SPECIFIED   = 1
      WRONG_CLUSTER_VERSION = 2
      NO_READ_AUTHORITY     = 3
      CLUSTER_ARCHIVED      = 4
      TECHNICAL_ERROR       = 5
      OTHERS                = 6.

Regards,

Read only

0 Likes
758

Hi,

Thanks for the reply. I just try the HR_TIME_RESULTS_GET, and i get the runtime error - OBJECTS_TABLES_NOT_COMPATIBLE. I have pass in the PERNR, YEAR and MONTH. Am I need to pass in data for TGETBUFF as well? What is the example data for this table? Thanks a lot

Read only

0 Likes
758

Hi, You don't need pass any data for table tgetbuff .

Try this simple report. It's work for me:


REPORT  Z_JRQ038R NO STANDARD PAGE HEADING
                 LINE-COUNT 65
                 LINE-SIZE 175.
*-----------------------------------------------------------------------
* D.A.T.A.
*-----------------------------------------------------------------------
DATA: IT_FL TYPE PC2B8 OCCURS 0 WITH HEADER LINE.
DATA:  BEGIN OF tgetbuff occurs 0,
              x(10),
           END OF tgetbuff.
*-----------------------------------------------------------------------
* S.E.L.L.E.C.T.I.O.N.  .S.C.R.E.E.N.
*-----------------------------------------------------------------------
  SELECTION-SCREEN BEGIN OF BLOCK BL02 WITH FRAME TITLE TEXT-S20.
    PARAMETERS:
      PERNR LIKE PA0001-PERNR,
      YEAR  LIKE T549Q-PABRJ,
      MONTH LIKE T549Q-PABRP.
  SELECTION-SCREEN END OF BLOCK BL02.
*-----------------------------------------------------------------------
* M.A.I.N.  .P.R.O.G.R.A.M.
*-----------------------------------------------------------------------
START-OF-SELECTION.

  CALL FUNCTION 'HR_TIME_RESULTS_GET'
    EXPORTING
      GET_PERNR     = PERNR
      GET_PABRJ     = YEAR
      GET_PABRP     = MONTH
    TABLES
      GET_TBUFF     = TGETBUFF
      GET_FEHLER    = IT_FL
    EXCEPTIONS
      NO_PERIOD_SPECIFIED   = 1
      WRONG_CLUSTER_VERSION = 2
      NO_READ_AUTHORITY     = 3
      CLUSTER_ARCHIVED      = 4
      TECHNICAL_ERROR       = 5
      OTHERS                = 6.

  CHECK IT_FL[] IS NOT INITIAL.
  LOOP AT IT_FL.
    WRITE: / IT_FL-LDATE, SPACE, IT_FL-LTIME, SPACE, IT_FL-ERRTY.
  ENDLOOP.

Regards,