Application Development 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: 

date is not displayed

Former Member
0 Kudos

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,

1 ACCEPTED SOLUTION

former_member188827
Active Contributor
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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

former_member188827
Active Contributor
0 Kudos

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

0 Kudos

thanks very much for your help

Former Member
0 Kudos

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