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

using left in select

Former Member
0 Likes
521

i have a field which is combination of two fields.

doctype+year 123452008

12345 2008

i want 12345 only,i use same santax in sql server.but here it makes problem.tell me whats wrong with it.

select single left ( awkey , 5 ) as awkey from bkpf into zmatdoc where belnr = bkpf-belnr .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
486

Hi:

Do like this

data: wa_bkpf type bkpf.

select single * from bkpf into wa_bkpf where belnr = bkpf-belnr .

if sy-subrc eq 0.

zmatdoc = wa_bkpf-awkey+0(5).

endif.

Regards

Shashi

2 REPLIES 2
Read only

Former Member
0 Likes
487

Hi:

Do like this

data: wa_bkpf type bkpf.

select single * from bkpf into wa_bkpf where belnr = bkpf-belnr .

if sy-subrc eq 0.

zmatdoc = wa_bkpf-awkey+0(5).

endif.

Regards

Shashi

Read only

0 Likes
486

thanks it seems good.