08-28-2007 11:52 AM
hi guys,
iam creating a smart form and i need a date in format 28august2007 for that i used the below program in program lines
data : date(10),
text1(26),
num1(10),
test_day(15),
o_date(20),
idate type sy-datum.
data : Day(2), month(2), Year(4).
data : ODay(2), Omonth(2), OYear(4).
data : Ltext Type T247-LTX.
date = '06.07.2007'.
day = date+0(2).
month = date+3(2).
year = date+6(4).
concatenate year month day into idate.
CALL FUNCTION 'HR_IN_GET_DATE_COMPONENTS'
EXPORTING
idate = idate
IMPORTING
DAY = oday
MONTH = omonth
YEAR = oyear
LTEXT = ltext.
concatenate oday '-' ltext '-' oyear into o_date.
write : O_date.
but i cant see this on the forum..
plz advise..
regds,
08-28-2007 11:56 AM
instead of using write satement, creae a text element and display ur vaiable on it.(drag and drop o_date on this text)..
aslo declare o_date as global varaible and in the program lines declare it under output parameter section...
plz reward points if it helps
08-28-2007 11:56 AM
Hi,
You need to declare o_date as a global variable at the top of you Smartform, populate it as you are doing and then use that field in a text element. Using WRITE in the program node of a Smartform does not display the field.
Regards,
Nick
08-28-2007 11:56 AM
instead of using write satement, creae a text element and display ur vaiable on it.(drag and drop o_date on this text)..
aslo declare o_date as global varaible and in the program lines declare it under output parameter section...
plz reward points if it helps
08-28-2007 3:01 PM
08-28-2007 12:17 PM
hi,
declare the date as global variable in your program & in the interface of the smartform declare a variable of date.
& in the call of the smartform in your program equate the global var u declared in your program totht of form interface.
call function FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
o_date(from form interface) = o_date ( date u calculated in your program)
TABLES
itab = itab
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
hope it helps!rgds