cancel
Showing results for 
Search instead for 
Did you mean: 

need infn abt date format in webdynpro

Former Member
0 Kudos

i want to enter date in dd/mm/yy format

for that i have taken simpletype in webdynpro

given defn date

and representatation dd/MM/yyyy

its taking in mm/dd/yyyy

pls tell me how to do that

once we get that in dd/mm/yyy format

how to convert thta and send it to r/3 system

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I think ur NWDS is not working properly....Do the following steps,

First Close your NWDS,

1) Go to NWDS installation directory, take a backup of your projects from the workspace and delete the .metadata folder from the workspace.

2) Then open the NDS, a new .metadata folder will be created and now you can try opening the NWDS it will open without error

3)Sometimes when your metadata of the NWDS is corrupted then your NWDS will not function properly.

4)Restart ur machine,then its works properly

Former Member
0 Kudos

Hi,

Do like this,

Date d = wdContext.currentContextElement().getDate();

SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy");

Date reqDate= sdf.format(d);

Other Method,

SimpleDateFormat d1 = new SimpleDateFormat("yyyy-MM-dd");

Date date = d1.parse("2007-07-05");

SimpleDateFormat d2 = new SimpleDateFormat("dd.MM.yyyy");

String out = d2.format(date);

Regards,

Suresh.T

Former Member
0 Kudos

hi

are yaar i want while entering in webdynpro

if we enter dd/mm/yyy

in that input field it displays as mm/dd/yyyy

so i am creating simple type in dictionaries

there i want to set format

how to do that

Former Member
0 Kudos

Hi,

After creating simple type click Representation tab,their u enter the date format in Format field

Former Member
0 Kudos

representation i gave dd/MM/yyyy

its displ as mm/dd/yyyy

can u tell me exact representatation

Former Member
0 Kudos

Hi,

Tell me clearly...u only going to give date in input field r selecting the date from date navigator?

Former Member
0 Kudos

date navigator

control is input field and i made context date its giving date navigator

when i select date its taking in mm/dd/yyyy

i think thats problem with webdynpro editor

pls yaar tell me what i have to do in representation tab of date simple type

Former Member
0 Kudos

i hope u got my point

Former Member
0 Kudos

Hi vani,

1)Just goto simple type u create for date,click Representation tab--->Format = dd/MM/yyyy (MM should be caps)

2)create 1 attribute in context then bind this simple type to that attribute.

3)Bind context attribute to Input Field.

I tried this,it works for me.....

Former Member
0 Kudos

evn i trd its not wkng

Former Member
0 Kudos

and i have taken in defn built in type as date thats all

Former Member
0 Kudos

Hi,

Now only i checked,its working for me....did u create attribute in context? click properties of that attribute change TYPE= (package name) <b>.</b> (simple type)

Former Member
0 Kudos

yes sir i did that its not cmg

Former Member
0 Kudos

Hi,

Create a simple dictionary type (say formattedDate) in a package. Make the BuiltIn type as Date. Switch to representation tab and in Format fileld, give dd/MM/yyyy.

Then, right click the context variable->properties->type->formattedDate from package.

If it's not working, then raise one OSS maessage regarding this.

Regards

Fahad Hamsa

Former Member
0 Kudos

hi,

U delete that simple type n attribute.....may b some problem in NWDS...after deleting simple type...close ur NWDS and open it.....after that create

1)create simple type with type=date,format=dd/MM/yyyy

2)create attribute with type=(pack name)<b>.</b>(simple type)

3)bind this attribute to input field....

I checked for me its working......better u do again.....

Former Member
0 Kudos

ok sir

Former Member
0 Kudos

hi once i get date how to convert that into abap acceptable format

Former Member
0 Kudos

hi

no i closed nwds and restarted its not cmg

Former Member
0 Kudos

i did its nt cmg

i dnt knw what happnd

i closed nwds n tried its not cmg

Former Member
0 Kudos

Abap format is by default java.sql.Date.

So u can pass the date u r getting from DateNavigator directly. It is by default sql date

Regards

Fahad Hamsa

Former Member
0 Kudos

hi i am getting error for parse what u mentoned as second method

Former Member
0 Kudos

Hi,

Where u getting that error?

Former Member
0 Kudos

Hi Vani,

I think the problem is with your NWDS.

I propose re-installing the NWDS after backing up the projects to avoid further problems, if its not a issue with you.

I tried the simple type method and it is working nicely.