Skip to Content
-1

field not displaying a data

Hi experts,

SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; } .L0S70 { color: #808080; }

SELECT matnr
lvorm
mtart

ersda
FROM mara
INTO TABLE t_mara
FOR ALL ENTRIES IN t_marc
WHERE matnr = t_marc-matnr
AND mtart IN s_mtart1.

above query is not displaying ersda field data . Can you please help me to display ersda field data

regards,

bhavani.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Posted on Sep 26, 2019 at 05:07 AM

    Hi Bhavani Amara,

    First check your data in MARA table through SE16N, if you are getting the data in the respective field, then check, if you are using correct data type for your corresponding fields and moreover check the sequence of fields in types declaration and your select query.

    Regards,

    Mohit Sharma

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 26, 2019 at 05:22 AM

    if this is working, that means your data declaration is not OK. (maybe because the order of the field in the table T_MARA is not the same as your SELECT statement, and you shoud use INTO CORRESPONDING FIELDS OF TABLE .... )

    SELECT matnr

    lvorm
    mtart

    ersda
    FROM mara
    INTO TABLE @data(t_mara)
    FOR ALL ENTRIES IN t_marc
    WHERE matnr = @t_marc-matnr
    AND mtart IN @s_mtart1.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 26, 2019 at 05:26 AM

    Hello,

    I hope your table has the data as per your Select Condition. Try directly in T-Code SE16N to check if the table has entries for the given selection criteria.

    Next am interested in the data type of ERSDA field in Internak table T_MARA, are they both same?

    Finally ensure the fields in the select query and the fields in your internal table (T_MARA) are all in same Order. I think you would have missed this in your query.

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 21, 2019 at 12:01 PM

    "WHERE matnr = t_marc-matnr"

    It looks like you are using the target as the selection criteria. If this is true, than the WHERE clause will be looking for MATNR = blank. I'm sure this isn't what you intended, but that is what the code indicates.

    At least that is how it works in the ancient version of ABAP my client is using.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 21, 2019 at 02:17 PM

    Hello Bhavani Amara,

    1º please check if u get any data in Mara by se16n;

    2º Check the data types;

    3º SELECT matnr,lvorm,mtart,ersda

    FROM mara

    INTO TABLE @lt_mara
    FOR ALL ENTRIES IN @lt_marc
    WHERE matnr =@lt_marc-matnr

    AND mtart IN @s_mtart1.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 21, 2019 at 12:40 PM
    -1

    Hi Bhavani Amara ,

    Please recheck the below details,

    1. Check MARA table for ersda field data that should not be blank,
    2. Your select query is ok.

    Just ensure the DATA types like,

    If you declare s_mtart1 in SELECT-OPTIONS the this should be your type:

    SELECT-OPTIONS: s_mtart1 FOR mara-mtart.

    And this should be your code:

    TYPES: BEGIN OF tt_mara,
      matnr TYPE matnr,
      lvorm TYPE lvorm,
      mtart TYPE mtart,
      ersda TYPE ersda,
      end OF tt_mara.
    
    DATA: t_marc TYPE STANDARD TABLE OF marc,
          t_mara TYPE STANDARD TABLE OF tt_mara.
    
    SELECT * FROM marc
    INTO TABLE t_marc.
    
    SELECT matnr lvorm mtart ersda
    FROM mara
    INTO TABLE t_mara
    FOR ALL ENTRIES IN t_marc
    WHERE matnr = t_marc-matnr
    AND mtart IN s_mtart1.
    
    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.