on 11-20-2008 4:30 AM
In a script i want to print these two tables.department table and student table in the main window in the script.two tables data i have to print one by one like department table and then down student table.If i have to print these two tables data means how.I am taking start form also.But i am getting error.Plz tell me the correct way.And in the script i am printing like this &itab&
&itab1&.Plz correct my program and give me correct solution.
REPORT ZSCRIPT1.
tables: zdept1,zpstudent2.
data: itab like zdept1 occurs 0 with header line.
data: itab1 like zpstudent2 occurs 0 with header line.
select * from zdept1 into table itab.
select * from zpstudent2 into table it2.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
DIALOG = 'X'
FORM = 'ZPSCRIPT1'
LANGUAGE = SY-LANGU.
loop at itab.
.
CALL FUNCTION 'START_FORM'
EXPORTING
FORM = 'ZPSCRIPT1'
LANGUAGE = ' '.
select * from zpstudent2 into table itab1.
loop at itab1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'TEST'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'.
CALL FUNCTION 'END_FORM'.
endloop.
endloop.
thankyou
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I want to print two internal tables data in a script
No Probs.
REPORT ZSCRIPT1.
tables: zdept1,zpstudent2.
data: itab like zdept1 occurs 0 with header line.
data: itab1 like zpstudent2 occurs 0 with header line.
select * from zdept1 into table itab.
select * from zpstudent2 into table it2.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
DIALOG = 'X'
FORM = 'ZPSCRIPT1'
LANGUAGE = SY-LANGU.
loop at itab.
.
CALL FUNCTION 'START_FORM'
EXPORTING
FORM = 'ZPSCRIPT1'
LANGUAGE = ' '.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'TEST1'"this is new Element(Print Itab data)
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'.
select * from zpstudent2 into table itab1.
loop at itab1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'TEST'"print itab1 data
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'.
CALL FUNCTION 'END_FORM'.
endloop.
endloop.
Add one more Element in main window and for this element add one extra Write_form and print Different internal table data in that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.