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

concatenate

Former Member
0 Likes
1,240

Hi experts,

plz help me with this.

actually i want ot concatenate 'sy-datum ,sy-uziet and one literal in to one variable.

but before concatenation i want ot change the format of sy-datum as mm-dd-yyyy format .

regrads,

siri.

1 ACCEPTED SOLUTION
Read only

athavanraja
Active Contributor
0 Likes
1,073

concatenate sy-datum4(2) '-' sy-datum6(2) '-' sy-datum+0(4) sy-uzeit 'literal' into result_var .

Regards

Raja

Hi experts,

plz help me with this.

actually i want ot concatenate 'sy-datum ,sy-uziet and one literal in to one variable.

but before concatenation i want ot change the format of sy-datum as mm-dd-yyyy format .

regrads,

siri.

7 REPLIES 7
Read only

athavanraja
Active Contributor
0 Likes
1,074

concatenate sy-datum4(2) '-' sy-datum6(2) '-' sy-datum+0(4) sy-uzeit 'literal' into result_var .

Regards

Raja

Read only

Former Member
0 Likes
1,073

USE FM.

<b>CONVERSION_EXIT_PDATE_OUTPUT</b>

to change data format.

after that u use concatenate into string(21) type c..

or..

concatenate sy-datum4(2) '/' sy-datum6(2) '/' sy-datum+0(4) sy-uzeit into string.

Read only

Former Member
0 Likes
1,073

Hi!

If your sy-datum seems like this '04092006'

CONCATENATE sy-datum2(2) '-' sy-datum(2) '-' sy-datum4(4) ' ' sy-uzeit variable INTO destination_variable.

Happy developing...

Read only

0 Likes
1,073

sy-datum will always be in the following format

YYYYMMDD

Regards

Raja

Read only

Former Member
0 Likes
1,073

> actually i want ot concatenate 'sy-datum ,sy-uziet

> and one literal in to one variable.

> but before concatenation i want ot change the format

> of sy-datum as mm-dd-yyyy format .

>

Hi,

Declare one more variable of type c and length 10 and use that for concatenation.

See the code below:

Data: w_datec(10).

write sy-datum to w_datec MM/DD/YYYY.

Concatenate w_datec sy-uzeit......

Regards

Read only

Former Member
0 Likes
1,073

Hi Sireesha,

Check the following code:

  • Date

wa_header-typ = 'S'.

wa_header-key = 'Date/Time ' .

CONCATENATE sy-datum+6(2) '/'

sy-datum+4(2) '/'

sy-datum(4) sy-uzeit0(2) ':' sy-uzeit2(2) 'AM'

INTO wa_header-info SEPARATED BY ''.

APPEND wa_header TO t_header.

CLEAR: wa_header.

You can use std. FM 'CONVERSION_EXIT_PDATE_INPUT', for conversion of date.

Read only

Former Member
0 Likes
1,073

hi.

try this.

data: string type string.

CONCATENATE sy-datum4(2) sy-datum6(2) sy-datum(4)

sy-uzeit(2) ':' sy-uzeit2(2) ':' sy-uzeit4(2) 'var'

into string.

hope this help u.