cancel
Showing results for 
Search instead for 
Did you mean: 

changing date format in smartforms

Former Member
0 Kudos

hello abapers,

could any one tell me the procedure how to change the date format in smartforms.thanks in advance...

regards,

santosh

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi

You need to write code in program lines , it will totally depend on which format u want.

you need to fetch the same format from sy-datum and conctenate into one variable.

Please try u will get any format.

Former Member
0 Kudos

Hi,

Use SET COUNTRY-KEY keyword. I think it will work.

Regards,

Aravind

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Create program lines by clicking the node.

Use concatenate statement to change the format.Give the date variable as input parameter and the modified date variable as export parameter.

former_member842213
Participant
0 Kudos

CONCATENATE sy-datum+6(2) text-035

sy-datum+4(2) text-035

sy-datum(4) INTO wa.

this may work...

U can write the coding in the initalization...........

Former Member
0 Kudos

HI,

You can write the code fo this one in the Flow logic --> program lines, In the Program line, just write this lines.

Lets say your date field id G_date.

Data: L_date type sy-datum.

Data: C_date(10) type C.

Move G_Date to L_Date.

Write L_date to C_Date.

So, here the C_Date field will have the user format date.

Regards

Sudheer

marius_greeff
Active Participant
0 Kudos

Hi,

In most print programs there is a function module called as below.

By setting the export parameter PI_COUNTRY one can set the form to print all dates according to country without any further coding.

CALL FUNCTION 'WFMC_PREPARE_SMART_FORM'

EXPORTING

PI_NAST = NAST

PI_COUNTRY = IS_DLV-LAND

PI_ADDR_KEY = IS_ADDR_KEY

PI_REPID = LF_REPID

PI_SCREEN = XSCREEN

IMPORTING

PE_RETURNCODE = CF_RETCODE

PE_ITCPO = LS_ITCPO

PE_DEVICE = LF_DEVICE

PE_RECIPIENT = CS_RECIPIENT

PE_SENDER = CS_SENDER.

If your problem is solved please set the question as answered.

Kind Regards,

Marius