Application Development and Automation 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: 
Read only

SMA Class-> Get_Instance_Infos

Former Member
0 Likes
595

Hi All,

For the Shared Memory Area, I am trying to use a method: Get_Instance_Infos. Maybe I'm missing it because it's late.. not sure.

I get an error message saying:

Program Zxxxxyyyyzzzz

Formal Parameter "INFOS" is not a EXPORTING parameter; it is a RETURNING parameter.

Relevant code is:

Types: Inst_InfosT Type SHM_Inst_Infos.
Data: InstInfos type Standard table of Inst_InfosT. 
aHnd = C_AreaClass=>attach_for_read( ).
Call Method aHnd->Get_Instance_Infos Exporting client = Syst-Mandt
                                                          Importing Infos = InstInfos. 

Maybe it's something obvious. I haven't worked with OO for a while now....

Thank You..... Dan Perecky

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
554

Hello Daniel

In this case the solution is simple:


Types: Inst_InfosT Type SHM_Inst_Infos.
Data: InstInfos type Standard table of Inst_InfosT. 
aHnd = C_AreaClass=>attach_for_read( ).
"Call Method aHnd->Get_Instance_Infos Exporting client = Syst-Mandt
"                                                          Importing Infos = InstInfos. 

Call Method aHnd->Get_Instance_Infos 
  Exporting 
    client = Syst-Mandt
  receiving 
    Infos = InstInfos. 
" Or use this functional call:
InstInfos = aHnd->Get_Instance_Infos( syst-client ).

Regards

Uwe

Hi All,

For the Shared Memory Area, I am trying to use a method: Get_Instance_Infos. Maybe I'm missing it because it's late.. not sure.

I get an error message saying:

Program Zxxxxyyyyzzzz

Formal Parameter "INFOS" is not a EXPORTING parameter; it is a RETURNING parameter.

Relevant code is:

Types: Inst_InfosT Type SHM_Inst_Infos.
Data: InstInfos type Standard table of Inst_InfosT. 
aHnd = C_AreaClass=>attach_for_read( ).
Call Method aHnd->Get_Instance_Infos Exporting client = Syst-Mandt
                                                          Importing Infos = InstInfos. 

Maybe it's something obvious. I haven't worked with OO for a while now....

Thank You..... Dan Perecky

3 REPLIES 3
Read only

uwe_schieferstein
Active Contributor
0 Likes
555

Hello Daniel

In this case the solution is simple:


Types: Inst_InfosT Type SHM_Inst_Infos.
Data: InstInfos type Standard table of Inst_InfosT. 
aHnd = C_AreaClass=>attach_for_read( ).
"Call Method aHnd->Get_Instance_Infos Exporting client = Syst-Mandt
"                                                          Importing Infos = InstInfos. 

Call Method aHnd->Get_Instance_Infos 
  Exporting 
    client = Syst-Mandt
  receiving 
    Infos = InstInfos. 
" Or use this functional call:
InstInfos = aHnd->Get_Instance_Infos( syst-client ).

Regards

Uwe

Read only

GrahamRobbo
SAP Mentor
SAP Mentor
0 Likes
554

Hi Dan,

try something like this for a returning parameter.

InstInfos = aHnd->Get_Instance_Infos( Exporting client = Syst-Mandt ).

Cheers

Graham Robbo

Read only

0 Likes
554

Uwe,

Thank you... That worked.

'Receiving' was one big thing (wasn't it 'Importing' at one time?). Also, it turns out that type SHM_Inst_Infos is already a table type.

Take Care, Dan P.