2006 Jan 18 2:31 PM
I want to write a function module which will take an internal table with an entirely arbitrary line type as its input and output a table in HTML. This is not very difficult to do in ABAP as long as I can get the table in and out. However, I have no idea how to transfer a generic table. At the moment I can see myself having to do something truly horrible to hack around this, when all I want to do is use "describe table" and a couple of "do...enddo" loops.
I really, really hope this is a dead easy question to answer...
2006 Jan 18 2:41 PM
Hi,
In Tables Parameters of your FM interface do not give any reference type for your IN table..
For your OUT Table you can use W3HTML as line type.
Hope this helps..
Sri
Message was edited by: Srikanth Pinnamaneni
Message was edited by: Srikanth Pinnamaneni
2006 Jan 18 2:41 PM
Hi,
In Tables Parameters of your FM interface do not give any reference type for your IN table..
For your OUT Table you can use W3HTML as line type.
Hope this helps..
Sri
Message was edited by: Srikanth Pinnamaneni
Message was edited by: Srikanth Pinnamaneni
2006 Jan 18 2:42 PM
Well, passing a table thru the interface with no type is easy, just don't assign a structure when defining the interface. It will then take its structure by what is being passed to it.
So if you would pass an internal table to it with the structure like so.
Data: begin of itab occurs 0,
line(1000) type c,
end of itab.
Then that is the structure inside the function module.
Did this answer your question? Please explain further if not.
Regards,
Rich Heilman
2006 Jan 18 2:47 PM
Thanks guys. I feel like a right tit now! 😛 Can I just ask - what's so special about W3HTML? Am I not better off just passing back something of type string, as I'm obviously never going to go over 2GB of HTML (which I think is the maximum size for type string) and is surely easier to embed into a BSP? Obviously whatever it is I do I want it to be correct.
2006 Jan 18 2:51 PM
Hi,
W3HTML is the line type typically used by CL_GUI_HTML_VIEWER or CL_DD classes for the HTML code internal tables.
That is why I have suggested it..
Hope this helps..
Sri
2006 Jan 18 2:56 PM