cancel
Showing results for 
Search instead for 
Did you mean: 

Badi SOCM_PROCESS_ACTION => Read HF_INSTANCE information

Former Member
0 Kudos

Hi,

I have a problem to read the attributes of HF_INSTANCE parameter in the badi SOCM_PROCESS_ACTION method IF_EX_SOCM_PROCESS_ACTION~PROCESS_ACTION.

I can see the type is a REF of IF_SOCM_INSTANCE_ATTRIBUTES.

In debug mode we can remark that this reference point of class object

and we can access to this data

0 \CLASS=OBJECT

1 \CLASS=CL_CHM1_INSTANCE

IF_SOCM_INSTANCE_ATTRIBUTES

IF_SOCM_INSTANCE

IF_CHM1_INSTANCE

IF_EX_SOCM_CHECK_CONDITION

IF_EX_SOCM_PROCESS_ACTION

2 \CLASS=CL_CHM1_MAINTENANCE_INSTANCE

IF_SOCM_MN_INSTANCE_ATTRIBUTE

3 \CLASS=CL_CHM1_REG_CORR_INSTANCE

IF_CHM1_NC_INSTANCE_ATTRIBUTES

But in the code source i can only call the IF_SOCM_INSTANCE_ATTRIBUTES attributes.

How can i use the others interfaces to read data or call method ?

Thanks for your reply !

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Problem solved !

The solution consist of declare a new instance of primary class

DATA: l_instance TYPE REF TO CL_CHM1_REG_CORR_INSTANCE.

And cast the interface importing by the method to this new instance.

  • fetch all methods and attributes of class CL_CHM1_REG_CORR_INSTANCE

l_INSTANCE ?= hf_instance.