Skip to Content

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

Code Problems (java)

Hi there,

i have a problem with my implementation code.

Right now, i’m doing the elearning RIG Sessions from sdn. I copied the code bellow (as described in the session) into the wdDoInit part but when i run the application I get a NullPointerExeption and I don’t know why…!

I also tried to comment the code bellow. Then the application works just fine.

Any idea?



public void wdDoInit()


//@@begin wdDoInit()

//prefill the fields Name and CostCenter

wdContext.currentPersonalDataElement().setName("Thorben Eichler");


//setup content of a drop down list dynamically

IWDAttributeInfo countryInfo = wdContext.nodeTravelData().getNodeInfo().getAttribute("DestinationCountry");

ISimpleTypeModifiable countryType = countryInfo.getModifiableSimpleType();

IModifiableSimpleValueSet countryValueSet = countryType.getSVServices().getModifiableSimpleValueSet();


countryValueSet.put("2", "USA");

//prefill the date fields with the current date

wdContext.currentTravelDataElement().setDepatureDate(new Date(System.currentTimeMillis()));

wdContext.currentTravelDataElement().setArrivalDate(new Date(System.currentTimeMillis()));

//set the checkfield




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