Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

In Module Pool, with many screens, what the correct location to declare CREATE OBJECT ???

$
0
0

Hi friends, I have this scenario in my module pool. It´s working perfectly:

 

INCLUDE TOP:

DATA: GC_CLASS TYPE REF TO ZLCL_TEST.

 

SCREEN 1000:
CREATE OBJECT GC_CLASS.

GC_CLASS->METHODXXX( ).


SCREEN 2000:
GC_CLASS->METHODYYY( ).

 


But, for me, the code will be better formatted if I put CREATE OBJECT GC_CLASS outside screen.

 

I try put at INCLUDE TOP, after INITIALIZATION event, actived and run program, a dump was generated.

 

Someboy knows where a right and global location for the statement "CREATE OBJECT"??


I wish this:

INCLUDE TOP:

DATA: GC_CLASS TYPE REF TO ZLCL_TEST.

"CREATE OBJECT GC_CLASS." ??????

 

SCREEN 1000:
GC_CLASS->METHODXXX( ).


SCREEN 2000:
GC_CLASS->METHODYYY( ).

 

 

 

 

Regards,

 

Felipe


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>