cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the default value of a field

Former Member
0 Kudos

Hello,

I am on EP7.0 ERP05 NW04s and trying to modify ESS Applications and on the Address Edit (Detail) screen I added a input field -- additional telephone number and mapped it onto Area code field in the Infotype and now whenever I goto the Edit screen by default it shows up as "000" being desplayed but I want to keep it blank ...

I tried modifying it in the wdDoModifyView by setting it to blank String but still it comes up with "000" ..

Any help would be highly appreciated.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hello Ayyapparaj/Shriram,

I changed the code in the SetType1() as you said but still it comes up with a blank screen.....

The type of the Additional number field is com.sap.xss.hr.per.us.address.model.types.P10_Ui_Areac

also the Review button action is a common button for all ESS personal information services ....

Former Member
0 Kudos

Hi,

<b>additional telephone number and mapped it onto Area code field in the Infotype</b>

What is the type for Area Code attribute ?

And also what are you doing in the action of review button ?

Former Member
0 Kudos

Hello ,

Here's what i did

1) created a value attribut Type1 and changed the calculated property to true.

2) Then wrote the following code:

public java.lang.String getType1(IPrivateDetailView.IContextElement element)

{

//@@begin getType1(IPrivateDetailView.IContextElement)

if(wdContext.currentSelectedInfotypeElement().getArea1().equalsIgnoreCase("000"))

return "";

else

return (wdContext.currentSelectedInfotypeElement().getArea1());

//@@end

}

public void setType1(IPrivateDetailView.IContextElement element, java.lang.String value)

{

//@@begin setType1(IPrivateDetailView.IContextElement, java.lang.String)

wdContext.currentContextElement().setType1(wdContext.currentSelectedInfotypeElement().getArea1());

//@@end

}

The Edit screen shows a blank value for the field but when I press the review button it comes up with a blank screen altogether ...I wonder what to do.

Looking forward to your reply.

Former Member
0 Kudos

public void setType1(IPrivateDetailView.IContextElement element, java.lang.String value)

{

//@@begin setType1(IPrivateDetailView.IContextElement, java.lang.String)

if(value.equalsIgnoreCase(""))

element.setType1("000");

else

element.setType1(value);

//@@end

}

Former Member
0 Kudos

Hello,

Thanks for the reply. It would be great if you can send me the code for creating Calculated Context attributes..

Looking forward to your reply.

Former Member
0 Kudos

While creating the attribute click on calculated. or else from the properties of the attributes set it to calculated true.

former_member186016
Active Contributor
0 Kudos

The fiels must be mapped to attribute of type some "Dictionary Type".

Try to check what is that dictionary type. open the dictionary type and edit in Representation Tab.

THere you can mention how the value has to displayed

Regards,

Ashwani Kr Sharma

Former Member
0 Kudos

Hi,

Create a calculated attribute with set/get and map this attribute to the text box

Inside the getter if the value of the additional number is "000" return ""

else return the actual value.

same case with set when the value is "" set it to "000" else set the actuals entered by the user.

Regards

Ayyapparaj