Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Read only

Problems with SAPscript

Former Member
0 Likes
1,309

Hello.

I have a problem with a form in SapCript. Inside the form I have a text elemen that writes a date :

&REGUH-VALUT&, and usually have the value 20060602

and when i display the result of the form sometimes it writes "02.04.2006" correctly and others writes "02 de Junio de 2006" and i don“t wnat this.

What is the reason ?? you know??

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,275

Hi Jorge,

You can convert the date of 02.04.2006 to 02 de Junio de 2006 and then print the converted value.

Just refer this link which will tell u how to convert.

Regards,

SP.

13 REPLIES 13
Read only

Former Member
0 Likes
1,275

Hi Jorge,

use this:

/: set date mask 'mmddyyyy'.

reward if helpful.

regards,

keerthi.

Read only

0 Likes
1,275

Where ? inside the form ??

Read only

0 Likes
1,275

But with my user profile sometimes writes the correct form and others the incorrect..

Read only

0 Likes
1,275

hi jorge,

yes inside the form in <b>text elements</b>

give

/: SET TIME MASK = ‘time mask’

/: SET TIME MASK = ‘HH:MM’

&TIME&

/: SET TIME MASK = ‘HH hours MM minutes’

&TIME&

hope this helps,

do reward if it helps,

priya.

Read only

0 Likes
1,275

Then, its better to convert the date format manually in print program by taking offset positions and rearrange them in a variable by specifying dots between day month year.

or you can SET DATE MASK ddmmyyy.

regards,

ram

Read only

0 Likes
1,275

Iva tested with SET DATE MASK ddmmyyy but it dosen“t go well.

Some idea???

Read only

Former Member
0 Likes
1,275

convert the date in the desired format and then pass it to SAP Script.

If you dont convert it, it will automatially take default format from User profile.

regards,

ram

Read only

Former Member
0 Likes
1,275

check the language settings

inside the form use

<b>/: SET DATE MASK = ‘MMMM, DD. YYYY’

&DATE&</b>

Read only

Former Member
0 Likes
1,276

Hi Jorge,

You can convert the date of 02.04.2006 to 02 de Junio de 2006 and then print the converted value.

Just refer this link which will tell u how to convert.

Regards,

SP.

Read only

0 Likes
1,275

In some documents with the same user and profile and language options the form shows 02.06.2006 ( is the correct ) sometimes and other shows 02 de Junio de 2006 ( Incorrect ) .

Read only

0 Likes
1,275

Hi Jorge,

that may be because of country specific date formatting within SAP... u can override all such side effects by using the SET DATE MASK command as suggested by other ppl.

just before ur variable in sapscript..

/: SET DATE MASK = 'DD.MM.YYYY'.

the next line contains ur date variable...similarly u can use this anywhere else...

Read only

Former Member
0 Likes
1,275

Hi

IN se71 before printing &REGUH-VALUT&,

use below code

set date 'DD.MM.YYYY'.

&REGUH-VALUT&

Regards,

Amole

Read only

Former Member
0 Likes
1,275

Hi,

are you sure ?, and both the places are you using the same variable &REGUH-VALUT&.

i doubt check it once you might be converting some where in your program.....

Regards

vijay