on 01-23-2008 4:14 AM
hi all,
i want to retrieve a particular value from a table.Here is what i hav done so far.
on the lead-select event i read the particular attribute say item_id , now i create a context node and store this item_id in it.
There is another click event wherein i am passing this value which is read b4(ie item_id) to a bapi and doin a dynamic bindin...
But the problem is as soon as i perform lead-select on my table it gives me the error "Access using a 'ZERO' object reference is not possible"
am i proceeding in the rite track?wat causes dis error..plz help me out as til nw u've been helpin..
Thanks n regards,
Urbashi
Hi Urbashi,
Generally we get the error if an object type if_wd_context_node is not filled.
Please check whether the node object created in your ONlead selection action is
filled.
Have you used the method
lo_node = wd_context->get_child_node( 'NODE' ) again in your onlead selection event
handler method.
Hope this solves your problem.
Regards,
Ismail.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI SHARATH,
once i read the context-node attribute i.e item_id i call the bapi and write the code
CALL FUNCTION 'ZRFC_PD_RESULTS'
EXPORTING
I_ITEM_ID = lv_item_id
IMPORTING
E_TAB_RESULT = PD_RES_ITAB.
.
PD_RESULTS_TAB = wd_context->get_child_node( name = wd_this->wdctx_PD_RESULTS_TAB ).
PD_RESULTS_TAB->bind_table( PD_RES_ITAB ).
since i've creatd a context node and the table should display the result is binded to the context node but nothin gets displayd on the table...wat m i 2 do,Plz help
regards,
Urvashi
Hi Urbashi Dewan ,
if your PD_RES_ITAB is having values, then also table is not displaying any thing mens , binding is not hapenning.
this is because PD_RES_ITAB fields and attributes of the node you are binding are of not same type. some difference will be there. IF any slight difference between them is there means , bind table will fail. one think you can do if you are not able to change the type of attributes is loop PD_RES_ITAB and bind elem by elem.
Regards
Sarath
HI SHARATH,
YOU KNW WAT...in the lead-select i read the attribute item-id ok,then i creatd a another node of the same type item_id and now i again read this new node and used the set-attribute to trap the value in the context-controller..
now in another view i again read this new node but dat value of item-id is not present in this new atrtribute....when u run the de-bugger it shows empty..though when u run the d-buggr in the lead-select action the value is present on the new node creatd..
Hi Urbashi Dewan ,
where did you created the new node?
create the new node in the componet controller nad bibd the value to the node.. once the value is binde to the node in the component controller means, it will be available across all nodes.
Since you just required to pass only one attribute, its better to us the componet controller attriburte. create a component controller public attribue nad set value of item-id on that. then read this attribute where ever you want.
Regards
Sarath
Hi Urbashi..
Ur approach is right, but everytime you move to a new context node, u have to navigate to it. Try navigating to the other node and it should work.
regards,
Lloyd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Urbashi,
As you are using only one item_id, create a public attribute in your component controller
and fill it with the value in your event handler.
for eg: if its name is dv_item_id
then wd_comp_controller->dv_item_id = lv_item_id.
where lv_item_id is the item_id value you have.
Again when you are passing to the bapi
directly give wd_Comp_controller->dv_item_id there.
Regards,
Ismail.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Urbashi,
Does lv_item_id has any value before you are passing it to the FM ?
Is the table PD_RES_ITAB being filled by the FM ?
Check these 2 things...
Hope this solves your problem.
Regards,
Ismail.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Urbashi,
Create a public attribute in your component controller and pass the required value to it
in your event handler.
You can use the same public attribute of Component controller to pass as input to
your BAPI.
Hope this solves your problem.
Regards,
Ismail.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi urbashi.....
just make sure that the value is getting read correctly and then passed to the bapi.
just check this link:
[link|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2e71ce83-0b01-0010-11a4-98c28a33195f ]
---regards,
alex b justin
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.