Skip to Content
0
Former Member
Sep 26, 2013 at 06:19 AM

Use of SAP templates in Object Oriented Approach

24 Views

Hi Colleagues

I have a template ( a report containing commented code which categorizes different abap statements ) . This report contains dynamic select query .
By this categorization i mean

"DATA BEGIN OF P_REAC OCCURS 20.

" INCLUDE STRUCTURE &TABNAME .

"DATA END OF P_REAC.

( " for data declarations )

**FIELDCAT AND gv_redet-&FIELDNAME = up_bedf-&FIELDNAME

( ** for dynamic select query )

This report is uncommented , filled with actual data and compiled at runtime using the code like

*- generate subroutine pool ------------------------------------------*

generate subroutine pool h_codetab name g_report

message h_codetab_message

include h_codetab_include

line h_codetab_line

word h_codetab_word.

This generates a report (gv_determination-report) .

Now this report is used in a subroutine like :

PERFORM rereg_determination IN PROGRAM (gv_determination-report)

USING im_bedf

gv_determination-table

im_bedf-j_3aresgy

CHANGING ex_rereg.



I am trying to achieve all of this using OOPS approach .

Please let me know whether this is possible .

Kindly give your inputs.

Thanks and Best Regards

Varsha




.