Application Development 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: 

Does Dynamic subroutine accepts TYPES declared in Global area

surya_gupta3
Explorer
0 Kudos
68

Hi,

I tried building a dynamic subroutine where the a piece of code is being generated as:

REPORT ZZZZZZ.

FORM dynamic_delete USING

IM_VKORG TYPE SHP_VKORG_RANGE_T

IM_VTWEG TYPE SHP_VTWEG_RANGE_T

IM_SPART TYPE SHP_SPART_RANGE_T

IM_KUNNR TYPE SHP_KUNNR_RANGE_T

CHANGING rt_errlog TYPE type_t_errlog.

DATA : s_errlog TYPE LINE OF rt_errlog.

While GENERATE SUBROUTINE POOL, I am getting an error message(SY-SUBRC = 4):

The type "TYPE_T_ERRLOG" is unknown.

I have globally defined TYPE_T_ERRLOG. It is necessary that TYPE_T_ERRLOG should be defined in dictionary?

Regarding TYPE declaration in Dynamic subroutine, i would like to know the visibility of subroutine. Sub routine can view(parses) DDIC types. Similarly, can it view Global types declared in program from which the dynamic subroutine is being created?

Thanks & Regards,

Surya

2 REPLIES 2

andreas_mann3
Active Contributor
0 Kudos
37

Hi,

you must incude your global data in your subroutine.

report ZZZZZ.

incude ZZZZ_incl.

form...

Message was edited by: Andreas Mann

Former Member
0 Kudos
37

Declare a global workarea of type type_t_errlog.

And use that in the changing parameter.

Prakash.