Skip to Content
author's profile photo Former Member
Former Member

Calling smartform application in ITS

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 19, 2008 at 01:10 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.