on 05-11-2010 11:48 AM
Hi All,
I need to check whether an internal table is having data or not in script.
Can i use If Not &it_table& is Initial, just like we use in reports, but it is not working.
Pls advise me how to check whether the internal table is having data or not.
Thanks,
Priya
Hi Priya,
In SAP script you can not pass all the data to output layout.. Whenever we need to use the the data to be printed on output layout, we first populate that data in a print program.
First you need to populate your internal table in Print program only.. and to display this data ..
you need to put a loop on that internal table. pass all the fields into a structure.. and then you can use that structure in script editor. so that your layout can print it one by one..
You need to code like as below in your print program..
loop at i_tab.
i_tab-f1 = w_display-f1.
i_tab-f2 = w_display-f2.
i_tab-f3 = w_display-f3.
* Call the wirte_form
call function 'WRITE_FORM'
exporting
element = 'ELEMENT'
window = 'MAIN'
exceptions
element = 1
function = 2
type = 3
unopened = 4
unstarted = 5
window = 6
others = 7.
endloop.
Now in editor you can put like that:
*/E ELEMENT*
*PF &w_display-f1&,, &w_display-f2&,, &W_display-f3&*
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
FIrst thing is how can we get total internal table at once to script?
I am afride to say it is not possible to do that.
Regards and Best wishes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.