Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Null Pointer Exception : Help Needed

Hi there,

I am facing a strange NullPointer Exception in one of my objects. The strange part is that the same code is working on Quality and Production but throws up an error on the Development system. The code is as follows:

The method initSoldto() executes the RFC and then calls a method populateSalesArea() :

public void initSoldto( java.lang.String username )
    //@@begin initSoldto()

		IWDMessageManager messageMgr = this.wdComponentAPI.getMessageManager();
		messageMgr.reportSuccess("testUser: " + username );

		Z_Sd_Mdr_Soldto_Input input = new Z_Sd_Mdr_Soldto_Input();
		Zsd_Mdr_Sold_To_Data inputData = new Zsd_Mdr_Sold_To_Data();


		try {

		} catch (WDDynamicRFCExecuteException ex) {

			messageMgr.reportSuccess("did not execute: " + ex.getMessage());



The few initial lines of code for the method populateSalesArea() where the exception is getting thrown is as follows:

public void populateSalesArea( )
    //@@begin populateSalesArea()

		IWDMessageManager messageMgr = this.wdComponentAPI.getMessageManager();

		Z_Sd_Mdr_Soldto_Input input = new Z_Sd_Mdr_Soldto_Input();

		input = wdContext.currentZ_Sd_Mdr_Soldto_InputElement().modelObject();

*//This is where the exception is being thrown*
		List dropInitialValues = input.getOutput().getT_Dropdown_Value();
		List dropSalesGroupValues = input.getOutput().getT_Sales_Group_Values();
		List dropSalesDistrictValues =

Any help would be greatly appreciated. As discussed the exception is being thrown at the line

List dropInitialValues = input.getOutput().getT_Dropdown_Value();

Former Member
Not what you were looking for? View more on this topic or Ask a question