Application Development 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: 

Problem in Selection

sastry_gunturi
Active Participant
0 Kudos

These are the select options.


SELECT-OPTIONS: 
                S_MATNR FOR MARA-MATNR ,
                S_MATKL FOR MARA-MATKL OBLIGATORY DEFAULT 'H*',
                S_WERKS FOR MARC-WERKS OBLIGATORY.

This is the select query


SELECT MARA~MATNR
             MARA~MATKL
             MARC~WERKS      
             FROM MARA AS MARA INNER JOIN MARC AS MARC
            ON MARA~MATNR = MARC~MATNR INTO TABLE GT_MARA
            WHERE MARA~MATNR IN S_MATNR AND
            MARA~MATKL IN S_MATKL AND
            MARC~WERKS IN S_WERKS.

S_MATKL internal table is having

s_sign = 'I'
s_option = 'EQ'
s_low = H*.

I know this works if <b>S_OPTION = CP</b>.

Let me know how can it be done.

4 REPLIES 4

Former Member
0 Kudos

Karthik,

use % instead of *.

reward if it helps,

Satish

sastry_gunturi
Active Participant
0 Kudos
SELECT-OPTIONS: S_LAEDA FOR MARA-LAEDA OBLIGATORY,
                S_MATNR FOR MARA-MATNR ,
                S_MATKL FOR MARA-MATKL OBLIGATORY DEFAULT 'H*',
*               OPTION CP,  " adding this option
                S_MTART FOR MARA-MTART OBLIGATORY DEFAULT 'FERT',
                S_WERKS FOR MARC-WERKS OBLIGATORY.

Solved the problem.

naimesh_patel
Active Contributor
0 Kudos

Try like this:

SELECT-OPTIONS: 
                S_MATNR FOR MARA-MATNR ,
                S_MATKL FOR MARA-MATKL OBLIGATORY, " DEFAULT 'H*', << Comment
                S_WERKS FOR MARC-WERKS OBLIGATORY.

initialization.
 s_matkl-sign = 'I'
s_matkl-option = 'CP'
s_maktl-low = 'H*'.
append s_matkl.

Regards,

Naimesh Patel

Former Member
0 Kudos

Hi

  • is not treated as wild character . Instead use %

SELECT-OPTIONS:

S_MATNR FOR MARA-MATNR ,

S_MATKL FOR MARA-MATKL OBLIGATORY DEFAULT 'H%',

S_WERKS FOR MARC-WERKS OBLIGATORY.

Hope this work .

Praveen