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: 

internal table

0 Kudos

if i write statement

SELECT SINGLE *
* FROM mara
* INTO wa_mara
* WHERE matnr = a_matnr.

then what will be the write statement.

4 REPLIES 4

matt
Active Contributor

Whatever you want it to be. Your question is unclear. Your title is about internal tables, the content is a select single, and you're asking about a write statement.

I can appreciate that not everyone's first language is English, but I can't make any sense of your post.

aliimran_uppal
Participant
0 Kudos

You can show the work area fields by writing

wa_mara-"FieldName"

example:

wrtie: wa_mara-matnr.

BaerbelWinkler
Active Contributor

If you write the statement exactly as shown, then you should get a syntax error as lines 2 to 4 start with an '*' and are therefore treated as comments leaving the first line hanging in limbo as it's not even a complete statement. But, as Matt already mentioned, it's not even clear what you want to ask and/or achieve.

former_member596005
Participant
0 Kudos

HI Anand Mokashi ,

Please be clear with your question , Anyway if you want your output then change according to sample code suggested below.

SELECT *
FROM mara
INTO it_mara
WHERE matnr = a_matnr.

loop at it_mara into wa_mara.

write : / wa_mara-matnr , ............your req fields.

endloop.

Moreover you have to remove * in your select query before starting of line as sap treats it as comment .

If you want to write select query only like you mentioned in your question then write as below.

SELECT single *
FROM mara
INTO wa_mara
WHERE matnr = a_matnr.

*and for output :

write : / wa_mara-matnr , wa_mara-mtart ,wa_mara-meins,........ and so on.