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
862

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
821

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

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

6 REPLIES 6
Read only

Former Member
0 Likes
821

HI,

Create RANGEtable for seriegem.

U will get it.

Kishore.

Read only

Former Member
0 Likes
821

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
821
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
821

May be u try this.

SELECT SINGLE * INTO lr_bsid

FROM bsid

WHERE xblnr like lv_value%.

Read only

Former Member
0 Likes
822

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
821

Thanks!!