2008 Jan 11 4:03 AM
Hi All,
I am new to smartforms.I want to position the date on page top corner of the left side of the form such as day month year(Tuesday,january 01,2008).how to get this formate in smart form?
Thanks & Reagrds
HB
Hi All,
I am new to smartforms.I want to position the date on page top corner of the left side of the form such as day month year(Tuesday,january 01,2008).how to get this formate in smart form?
Thanks & Reagrds
HB
2008 Jan 11 4:09 AM
Hi Hans
hope this will help you.
pls reward if help.
SmartForms System Fields
Within a form you can use the field string SFSY with its system fields. During form processing the system replaces these fields with the corresponding values. The field values come from the SAP System or are results of the processing.
System fields of Smart Forms
&SFSY-DATE&
Displays the date. You determine the display format in the user master record.
&SFSY-TIME&
Displays the time of day in the form HH:MM:SS.
&SFSY-PAGE&
Inserts the number of the current print page into the text. You determine the format of the page number (for example, Arabic, numeric) in the page node.
&SFSY-FORMPAGES&
Displays the total number of pages for the currently processed form. This allows you to include texts such as'Page x of y' into your output.
&SFSY-JOBPAGES&
Contains the total page number of all forms in the currently processed print request.
&SFSY-WINDOWNAME&
Contains the name of the current window (string in the Window field)
&SFSY-PAGENAME&
Contains the name of the current page (string in the Page field)
&SFSY-PAGEBREAK&
Is set to 'X' after a page break (either automatic [Page 7] or command-controlled [Page 46])
&SFSY-MAINEND&
Is set as soon as processing of the main window on the current page ends
&SFSY-EXCEPTION&
Contains the name of the raised exception. You must trigger your own exceptions, which you defined in the form interface, using the user_exception macro (syntax: user_exception <exception name >).
2008 Jan 11 4:16 AM
Hi
Thanks for ur reply.. I tried ur suggestion already. It shows date only,but i want to show such as Friday,January 11, 2008.....
Could please tel how to do this in smart form?
2008 Jan 11 4:45 AM
use the FM MONTH_NAMES_GET to get the month names.
It will get the month names and store it in an Internal table.
Read this table by index of ur month. u will get the month name.
I shall send how to get Week name.
awrd points if useful
Bhupal
2008 Jan 11 4:10 AM
Hi,
Create a window at the top position of the page giving the alignment position left and right.
to that write the code in text editor sy-datum.
it will show the date.
regards,
satish.
if it helpful, reward points.
2008 Jan 11 4:10 AM
Hi,
Check this it may be useful to u
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
Regards
2008 Jan 11 4:56 AM
Hi
Thanks for ur reply...Please tel me how to implement this way in smart form...this concept belogs to sapscript right....
2008 Jan 11 4:59 AM
No. This is a general concept. We can use it in any process.
I suggest u to write it in the coding block of the Smartform. For our need we have written it in the Initialization.
Also u can use the FM: HRIQ_GET_DATE_DAYNAME to get the Week Day Name.
awrd points if helpful
Bhupal
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |