Skip to Content
author's profile photo
Former Member

OO ABAP - Retrieve source from Class Builder?

Hi. Is there a way to display the source code for a class or interface definition that was created with the class builder (se24).

I looked through the drop downs, but I didn't see anything to display the source.

Thanks in advance.

Brendan

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on Aug 10, 2004 at 08:16 AM

    ******

    Message was edited by: Brian McKellar

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      A class is distributed upon several includes. The Se24 in my 45b system offers to view the source via button on the bottom of the method list.

      If you like you can try the following sample program also. Just paste the source and create the Pf-Status 'STA_MAIN' (line 135) and add the commands PICK(f2),Back, Exit, My_Edit(any key).

      PS: double clicking on a include navigates forward ( if PICK is set to F2 ).

      PPS: If you experience trouble with pasting the code and lost line termination, please paste into wordpad an save as text file.

      [code]

      *----


      *

      • report: Ze80Lite

      *

      • created: 17.aug.2000

      *

      *----


      *

      • purpose

      • this report displays various informations of report-source files

      *

      *----


      *

      • Change History

      *

      • #nn - dd.mmm.yyyy - Author

      • short description

      *

      • #00 - 17.aug.2000 - KZI

      • initial

      *----


      report Ze80Lite

      no standard page heading

      line-size 120

      message-id sx.

      *$ external types & constants =====================

      *======================================================================

      *$ local types ========================================================

      *======================================================================

      types:

      typ_source type string,

      typ_source_tab type standard table of typ_source,

      begin of typ_file_info,

      lsind type syst-lsind,

      isvalid type flag,

      r3state type d010sinf-r3state,

      prgnam type programm,

      srcnam type programm,

      prgtyp type d010sinf-subc,

      end of typ_file_info,

      begin of typ_line_info,

      flag_newline type flag,

      flag_comment type flag,

      text type string,

      end of typ_line_info,

      begin of typ_method_info,

      methodname type tmdir-methodname,

      methodindx type tmdir-methodindx,

      end of typ_method_info,

      typ_method_info_tab type standard table of typ_method_info,

      typ_line_tab type standard table of typ_line_info.

      selection-screen begin of block sel1 with frame title text-s01.

      parameter:

      p_prgnam type programm obligatory,

      p_state type d010sinf-r3state default 'I',

      p_typprg radiobutton group 0001 default 'X',

      p_typcla radiobutton group 0001,

      p_typifc radiobutton group 0001,

      p_typfct radiobutton group 0001,

      p_typmod radiobutton group 0001,

      p_typool radiobutton group 0001.

      selection-screen end of block sel1.

      constants:

      begin of gcr_rep,

      " -


      typ_prg type i value 1,

      typ_cla type i value 2,

      typ_ifc type i value 3,

      typ_fct type i value 4,

      typ_mod type i value 5,

      typ_pool type i value 6,

      " -


      max_modi type syst-lsind value 5,

      max_width type i value 80,

      mem_prg type memoryid value 'ST22_PRGNAME',

      mem_typ type memoryid value '91A', " missuse

      mem_dir type memoryid value '91B', " missuse

      mem_sta type memoryid value '91C', " missuse

      end of gcr_rep.

      data:

      goa_file type standard table of typ_file_info.

      • =====================================================================

      *$ report eventing ====================================================

      • =====================================================================

      initialization.

      perform sub_init.

      at selection-screen.

      perform sub_check.

      start-of-selection.

      perform sub_main.

      at line-selection.

      perform sub_click.

      at user-command.

      perform sub_command

      using sy-ucomm.

      sy-ucomm = ''.

      • =====================================================================

      *$ subroutines ========================================================

      • =====================================================================

      ***************

      • form : sub_main

      • purp. : main entry point for procecssing

      • param : <global> from selectio screen

      • rcode : ---

      • hist. : #00 - KZI - created

      ***************

      form sub_main.

      • data declaration

      data:

      lon_error type i,

      lon_srctyp type i,

      loc_srcnam type programm,

      lor_file type typ_file_info.

      • init

      set pf-status 'STA_MAIN'.

      clear:

      lor_file,

      goa_file.

      do 10 times.

      append lor_file to goa_file[].

      enddo.

      • get the type

      " keep in sync with parameter, sub_check, sub_init

      case 'X'.

      when p_typprg.

      lon_srctyp = gcr_rep-typ_prg.

      when p_typcla.

      lon_srctyp = gcr_rep-typ_cla.

      when p_typifc.

      lon_srctyp = gcr_rep-typ_ifc.

      when p_typfct.

      lon_srctyp = gcr_rep-typ_fct.

      when p_typmod.

      lon_srctyp = gcr_rep-typ_mod.

      when p_typool.

      lon_srctyp = gcr_rep-typ_pool.

      when others.

      lon_srctyp = gcr_rep-typ_prg.

      endcase.

      • get true name

      perform sub_get_srcnam

      using

      lon_srctyp

      p_prgnam

      changing

      lon_error

      loc_srcnam.

      perform sub_dsp_source

      using

      p_prgnam

      loc_srcnam.

      • the end

      exit. " form

      endform. "sub_main

      ***************

      • form : sub_click

      • purp. : entry point for line selection

      • param : <global> sy-lisel

      • rcode : ---

      • hist. : #00 - KZI - created

      ***************

      form sub_click.

      • data declaration

      data:

      lon_error type i,

      loc_prgnam type programm,

      loc_srcnam type programm.

      • get possibly program name

      if ( 0 eq lon_error ).

      perform sub_get_word_from_list

      changing

      loc_prgnam.

      if ( '' eq loc_prgnam ).

      lon_error = 1.

      else.

      translate loc_prgnam to upper case.

      endif.

      endif.

      • get source name

      if ( 0 eq lon_error ).

      case loc_prgnam.

      when 'METHODS'.

      perform sub_dsp_methods.

      when others.

      perform sub_get_srcnam

      using

      gcr_rep-typ_prg

      loc_prgnam

      changing

      lon_error

      loc_srcnam.

      if ( 0 eq lon_error ).

      perform sub_dsp_source

      using

      loc_srcnam

      loc_srcnam.

      endif.

      endcase.

      endif.

      • the end

      exit. " form

      endform. "sub_click

      ***************

      • form : sub_command

      • purp. : entry point for user command

      • param : ---

      • rcode : ---

      • hist. : #00 - KZI - created

      ***************

      form sub_command

      using

      value(poc_cmd) type syst-ucomm.

      • data declaration

      data:

      lon_error type i,

      lon_lsind type syst-lsind,

      lor_file type typ_file_info.

      • try to catch a valid file info

      if ( 0 eq lon_error ).

      read table goa_file[]

      into lor_file

      with key lsind = sy-lsind.

      if ( 0 ne sy-subrc ).

      lon_error = 1.

      elseif ( 'X' ne lor_file-isvalid ).

      lon_error = 1.

      endif.

      endif.

      • dispatch work

      if ( 0 eq lon_error ).

      case poc_cmd.

      when 'MY_EDIT'.

      editor-call for report lor_file-srcnam display-mode.

      when 'MY_HELP'.

      perform sub_dsp_help.

      when others.

      " nop

      endcase.

      endif.

      endform. "sub_command

      ***************

      • form : sub_get_word_from_list

      • purp. : get the word clicked on

      • param : <global> sy-lisel

      • rcode : ---

      • hist. : #00 - created

      • #01 - fixed a problem with words starting in first column

      ***************

      form sub_get_word_from_list

      changing

      prc_srcnam type programm.

      data:

      loc_cmp(1) type c,

      lon_bgn type i,

      lon_end type i,

      lon_len type i.

      • get fundamental data

      lon_len = strlen( sy-lisel ).

      lon_bgn = sy-cucol.

      lon_end = sy-cucol.

      • find begin/end of word

      do.

      loc_cmp = sy-lisel+lon_bgn(1).

      if

      (

      '' eq loc_cmp or

      '"'',.' ca loc_cmp

      ).

      exit." do

      endif.

      lon_bgn = lon_bgn - 1.

      if ( 0 GT lon_bgn ).

      exit. " do

      endif.

      enddo.

      lon_bgn = lon_bgn + 1.

      do.

      loc_cmp = sy-lisel+lon_end(1).

      if

      (

      lon_len le lon_end or

      '' eq loc_cmp or

      '"'',.' ca loc_cmp

      ).

      exit.

      endif.

      lon_end = lon_end + 1.

      enddo.

      lon_end = lon_end - 1.

      • if end >= begin give it back

      if ( lon_end ge lon_bgn ).

      lon_len = lon_end - lon_bgn + 1.

      prc_srcnam = sy-lisel+lon_bgn(lon_len).

      endif.

      endform. "sub_get_word_from_list

      ***************

      • form : sub_get_srcnam

      • purp. : builds sourcename according to selection screen settings

      • param : pon_prgtyp distinquish the various program types

      • pon_prgnam the program name used to build the source file

      • rcode : prn_error 0 success, else failure

      • prc_srcnam name of sourcefile

      • hist. : #00 - KZI - created

      ***************

      form sub_get_srcnam

      using

      value(pon_prgtyp) type i

      value(poc_prgnam) type program

      changing

      prn_error type i

      prc_srcnam type programm.

      • data declaration

      data:

      lon_error type i, " local errorflag

      x type i, " simple counter

      y type i, " simple counter

      lor_tfdir type tfdir. " prog info tab.

      • build the true filename dependend on prg type

      " keep this source in sync with parameter, sub_check, sub_init

      case pon_prgtyp.

      when gcr_rep-typ_prg.

      " simple program

      prc_srcnam = poc_prgnam.

      when gcr_rep-typ_cla.

      " class

      prc_srcnam = poc_prgnam.

      x = strlen( poc_prgnam ).

      if ( 30 > x ).

      y = 30 - x.

      prc_srcnam+x(y) = '=============================='.

      endif.

      prc_srcnam+30(2) = 'CP'.

      when gcr_rep-typ_ifc.

      " interface

      prc_srcnam = poc_prgnam.

      x = strlen( poc_prgnam ).

      if ( 30 > x ).

      y = 30 - x.

      prc_srcnam+x(y) = '=============================='.

      endif.

      prc_srcnam+30(2) = 'IP'.

      when gcr_rep-typ_fct.

      " function pool

      concatenate

      'SAPL'

      poc_prgnam

      into prc_srcnam.

      when gcr_rep-typ_mod.

      " function module

      select

      single *

      into lor_tfdir

      from tfdir

      where funcname = poc_prgnam.

      if ( 0 eq sy-subrc ).

      concatenate

      'L'

      lor_tfdir-pname+4

      'U'

      lor_tfdir-include

      into prc_srcnam.

      else.

      lon_error = 1.

      endif.

      when gcr_rep-typ_pool.

      " type pool

      concatenate '%_C' poc_prgnam into prc_srcnam.

      when others.

      " unknown type

      lon_error = 1.

      endcase.

      • the end

      if ( 0 eq lon_error ).

      prn_error = 0.

      else.

      prn_error = 1.

      prc_srcnam = p_prgnam.

      endif.

      endform. "sub_get_srcnam

      ***************

      • form : Sub_Dsp_Methods

      • purp. : displays methods of a Class

      • param : prc_ClassName the name of the class to display methods from

      • rcode :

      • hist. : #00 - KZI - created

      ***************

      form sub_dsp_methods.

      • data declaration

      constants:

      c_Num_Index type i value 35,

      c_Num_Modulo type i value 36,

      c_Index(37) type c

      value '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ?'.

      data:

      lon_Fraction type i,

      lon_Modulo type i,

      lon_Index type i,

      lon_Offset type i,

      loa_methods type typ_method_info_tab,

      loc_Class_Name type tmdir-classname,

      loc_include_Name type programm,

      lor_file type typ_file_info,

      loc_Index(3) type c.

      field-symbols:

      <lor_method> type typ_method_info.

      • init &_ precheck

      lor_file-isvalid = ''.

      lor_file-prgtyp = ''.

      lor_file-lsind = sy-lsind + 1.

      modify goa_file[] from lor_file index lor_file-lsind.

      read table goa_file[] index sy-lsind into lor_file.

      if ( 0 ne sy-subrc or 'X' ne lor_File-isValid ).

      exit.

      endif.

      loc_Class_Name = lor_File-PrgNam.

      if ( loc_class_name cs '=' ).

      loc_Class_Name = loc_class_name(sy-fdpos).

      endif.

      • get all methods

      select methodname methodindx from tmdir

      into corresponding fields of table loa_methods[]

      where

      classname = loc_class_name AND

      methodname <> ''

      order by

      methodindx.

      if ( 0 ne sy-subrc ).

      write:

      'could not be loaded!'(e04),

      / 'No entry in TMDIR,' , loc_class_name.

      exit.

      endif.

      • put em on the list.

      Format: Reset.

      loc_Include_Name = loc_Class_Name.

      concatenate

      loc_Include_Name

      '=================================================='

      into loc_Include_Name.

      loc_Include_Name+30 = 'CM'.

      loop at loa_methods[] assigning <lor_method>.

      loc_Index = '000'.

      lon_Offset = 3.

      lon_Modulo = <lor_Method>-MethodIndx mod c_Num_Modulo.

      lon_Fraction = <lor_Method>-MethodIndx div c_Num_Modulo.

      while ( ( lon_Fraction > 0 or lon_Modulo > 0 ) and lon_Offset > 0 ).

      lon_Offset = lon_Offset - 1.

      loc_Indexlon_Offset(1) = c_Indexlon_Modulo(1).

      loc_Include_Name+32 = loc_Index.

      lon_Modulo = lon_Fraction mod c_Num_Modulo.

      lon_Fraction = lon_Fraction div c_Num_Modulo.

      endwhile.

      write: /

      loc_include_name intensified,

      at 40 <lor_method>-methodname(40).

      endloop.

      endform. "sub_Dsp_Methods

      ***************

      • form : sub_Dsp_Source

      • purp. : loads source file from database and displays its contents

      • with write

      • param : prc_srcnam name of source piece to display

      • rcode : <hide> name of occasional included files

      • hist. : #00 - KZI - created

      ***************

      form sub_dsp_source

      using

      value(poc_prgnam) type programm

      value(poc_srcnam) type programm.

      • data declaration

      data:

      lon_error type i,

      lon_warn type i,

      loa_source type standard table of typ_source,

      loa_lines type typ_line_tab,

      loc_line type string,

      loc_print type string,

      lon_tmp type i,

      lon_tabix type syst-tabix,

      lor_d010sinf type d010sinf,

      lor_file type typ_file_info.

      field-symbols:

      <lof_source> type typ_source,

      <lof_line> type typ_line_info.

      • init &_ precheck

      format:

      reset.

      if ( gcr_rep-max_modi lt sy-lsind ). " limit modes

      sy-lsind = gcr_rep-max_modi.

      endif.

      lor_file-srcnam = poc_srcnam.

      lor_file-prgnam = poc_prgnam.

      lor_file-lsind = sy-lsind + 1.

      lor_file-r3state = p_state.

      • poc_srcnam = ucase( poc_srcnam ).

      • check existance

      if ( 0 eq lon_error ).

      select *

      from d010sinf up to 1 rows

      into lor_d010sinf

      where

      prog = poc_srcnam

      order by

      r3state

      cdat.

      if ( lor_d010sinf-r3state eq p_state ).

      exit. " loop

      endif.

      endselect.

      if ( 0 ne sy-subrc ).

      lon_error = 1.

      write:

      'could not be loaded!'(e04),

      / 'No entry in D010SINF,' , poc_srcnam.

      endif.

      endif.

      • get report text

      if ( 0 eq lon_error ).

      read report poc_srcnam into loa_source[] state p_state.

      if ( 0 ne sy-subrc and 'I' eq p_state ).

      read report poc_srcnam into loa_source[] state 'A'.

      lon_warn = 1.

      endif.

      if ( 0 ne sy-subrc ).

      lon_tmp = strlen( poc_srcnam ).

      write: / 'Program'(e01).

      format inverse on. format color col_negative on.

      write at (lon_tmp) poc_srcnam.

      format inverse off. format color col_negative off.

      write: /

      'Cannot load source info, sy-subrc= '(e02),sy-subrc.

      endif.

      endif.

      • create display

      if ( 0 eq lon_error ).

      perform sub_dsp_source_lines

      using

      poc_prgnam

      0

      0

      loa_source[]

      changing

      lon_error.

      endif.

      • update internal memory

      if ( 0 eq lon_error ).

      lor_file-isvalid = 'X'.

      if ( 0 eq lon_warn ).

      lor_file-r3state = p_state.

      else.

      lor_file-r3state = 'A'.

      endif.

      lor_file-prgtyp = lor_d010sinf-subc.

      else.

      lor_file-isvalid = ''.

      lor_file-prgtyp = ''.

      endif.

      modify goa_file[] from lor_file index lor_file-lsind.

      • the end

      if ( 0 ne lon_warn ).

      message s777 with

      'There is no inactive version => no upload possible!'(i01).

      endif.

      exit. " form

      endform. "sub_dsp_source

      ***************

      • form : sub_dsp_source_lines

      • purp. : loads source file from database and displays its contents

      • with write

      • param : poc_prgnam name of source piece to display

      • pra_source source to display

      • rcode : prn_error 0 success

      • hist. : #00 - KZI - created

      ***************

      form sub_dsp_source_lines

      using

      value(poc_prgnam) type programm

      value(pon_lwr_ndx) type i

      value(pon_upr_ndx) type i

      pra_source type typ_source_tab

      changing

      prn_error type i.

      • data declaration

      data:

      lon_Strlen type i,

      lon_Tabix(5) type n,

      loa_lines type typ_line_tab,

      loc_line type string,

      lon_error type i,

      lon_tmp type i,

      lon_lwr_ndx type syst-tabix,

      lon_upr_ndx type syst-tabix.

      field-symbols:

      <lof_source> type typ_source,

      <lof_line> type typ_line_info.

      • init &_ precheck

      format:

      reset.

      lon_error = 0.

      describe table pra_source[] lines lon_tmp.

      if ( 1 gt pon_lwr_ndx or lon_tmp lt pon_lwr_ndx ).

      lon_lwr_ndx = 1.

      else.

      lon_lwr_ndx = pon_lwr_ndx.

      endif.

      if ( 1 gt pon_upr_ndx or lon_tmp lt pon_upr_ndx ).

      lon_upr_ndx = lon_tmp.

      else.

      lon_upr_ndx = pon_upr_ndx.

      endif.

      • create display

      if ( 0 eq lon_error ).

      format: reset.

      loop at pra_source[]

      assigning <lof_source>

      from lon_lwr_ndx

      to lon_upr_ndx.

      lon_tabix = syst-tabix.

      loc_line = <lof_source>.

      perform sub_cut_text_comment

      using

      loc_line

      'X'

      changing

      loa_lines[].

      loop at loa_lines[] assigning <lof_line>.

      if ( 'X' eq <lof_line>-flag_newline ).

      if ( 0 ne lon_tabix ).

      write:

      /(5) lon_tabix intensified color col_normal.

      else.

      write:

      /(5) ' .' intensified color col_normal.

      endif.

      write at 6 ''.

      lon_tabix = 0.

      endif.

      lon_Strlen = strlen( <lof_Line>-Text ).

      if ( 'X' eq <lof_line>-flag_comment ).

      write: at (lon_Strlen)

      <lof_line>-text intensified no-gap.

      else.

      write: at (lon_Strlen)

      <lof_line>-text no-gap.

      endif.

      endloop.

      endloop.

      endif.

      • the end

      if ( 0 ne lon_error ).

      prn_error = 1.

      else.

      prn_error = 0.

      endif.

      exit. " form

      endform. "sub_dsp_source_lines

      ***************

      • form : sub_chk_input

      • purp. : (en) validate input data

      • (de) validieren der eingabewerte

      • param : ---

      • rcode : ---

      • hist. : #00 - initial

      ***************

      form sub_dsp_help.

      • data declaration

      data:

      lon_error type i,

      loa_tline type standard table of tline,

      loc_docnam type syst-repid.

      • show help about ?

      if ( 0 eq lon_error ). " Help

      loc_docnam = sy-repid.

      call function 'HELP_OBJECT_SHOW'

      exporting

      dokclass = 'RE'

      dokname = loc_docnam

      tables

      links = loa_tline[]

      exceptions

      object_not_found = 1

      sapscript_error = 2

      others = 3.

      if ( 0 ne sy-subrc ).

      lon_error = 1.

      message w777 with 'No Help Available'(w00).

      sy-subrc = 0.

      endif.

      endif.

      endform. "sub_dsp_help

      ***************

      • form : sub_init

      • purp. : initializes the selection screen

      • param : ---

      • rcode : ---

      • hist. : #00 - KZI - created

      ***************

      form sub_init.

      • data declaration

      data:

      loc_memory(256) type c,

      lon_memory type i.

      • memory id logic

      " get prog

      get parameter id gcr_rep-mem_prg field p_prgnam.

      if ( 0 ne sy-subrc or '' eq p_prgnam ).

      p_prgnam = sy-repid.

      endif.

      set parameter id gcr_rep-mem_prg field p_prgnam.

      " get prog type ( keep in sync with parameters sub_check and

      " sub_get_srcnam )

      get parameter id gcr_rep-mem_typ field loc_memory.

      condense loc_memory.

      loc_memory = loc_memory(4).

      if ( loc_memory co ' 0123456789' ).

      lon_memory = loc_memory.

      else.

      lon_memory = gcr_rep-typ_prg.

      endif.

      clear:

      p_typcla,

      p_typfct,

      p_typifc,

      p_typmod,

      p_typool,

      p_typprg.

      case lon_memory.

      when gcr_rep-typ_prg.

      p_typprg = 'X'.

      when gcr_rep-typ_cla.

      p_typcla = 'X'.

      when gcr_rep-typ_ifc.

      p_typifc = 'X'.

      when gcr_rep-typ_fct.

      p_typfct = 'X'.

      when gcr_rep-typ_mod.

      p_typmod = 'X'.

      when gcr_rep-typ_pool.

      p_typool = 'X'.

      when others.

      " default

      p_typprg = 'X'.

      endcase.

      " get status ( keep in sync with sub check ).

      get parameter id gcr_rep-mem_sta field p_state.

      if ( 'A' ne p_state ).

      " only 'I' or 'A' is allowed

      p_state = 'I'.

      endif.

      set parameter id gcr_rep-mem_sta field p_state.

      endform. "sub_init

      ***************

      • form : sub_check

      • purp. : at the selection screen

      • param : ---

      • rcode : ---

      • hist. : #00 - KZI - created

      ***************

      form sub_check.

      • data declaration

      data:

      loc_memory(4) type c,

      lon_rcode type i.

      • memory id handling

      case p_state.

      when 'A' or 'I'.

      " ok

      when others.

      message e777 with

      'Only ''A'' and ''I'' are allowed for state'(se1).

      endcase.

      set parameter id gcr_rep-mem_prg field p_prgnam.

      set parameter id gcr_rep-mem_sta field p_state.

      " multiple choice

      " keep in sync with parameters and sub_check, sub_main

      case 'X'.

      when p_typprg.

      loc_memory = gcr_rep-typ_prg.

      when p_typcla.

      loc_memory = gcr_rep-typ_cla.

      when p_typifc.

      loc_memory = gcr_rep-typ_ifc.

      when p_typfct.

      loc_memory = gcr_rep-typ_fct.

      when p_typmod.

      loc_memory = gcr_rep-typ_mod.

      when p_typool.

      loc_memory = gcr_rep-typ_pool.

      when others.

      " if bugfree this should never happen, sync source if you

      " expierience this source to be executed

      loc_memory = gcr_rep-typ_prg.

      endcase.

      if ( '' ne loc_memory ).

      set parameter id gcr_rep-mem_typ field loc_memory.

      endif.

      endform. "sub_check

      ***************

      • form : sub_split_comment

      • purp. : splits a line into a comment and command part.

      • param : poc_line to source line

      • poc_command the command part

      • poc_comment the comment part

      • rcode : <hide> name of occasional included files

      • hist. : #00 - KZI - created

      ***************

      form sub_split_comment

      using

      value(poc_line) type typ_source

      changing

      prc_command type typ_source

      prc_comment type typ_source.

      • data declaration

      data:

      loc_First_Char(1) type c,

      lon_len_old type i,

      lon_len_new type i,

      lon_pos_cmt type i,

      loc_buf1 type string,

      loc_buf2 type string,

      loc_cmtbuf(240) type c.

      • init & precheck

      clear:

      prc_command,

      prc_comment.

      • computation

      loc_First_Char = poc_Line.

      if ( '*' eq loc_First_Char ).

      prc_command = ''.

      prc_comment = poc_line.

      else.

      if ( poc_line ca '"' and poc_line np '''"''' ).

      split poc_line at '"' into loc_buf1 loc_buf2.

      if ( '' eq loc_buf1 ).

      prc_command = ''.

      prc_comment = poc_line.

      else.

      lon_len_old =

      strlen( poc_line ).

      lon_len_new =

      strlen( loc_buf1 ) +

      strlen( loc_buf2 ).

      lon_pos_cmt = lon_len_old - lon_len_new - 2.

      if ( 0 gt lon_pos_cmt or 240 lt lon_pos_cmt ).

      lon_pos_cmt = 0.

      endif.

      loc_cmtbuf+lon_pos_cmt = '"'.

      prc_command = loc_buf1.

      concatenate loc_cmtbuf loc_buf2 into prc_comment.

      endif.

      else.

      prc_command = poc_line.

      prc_comment = ''.

      endif.

      endif.

      • the end

      exit. " form

      endform. "sub_split_comment

      ***************

      • form : sub_cut_text_comment

      • purp. : splits a line into a comment and command part.

      • param : poc_line to source/text line

      • poc_cmt 'X' chk for comments

      • rcode : pra_lines filled with line info ( reset )

      • hist. : #00 - KZI - created

      ***************

      form sub_cut_text_comment

      using

      value(poc_line) type string

      value(poc_cmt_check) type flag

      changing

      pra_lines type typ_line_tab.

      • data declaration

      data:

      loc_buf1 type string,

      loc_buf2 type string,

      loc_comment type string,

      loc_command type string.

      data:

      loc_First_Char(1) type c,

      loc_new_line type flag,

      lon_cur_pos type i,

      lon_new_pos type i.

      • init & precheck

      clear:

      pra_lines[],

      loc_command,

      loc_comment.

      • computation

      loc_First_Char = poc_Line.

      if ( '' eq poc_cmt_check or '' eq poc_line ).

      loc_command = poc_line.

      loc_comment = ''.

      else.

      if ( '*' eq loc_First_Char ).

      loc_command = ''.

      loc_comment = poc_line.

      else.

      if ( poc_line ca '"' and poc_line np '''"''' ).

      split poc_line at '"' into loc_buf1 loc_buf2.

      if ( '' eq loc_buf1 ).

      loc_command = ''.

      loc_comment = poc_line.

      else.

      loc_command = loc_buf1.

      concatenate '"' loc_buf2 into loc_comment.

      endif.

      else.

      loc_command = poc_line.

      loc_comment = ''.

      endif.

      endif.

      endif.

      • cvt text

      lon_cur_pos = 0.

      loc_new_line = 'X'.

      if ( '' ne loc_command ).

      perform sub_cut_text_width

      using

      loc_command

      loc_new_line

      ''

      lon_cur_pos

      gcr_rep-max_width

      changing

      pra_lines[]

      lon_new_pos.

      lon_cur_pos = lon_new_pos.

      loc_new_line = ''.

      endif.

      if ( '' ne loc_comment ).

      perform sub_cut_text_width

      using

      loc_comment

      loc_new_line

      'X'

      lon_cur_pos

      gcr_rep-max_width

      changing

      pra_lines[]

      lon_new_pos.

      lon_cur_pos = lon_new_pos.

      loc_new_line = ''.

      endif.

      if ( '' ne loc_new_line ).

      perform sub_cut_text_width

      using

      ''

      loc_new_line

      ''

      lon_cur_pos

      gcr_rep-max_width

      changing

      pra_lines[]

      lon_new_pos.

      lon_cur_pos = lon_new_pos.

      loc_new_line = ''.

      endif.

      • the end

      exit. " form

      endform. "sub_cut_text_comment

      ***************

      • form : sub_cut_text_width

      • purp. : splits text info into several lines to make them

      • fit to a max-width

      • param : poc_line to source/text line

      • poc_cmt 'X' chk for comments

      • rcode : pra_lines appended ( no reset ) line info.

      • hist. : #00 - KZI - created

      ***************

      form sub_cut_text_width

      using

      value(poc_text) type string

      value(poc_new_line) type flag

      value(poc_typ_cmt) type flag

      value(pon_cur_pos) type i

      value(pon_max_width) type i

      changing

      pra_lines type typ_line_tab

      prn_new_pos type i.

      • data declaration

      data:

      lor_text_info type typ_line_info,

      lon_cnt_loop type i,

      lon_tmp type i,

      lon_pos_cur type i,

      lon_len_cur type i,

      loc_buf_cur type string,

      loc_new_line type flag.

      • init & precheck

      loc_buf_cur = poc_text.

      loc_new_line = poc_new_line.

      lon_pos_cur = pon_cur_pos.

      do.

      if ( '' eq loc_buf_cur and '' eq loc_new_line or

      1000 lt lon_cnt_loop ).

      exit. " do

      else.

      lon_cnt_loop = lon_cnt_loop + 1.

      clear:

      lor_text_info.

      lor_text_info-flag_comment = poc_typ_cmt.

      if ( '' ne loc_new_line ).

      loc_new_line = ' '.

      lor_text_info-flag_newline = 'X'.

      lon_pos_cur = 0.

      endif.

      lon_len_cur = strlen( loc_buf_cur ).

      lon_tmp = lon_pos_cur + lon_len_cur.

      if ( lon_tmp le pon_max_width ).

      " all fits in currentline

      lor_text_info-text = loc_buf_cur.

      loc_buf_cur = ''.

      lon_pos_cur = lon_pos_cur + lon_len_cur.

      else.

      " we need to split

      lon_tmp = pon_max_width - lon_pos_cur.

      if ( 0 gt lon_tmp ).

      " should not happen

      lor_text_info-text = loc_buf_cur.

      loc_buf_cur = ''.

      else.

      lor_text_info-text = loc_buf_cur(lon_tmp).

      loc_buf_cur = loc_buf_cur+lon_tmp.

      endif.

      lon_pos_cur = 0.

      loc_new_line = 'X'.

      endif.

      append lor_text_info to pra_lines[].

      endif.

      enddo.

      • the end

      prn_new_pos = lon_pos_cur.

      exit. " form.

      endform. "sub_cut_text_width

      [/code]

  • author's profile photo
    Former Member
    Posted on Aug 10, 2004 at 06:21 AM

    Try double clicking on the method/interface

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I'm sorry. I should have mentioned that my release is 45B. Is it possible to display the class source code in this release?

  • author's profile photo
    Former Member
    Posted on Aug 12, 2004 at 01:29 PM

    Try report SEO_CLASS_OUTPUT in the SEO packet.

    or in the class browser double-click the class and

    then use menu SPRINGEN(JUMP)->public(protected, private)

    section to view the definitions.

    thomas

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Aug 18, 2004 at 04:53 PM

    If the transaction exists in 45X, you may want to use SHOW_CLIF.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      There is OO service class available to get the respective include members of class members...

      Class name: CL_OO_CLASSNAME_SERVICE - there are various methods. For example method GET_METHOD_INCLUDE will return the include name for a method...

      Check whether this exists as of 45X or not? If not let me know I can pass you the code to extract/ determine.

      Regards

      Anjaiah