cancel
Showing results for 
Search instead for 
Did you mean: 

Fetch attribute value of structure node

Former Member
0 Kudos

Dear All,

Please let me know is it possible to get the attribute name and attribute value of a structure node of a record model inside the program?

Can I give any name as the attribute name?

Regards,

Biju K George

Accepted Solutions (0)

Answers (1)

Answers (1)

FredericGirod
Active Contributor
0 Kudos

Hi,

could you provide an example ?

I think you speak about using field-symbol.

--> get the attributes of a structure or a table --> same has field catalog for ALV

--> get the value of the attributes :

concatenante structure_mane attribute_name into w_field separated by '-'.

assign (w_field) to <field>

check <field> is assigned.

and <field> is the value of the attribute attribute_name of the structure structure_name.

regards

Fred

Pragya_Pande
Contributor
0 Kudos

Dear Biju,

Use methods of IF_SRM_SP_MODEL to get elements(nodes) of record model. The instances of IF_SRM_SP_MODEL_ELEMENT are returned and using methods of IF_SRM_SP_MODEL_ELEMENT, you can retrieve attributes and values set at a node level in record model.

Yes, you can give any name as attribute in free attributes for a node in record model.

Best Regards,

Pragya