cancel
Showing results for 
Search instead for 
Did you mean: 

Retriving data from SAP BW system through RFC

Former Member
0 Kudos

Hi Experts,

I have a requirement on my application

here i need to retrive the data from sap bw system and exposed into tables through RFC.

any suggestions please.

thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Import the remote enabled function module in you webdynpro java development component.

Create a local node with the same type as of imported RFC node. Bind the local node to table UI data source property.

Sample code to execute RFC in webdynpro java

public void executeRFC( )
  {   
    
    //creating instance 
    Bapi_Help_Input help_Input = new Bapi_Help_Input();
    
    try
    {
	      //setting input to RFC
    	      help_Input.setI_Material("Pen");		
	      help_Input.setI_Langu("EN");
		
	
             //binding the values to rfc node
	     wdContext.node__Bapi_Help_Input().bind(help_Input);
    
	    //executing bapi
	    wdContext.currentBapi_Help_InputElement().modelObject().execute();
    
	     //invalidating output bapi node
	     wdContext.nodeBapi_Help_Output().invalidate();
 
    
	     //disconnecting R3 connection
	    wdContext.current__Bapi_Help_InputElement().modelObject().modelInstance().disconnectIfAlive();
	  
	   
	   if(wdContext.nodeEt_Material().size()!=0)
	   {
		//copy service from bapi node to local node
		WDCopyService.copyElements((IWDNode)wdContext.nodeEt_Material(),(IWDNode)wdContext.nodeChnEt_Material());	    
	   }	  
 
    }
    
    catch(WDDynamicRFCExecuteException e)
    {
    	wdComponentAPI.getMessageManager().reportException(e.getMessage(),true);
    }
}

Refer this link for how to access function modules in webdynpro java

[http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a00f7103-6790-2a10-ac9c-fcac7c5b18a3?quicklink=index&overridelayout=true]

Regards,

Bala Baskaran.S

Edited by: Bala Baskaran on Dec 9, 2010 3:32 PM

Former Member
0 Kudos

Hi,

hope the below link will help you.

[/docs/DOC-8061#15 [original link is broken]]

Regards,

Govindu