2011 Mar 26 9:18 PM
Hi
I have written following code to get professor number on each loop and display it on the report but I get 9 rows of 00000000 instead of actual professor number. Can anyone help me please?
tables: ukurs.
data: itab like ukurs occurs 0 with header line.
select prfnr from ukurs into table itab
where prfnr in (00000002, 00000003,00000006).
loop at itab.
write:/ itab-prfnr.
endloop.
Thanks,
Khalid Atiq
2011 Mar 26 9:54 PM
Hi Khalidatiq,
when you use SELECT <list of table columns> FROM <table> INTO \[TABLE\] <data object>, the data object must fit exactly the list of fields, in the same sequence and with exactly the same data types.
In your case, table column is PRFNR, and data object is (an internal table) with row type UKURS. So you must declare your data object like this :
data: itab like ukurs-prfnr occurs 0 with header line.
Note that your writing is obsolete, you'd better use, for example :
data itab type standard table of ukurs-prfnr.
Best regards,
Sandra
Hi Khalidatiq,
when you use SELECT <list of table columns> FROM <table> INTO \[TABLE\] <data object>, the data object must fit exactly the list of fields, in the same sequence and with exactly the same data types.
In your case, table column is PRFNR, and data object is (an internal table) with row type UKURS. So you must declare your data object like this :
data: itab like ukurs-prfnr occurs 0 with header line.
Note that your writing is obsolete, you'd better use, for example :
data itab type standard table of ukurs-prfnr.
Best regards,
Sandra
2011 Mar 26 9:52 PM
Bonjour,
There is a problem in your SELECT statement: replace "INTO TABLE" with "INTO CORRESPONDING FIELDS OF TABLE"
tables: ukurs.
data: itab like ukurs occurs 0 with header line.
SELECT prfnr FROM ukurs INTO CORRESPONDING FIELDS OF TABLE itab
where prfnr in (00000002, 00000003,00000006).
loop at itab.
write:/ itab-prfnr.
endloop.Cordialement,
Chaouki
2011 Mar 26 9:54 PM
Hi Khalidatiq,
when you use SELECT <list of table columns> FROM <table> INTO \[TABLE\] <data object>, the data object must fit exactly the list of fields, in the same sequence and with exactly the same data types.
In your case, table column is PRFNR, and data object is (an internal table) with row type UKURS. So you must declare your data object like this :
data: itab like ukurs-prfnr occurs 0 with header line.
Note that your writing is obsolete, you'd better use, for example :
data itab type standard table of ukurs-prfnr.
Best regards,
Sandra
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |