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

problem with select stmt

Former Member
0 Likes
455

hi gurus,

i need to select all the vbeln data from vbap, where the vbeln ends with 005.

i am trying to use the following, but its not picking any values,

SELECT * FROM vbap INTO TABLE temp_vbap WHERE vbeln like ' *005 '.

please help.

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
438

Try like this:


DATA: IT_VBAP TYPE STANDARD TABLE OF VBAP.
RANGES: R_VBELN FOR VBAP-VBELN.

R_VBELN-SIGN = 'I'.
R_VBELN-OPTION = 'CP'.
R_VBELN-LOW = '+++++++005'.
APPEND R_VBELN.
CLEAR  R_VBELN.

SELECT * FROM VBAP INTO TABLE IT_VBAP WHERE VBELN IN R_VBELN.
WRITE: SY-DBCNT.

Regards,

Naimesh Patel

2 REPLIES 2
Read only

naimesh_patel
Active Contributor
0 Likes
439

Try like this:


DATA: IT_VBAP TYPE STANDARD TABLE OF VBAP.
RANGES: R_VBELN FOR VBAP-VBELN.

R_VBELN-SIGN = 'I'.
R_VBELN-OPTION = 'CP'.
R_VBELN-LOW = '+++++++005'.
APPEND R_VBELN.
CLEAR  R_VBELN.

SELECT * FROM VBAP INTO TABLE IT_VBAP WHERE VBELN IN R_VBELN.
WRITE: SY-DBCNT.

Regards,

Naimesh Patel

Read only

0 Likes
438

thanks for your effort.