Skip to Content
author's profile photo Former Member
Former Member

JUST TELL ME THE ANSWER

TABLES: MARA.

SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS: MATNR FOR MARA-MATNR,

MTART FOR MARA-MTART.

SELECTION-SCREEN: END OF BLOCK B1.

DATA: BEGIN OF ITAB,

MATNR LIKE MARA-MATNR,

MTART LIKE MARA-MTART,

MATKL LIKE MARA-MATKL,

LAEDA LIKE MARA-LAEDA,

END OF ITAB.

DATA: WA_ITAB LIKE ITAB OCCURS 0.

DATA WA LIKE LINE OF WA_ITAB.

SELECT * FROM MARA INTO CORRESPONDING FIELDS OF TABLE WA_ITAB WHERE

MATNR = ?????????.

LOOP AT WA_ITAB INTO WA.

WRITE : WA-MATKL.

ENDLOOP.

CAN U TELL ME WHAT TO WRITE IN ??????? SO THAT IT WILL FETCH DATAS FROM THE MARA TABLE BASED ON THE VALUES IN SELECTION SCREEN.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 07:40 AM

    SELECT * FROM MARA INTO CORRESPONDING FIELDS OF TABLE WA_ITAB WHERE

    MATNR IN MATNR. <-- check this

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 07:40 AM

    hii

    SELECT * FROM MARA INTO CORRESPONDING FIELDS OF TABLE WA_ITAB WHERE

    MATNR IN MATNR.

    reward if useful

    thx

    twinkal

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 07:41 AM

    hi,

    SELECT * FROM MARA INTO CORRESPONDING FIELDS OF TABLE WA_ITAB WHERE

    MATNR *in matnr and MTART IN MTART*

    Rgds.,

    subash

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 07:38 AM

    the select options field MATNR

    SELECT * FROM MARA INTO CORRESPONDING FIELDS OF TABLE WA_ITAB WHERE

    MATNR IN MATNR

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 07:41 AM

    hii

    SELECT * FROM MARA INTO CORRESPONDING FIELDS OF TABLE WA_ITAB WHERE

    MATNR IN MATNR.

    reward if useful

    thx

    twinkal

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 16, 2008 at 07:41 AM
    SELECT * FROM MARA 
      INTO CORRESPONDING FIELDS OF TABLE WA_ITAB 
      WHERE MATNR IN MATNR AND MTART IN MTART.

    The ABAP compiler is able to distinguish the field of the database and the select-options even if they have the same name.

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 07:41 AM

    Hi Ansuman,

    SELECT * FROM MARA INTO CORRESPONDING FIELDS OF TABLE WA_ITAB WHERE
    MATNR = ?????????.

    In this statement we are fetching the data from the database table depending on the WHERE condition. Here if we sepecify the MATNR value then a single record containg all the fields is selected .

    IN S_MATNR gives u the number of records which are specified in the selection screen

    Best regards,

    raam

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.