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: 

Call Local class within PAI Module

Floatjitsu
Explorer
717

Hey there,

I have a program with 4 includes in it. One top-include (global data), one for pai-modules, one for pbo-modules and one for a local helper class.

I put the definition and implementation of my local class in the include "local helper class". Now I want to access the instance of this class inside the pai-module after an user-command with lcl_class=>get_instance( ). I used the singleton pattern.


But when I want to activate the PAI Module, an error occurs, saying "Type lcl_class is unknown". Even when I set a variable inside my top-include, the same error occurs after I try to activate the program.

Any one know how to solve this?

Thank you and best regards

Timur

1 ACCEPTED SOLUTION

Floatjitsu
Explorer
314

SOLVED

I solved this problem. Had to put the PAI-Include after the Local-Class-Helper-Include. So now its like:

INCLUDE Z_TEST_TOP             .    " global Data
INCLUDE Z_TEST_PBO.                 " PBO
INCLUDE Z_TEST_HELPER.              " Local Helper Class
INCLUDE Z_TEST_PAI.                 " PAI

Before this sequence the Include for Local Helper Class was the last one.

2 REPLIES 2

Floatjitsu
Explorer
315

SOLVED

I solved this problem. Had to put the PAI-Include after the Local-Class-Helper-Include. So now its like:

INCLUDE Z_TEST_TOP             .    " global Data
INCLUDE Z_TEST_PBO.                 " PBO
INCLUDE Z_TEST_HELPER.              " Local Helper Class
INCLUDE Z_TEST_PAI.                 " PAI

Before this sequence the Include for Local Helper Class was the last one.

0 Kudos
65

Can You please share the whole code here as I am also facing same issue, I want to write my report using complete class method approach but when I am trying to access object of my local class inside PBO & PAI event it is showing me error. I think your code will help me to figure out,