‎2018 Nov 27 8:42 AM
Hello.
I want to display multiple records in a window.(Not main window)
My code is below.
<SE38(ABAP Program for calling subroutines)>
CALL FUNCTION 'START_FORM'.
:
LOOP AT ITAB.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'ITEM'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'WINDOW1'
ENDLOOP.
:
CALL FUNCTION 'END_FORM'.
<SE71(PRINT PROGRAM)>(Window1)
DEFINE &BUKRS& = & REGUP-BUKRS&
DEFINE &VBLNR& = & REGUP-VBLNR&
DEFINE &XBLNR& = ' '
PERFORM SUB1 IN PROGRAM PG1
USING &BUKRS&
USING &VBLNR&
CHANGING &XBLNR&
ENDPERFORM
/E ITEM
AS &XBLNR&
I wrote this code by reference to other similar questions.
But it's not going well. Please help.
‎2018 Nov 27 11:08 AM
Hi ryo-yama
You should tell us what it means "it's not going well".
The first thing I see it's that, in your Sapscript you want to display field XBLNR
Where do you fill it in your loop in your program?
LOOP AT ITAB.
"Which value has XBLNR in this point if you debug?
CALL FUNCTION 'WRITE_FORM'
EXPORTING ELEMENT = 'ITEM'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'WINDOW1'.
ENDLOOP.Debug your report and check:
A little suggestion for the future: use CODE option (pasting your code as plain text) to make it more easy to read and share as much as information you can.
If you say "it's not going well" is a bit unclear and we struggle into helping you 🙂