on 12-17-2008 4:28 PM
Hi all,
I am workin on SRM 5.0 with integrated ITS.I have created a custom report and assigned a tcode to it as well as created an internet service for it.
Now i have added the tcode for the report in my SRM roles so that it is displayed as link in the ITS screen.However in my report i have a custom icon on the screen on click of which i call a custom smartform.I need to display this smartform in ITS.(In ITS.all forms are displayed in PDF format).However when i click on the custom icon in ITS,it doesnt open the smartform application.
Can anyone pls explain me the steps for calling a smartform in ITS?
ALL suggestions will be appreciated and rewarded.
BR,
SRM Tech
Hi,
Yes, you can do this like this:
call function 'BBP_OUTPUT_SC_PREVIEW_SMART'
exporting
iv_guid = lv_guid
iv_smartform = 'ZBBP_SC_PREV'
iv_html = space
importing
ev_pdf = lv_pdf
ev_bin_filesize = lv_bin_filesize
exceptions
no_smartform = 1
no_partner = 2
no_data = 3
psf_error = 4
otf_error = 5
its_error = 6
no_printer = 7
others = 8.
- LV_GUID - SC GUID
- ZBBP_SC_PREV - name of smartform document
- lv_pdf - content of PDF document in XSTRING
- lv_bin_filesize - size of generated PDF document
Now when you get lv_pdf content you can do something like this:
*FROM BSP CALL
data: cached_response type ref to if_http_response,
guid type guid_32,
display_url type string.
create object cached_response type cl_http_response exporting add_c_msg = 1.
lv_bin_filesize = xstrlen( lv_pdf ).
cached_response->set_data( data = lv_pdf
length = lv_bin_filesize ).
cached_response->set_header_field( name = if_http_header_fields=>content_type
value = 'application/pdf' ).
cached_response->set_status( code = 200 reason = 'OK' ).
cached_response->server_cache_expire_rel( expires_rel = 180 ).
call function 'GUID_CREATE'
importing
ev_guid_32 = guid.
concatenate runtime->application_url '/' guid '.pdf' into display_url.
cl_http_server=>server_cache_upload( url = display_url
response = cached_response ).
navigation->exit( display_url ).
For ITS call you can user FM CALL_BROWSER.
Regards,
Marcin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.