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

Get Date from Text

Former Member
0 Likes
438

Text comes from Sales Order in Additional Information.Text varies for each sales order item details. Date is present which needs to be displayed. Length of text varies for items.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
407

REPORT ychatest. .

DATA : txt(25) VALUE 'sales23/11/2006xyz',

date(10).

SEARCH txt FOR '/'.

IF sy-subrc EQ 0.

sy-fdpos = sy-fdpos - 2.

date = txt+sy-fdpos(10).

ENDIF.

WRITE : / date.

2 REPLIES 2
Read only

Former Member
0 Likes
408

REPORT ychatest. .

DATA : txt(25) VALUE 'sales23/11/2006xyz',

date(10).

SEARCH txt FOR '/'.

IF sy-subrc EQ 0.

sy-fdpos = sy-fdpos - 2.

date = txt+sy-fdpos(10).

ENDIF.

WRITE : / date.

Read only

Former Member
0 Likes
407

Hi,

Give us a example of how the date will be in the text??Is there any position or a delimiter to identify the date...

Thanks,

Naren