Skip to Content
author's profile photo
Former Member

Need logic...

Hi Experts,

Can any body help me in reading all the data from select-options_SMATNR values into one internal table.

Scenario:

Here User has entered the data in jumbled order not consecutive numbers and SMATNR-high value also filled up along with jumbled numbers with extension.

Please help me in the above situation, how to read all the data into one internal table along with one simple example.

Thanks

Praveen

Moderator Message: Basic Question.

Edited by: kishan P on May 5, 2011 12:00 PM

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • author's profile photo
    Former Member
    Posted on May 05, 2011 at 06:25 AM

    HI,

    Select the value from mara into an internal table on the basis of the select-option.

    select matnr from mara into table it_mara where matnr in s_matnr.

    you will get all the material in the internal table.

    Regards,

    Madhukar Shetty

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on May 05, 2011 at 06:26 AM

    Hi Praveen,

    What's difficult in it..

    Select-Options will be having SIGN, OPTION, LOW, HIGH fields in it's structure.

    Case1: If user enters only LOW values with sign I and option EQ

    Loop on that select-options table and pass values where ever you want!

    Case2: Other than above scenarios:

    You should pull values from database table

    Thanks.

    Naveen.I

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on May 05, 2011 at 06:28 AM

    REPORT ZTEST_SM02.

    tables: mara.

    data: t_mara type standard table of mara,

    wa_mara type mara.

    select-options: s_matnr for mara-matnr.

    select * from mara into table t_mara

    where matnr in s_matnr.

    loop at t_mara into wa_mara.

    write:/1 wa_mara-matnr.

    endloop.

    using this code u can test your code...

    i thing this will help

    Add comment
    10|10000 characters needed characters exceeded