on 01-24-2007 4:01 PM
Hello all.
What is the best practice to display an abaplist returned from memory using
submit report?
I tried converting to text and use the textview but I am not able to add line breaks
so the format looks bad.
Any hints are welcome.
Thanks,
Sascha
Hi Sascha,
have you ever tried the formatted text view? I hope it is already available in your system. Just separate the lines with "<br/>".
Otherwise you can use the textedit in a read-only state and the context attribute is a string_table.
Ciao, Regina
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Regina.
I already tried the FormattedTextView but it seems that it can not handle larger
texts cause I get an error: Regular Expression is to complex. I just added all line
of the result to one string and mapped it to the UI Element. However, when I
shorten the string it gets displayed but does not look good enough.
I will try to run the report as service and convert the output to HTML which I attach
to the response and display it in an IFRAME.
Would be nice to have an UI Element to display abaplist.
Thank you so far.
Cheers,
Sascha
Hi Sascha,
I also use BSPs or Services to render ABAPs are Simple HTML lists.
No interactive stuff, just simple Html.
But it works and is easy.
Your IFRAME can call a simple Service or BSP for example... see below
regards
Phil.
method IF_HTTP_EXTENSION~HANDLE_REQUEST.
* this piece of code is a generic OUTPUT in
* HTML format, of ABAP LISTs.
* ALV NOT SUPPORTED. Use ITS service for that.
* variants also supported etc.
*
* HOW TO:
* create a class using interface IF_HTTP_EXTENSION
*Place this code in the HANDLE_REQUEST METHOD.
*create a new service in SICF entering your new class
*as the handler.
* Known Restrictions:
* NO CALL SCREENS etc that cause SAPGUI dialog.
* Nice test reports RSUSR003 or RSUSR005
data: lv_variant type char30.
data: lv_repname type sy-repid.
data: output_str type string.
data: html type table of w3html.
data: html_wa type w3html.
data: listobject type table of abaplist.
* to call
*http://host:port/this_service?report=rxxxxxxx&variant=vxxxxxxxx
lv_repname = server->request->get_form_field('report').
lv_variant = server->request->get_form_field('variant').
if lv_variant = space.
* the abap output section
submit (lv_repname) and return exporting list to memory.
else.
submit (lv_repname) using selection-set lv_variant
and return exporting list to memory.
endif.
call function 'LIST_FROM_MEMORY'
tables
listobject = listobject.
call function 'WWW_HTML_FROM_LISTOBJECT'
exporting
report_name = lv_repname
tables
html = html
listobject = listobject.
clear output_str.
loop at html into html_wa.
concatenate output_str html_wa into output_str.
endloop.
call method server->response->set_cdata( data = output_str ).
endmethod.
Hi Phil.
Thank you very much but meanwhile my service is already running. It looks
almost like your code.
The tricky part was to get all select options of the select_options component into
the URL as parameter.
But works well.
I just have read that IFRAME gets obsolete. Maybe they build a webreporting
component instead.
Anyway thanks for your code. It just shows that I am on the right path.
Cheers,
Sascha
Hi Regina.
The problem also occurs when I use a String which wasn't processed with the
class CL_WD_FORMATTED_TEXT. Seems that the FormattedTextView has a
problem with texts that are too long in general. I just added a simple Text String.
But thank you for the hint. I think its a good idea to move from SP09 to SP10.
Have a nice weekens,
Sascha
Hi Regina,
do you mean that the FormattedTextView knows the format of an ABAP List retrieved via:
SUBMIT ABAPXXX and return exporting list to memory.
call function 'LIST_FROM_MEMORY'
tables
listobject = listobject.
It would be really great. The list of the "old" ABAP Reports would be automatically available via Web Dynpro...
Sergio
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.