Skip to Content
0
Mar 29, 2010 at 08:08 AM

SCRIPT - Print text continuously in a loop

52 Views

Hi Guys,

In script, I want to print text continuosly in a loop. I searched SCN, but I couldn't find anything related. Perhaps, I dont know what keyword to feed in the search.

For example, I have 10 materials in an internal table gt_mara. As of now, it is printing as below.

MAT 1

MAT 2

MAT 3

My code for the above is,

LOOP AT gt_mara INTO gwa_mara.

  CALL FUNCTION 'WRITE_FORM'
   EXPORTING
    element = 'MATERIAL'
    window  = 'MAIN'.

ENDLOOP.

In script,

/E	 	MATERIAL
P1	 	<HB>&GWA_MARA-MATNR& </>

But I need to print in a single line as below. How can I acheive this?

MAT 1 MAT 2 MAT 3

Please excuse me for posting in a wrong forum.

Edited by: P Yasin on Mar 29, 2010 11:12 AM