cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

reading attribute in method

Former Member
0 Likes
324

Hi frnds ,

can anyone tell me how to read a virtual attribute inside a method .

Both are customized .

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

In order to read your object attribute in object method you should use macro SWC_GET_PROPERTY self 'your attri name' var1.

so you will get var1 = value of 'your attri name' .

Reward points if useful,

Gautam

Edited by: Gautam Sinha on Mar 14, 2008 4:28 PM

Answers (1)

Answers (1)

former_member184495
Active Contributor
0 Likes

Hi RG,

presuming ur v-attribute has a value, u need to use macros

SWC_GET_ELEMENT CONTAINER 'lv_value' v_attribute.

Hope it helps.

Aditya

Former Member
0 Likes

actualy i am passing the value from my report using this fm

WA_G_SWCONT-ELEMENT = 'ATT_P_DATE' .

WA_G_SWCONT-ELEMLENGTH = 8.

WA_G_SWCONT-TYPE = 'D'.

WA_G_SWCONT-VALUE = P_DATE.

APPEND WA_G_SWCONT TO I_G_SWCONT .

  • TRIGGER THE CONTRACT_TO_EXPIRE event

CALL FUNCTION 'SWE_EVENT_CREATE'

EXPORTING

OBJTYPE = 'BUS2000113'

OBJKEY = P_G_OBJKEY

EVENT = P_0550

IMPORTING

EVENT_ID = G_EVENT_ID

TABLES

EVENT_CONTAINER = I_G_SWCONT

EXCEPTIONS

OBJTYPE_NOT_FOUND = 1

OTHERS = 2.

And in my bus obj i have created a attribute with the same name as 'ATT_P_DATE' . I am using command

SWC_GET_ELEMENT CONTAINER 'ATT_P_DATE' v_attribute .

but i am not able to get the value into the variable .

Plz help me out how to capture the value passed from my program .

.