on 11-04-2009 9:28 AM
Hi ,
I am in the process of developing my first webynpro adobe interactive form application ,
I have 2 fields in the from Deptno and Dept name .. My purpose is to catche the event click in the form and save it to a Database
I am using a ZCLI form , My context struture is Node Adobe under which zdept1 node under which 2 attributes deptname and depno are there .
My error is : The form gets loaded and when I submit the click button I get an error
Error Access via 'NULL' object reference not possible.
Cardinality for Node : Adobe 1:1
Cardinality for node zdept is 1: 1
Data source propert y is mapped to node zdept
and PDFsource is also mapped to PDFSource type string
Can you gusy let me know the issue for this error?
Regards
Abhilash
Hi Abhilash,
You will get that error if you try to access the node or attribute without any reference.
Use the following code in the action to access the data.
data: lo_nd_adobe type ref to if_wd_context_node,
lo_nd_zdept type ref to if_wd_context_node,
ls_zdept type wd_this->element_zdept.
lo_nd_adobe = wd_context->get_child_node( name = wd_this->wdctx_adobe ).
lo_nd_zdept = lo_nd_adobe->get_child_node( name = wd_this->wdctx_zdept ).
to get the values deptname & deptno, use the belwo code:
lo_nd_zdept ->get_static_attributes( IMPORTING static_attributes = ls_zdept ).
From ls_zdept you can access deptname & deptno into required fields or directly the field values like ls_zdept-deptname & ls_zdept -deptno.
Hope this helps.
Thanks,
Jhansi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This kind of things (WD, especially when youre a beginner) are very difficult to describe enough to get help. I can recommend reading and following some short WD Abap Adobe form tutorial. You need to do like ten clicks to create the most simple WD Abap Adobe app so it will not be a problem for you to follow the tutorial.
Also when facing a problem in development you can point out the tutorial source so the SDN gurus can help you using the same source.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.