Application Development and Automation 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: 
Read only

internal table

Former Member
0 Likes
716

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
Read only

matt
Active Contributor
601

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.

Read only

aliimran_uppal
Participant
0 Likes
601

You can show the work area fields by writing

wa_mara-"FieldName"

example:

wrtie: wa_mara-matnr.

Read only

BaerbelWinkler
SAP Champion
SAP Champion
601

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.

Read only

former_member596005
Participant
0 Likes
601

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.