BSP+Guided Procdure

Hi All,
I am implementing MDM work flow using Guided Procedure and Business Server Page (BSP).   Created Collable objects using BSP application.Created one BSP application in that having two HTM pages and To complete the Action  calling complete.htm page from the Create.htm page, and this complete.htm page is send necessary input for the message action complete to the GP end.
When there is only one create.htm page in the BSP application, after clicking the create request button of BSP I m getting the action complete message in the GP for the action, but when I am trying to navigate internally from create.htm to input.htm entering few data and coming back to the create.htm and trying to click the button Create Request in the create.htm page getting error and not able to notify the GP for the Action complete result set. I am getting error like not able to display.
One more scenario, if I am having two buttons Create Request and Search Duplicate. If I m doing search for duplicate I m refreshing the page and after that I m trying to click the Create Request I m getting error not able to complete the action in GP, but if I m trying to click the Create Request button first I m getting success message in the GP.
Error in the Porta for GP action is :-Error while processing the item; it cannot be displayed
Is this refreshment of page is problem?
If any one having idea, plz share the same.
Regards,
Deepak

Hello Raja,
   Thank you for Responding.
   #2. Yes in normal bsp application it will store the data in application class if navigate to different page also.
   but here the two pages were attached to two different actions in Guided Procedures process. while running  the second action is executing in different memory context.
    how we can store the data while moving from one action to another action in Guided Procedures. ?

