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: 

field not displaying a data

former_member612655
Participant

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.

6 REPLIES 6

mohit_dev
Contributor
0 Kudos

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

FredericGirod
Active Contributor
0 Kudos

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.

former_member1716
Active Contributor
0 Kudos

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

loyd_enochs3
Participant
0 Kudos

"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.

0 Kudos

Hi bhavani123 ,

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.

0 Kudos

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.