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

query about where condition .

Former Member
0 Likes
469

Hello to all ,

i have a quest about the where condition in select statement .

SELECT * FROM /xyz/abc_V

INTO TABLE VIT_abc

WHERE ( FUNCTION = 'ab12' or FUNCTION = 'cd34' )

AND TYPECODE = 'VKORG'

.

.

.

if vit_vbrk[] is not initial.

SELECT * FROM VBRP INTO TABLE VIT_VBRP for all entries in vit_vbrk

WHERE

VBELN = VIT_VBRK-VBELN .

  • VBRP-MATNR <> the materials selected from /GIL/ZGTYPCODE_V for function WICFREIGHT.

can u please help me to write the code for the (* VBRP-MATNR <> the materials selected from /xyz/abc_V for function WICFREIGHT).

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

dev_parbutteea
Active Contributor
0 Likes
444

SELECT * FROM /xyz/abc_V

INTO TABLE VIT_abc

WHERE ( FUNCTION = 'ab12' or FUNCTION = 'cd34' )

AND TYPECODE = 'VKORG'

.

.

.

if vit_vbrk[] is not initial.

SELECT * FROM VBRP INTO TABLE VIT_VBRP for all entries in vit_vbrk

WHERE

VBELN = VIT_VBRK-VBELN .

if sy-subrc = 0.

  SELECT * FROM VIT_VBRP INTO TABLE VIT_VBRP2 for all entries in

   

/GIL/ZGTYPCODE_V for function WICFREIGHT


    where VIT_VBRP-MATNR <> the materials selected from /GIL/ZGTYPCODE_V for function WICFREIGHT

3 REPLIES 3
Read only

former_member632991
Active Contributor
0 Likes
444

Hi,

try like this

SELECT * FROM /xyz/abc_V

INTO TABLE VIT_abc

WHERE ( FUNCTION = 'ab12' or FUNCTION = 'cd34' )

AND TYPECODE = 'VKORG'

SELECT * FROM VBRP INTO TABLE VIT_VBRP for all entries in vit_vbrk

WHERE

VBELN = VIT_VBRK-VBELN .

<b>and matnr <> vit_vbrk-matnr.</b>

  • VBRP-MATNR <> the materials selected from /GIL/ZGTYPCODE_V for function WICFREIGHT.

Regards,

Sonika

Read only

0 Likes
444

Hello to all ,

the select statement should be like this

SELECT * FROM VBRP INTO TABLE VIT_VBRP for all entries in vit_vbrk

WHERE

VBELN = VIT_VBRK-VBELN .

  • VBRP-MATNR <> the materials selected from /xyz/abc_V for function WICFREIGHT.

can u please help me to write the code for the (* VBRP-MATNR <> the materials selected from /xyz/abc_V for function WICFREIGHT).

Thanks in advance.

Read only

dev_parbutteea
Active Contributor
0 Likes
445

SELECT * FROM /xyz/abc_V

INTO TABLE VIT_abc

WHERE ( FUNCTION = 'ab12' or FUNCTION = 'cd34' )

AND TYPECODE = 'VKORG'

.

.

.

if vit_vbrk[] is not initial.

SELECT * FROM VBRP INTO TABLE VIT_VBRP for all entries in vit_vbrk

WHERE

VBELN = VIT_VBRK-VBELN .

if sy-subrc = 0.

  SELECT * FROM VIT_VBRP INTO TABLE VIT_VBRP2 for all entries in

   

/GIL/ZGTYPCODE_V for function WICFREIGHT


    where VIT_VBRP-MATNR <> the materials selected from /GIL/ZGTYPCODE_V for function WICFREIGHT