Skip to Content
0
Jul 27, 2023 at 11:44 AM

How to get header_func of report

135 Views Last edit Aug 01, 2023 at 12:03 PM 6 rev

Hello Community, I have a question.
I have a Program and i need read a list of reports and take your source code, i use the form GET_INCLUDES to get includes listeds in report, but i received functions and reports in addition. can i read the header_function report, or identify the item from list like include to read your source code?

  PARAMETERS: p_n_prog type programm.
  DATA: lt_source TYPE TABLE OF string.
  DATA: lt_include TYPE TABLE OF string,
        lv_result TYPE trdir-name.
  CALL FUNCTION 'GET_INCLUDES'
    EXPORTING
     progname       = p_n_prog
    tables
     incltab        = lt_include.
  BREAK POINT.
  LOOP AT lt_include INTO DATA(ls_include).
    CALL METHOD cl_reca_rs_services=>get_source
      EXPORTING
        id_objtype = 'PROG'
        id_objname = ls_include
      IMPORTING
        et_source  = lt_source.
  ENDLOOP.

Here there are a list of includes into internal table lt_include

image.png

Attachments

image.png (26.4 kB)