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

IN seltab

Former Member
0 Likes
859

Hello,

I have a seltab of a type with two characters, and I need to select documents from bsid where the two first positions of the xblnr are in the seltab.

SELECT SINGLE * INTO lr_bsid

FROM bsid

WHERE xblnr(2) IN seriegem.

How can I do this?

Thanks in advance!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
818

Hi,

Using ranges you can achieve this

loop at seriegem into wa_seriegem.
    wa_xblnr_r-sign   = 'IN.
    wa_xblnr_r-option = 'CP'.
    concatenate wa_seriegem '%' into wa_xblnr_r-low.
    APPEND wa_xblnr_r TO r_xblnr.
endloop.

SELECT SINGLE * INTO lr_bsid
FROM bsid
WHERE xblnr IN r_xblnr

Regards

Bhupal Reddy

Hello,

I have a seltab of a type with two characters, and I need to select documents from bsid where the two first positions of the xblnr are in the seltab.

SELECT SINGLE * INTO lr_bsid

FROM bsid

WHERE xblnr(2) IN seriegem.

How can I do this?

Thanks in advance!

6 REPLIES 6
Read only

Former Member
0 Likes
818

HI,

Create RANGEtable for seriegem.

U will get it.

Kishore.

Read only

Former Member
0 Likes
818

concatenate seriegem-low '%' into lv_value

SELECT SINGLE * INTO lr_bsid

FROM bsid

WHERE xblnr(2) like lv_value.

Regards,

Ravi

Read only

Former Member
0 Likes
818
Try this..
say ur first 2 characters are CH

loop at seriegem.
  seriegem-sign = 'I'.
  seriegem-option = 'CP'.
  seriegem-low = 'CH*'.
  seriegem-high = ''.
  append seriegem.
  clear seriegem.
endloop.

SELECT SINGLE * INTO lr_bsid
FROM bsid
WHERE xblnr IN seriegem.
Read only

0 Likes
818

May be u try this.

SELECT SINGLE * INTO lr_bsid

FROM bsid

WHERE xblnr like lv_value%.

Read only

Former Member
0 Likes
819

Hi,

Using ranges you can achieve this

loop at seriegem into wa_seriegem.
    wa_xblnr_r-sign   = 'IN.
    wa_xblnr_r-option = 'CP'.
    concatenate wa_seriegem '%' into wa_xblnr_r-low.
    APPEND wa_xblnr_r TO r_xblnr.
endloop.

SELECT SINGLE * INTO lr_bsid
FROM bsid
WHERE xblnr IN r_xblnr

Regards

Bhupal Reddy

Read only

Former Member
0 Likes
818

Thanks!!