Similar Messages

  • Output to input mapping between actions in Guided Procdure

    Hi,
    i had requirement to create process i.e. user request for group access to manager this one developed in Web dynpro.
    I can able create initial screen in process i.e. display available groups in portal using table in this user can select required groups and click submit then request pass to manager for approval but i'm unable pass whatever groups selected by user to manager view means i didn't no how to map parameters user request view to manager approval view  and  also tell me once pass parameters to input of manager view how to read the list of input (here selected groups by user).
    Please give me if u have any example url to explaining about mapping between list of output to list of input between actions of wd gp process.
    reagrds,
    Nari.

    It is better to avoid more customization from maintainability point of view, if possible . Meaning I would try to make standard map as much as possible(less customization, no custom functoids, less customized xslt etc). Since your source xml format and
    destination root is known, I can see your destination format is also known. Hence, you can copy the same schema format from source into destination with the root which you are referring as one element rather than just creating one element, To avoid all drawing
    all lines manually, you can use "mass copy" functoid
    to recursively copy all data in an input instance message, to arbitrary depth, that corresponds to a specified node in the source schema to the position in an output instance message that is specified by the output link. also refer
    anytype with masscopy.
    If you are just searching for a solution to pass raw xml, then I would go with your second approach already. You can also pass the output to external assembly to allow more flexibility in terms of coding if needed.
    Please mark it as Answer if this answers your question
    Thanks.
    Mo
    The contents I write here is my personal views, not the view of my employer and anyone else.

  • Intercating Adobe Forms in GP?

    Hi,I am New to Guided Procdures.
    What is Main Benefits of GP Over Webdynpro.
    What is RelationShip Between CAF And GP.
    Why SAP Introduced the type Of Differnet UI Development Tools.
    What GP Role in UWL And ESS/MSS.
    My Requirement is We Get Data From SAP ECC,Adobe Forms.
    Some times We Need To Get Webdynpro Components
    I Want Step By Step Procedure For Adobe Forms And Webdynpro APplications.
    Bye
    Thanks
    SubbaRao Chinta

    Hi SubbaRao Chinta,
    SAP Interactive Forms by Adobe in the Guided Procedures Environment
    https://www.sdn.sap.com/irj/sdn/java?rid=/webcontent/uuid/f057d803-3c53-2910-db92-a6a2f1cc7334
    Guided Procedures Functions and Features
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d261b611-0b01-0010-7781-acb929f30163
    Guided Procedures Overview 
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a553bb11-0b01-0010-23ad-a3dc74e77e39
    Task-Oriented Support for Your Department's Informal Processes - Without Calling on IT
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b866ae10-0b01-0010-cc85-e6c886cbfa84
    Getting Up to Speed on Guided Procedures, Part I  
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/49a605f0-0a01-0010-68aa-ebb5dfdce852
    Getting Up to Speed on Guided Procedures, Part II  
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/1ffe06f0-0a01-0010-60a7-a2593e1862f3
    http://help.sap.com/SAPHELP_NW04S/helpdata/EN/33/198141f906040de10000000a1550b0/content.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a553bb11-0b01-0010-23ad-a3dc74e77e39
    https://www.sdn.sap.com/irj/sdn/java?rid=/webcontent/uuid/f057d803-3c53-2910-db92-a6a2f1cc7334
    Wiki
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/bpx/guidedProceduresGetting+Started
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/bpx/guidedProcedureGeneral+questions
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/bpx/guidedProceduresProcess+Examples
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/emtech/adobeformsinGuidedprocedures
    https://wiki.sdn.sap.com/wiki/display/EmTech/AdobeinteractiveformsinwebDynpro+JAVA
    https://wiki.sdn.sap.com/wiki/display/BPX/TheuseofInteractiveFormsinGP
    Useful blogs
    A Tale of Two Brothers: Guided Procedures and the SAP NetWeaver BPM Product
    The specified item was not found.
    Usage guide for creating Guided Procedures
    Usage guide for creating Guided Procedures
    Galaxy, Universal Worklist, Guided Procedures Connector, and Dr. Bruce
    Galaxy, Universal Worklist, Guided Procedures Connector, and Dr. Bruce
    Reward points if it's helpful.

  • Retrieving cProject Number/GUID in projectResources.bsp

    Hello BSP Gurus,
    I'm relatively new to BSP and trying my hands on cProjects 3.1
    I want to retrieve the cProject Number or the project GUID in the BSP page projectResources.bsp (Application Name: PRP). The controller has a method to retrieve the project name, but not the project number.
    Kindly let me know if there is any technique for retrieving the same.
    Regards,
    Vivek Pandey

    Solved on own

  • How  to create new bsp application ? complete guide

    hi all,
    i am new to bsp pls, anyone can explain or send material regarging bsp application . with one example.
    its urgent
    with regards
    lokeshan.m

    Check these links:
    overview:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4fbe7b8e-0a01-0010-b69b-b7e717378f22
    Full Demos:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d46b9b90-0201-0010-ef92-9964c1bc98e1

  • BSP Programming Guide

    Hi Friends,
      I am new to BSP Developments.Can anyone send me the step by step tutorials for the BSP Developments
    Thanks & Regards,
    Ashok.

    Hi Ashok,
    First of all welcome to BSP world...
    First of all I would request you to go through the forum's Rules of Engagement,and there it is mentioned that before posting please search through the forum, and you will get many threads where this question is answered...
    Regarding step by step procedures referr to the <a href="http://help.sap.com/saphelp_nw04/helpdata/en/c8/101c3a1cf1c54be10000000a114084/frameset.htm">tutorials</a> on help.sap.com.
    Hope this helps.
    <b><i>Do reward each useful answer..!</i></b>
    Thanks,
    Tatvagna.

  • Error message in bsp application

    hi
    Im tamil selvan .....this is my first bsp application i created .. but i cant view the output..the default html code itself not executing... i copied the same code in text and saved in html its executing there... i dont know what is the issue..is any system files are missing...plz guide me im new to bsp....first what should i learn ...  the below is the error i pasted...
    Business Server Page (BSP) error
    What happened?
    Calling the BSP page was terminated due to an error.
    SAP Note
    The following error text was processed in the system:
    Die URL enthält keine vollständige Domainangabe (isys-ecc statt isys-ecc.).
    Exception Class CX_FQDN
    Error Name 
    Program CX_FQDN=======================CP
    Include CX_FQDN=======================CM002
    ABAP Class CX_FQDN
    Method CHECK
    Line 10 
    Long text -
    Error type: Exception
    Your SAP Business Server Pages Team

    Hi Tamil,
    welcome to the SAP Community Network. You will find lots of great resources, tips, and examples here.
    Of course to find them you have to look for them. You will find most people more than happy to help you with problems if you first try and help yourself by searching for the solution yourself.
    So please, search the forums for the solution to your problem before you post.
    Cheers
    Graham Robbo

  • How to create downloadable pdf report as hyperlink within BSP application

    Hi,
    I'm developing a BSP application using MVC and htmlb extensions on a WAS 6.40. One of the requirements of my webapplication is:
    - the ability to generate a report in pdf format at runtime, using data retrieved from a backend SAP CRM 3.0 system
    and
    - make this report available/downloadable via a hyperlink in the application.
    I am aware of tools like Smartforms and Adobe interactive forms but need some help to get started and choose the right tool.
    regards, Roelof Jan

    Hi,
    we've done that by firstly building a RFC which prints the report to sap-spool:
    call function 'GET_PRINT_PARAMETERS'
          exporting
            expiration     = 1
            immediately    = ' '
            new_list_id    = 'X'
            line_count     = 65
            line_size      = 132
            report         = sy-repid
            no_dialog      = 'X'
          importing
            out_parameters = wf_params
            valid          = valid_flag.
        if sy-subrc ne 0 or valid_flag eq false.
        endif.
        new-page no-heading no-title print on parameters wf_params
                          no dialog .
    ... list processing ...
    new-page print off.
      concatenate programname sy-uname+0(3) into lc_rq2name separated by '_'.
      select * from tsp01 into tsp01_wa
                          where rq2name = lc_rq2name
                          and rqowner   = sy-uname
                          order by rqcretime descending.
        wf_spono = tsp01_wa-rqident.
        exit.
      endselect.
      if sy-subrc ne 0.
        clear wf_spono.
      endif.
    Then convert the spooljob:
      call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
        exporting
          src_spoolid              = wf_spono
          no_dialog                = 'X'
        tables
          pdf                      = witab
        exceptions
          err_no_abap_spooljob     = 1
          err_no_spooljob          = 2
          err_no_permission        = 3
          err_conv_not_possible    = 4
          err_bad_destdevice       = 5
          user_cancelled           = 6
          err_spoolerror           = 7
          err_temseerror           = 8
          err_btcjob_open_failed   = 8
          err_btcjob_submit_failed = 9
          err_btcjob_close_failed  = 10
          others                   = 11.
      if sy-subrc ne 0.
        return.
      endif.
    Delete Spooljob and generate cached response:
      data del_spono type  tsp01_sp0r-rqid_char.
      del_spono = wf_spono.
      call function 'RSPO_R_RDELETE_SPOOLREQ'
        exporting
          spoolid = del_spono.
      if witab is not initial.
        loop at witab into itab .
          translate itab using ' ~'.
          concatenate output itab into output in character mode.
        endloop.
        translate output using '~ ' .
        create object cached_response
               type cl_http_response
               exporting add_c_msg = 1.
        l_pdf_len = strlen( output ).
        cached_response->set_cdata( data   = output
                                    length = l_pdf_len ).
        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 ).
        data: guid type guid_32,
              display_url type string.
        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 ).
        app ?= application.
        app->print_url = display_url.
      endif .
    The display_url has to be used in the normal response-view:
    <script type="text/javascript">
    var param = 'width=700'
          + ',height=550'
          + ',left=0'
          + ',top=0'
          + ',menubar=no'
          + ',location=no'
          + ',resizable=yes'
          + ',status=no';
      window.open('<%= application->print_url%>', 'DRUCK', param ).focus();
    </script>

  • Open document from bsp

    I created sample document under the
    content management->documents. ( for example word.xls )
    I want to link this document to my BSP and want to
    open this document from my bsp report application.
    How can i do this.
    Thank for your help.

    here is a sample code also...
    READ TABLE application->doc-t_attachments
                        INTO l_attachment
                        INDEX l_index.
             CALL METHOD application->document_display_attachment
               EXPORTING
                 attachment       = l_attachment
               IMPORTING
                 s_return         = ls_return
                 file_content     = l_file_content
                 file_content_hex = l_file_content_hex
                 mime_file_type   = l_file_mime_type.
             IF NOT ls_return IS INITIAL.
               APPEND ls_return TO application->t_return.
             ELSE.
               CREATE OBJECT cached_response TYPE cl_http_response
                     EXPORTING add_c_msg = 1.
               IF NOT l_file_content IS INITIAL.
                 cached_response->set_cdata( l_file_content ).
               ELSE.
                 cached_response->set_data( l_file_content_hex ).
               ENDIF.
               IF l_event_tableview->itemclick = 'ClickName'.
                 cached_response->set_header_field(
                     name  = if_http_header_fields=>content_type
                     value = l_file_mime_type ).
                 cached_response->set_header_field(
                     name  = 'Content-Disposition'
                     value = 'inline' ).
               ELSE.
                 cached_response->set_header_field(
                     name  = if_http_header_fields=>content_type
                     value = 'application/x-download' ).
                 CONCATENATE l_attachment-name '.' l_attachment-type
                         INTO l_filename.
                 CONCATENATE 'attachment; filename=' l_filename
                         INTO l_value.
                 cached_response->set_header_field(
                     name  = 'Content-Disposition'
                     value = l_value ).
               ENDIF.
               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 INTO l_url.
               cl_http_server=>server_cache_upload(
                     url      = l_url
                     response = cached_response ).
               RETURN.
             ENDIF.
    the method document_display_attachment is in the class
    CL_BSP_HAP_DOCUMENT_IF.
    Message was edited by: manasa

  • BSP PDF not working in ECC 6.0

    Hello all, we are upgrading from 4.7 to ECC 6.0 and we have several BSP programs that create pdf reports by converting data from the r/3 spool.  This following code works fine in SAP 4.7 but in ECC 6.0, I am getting the error: 'File does not begin with '%pdf-'.  The following is the code to convert a file from the spool and display in pdf format.  Again, this works in 4.7.
    Any help is appreciated
      IF ztsp01-rqapprule LE 99.
        CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
          EXPORTING
            src_spoolid              = ztsp01-rqident
            no_dialog                = 'X'
          TABLES
            pdf                      = witab
          EXCEPTIONS
            err_no_abap_spooljob     = 1
            err_no_spooljob          = 2
            err_no_permission        = 3
            err_conv_not_possible    = 4
            err_bad_destdevice       = 5
            user_cancelled           = 6
            err_spoolerror           = 7
            err_temseerror           = 8
            err_btcjob_open_failed   = 8
            err_btcjob_submit_failed = 9
            err_btcjob_close_failed  = 10
            OTHERS                   = 11.
      Get spool name.
        zabapspoolid = ztsp01-rqident.
      Delete spool.
        CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
          EXPORTING
            spoolid = zabapspoolid.
        IF sy-subrc EQ 0.
          LOOP AT witab INTO itab.
            TRANSLATE itab USING ' ~'.
            CONCATENATE output itab INTO output IN CHARACTER MODE.
          ENDLOOP.
          TRANSLATE output USING '~ ' .
        Convert the Character String to Binary String.
          DATA: r_string  TYPE string.
          DATA: r_xstring TYPE xstring.
          CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
            EXPORTING
              text   = output
            IMPORTING
              buffer = outputx.
          CREATE OBJECT cached_response TYPE cl_http_response EXPORTING
              add_c_msg = 1.
          DATA:l_pdf_len TYPE i.
          l_pdf_len = XSTRLEN( outputx ).
       l_pdf_len = strlen( output ).
          cached_response->set_data( data   = outputx
         cached_response->set_cdata( data   = output
                              length = l_pdf_len ).
          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 = 30 ).
          CALL FUNCTION 'GUID_CREATE'
            IMPORTING
              ev_guid_32 = guid.
          CONCATENATE runtime->page_url '/' guid '.pdf' INTO
              display_url.
          cl_http_server=>server_cache_upload( url      = display_url
              response = cached_response ).
        ENDIF.
        RETURN.
      ELSE.
        zabapspoolid = ztsp01-rqident.
      Delete spool.
        CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
          EXPORTING
            spoolid = zabapspoolid.
        page->messages->add_message(
             condition = 'page'
        message =
        'Display is greater than 99 pages. Use a smaller selection.'
            severity = page->messages->co_severity_error ).
      ENDIF.

    Hello all, SAP just issued a fix for PDF conversion in a Unicode environment on 4/7/09.  This fixes function modules 'CONVERT_ABAPSPOOLJOB_2_PDF' and 'CONVERT_OTFSPOOLJOB_2_PDF' among others.  They are notes 1320163 and 1324547.  I have included the code to display a spool file in a BSP application using the lastest version of the function module.
    Data: 
      text(68)             TYPE c,
      pdf_xstring          type xstring,
      bin_size             type i,
      l_pdf_len            type i.
      IF ztsp01-rqapprule LE 99.
      Convert binary xstring to PDF.
        CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
          EXPORTING
            src_spoolid                    = ztsp01-rqident
            no_dialog                      = 'X'
            pdf_destination                = 'X'
            no_background                  = 'X'
       importing
            pdf_bytecount                  = bin_size
            bin_file                       = pdf_xstring
          exceptions
            err_no_abap_spooljob           = 1
            err_no_spooljob                = 2
            err_no_permission              = 3
            err_conv_not_possible          = 4
            err_bad_destdevice             = 5
            user_cancelled                 = 6
            err_spoolerror                 = 7
            err_temseerror                 = 8
            err_btcjob_open_failed         = 9
            err_btcjob_submit_failed       = 10
            err_btcjob_close_failed        = 11
            OTHERS                         = 12.
      Get spool name.
        zabapspoolid = ztsp01-rqident.
      Delete spool.
        CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
          EXPORTING
            spoolid = zabapspoolid.
        IF sy-subrc EQ 0.
          LOOP AT witab INTO itab.
            TRANSLATE itab USING ' ~'.
            CONCATENATE output itab INTO output IN CHARACTER MODE.
          ENDLOOP.
          TRANSLATE output USING '~ ' .
        Convert the Character String to Binary String.
         CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
           EXPORTING
             text   = output
           IMPORTING
             buffer = outputx.
        Instantiate Object
          CREATE OBJECT cached_response
            TYPE
              cl_http_response
            EXPORTING
              add_c_msg        = 1.
        Determine length of pdf xstring.
          l_pdf_len = XSTRLEN( pdf_xstring ).
        Sets the HTTP body of this entity to the given binary data.
          cached_response->set_data( data = pdf_xstring
                              length = l_pdf_len ).
        Sets the value of the specified header field.
          cached_response->set_header_field( name  =
            if_http_header_fields=>content_type
            value = 'application/pdf' ).
        Sets current HTTP status code
          cached_response->set_status( code = 200 reason = 'OK' ).
        Sets relative expiry time for this response in server cache.
          cached_response->server_cache_expire_rel( expires_rel = 30 ).
        Create GUID.
          CALL FUNCTION 'GUID_CREATE'
            IMPORTING
              ev_guid_32 = guid.
        build display url.
          CONCATENATE runtime->page_url '/' guid '.pdf' INTO
              display_url.
        Put New Object in the ICM Server Clipboard (ICM)
          cl_http_server=>server_cache_upload( url = display_url
              response = cached_response ).
        ENDIF.
    Thanks, Troy

  • Call T.Code MB5B from with in BSP

    Hi All
           i want ur's guidance on calling a Report Transaction Code (T.Code) from with in the  BSP.
           Like T.Code MB5B is for Stock on Posting date .
    i want to call it in BSP with in the frame.
    please guide me .
    Regards
    Sachin

    Hi
      I have only one restriction that result of call should be with in BSP.
       As u saying if it possible through iview then i can go for this.
    I refered some threads by which we r Log-in into SAP then it opening new session of SAP GUI of desired code .
    I think i have to use webGUI , first make a webGUI of t.code then call it in BSP , but how to initiate it , i don,t kow that.
    Regrads
    Sachin

  • Calling cl_crm_documents= get_with_file in Interaction Center (BSP) failes

    Hallo,
    I am trying to import an Word-Document from the SAP Content Management System(CMS) to a folder on the CRM-Server.
    The call of the method cl_crm_documents=>get_with_file fails if calling in a BSP-Aplication.
    The same call from a ABP Report is successful.
    Does anybody know a solution for that?
    Thankx
    Afshin

    Hi Kumar,
    I'm not sure if it works ..
    but just give a try ..
    open the attachment in editable mode in SAP .. check the windows temp directory .. in the path ..
    C:\Documents and Settings\Administrator\Local Settings\Temp\<Directory GUID>\file.ext
    Normally SAP stores the temporary file in the above location.
    open this file and save it in ASCII format ..
    then run your code..
    regards
    Sandeep

  • How to display the one BSP View page (not a start page)Through URL link..

    Hi Sir/Madam,
                 I want to open one BSP view page through URL link...
    Let me Explain clearly..
                I have an Z application ZHRRCF_APPROVAL..In this application approve.bsp file i have added som more Fields..and Finally I am going to click ApproVe Buton /Reject Button.When i click the reject button the the items are rejected.Its working fine.....
              My Requirement is :
                   1. I want to display the approval page directly when i click the URL link from mail box.--i am getting this .. No issues..(Got the URL link from function module)
                   2. After opening the approval page when i click URL link, when i click the reject button-- i am getting the error "The following Error Text was processed in the system GR2."Access via NULL object reference not possible"
                   3. How to proceed the this URL link without error .. the URL link is
    https://abd00093.de.abb.com:8200/sap(bD1lbiZjPTIwMA==)/bc/bsp/sap/zhrrcf_approval/application.bsp?objid=50003421&otype=NB&plvar=01&requestdate=20090121&requestedRsnCode=01&requestedstatus=1&requester=USRECRUITER1&SAPWFCBURL=https%3a%2f%2fabd00093%2ede%2eabb%2ecom%3a0000000000008200%2fsap%2fbc%2fwebflow%2fwshandler%3f_sapwiid%3d000000018491%26_saptask%3dTS51807979%26_saplogsys%3dGR2CLNT200%26_sapuname%3dLINEMANAGER%26_saplangu%3dE%26sap-client%3d200
    ( I got this URL directly using my own function module.. In this function Module i was not getting the SAPGUID -- the error is because of that i am not sure..)How to get this sapguid dynamically..
                    Please guide me to proceed this req asap..
    I am waiting for your reply ....Please
    Thanks and Regards
    Mohan,P

    Please have BPEL loggers both at domain and system level to DEBUG mode. Set all loggers to DEBUG as you are interested to see the entire sequence flow..however, some loggers give you unnecessary info ;/ apart from cube, activation, delivery, dispatch, persistence.
    Added to this, you might want to try SOAPUI, Fiddler, HTTP Analyzer.

  • Exporting data from table to Excel in a particular format using BSP.

    Hello all,
          I am creating a application in BSP  wherein i have to export data to excel sheet.
      I am able to do that but the output in excel sheet is not formatted. it is displaying the data in a single 
    column. For example, the internal table which i am exporting to excel contains fields "product
    name", "area name", country name", "values". all these should be displayed in different columns.How 
    can i achieve this functionality.A sample code will be of great help..
    Below is the code i hav written for exporting to excel :
         data: l_len type i,
               l_string type string,
               app_type type string,
               file_content type xstring,
               file_mime_type type string.
         create OBJECT cached_response TYPE cl_http_response EXPORTING add_c_msg = 1.
         cached_response->set_data( file_content ).
         cached_response->set_header_field(
                          name = if_http_header_fields=>content_type
                          value = file_mime_type ).
    LOOP AT itab_xls INTO wa_xls.
       CONCATENATE L_STRING wa_xls-product_name
       wa_xls-area_name
       wa_xls-landx
       CL_ABAP_CHAR_UTILITIES=>CR_LF INTO L_STRING SEPARATED BY SPACE.
    ENDLOOP.
      APP_TYPE = 'APPLICATION/MSEXCEL; charset=utf-16le'.
      data: l_xstring type xstring.
    call function 'SCMS_STRING_TO_XSTRING'
        exporting
          text = l_string
          MIMETYPE = 'APPLICATION/MSEXCEL; charset=utf-16le'
        IMPORTING
          BUFFER = l_xstring.
    Add the Byte Order Mark - UTF-16 Little Endian
      concatenate  cl_abap_char_utilities=>byte_order_mark_little
                   l_xstring
                   into l_xstring in byte mode.
       cached_response->set_data( l_xstring ).
       cached_response->set_header_field( name  = if_http_header_fields=>content_type
                                         value = 'APPLICATION/MSEXCEL; charset=utf-16le' ).
    *Set the filename into the response header
       cached_response->set_header_field( name  = 'Content-Disposition'
                                  value = 'attachment; filename=gkb_excel.xls' ).
    *Set the Response Status
       cached_response->set_status( code = 200 reason = 'OK' ).
    *Set the Cache Timeout - 60 seconds - we only need this in the cache
    *long enough to build the page and allow the IFrame on the Client to request it.
       cached_response->server_cache_expire_rel( expires_rel = 60 ).
        CALL FUNCTION 'GUID_CREATE'
        IMPORTING
          ev_guid_32 = guid.
        CONCATENATE runtime->application_url '/' guid '.xls' INTO url.
        cl_http_server=>server_cache_upload( url      = url
                                           response = cached_response ).
    Can anyone help me with some solution.
    Thanks in advance.
    Gurmahima.

    the issue is here
    LOOP AT itab_xls INTO wa_xls.
    CONCATENATE L_STRING wa_xls-product_name
    wa_xls-area_name
    wa_xls-landx
    CL_ABAP_CHAR_UTILITIES=>CR_LF INTO L_STRING SEPARATED BY SPACE.
    ENDLOOP.
    instead do the following
    LOOP AT itab_xls INTO wa_xls.
    CONCATENATE L_STRING wa_xls-product_name ','
    wa_xls-area_name  ','
    wa_xls-landx  ','
    CL_ABAP_CHAR_UTILITIES=>CR_LF INTO L_STRING .
    ENDLOOP.
    and then change the file name extension from xls to csv. it should open properly in excel.
    Note that this is only excel csv file. if you want a proper excel excel file, then
    option one: build a html table with your data into a string and pass it to excel
    option 2: build excel xml using your data into a string and pass it to excel.
    Regards
    Raja

  • Error when activating the BSP aplication of Demo Examples in SAP XI 7.0

    Hi all,
    I'm configuring the Demo Examples of SAP XI 7.0 (SAP BASIS 7.0 Content), when i activate the service "sxidemo_agcy_ui" and then edit this service as tutorial of the Configuration Guide document and then save all modification, finally choose "Test Service", I get an error message in the web page as below:
    Business Server Page (BSP) error
    What happened?
    Calling the BSP page was terminated due to an error.
    SAP Note
    The following error text was processed in the system:  BSP Exception: Das Objekt default.htm in der URL /sap/bc/bsp/sap/sxidemo_agcy_ui/default.htm?sap-client=105&sap-sessioncmd=open ist nicht gültig.
    Error type:
    Your SAP Business Server Pages Team
    After, i try to test all service in the BUSINESS SERVICE PAGE (default_host/sap/bc/bsp ...), i get a same error message as above.
    I have followed the SAP Note 517484 to active all service necessary in order to run the BSP application. But i have still get the same error message and BSP in my XI System is still not available.
    Anyone have met a same situation as me or anyone know resolve this problem, could you please help me?
    Thanks a lot in advance,
    Vinh Vo

    Hi Vinh,
    You might want need to go into the abap development workbench (tcode se80), in here there are BSP application program that might not get activate and publish, and also the Internet Service/WEBGUI.
    check and see if all require service are published.
    thanks,
    Nhung

