Skip to Content
0
Former Member
Apr 20, 2007 at 03:09 PM

Reuse values of a node?

13 Views

Hi,

how can i reuse the values which was saved in my node. After i call some values from my node in the method: getData()

it is not possible to call values from this node again like from the method: getMoreData(). Should i execute my BAPI again every time???

My Model:
BAPI_GLOBAL_STRUC_FROM_R3
  OUTPUT
     Et_Doc_Links
       - Url
       - ...

	
	private IEt_Doc_LinksNode node;
	private IEt_Doc_LinksElement elements;

	public void connectToBackend(){	
		Zcm_Prv_Get_Doc_Links_Input input = new Zcm_Prv_Get_Doc_Links_Input();
		wdContext.nodeBAPI_GLOBAL_STRUC_FROM_R3().bind(input);	
		wdContext.currentBAPI_GLOBAL_STRUC_FROM_R3Element().modelObject().execute();
	}
        /**This method works fine.*/
	public void getDate(){
		IEt_Doc_LinksNode node;	
		for (int i = 0; i < node.size(); i++)   <-- nodeSize = 15
		{	
			elements = node.getEt_Doc_LinksElementAt( i );					
			System.err.println("URL: " + elements.getUrl());
			.....
		}
	}
	
        /** Hier i get an empty string back. */
	public void getMoreData(){
		for (int i = 0; i < node.size(); i++)   /**<--- same nodeSize = 15*/
		{
			elements = node.getEt_Doc_LinksElementAt( i );					
			System.err.println("URL: " + elements.getUrl()); /**<-- empty string???*/
			.....
		}
	}

regards,

Sharam