cancel
Showing results for 
Search instead for 
Did you mean: 

Business Object : access to object attribute in method

Former Member
0 Kudos

Hi,

i've created a BOR object named Z_myobject :

- Attributs :

. START_DATE (type SYST-DATUM)

. END_DATE (type SYST-DATUM)

. MANAGER (type BOR EMPLOYEET)

...

- Methods

. Check_actors

In the Check_actors method i want to access to the MANAGER attribut. So, what i must do for this ? i've tried a lot solutions but no way.

Best regards,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You will have to use macros..

eg. SWC_GET_PROPERTY SELF 'MANAGER' field for manager..

Former Member
0 Kudos

Hi Samir, thanks for answer.

i know this instruction and it's work well.

I do that :

BEGIN_METHOD MAIL_REMINDER CHANGING CONTAINER.

DATA : wa_MANAGER TYPE SWC_OBJECT.

SWC_GET_PROPERTY self 'MANAGER' wa_MANAGER.

...

END_METHOD.

When i debug, my wa_MANAGER variable contains this :

HEADER C 4 OBJH

TYPE C 4 SWO

HANDLE I 4 100000004

CB_INDEX C 40

Now, i want to access to attribute of the wa_MANAGER.

Former Member
0 Kudos

Hi Tafkap,

You can use the HANDLE field of wa_MANAGER in a subsequent SWC_GET_PROPERTY, like this.

SWC_GET_PROPERTY wa_MANAGER-HANDLE 'attribute name' wa_waname.

Isn't the BOR such a user friendly tool to use...

Hope that helps.

Cheers,

Brad

Answers (0)