Maybe you are looking for

  • Issue with Ravenna search

    Hi all, He have problem when using the search included in test portal in Site Studio (the Ravenna portal). After doing a search, we do not get any result, and Content Server logs file registers the following lines (see bellow) Details of our environm

  • Ooops! What's the login URL?

    (This is currently in my LAB, not live!) So I figured I could create a Guest Landing Page that didn't have the masthead etc. I enabled anonymous access and so now, when an un-authenticated user goes to vibe they get a nice, clean web page with no vib

  • ABAP: How can I create screen like COOIS parameter

    Dear ABAP Experrts, How can I create same paremeter screen like COOIS. E,g in production order parameter screen there are many options  but when I create a parameter in ABAP program SELECT-OPTIONS: SO_AUFNR FOR AFKO-AUFNR, only one column is displaye

  • Problems with SMTP

    I have just changed my ISP and my email address. I hit a problem I encountered before but never solved. Now that I have 2 email addresses it wouldn't accept the regular SMTP address for the new mail which is mail."myisp".com.au After discussions with

  • Sun Java Desktop System [ SSH hanging]

    Hello, I am running latest solaris 10 release (10/09 Generic_141445-09 ) using gnome-terminal GNOME Terminal 2.6.1 (supplied with solaris) from within gnome terminal, as root, I can start interactive ssh session from this box to anywhere fine. BUT fr