on 01-08-2009 9:48 AM
Hi all
Webdynpro java
I want execute a bapi and need to pass some values from the view elements
when assigning the values to bapi attributes,its is throwing
Null pointer Exception
Any initializations need to be done here
plz help me out
wdContext.currentMatnrselectionElement().setMatnr_Low("*" );
wdContext.currentMatnrselectionElement().setOption("CP" );
wdContext.currentMatnrselectionElement().setSign("I" );
above here is the sample code where i asm assaigning values to model attributes
thanks
madhu
Hi
Did you first get a reference to the node and create a new element for that node before you use the set methods?
If not use the following:
I<node name>Node myNode = wdContext.node<node name>();
I<node name>Element newEl = myNode.create<node name>Element();
where <node name> is the name of your context node and then you can say
newEl.setMatnr_Low("*" );
newEl.setOption("CP" );
newEl.setSign("I" );
myNode.addElement(newEl);
Thashin
Edited by: Thoshin Naicker on Jan 8, 2009 12:27 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.