cancel
Showing results for 
Search instead for 
Did you mean: 

How to create Context Attribute Dynamically ?

Former Member
0 Kudos

Hi,

How to create a context attribute dynamically?

thanku

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

and here's some information about dynamic context manipulation in Web Dynpro ABAP: http://help.sap.com/saphelp_nw04s/helpdata/en/af/cb744176cb127de10000000a155106/frameset.htm

Regards, Heidi

former_member182372
Active Contributor
0 Kudos

Hi Sunil,

Check appropriate tutorial https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/tutorial on dynamic programming of web dynpro applications - 17.htm

Best regards, Maksim Rashchynski.

vijayakhanna_raman
Active Contributor
0 Kudos

Hi,

U can create using this code.

IWDAttributeInfo a=wdContext.getNodeInfo().addAttribute("val1","ddic:com.sap.String");

Regards,

Vijayakhanna Raman

Former Member
0 Kudos

Hi,

I created contextAttribute. but how can i access this?

I want to store some data in that. and i want to display that data.

thanku

former_member182372
Active Contributor
0 Kudos

wdContext.currentContextElement().setAttributeValue("val1", "Value1");

Former Member
0 Kudos

when i am creating wdContext.setAttributeValue("val1", "Value1"); it is giving error that

" the method setAttributeValue(string,string)is undefined for the type IPrivateShowView.IContextNode

former_member182372
Active Contributor
0 Kudos

Sorry

wdContext.currentContextElement().setAttributeValue("val1", "Value1");

Former Member
0 Kudos

thank u maskim,

i am gothroughing the link u have gave me...

and can u tell me how to get that attribute value to display the form...

former_member182372
Active Contributor
0 Kudos

Hi Sunil,

For this you need to add dynamic binding. Use appropriate bind...() method of UI elements in wdDoModify method and pass name of new created attribute.

P.S.

BTW, I have posted a workaround for you another question:

Best regards, Maksim Rashchynksi.