cancel
Showing results for 
Search instead for 
Did you mean: 

Context Mapping Problem

Former Member
0 Kudos

Hello Everyone,

I am using the SAP_WAPI_CREATE_WORKLIST to create the WORKITEM list and when I map the IMPORTING Node to my VIEW I am execute the Application I am getting the following Runtime Exception. I have checked every Context mapping and binding with all the nodes and everything is fine.

Node COMPONENTCONTROLLER.1.SAP_WAPI_CREATE_WO.1.IMPORTING.1.IM_TASK_FILTER does not contain any elements

Could anyone help me to resolve this problem. I would greatly appreciate your help. Please let me know if you need more clarification regarding this issue.

Regards,

Gopal.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hello Everyone,

My problem is solved now. I have just changed the cardinality of IM_TASK_FILTER SUBNODE to 1..1 and it just started working.

Regards,

Gopal.

Former Member
0 Kudos

Hello,

Thanks for your replies. My node has got 0..n cardinality. So, that is not the problem. Can you suggest anything else.

Regards,

Gopal

Former Member
0 Kudos

Hi Gopal,

It seems you are binding null values to the node. Don't bind your internal table to the node when there are no values.If your internal table is not initial then only bind to the node.Try this way I hope it will be resolved.

Former Member
0 Kudos

Hi Suman,

Thanks alot for your reply. I have am not binding any internal table to the node. My node structure is as follows:

NODE: IMPORTING(1..1)

........SUBNODE: IM_TASK_FILTER(0..n)

................ATTRIBUTE: WI_RH_TASK

........ATTRIBUTE: USER

........ATTRIBUTE: LANGUAGE

Now, I am trying to set the attributes of the "IMPORTING" node and "IM_TASK_FILTER" subnode by using the following code and I am getting the runtime error I mentioned in my earlier post.


  lo_nd_importing = wd_context->get_child_node( name = wd_this->wdctx_importing ).
  lo_nd_task_filter = lo_nd_importing->get_child_node( name = wd_this->wdctx_IM_TASK_FILTER ).

  lo_nd_importing->set_attribute( EXPORTING NAME = 'USER' VALUE = SY-UNAME ).
  lo_nd_importing->set_attribute( EXPORTING NAME = 'LANGUAGE' VALUE = 'EN' ).
  lo_nd_task_filter->set_attribute( EXPORTING NAME = 'WI_RH_TASK' VALUE = 'TS20000166' ).

I hope this clearly explains my problem. Let me know if need more clarification. I would greatly appreciate your help.

Regards,

Gopal.

Former Member
0 Kudos

hi Gopal ,

hi

change carinality to 0..n

u may wish to see this online SAP help :

http://help.sap.com/saphelp_erp2005/helpdata/EN/7a/787e40417c6d1de10000000a1550b0/content.htm

Cardinality of a Context Node

When a node is created in the context of a Web Dynpro component, the cardinality of the node is specified. The cardinality defines how often a node is to be instantiated at runtime u2013 that is, how many elements of this node are available at runtime.

· 1u20261 Only one element is instantiated.

· 0u20261 At runtime, no more than one element is instantiated, but it is also possible that no element is instantiated.

· 1u2026n n elements can be instantiated, but at least one element must be instantiated.

· 0u2026n The number of instantiated elements of the context node can vary.

rgds,

amit

prasenjit_sharma
Active Contributor
0 Kudos

Hi,

Try to change the cardinality to 0...n

Regards

Prasenjit