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

Display internal table on screen.

0 Likes
4,945

Hi expert,

I want to display mara table using internal table .but its not displaying all the records on the output screen and the code is correct can u please help me with it and my version is 7.0 and there are no error in the code using mara table and i want to display all the reocords but staring records are not displaying of person name blank is coming


WRITE : /5 'MATERIAL NO',
30 'CREATED ON',
60 'PERSON NAME',
90 'LAST CHANGED ON'.

how can i solve this ?

Thanks in advance.

Hi expert,

I want to display mara table using internal table .but its not displaying all the records on the output screen and the code is correct can u please help me with it and my version is 7.0 and there are no error in the code using mara table and i want to display all the reocords but staring records are not displaying of person name blank is coming


WRITE : /5 'MATERIAL NO',
30 'CREATED ON',
60 'PERSON NAME',
90 'LAST CHANGED ON'.

how can i solve this ?

Thanks in advance.

14 REPLIES 14
Read only

former_member751964
Participant
0 Likes
4,248

Welcome to the SAP Community! We wanted to give you the opportunity to take the tutorial to get started in SAP Community: https://developers.sap.com/tutorials/community-qa.html, as it provides tips for preparing questions that draw responses from our members. Additionally, by adding a picture to your profile you encourage readers to respond to your question. Learn more about your profile here: https://developers.sap.com/tutorials/community-profile.html

Read only

FredericGirod
Active Contributor
4,248

use the button [code] to format your code, provide the SELECT statement part

Read only

VXLozano
Active Contributor
0 Likes
4,248

To display data in screen, you should use an ALV or a TREE, if you are within SAPGui.

Check CL_SALV_TABLE sample programs.

About your code, what's the line size defined in your report header?

Read only

0 Likes
4,248

no not about alv report i am saying that i am trying to display all the records of the mara table using internal table but its not displaying all the records its display from s.no from 22 and person name is blank till sum point like 588 like that so i am asking weather its version problem bcoz i tried for kna1 table also so can u please help me with u

Read only

VXLozano
Active Contributor
4,248

punctuation is your friend... or should be

The best way to DISPLAY any table-like information in screen is the ALV one. REUSE_ALV (old), CL_GUI_ALV (not so bad), CL_SALV_TABLE (last one).

If you want to use the WRITE sentence for any obscure reason, then you must be sure your REPORT has the proper line width.

In SE38 put the focus in the REPORT sentence, press F1 and look the help for its clauses. One of them sets the amount of characters the "printed" list will display.

But it's the wrong way to go.

Read only

Sandra_Rossi
Active Contributor
0 Likes
4,248

The question has already been asked many times in the forum:

Display internal table on screen site:sap.com
Read only

0 Likes
4,248

if u dont mind can u please send me that forum

Read only

matt
Active Contributor
4,248
Read only

0 Likes
4,248

here i am unable to display all the fileds as u can see staring fields cant properly been displayed and i have written the code properly can u please help me with this issuse using internal table i am trying to display kna1 means using internal table cant we display standard internal table ?

<Personal information was deleted by moderator.>

Read only

ashiqali_ratnani
Explorer
0 Likes
4,248

Check the below code

SELECT * FROM mara INTO TABLE @DATA(lt_mara) UP TO 20 ROWS.

WRITE: 5 'Material Number', 30 'Created On', 60 'Person Name', 90 'Last changed on'.

LOOP AT lt_mara INTO DATA(ls_mara).
WRITE: /, 5 ls_mara-matnr, 30 ls_mara-ersda, 60 ls_mara-ernam, 90 ls_mara-laeda.
ENDLOOP.

Read only

0 Likes
4,248

I wouldn't recommend that solution, but you can give your answer a better design with colors and indentation (CODE button), see:

SELECT * FROM mara INTO TABLE @DATA(lt_mara) UP TO 20 ROWS.
WRITE: 5 'Material Number', 30 'Created On', 60 'Person Name', 90 'Last changed on'.

LOOP AT lt_mara INTO DATA(ls_mara).
  WRITE: /, 5 ls_mara-matnr, 30 ls_mara-ersda, 60 ls_mara-ernam, 90 ls_mara-laeda.
ENDLOOP.
Read only

Sandra_Rossi
Active Contributor
0 Likes
4,248

You didn't post the code where you have a problem. Based on your latest comment, I guess your question gets changed. Are you talking about MARA or about KNA1, and why is it a different problem? Why don't you want to use ALV?

Now, I don't understand your issue at all.

Read only

0 Likes
4,248

where we can find code button if u dont mind can u say me nd what does co

Read only

0 Likes
4,248

i am talking about both i tried mara it not displayed starting record so i took another table nd tried kna1 same issuse so i am not getting the solution i want to try displaying internal table only later i will go with alv