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

Boxes in a window

Former Member
0 Likes
936

Hi,

I want to display each digit of the date (MM DD YYYY) in different boxes in a window. Could you please suggest me.

Thank you

6 REPLIES 6
Read only

Former Member
0 Likes
900

Hi Narasimha,

WELECOME TO SDN

draw boxes using BOX statement and then split the variable which is containg date in to three variable and then display them in the boxes that you have created.

Draws a horizontal line across the complete top edge of the window.

/: BOX WIDTH 0 TW FRAME 10 TW

Draws a vertical line along the complete height of the left hand edge of the window.

/: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15

/: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW

/: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW

/: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW

Draws two rectangles and two lines to construct a table of three columns with a highlighted heading section.

Regards,

Santosh

Read only

0 Likes
900

Thank you Santhosh for responding to my post. I want to create 8 different boxes separated by space to dispaly the 8 digits(M M D D Y Y Y Y).

Thank you

Read only

0 Likes
900

Hi korada,

Even i have a same issue how did you solve that date issue ?

m m d d y y y y in 8 boxes .

plz provice some suggestion

thnx

Read only

Former Member
0 Likes
900

Hi Korada,

In Scripts there are special syntaxs to set the date format.

<b>/: SET DATE MASK = 'MM.DD.YYYY'</b>

&SYST-DATUM&

your date will print in the format of 27.06.2006

There are other formats like

<b>DD</b> - day in two digits

<b>DDD</b> - name of day abbreviated (MON, SUN)

<b>DDDD</b> - name of day written in full (Sunday)

<b>MM</b> - Month in two digits

<b>MMM</b> - Month abbreviated in 3 digits (JUN, JAN)

<b>MMMM</b> - Month written in full (April)

<b>YY</b> - Year in two digits

<b>YYYY</b> - Year (4 digits)

In order to revert back to the standard setting

<b>/: SET DATE MASK = ' '</b>

Hope this sovles ur issue.

Regards,

Tushar

Read only

vinod_gunaware2
Active Contributor
0 Likes
900

Formatting Date Fields: SET DATE MASK

To define the formatting of date fields, use the SET DATE MASK control command. Executing this command causes all subsequent date fields to be printed using the specified format.
Syntax:
/: SET DATE MASK = 'date_mask'
In the date mask, you can use the following codes:
· DD: day (two digits)
· DDD: day name - abbreviated
· DDDD: day name - written out in full
· MM: month (two digits)
· MMM: month name - abbreviated
· MMMM: month name - written out in full
· YY: year (two digits)
· YYYY: year (four digits)
· LD: day (formatted as for the L option)
· LM: month (formatted as for the L option)
· LY: year (formatted as for the L option)
All other characters found in a date mask are interpreted as simple text and are copied straight into the output.

Assuming the current system date is March 1st, 1997.
/: SET DATE MASK = 'Foster City, MM/DD/YY'
&DATE& -> Foster City, 03/01/97
/: SET DATE MASK = 'MMMM DD, YYYY'
&DATE& -> March 01, 1997
The date mask may be reset to the default setting by using an empty string:
/: SET DATE MASK = ' '
The abbreviated and full forms of the names of the days and months are stored in the language dependent TTDTG table under the following keys:
· %%SAPSCRIPT_DDD_dd: abbreviated day name
· %%SAPSCRIPT_DDDD_dd: full form of day name
· %%SAPSCRIPT_MMM_mm: abbreviated month name
· %%SAPSCRIPT_MMMM_mm: full form of month name
dd: day number 01 = Monday,..., 07 = Sunday
mm: month number 01 = January,..., 12 = December

Formatting Time Fields: SET TIME MASK

To format time fields to your needs, use the SET TIME MASK control command. Executing this command causes all subsequent time fields to be printed using the specified format.
Syntax:
/: SET TIME MASK = 'time_mask'
In the time mask, you can use the following codes:
· HH hours (two digits)
· MM minutes (two digits)
· SS seconds (two digits)
All other characters found in a time mask are interpreted as simple text and are copied straight into the output.

Assuming the current time is 10:08:12,
/: SET TIME MASK = 'HH:MM'
&TIME& -> 10:08
/: SET TIME MASK = 'HH hours MM minutes'
&TIME& -> 10 hours 08 minutes

The time mask may be reset to the default setting by using an empty string:

/: SET TIME MASK = ' '

regards

vinod

Read only

Former Member
0 Likes
900

Hi Narasimha,

Using the split command separate all the 8 digits in eight varaiables.Create 8 boxes for all the 8 variables and place them as per your requirement.Put all the 8 variable that represent 8 digits in the respective boxes