cancel
Showing results for 
Search instead for 
Did you mean: 

WebDynpro Coding Checklist

Former Member
0 Kudos

Dear All,

Can anyone provide me a link / document for WebDynpro Coding Checklist.

Thanking in Advance

Accepted Solutions (0)

Answers (2)

Answers (2)

saraswathi_d
Participant
0 Kudos

Hi,

Try with this code

//@@begin imports

import com.sap.dictionary.runtime.ISimpleTypeModifiable;

import com.sap.tc.webdynpro.progmodel.api.IWDAttributeInfo;

import com.sap.tc.webdynpro.tutorials.valuehelp.wdp.IPrivateMain;

import com.sap.typeservices.IModifiableSimpleValueSet;

//@@end

...

/** Hook method called to initialize controller. */

public void wdDoInit()

{

//@@begin wdDoInit()

// Access interface ISimpleTypeModifiable for modifying the attribute's datatype

IWDAttributeInfo attributeInfo =

wdContext.getNodeInfo().getAttribute(IPrivateMain.IContextElement.COUNTRY);

ISimpleTypeModifiable countryType = attributeInfo.getModifiableSimpleType();

// Set field label and populate valueset

countryType.setFieldLabel("Country");

IModifiableSimpleValueSet valueSet =

countryType.getSVServices().getModifiableSimpleValueSet();

for (int i = 0; i < 40; i++){

valueSet.put("Key_"i,"Country "i);

}

// initialize context value attribute 'Country'

wdContext.currentContextElement().setCountry("Key_0");

//@@end //@@end

}

check the below link for sample application:

http://help.sap.com/saphelp_nw04/helpdata/en/c6/a5d4a523bf4b4c9085a114e46c6ed3/frameset.htm

Former Member
0 Kudos

Hai,

See thi blog:

/people/sathyanarayanan.ganesan2/blog/2006/06/16/checklist-of-activities-for-webdynpro-application-development

regards,

naga