cancel
Showing results for 
Search instead for 
Did you mean: 

Date field Length in Java Webdynpro

former_member186783
Participant
0 Kudos

Hi Experts,

I have a strange case.

I created a new filed in the infotype 0175: ZZDAT like the standard field AUSGD (type DATS length 😎

I modified the ESS view and added the new fields.

The view is working perfectly, the data is transfered between the databse and the webdynpro, the only problem is, that the user can't enter the date manually, because last point after the day can't be entered: e.g.: 2010.01.01 instead of 2010.01.01.

If the user uses the search help, and selects the date form the popup calendar, then the date format is correct: 2010.01.01.

(there is a point after the DAY ) I tried to change the field length manually but still, the last point after the day can't be entered.

Can you please help me to find out what is the problem?

Thanks

N.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello,

I have included database table attribute which is declared as DATS in my node attribute. In my layout view the calender corresponding to this field is showing beside the field but when i run the application that calender option is not coming. Can anyone suggest the solution....!!!!

Regards,

Devesh

former_member186783
Participant
0 Kudos

The solution is in the component controller:

Date is a standard SAP filed with length = 10, so we have tom extend it:

Comp Controller-wdDoInit()


wdContext.nodeSelectedInfotype().getNodeInfo().getAttribute("FieldName").getModifiableSimpleType().setMaxExternalLength(11);

Former Member
0 Kudos

Hi,

In Java, the sql date is in the form yyyy.MM.dd without any dot at the end.

Why dont you use the Data Type DATUM to correct the Date type for the infotype or else manually append the dot.

The Date picker doesnt provide you with any dots at the end of the Date.

Thanks,

Hanif

former_member186783
Participant
0 Kudos

Hi,

Because manually append the dot at the end, is a little bit complicated. It's more like "hacking" than correct functionality.

All the other dates on the view has type Date, and all of the dates are working properly, with dot at the end.

What do you mean on "Date picker " ? Are you talking about the value help? (The user clicks on the date box, and a calendar is showed by the webdynpro) because in this case the date picker puts the dot, right after the day: e.g.: 2010.01.01.

bye

N.

Former Member
0 Kudos

date picker means date value selector help.

Can you check if any simple type is binded to other date filed attributes?

former_member186783
Participant
0 Kudos

Hi,

No java simple type definied for the view fields.

1. There is a data model fro P0175 infotype it's binded to the component controller.

2. The Componenet controller is binded to the view.

All of the fields (including the properly working date fields) are binded in the same standard way.

Bye

N

Former Member
0 Kudos

then check the P0175 infotype table.

Check the date Data type you have created and the standard data type.

bind the same data type to the table and release from ECC.

re-import model.

it asks for server restart.

you can even do model cache invalidation.

Thanks,

Hanif

former_member186783
Participant
0 Kudos

Unfortunatelly this doesn'T help at all.

I reimported the data element, and restarted the server, but the result is the same. I can'T enter the date manually..

To be honest, i'm fed up with this stupid java webdynpro. I hope there is a special place in hell, for the people who invented this....

Anyway, I think the only solution here is to limit the field, capabilities. I'll try to set the Date picker as the only input way... I hope this is possible... it's easy in ABAP I just hope that java can do this the same "non-somplicated" way.

If you have any idea how to do this I'll be very greatfull for any kind of help.

Bye

N.