Open SAPGUI from BSP

Hi,
I have a requirement to open the print-preview of a smartform in the SAPGUI when a link is clicked on the BSP page in the browser. I have created a program which shows the print preview etc. Is there any way of opening up the SAPGUI from the browser with a specific transaction being called and parameters passed from BSP to the SAPGUI?
I dont want to display as PDF unless there is a way to disable downloading or saving of the displayed PDF to the users hard disk. Also printing of the PDF needs to be disabled. This does not seem to be possible from what I have seen in the forums.
Any help will be highly appreciated. Thanks in advance.
Regards
Preet

Hi,
Thanks for replying so quickly. The SAP version is R/3 Enterprise and I need to open the Wingui. However the issue we are facing is how to pass a dynamic parameter to the R/3 transaction. In the portal we can specify the transaction to call and can pass parameters to it but there seems to be no way of dynamically passing a value to the R/3 transaction.
I hope this makes sense. When the user clicks say a customer number on the webpage, I need to call a Z transaction in R/3 with that customer number passed to it. Is this actually possible?
Regards,
Preet

Similar Messages

  • 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

  • OPEN DATASET FROM BSP OnInputprocessing

    Hi Guys!
    I try to write a text file to the application server using oninputprocessing method in a bsp application by OPEN DATASET. If I run the BSP applcation in a LAN environment everything goes well, the application creates the file and writes the data. But if I run the same application from WAN the app. retuns with OPEN_DATASET_NO_AUTHORITY. To login users automatically i use a technical user for the internet service of this BSP application - this user is  : service type.
    The application is achieved on https. The only difference is the IP range (reached application from WAN or LAN).
    How could I preform this file creation from WAN (same as it works in LAN environment)    
    Thanks Héger A

    Dear Tobias!
    The problem was solved , by using specified roles for the technical user. In this case the roles are giving rigthts for the used areas and is able to reach the app. outside fom LAN
    Back to the original question:
    Both occasion I use the mentioned webuser without any rights.
    But I can use open_datset in a LAN environmet but couldn't from WAN.
    I ran the application in test mode logged in sap as a developer user, in se80 rigtht click on default.htm (entering point of webapp) then Test...
    Next step sap calls IE and runs the app, but logging in automatically as the technical user
    How does SAP "know" the runing environment? - I know is a stupid question, but this mechanism (i.e. in LAN occasion it runs but WAN doesn't run and evreything is the same in both occassion ) is totally ununderstable for me.
    The question is why can

  • Calling SAP Transaction from BSP

    I wonder whether it is possible to call SAP transaction from BSP application and pass to it some data; e.g., PO# when calling VA02?
    The called transaction could appear in a separate MS IE Window (like in some Portal applications) or in SAP GUI.
    Any help will be appreciated.
    Thank you in advance

    I have launched the Java SAPGui from BSP pages before.  I used SNC so that the users were logged on via Single Sign On.  I store the Java Gui in the Mime directory.  You can force the startup transaction.  Theorectically you could also Gui Scripting to try and control the Gui and force in the default value for your PO field.  I have not tried that however.  You will probably want to check the Service Marketplace for documents on the Gui Scripting.  The following is the code from my BSP page to launch the Java Gui in the Browser as an applet:
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <HTML>
    <HEAD>
      <TITLE>SAPGUI for the Java Environment</TITLE>
      <STYLE type="text/css">
          body { margin-left:0px; margin-right:0px; margin-top:0px; margin-bottom:0px; }
      </STYLE>
    </HEAD>
    <BODY scroll="no">
    <SCRIPT language="JavaScript">
    // user configurable part starts here
    var pluginurl         = '';
    var scriptable     = 'true';
    var codebase         = '.';
    var jnlp           = 'platin.jnlp';
    var keepalive      = 'true';
    var frog           = 'true';
    var trace          = '';
    var tracefile      = '';
    var connectionData = 'conn=/M/nts163/S/3620/G/SPACE/&tran=SE80&clnt=088&fast=true&sncon=true&sncname=p:[email protected]&sncqop=9';
    // user configurable part ends here
    // verify if Java Plugin as control in Internet Explorer or Java Plugin for Netscape or native JRE of browser must be used
    var jre = 'control';
    if(navigator.platform.indexOf("Mac") > -1)
       jre = 'native';
    else if (navigator.appName.indexOf("Netscape") != -1)
       jre = 'plugin';
    document.open();
    switch (jre)
    case 'control':
        document.writeln('<OBJECT CLASSID  = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"                               ');
        document.writeln('    ID       = "PlatinGUI"                                                                    ');
        document.writeln('    CODEBASE = "j2re-1_3_1_02-win-i.exe#Version=1,3,1,0"                             ');
        document.writeln('    WIDTH    = "100%"                                                 ');
        document.writeln('    HEIGHT   = "100%"                                                 ');
        document.writeln('    BORDER   = 0>                                                      ');
        document.writeln('<PARAM NAME = "TYPE"           VALUE = "application/x-java-applet;jpi-version=1.3.1">         ');
        document.writeln('<PARAM NAME = "SCRIPTABLE"     VALUE = "', scriptable,'">                                ');
        document.writeln('<PARAM NAME = "code"           VALUE = "com.sap.platin.GuiApplet2">                   ');
        document.writeln('<PARAM NAME = "codebase"       VALUE = "', codebase,'">                             ');
        document.writeln('<PARAM NAME = "jnlp"           VALUE = "', jnlp,'">                             ');
        document.writeln('<PARAM NAME = "archive"        VALUE = "GuiStartS.jar">                             ');
        document.writeln('<PARAM NAME = "keepalive"      VALUE = "', keepalive,'">                             ');
        document.writeln('<PARAM NAME = "frog"           VALUE = "', frog,'">                             ');
        document.writeln('<PARAM NAME = "trace"          VALUE = "', trace,'">                             ');
        document.writeln('<PARAM NAME = "tracefile"      VALUE = "', tracefile,'">        ');
        document.writeln('<PARAM NAME = "connectionData" VALUE = "', connectionData,'">                               ');
        document.writeln('                                                                ');
        document.writeln('This page requires a Sun Java Plugin 1.3 and a SAPGUI for Java to view.                      ');
        document.writeln('                                                                ');
        document.writeln('</OBJECT>                                                           ');
        break;
    case 'plugin':
        document.writeln('<EMBED TYPE        = "application/x-java-applet;version=1.3"                         ');
        document.writeln('    PLUGINURL      = "', pluginurl,'"                                          ');     
        document.writeln('    WIDTH          = "100%"                                            ');                                        
        document.writeln('    HEIGHT         = "100%"                                             ');
        document.writeln('    ALIGN          = "BASELINE"                                                ');
        document.writeln('    code           = "com.sap.platin.GuiApplet2"                                      ');
        document.writeln('    codebase       = "', codebase,'"                                        ');
        document.writeln('    jnlp           = "', jnlp,'"                                                ');
        document.writeln('    archive        = "GuiStartS.jar"                                       ');
        document.writeln('    keepalive      = "', keepalive,'"                                       ');
        document.writeln('    frog           = "', frog,'"                                            ');
        document.writeln('    trace          = "', trace,'"                                            ');
        document.writeln('    tracefile      = "', tracefile,'"                                       ');
        document.writeln('    connectionData = "', connectionData,'"                                        ');
        document.writeln(' <NOEMBED>                                                      ');
        document.writeln(' </NOEMBED>                                                      ');
        document.writeln(' </EMBED>                                                              ');
        break;
    case 'native':
        document.writeln('<APPLET CODEBASE  = "', codebase,'"                                                           ');
        document.writeln('        ARCHIVE   = "GuiStartS.jar"                                                           ');
        document.writeln('        CODE      = "com.sap.platin.GuiApplet2"                                               ');
        document.writeln('        WIDTH     = "100%"                                                                    ');
        document.writeln('        HEIGHT    = "100%">                                                                   ');
        document.writeln('<PARAM NAME = "SCRIPTABLE"     VALUE = "', scriptable, '">                                    ');
        document.writeln('<PARAM NAME = "jnlp"           VALUE = "', jnlp, '">                                          ');
        document.writeln('<PARAM NAME = "keepalive"      VALUE = "', keepalive, '">                                     ');
        document.writeln('<PARAM NAME = "frog"           VALUE = "', frog, '">                                          ');
        document.writeln('<PARAM NAME = "trace"          VALUE = "', trace, '">                                         ');
        document.writeln('<PARAM NAME = "tracefile"      VALUE = "', tracefile, '">                                     ');
        document.writeln('<PARAM NAME = "connectionData" VALUE = "', connectionData, '">                                ');
        document.writeln('</APPLET>                                                                                ');
        break;
    document.close();
    </SCRIPT>
    </BODY>
    </HTML>

  • In ABAP, if we came in from BSP or SAPGUI ?

    Hi,
    The question is when we are in ABAP code, is there a way to know if we came in from a BSP or from the SAP GUI.
    Thank you for your help in advance.

    are you calling a FM in your BSP and within the FM you want to check whether its being called by a BSP or a SAPGUI based program.
    may be you can check
    if sy-CPROG = SAPMHTTP then its called from BSP (web )

  • Urgent: call ABAP program from BSP

    hi BSP experts,
    We just want to trigger an ABAP program to say "Hello World" in BSP and see the wording "Hello World" on web browser when running it from BSP.  One BSP expert Raj gave the answer by using the following in BSP:
    oninitialization:
    submit ('z_program_name') and return exporting list to memory.
      call function 'LIST_FROM_MEMORY'
           tables
                listobject = listobject.
      call function 'WWW_HTML_FROM_LISTOBJECT'
           exporting
                report_name = 'z_program_name'
           tables
                html        = html
                listobject  = listobject.
      clear output_str.
      loop at html into html_wa.
        concatenate output_str html_wa into output_str.
      endloop.
    layout code:
    <htmlb:content design="design2003">
    <htmlb:page title = " ">
    <htmlb:form>
    <%= output_str %>
    </htmlb:form>
    </htmlb:page>
    </htmlb:content>
    We put the above in our BSP and then activate them, but get the following error:
    Field "LISTOBJECT" is unknown. It's neither in one of the specified tables nor defined by a "DATA" statement. "DATA" statement."DATA" statement.
    And the error stopps here:
    submit ('z_program_name') and return exporting list to memory.
    call function 'LIST_FROM_MEMORY'
    tables
    listobject = listobject.
    Any idea? 
    We will give you reward points!

    hi Tanguy,
    Eventually, I have figured it out on how to make the code works by showing "Hello World!" on web browser. But actually we would like to run another ABAP program which open a new container on users' machines, download an Excel template stored on server to the opened container on users' machinese, and then dump SAP table data to the opened excel template. This program works very well through SAP GUI, but users would like to run it on web that we tried to run this program in BSP, but it doesn't work with your code! Any idea?
    Thanks alot!

  • How to send/set parameter from BSP page to iview

    Dear Expert,
    Can advise me how to send or set parameter from BSP page to iview ?
    http://xxx.xxx.com/irj/portal?navigationtarget=roles://pcd:portal_content/FLD.ObjetLibrary/FLD.Iviews/FLD.CRM/ET/bsppage.htm?lv_param=xxx
    I want to view my bsp page in portal but with parameter value.
    I can open my bsp page without parameter value like link below :
    http://xxx.xxx.com/irj/portal?navigationtarget=roles://pcd:portal_content/FLD.ObjetLibrary/FLD.Iviews/FLD.CRM/ET/
    Thnx & Regards,
    Pieter

    Hi,
    your BSP page get's integrated via an iFrame. So, simply speaking, it's not possible to pass an parameter back.
    But what you can try is to use the Portal DataBag component. In the BSP page, store the information you want to pass in the browser. The iView/Portal than has to check if there is a new parameter / value stored.
    SAP Help: http://help.sap.com/saphelp_nw70/helpdata/en/68/322a9261c54e51b7965f86aac3dae2/frameset.htm
    br,
    Tobias

  • PDF file gets corrupted when generated from BSP

    Hi,
         I am generating a PDF file from a BSP page ( see the code below). The problem is that PDF file gets corrupted and  I am unable to open it. I also tried to use other functions like GUI_Download and DOwnload as suggested by many and they also do not work either. Has any one generated a PDF from BSP and can some one help?
    Data: GG type String.
    event handler for data retrieval
    data : event type ref to cl_htmlb_event.
    class cl_htmlb_manager definition load.
    class CL_HTTP_RESPONSE DEFINITION LOAD.
    DATA : PARAMS TYPE PRI_PARAMS,
             VALID  TYPE C,
    GV_SUCCESS_SPOOL_NO LIKE SY-SPONO.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING DESTINATION           = 'LOCL'
               COPIES                = COUNT
               LIST_NAME             = 'TEST'
               LIST_TEXT             = 'Test NEW-PAGE PRINT ON'
                  IMMEDIATELY           = ''
                  RELEASE               = 'X'
                  NEW_LIST_ID           = 'X'
               EXPIRATION            = DAYS
                  LINE_SIZE             = 140
               LINE_COUNT            = 23
               LAYOUT                = 'X_PAPER'
               SAP_COVER_PAGE        = 'X'
               RECEIVER              = 'SAP*'
               DEPARTMENT            = 'System'
                  NO_DIALOG             = 'X'
        IMPORTING OUT_PARAMETERS        = PARAMS
                  VALID                 = VALID.
      IF VALID <> SPACE.
        NEW-PAGE PRINT ON  PARAMETERS PARAMS NO DIALOG.
    write :/ 'Hello Message1'.
    write :/ 'Hello Message2 '.
    NEW-PAGE PRINT OFF .
      ENDIF.
    data :        spool_no TYPE TSP01-RQIDENT .
    spool_no = sy-spono.
    DATA: itab TYPE TLINE,
            witab TYPE TABLE OF TLINE,
            output TYPE STRING,
            outputx TYPE XSTRING.
    data : l_pdf_len type i.
    data: mi_bytecount type i.
    DATA : APP_TYPE TYPE STRING VALUE  'APPLICATION/PDF' .
    DATA:    cached_response TYPE ref to if_HTTP_RESPONSE.
    data : l_display_url type string .
    data : guid type GUID_32 .
      call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          SRC_SPOOLID              = spool_no
          NO_DIALOG                = 'X'
       IMPORTING
          PDF_BYTECOUNT            =  mi_bytecount
        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 EQ 0.
        LOOP AT witab INTO itab.
          CONCATENATE
            output
            itab-tdline
          INTO output in character mode.
        ENDLOOP.
    endif.
    CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
            EXPORTING
                text   = output
                mimetype =   'APPLICATION/PDF'
            IMPORTING
                buffer = outputx.
    concatenate cl_abap_char_utilities=>byte_order_mark_little
    outputx
    into outputx in byte mode.
      response->set_header_field( name = 'content-type' value =
    'APPLICATION/PDF; charset=utf-16le'  ).
      response->delete_header_field( name =
    if_http_header_fields=>cache_control ).
      response->delete_header_field( name = if_http_header_fields=>expires
      response->delete_header_field( name = if_http_header_fields=>pragma )
      response->set_header_field( name = 'content-disposition'
                                  value = 'attachment; filename = TEST.PDF'
      l_PDF_len = xstrlen( OUTPUTX ).
      response->set_data( data = OUTPUTx
                          length = l_PDF_len ).
    navigation->response_complete( ).
    Regards
    Amit Agrawal

    HI Craig Cmehil,
                   I have tried this code as well as given in the URL specified by you. But using this also browser shows the following  content. It seems that PDF content is corrupted.
    My Output as shown on Browser Starts below this line----
    DF-1.3
    %âãÏÓ
    2 0 obj
    /WinAnsiEncoding
    endobj
    3 0 obj
    <<
    /Type /Font
    /Subtype /Type1
    /BaseFont /Courier
    /Name /F001
    /Encodg 2 0 R
    >>
    endobj
    4 0 obj
    <<
    /Length 5 0 R
    >>
    stream
    /F001 7.30 Tf 0 0 0.753 rg BT 18.00 570.65 Td 0 Tw <33302E30362E3230302020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020>Tj ET 0 0 0.753 rg BT 2950 570.65 Td 0 Tw
    <20204854545020436F6E74726F6C202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020>Tj ET 0 0 0.753 rg BT 572.40 570.65 Td 0 Tw <2020202020202020202020202031>Tj ET q 0 0 0 RG 0.55 w 18.00 562.90 m
    634. 562.90 l S Q 0 0 0.753 rg BT 18.00 551.45 Td 0 Tw <48656C6C6F20416D6974>Tj ET 0 0 0.753 rg BT 18.00 541.85 Td 0 Tw <48656C6C6F204765726176>Tj ET
    endstream
    endobj
    5 0 obj
    624
    endobj
    6 0 obj
    <<
    /Type /Page
    /MediaBox
    /Parent 1 0 R
    /Resource
    <<
    /ProcSet
    /PDF /Text
    /Font
    <<
    /F001 3 0 R
    >>
    /XObject
    <<
    >>
    >>
    /Contents 4 0 R
    >>
    endobj
    7 0 obj
    <<
    /Author (AMG )
    /CreationDate (20050630 181301)
    /Creator (Form X_58_170 EN)
    /Producer (SAP R/3 Release 620 )
    %SAPinfoStart TOA_DARA
    %FUNCTI=(    )
    %MANDANT=(   )
    %DEL_DATE=(00000000)
    %SAP_OBJECT=(          )
    %AR_OBJECT=(          )
    %OBJECT_ID=(                          )
    %FORM_ID=(                                        )
    %FORMARCHIV=(  )
    %RESERVE=(   )
    %NOTIZ=(                                                                )
    %SAPinfoEnd TOA_DARA
    >>
    endobj
    1 0 obj
    <<
    /Type /Pages
    /Kids
    [ 6 0 R
    /Count 1
    >>
    endobj
    8 0 obj<<
    /Type /Catalog
    /Pages 1 0 R
    /PageMode /UseNone
    >>
    endobj
    xref
    0 9
    0000000000 65535 f
    0000001801 00000 n
    0000000017 0000n
    0000000052 00000 n
    0000000157 00000 n
    0000000840 00000 n
    0000000862 00000 n
    0000001048 00000 n
    0000001869 00000 n
    trailer
    /Size 9
    /Root 8 0 R
    /Info 7 0 R
    >>
    startxref
    1944
    %%EOF
    Browser Displey Content Ends----
    My Coding Starts----
    Data: GG type String.
    event handler for data retrieval
    data : event type ref to cl_htmlb_event.
    class cl_htmlb_manager definition load.
    class CL_HTTP_RESPONSE DEFINITION LOAD.
    DATA : PARAMS TYPE PRI_PARAMS,
             VALID  TYPE C,
    GV_SUCCESS_SPOOL_NO LIKE SY-SPONO.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING DESTINATION           = 'LOCL'
               COPIES                = COUNT
               LIST_NAME             = 'TEST'
               LIST_TEXT             = 'Test NEW-PAGE PRINT ON'
                  IMMEDIATELY           = ''
                  RELEASE               = 'X'
                  NEW_LIST_ID           = 'X'
               EXPIRATION            = DAYS
                  LINE_SIZE             = 140
               LINE_COUNT            = 23
               LAYOUT                = 'X_PAPER'
               SAP_COVER_PAGE        = 'X'
               RECEIVER              = 'SAP*'
               DEPARTMENT            = 'System'
                  NO_DIALOG             = 'X'
        IMPORTING OUT_PARAMETERS        = PARAMS
                  VALID                 = VALID.
      IF VALID <> SPACE.
        NEW-PAGE PRINT ON  PARAMETERS PARAMS NO DIALOG.
    write :/ 'Hello Amit'.
    write :/ 'Hello Gaurav '.
    NEW-PAGE PRINT OFF .
      ENDIF.
    GV_SUCCESS_SPOOL_NO = sy-spono.
    data :        spool_no TYPE TSP01-RQIDENT .
    spool_no = sy-spono.
    write: GV_SUCCESS_SPOOL_NO.
    *write: spool_no.
    IF display_type = 'convertspool'.
      DATA: itab TYPE TLINE,
            witab TYPE TABLE OF TLINE,
            output TYPE STRING,
            outputx TYPE XSTRING.
    data : l_pdf_len type i.
    data: mi_bytecount type i.
    DATA : APP_TYPE TYPE STRING VALUE  'APPLICATION/PDF' .
    DATA:    cached_response TYPE ref to if_HTTP_RESPONSE.
    data : l_display_url type string .
    data : guid type GUID_32 .
           spool_no like TSP01-RQIDENT .
    *spool_no = GV_SUCCESS_SPOOL_NO .
      call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          SRC_SPOOLID              = spool_no
          NO_DIALOG                = 'X'
       IMPORTING
          PDF_BYTECOUNT            =  mi_bytecount
        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 EQ 0.
        LOOP AT witab INTO itab.
          CONCATENATE
            output
            itab-tdline
          INTO output in character mode.
        ENDLOOP.
    endif.
    *write : output.
    CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
            EXPORTING
                text   = output
                mimetype =   'APPLICATION/PDF'
            IMPORTING
                buffer = outputx.
    *concatenate cl_abap_char_utilities=>byte_order_mark_little
    *outputx
    *into outputx in byte mode.
    CREATE OBJECT cached_response TYPE CL_HTTP_RESPONSE EXPORTING add_c_msg = 1.
    some Browsers have caching problems when loading Excel Format
      response->set_header_field( name = 'content-type' value =
    'APPLICATION/PDF'  ).
      response->delete_header_field( name =
    if_http_header_fields=>cache_control ).
      response->delete_header_field( name = if_http_header_fields=>expires
      response->delete_header_field( name = if_http_header_fields=>pragma )
        l_pdf_len = xstrlen( outputx ).
        cached_response->set_data( data   = outputx
                            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 ).
        CALL FUNCTION 'GUID_CREATE'
          IMPORTING
            ev_guid_32 = guid.
        CONCATENATE runtime->application_url '/' guid '.pdf' INTO l_display_url.
        cl_http_server=>server_cache_upload( url      = l_display_url
                                             response = cached_response ).
    RETURN.
    My Coding Ends----
    Any Further help on this.
    Regards
    Amit Agrawal

  • Calling a webdynpro URL in new window from BSP

    Hi experts,
      i am calling a URL from BSP application by creating a link and on the 'onclick'  event of the link ,using following code
    navigation->goto_page( URL = l_wd_url session = 'NEW' ).
    My problem is ,i have to open this page in a new window(the Page is basically a webdynpro URL) ,so far it is only opening in same window.I have tried different other options.
    navigation->next_page( URL = l_wd_url session = 'NEW' ).
    CALL METHOD runtime->server->response->redirect( url = l_wd_url ).
    navigation->call_application( URL = l_wd_url ).
    I tried using call_browser FM also but it is dumping.
    href tag will not work in my case as i have to capture the event and write some code inside  that event..
    Please suggest what i can do now?

    Hello Graham,
    I am trying to get the windows user id in webdynpro abap.
    I am unable to get,
    So I used BSP application to get the windows user id.
    I using java script to get that.
    After that I don,t know how to  assign that java variable to ABAP variable. the
    Insted of calling the WDA using the following way
    <a href="<%=l_wd_url%>" target="_blank">Click Here</a>
    is there any other way to call WDA from BSP based on some action.
    Regards
    Srini

  • How to call  web ui screen from bsp componants

    Hi Gurus,
                I am trying to call the web ui screen from bsp componants by using the function modules .but exception is coming. but from gui these functionmodules are opening the web ui screen.those function modules are BAPI_BUSPROCESSND_CHANGEDIALOG,CRM_1O_CALL_WEBUI here only we need to pass the GUID. but these are not working from bsp componants .i am not getting why these are not working if there is any solution Please give me suggestion.Its very needful.
    Regards,
    Bixamaiah.

    Hi Caíque Escaler,
             the requirement is workflow is triggered in web client.In the webscreen from the workflow task user selects the work item then one screen will come from there  if the user selects the reject option then immidiately  we need to open that order in web screen.that is the requirement.
    Regards,
    Bixamaiah.

  • Transport request from BSP

    Hi all!
    We have a BSP application which maintains a customizing table. But after adding new content to that table, the user has to create and release a transport request within SAPGUI.
    So here's my question: Is it possible to create and release a transport request from BSP and how to do that?
    Regards
    Mark-André

    Hi,
    it's just used in development environment. I'll check these function modules.
    Thanks!
    Regards
    Mark-André

  • I downloaded Maverick and now I can't open pages from the Dock.  The Pages icon just jumps up and down abut doesn't open.  However, I can one pages by clicking on the App. I have an iMac with iWork 08.

    Since upgrading to Maverick from Mountain Lion I am unable to open Pages from the Dock.  When I click on the pages icon in the dock the icon just keeps bouncing up and down.  However, I can open pages by clicking on the icon in the Apps folder.  No problems prior to upgrading to Maverick.

    Quit Pages. Drag its icon out of the Dock. Create a new one by dragging the application into the Dock. Test.

  • I cannot open Pages from the app or from a saved document on the desk top.  I get an error: "The application Pages cannot be opened  -1712"  Any suggestions?

    I cannot open Pages from the app or from a saved document on the desk top.  I get an error: "The application Pages cannot be opened  -1712"  Any suggestions?

    The following previous discussion has a solution that worked for a variety of people with the -1712 error on a variety of applications and may help: The application Safari can't be opened -1712

  • When I open Pages from the dock, the page comes up but immediately hangs up with the

    When I open Pages from the Dock,  the page comes up on the screen but immediately hangs up with the rainbow circle spinning.  I finally have to force quite to make it go away.  It does not ask me to choose a template.  This is sporadic, sometimes working, sometimes not.  What is going on?

    Helo,
    Did you try to delete Pages' preferences file(s) in the folder your-user-name/Library/Preferences ?
    There are one or more (depends on your OS X version) file like "com.apple.iWork.Pages.plist"
    You can also repair permissions with Disk Utility in the folder Applications/Utilities.
    Choose the hard drive were Pages is and click the button "Repair permissions".
    Or you can re-install Pages.
    Hope this will help.

  • My iPhone 5 won't allow me to open pictures from text messages.

    My iPhone 5 won't allow me to open pictures from text messages. I tap the picture, then it just goes to a "thinking" screen and says "Restoring..."
    I tried restarting, but it still won't allow me to open pictures.
    Please help!!

    My iPhone 5 is also having this problem. I just received it2 days ago and it would let me open mms messages, but ever since yesterday it will have a loading screen and never let me see it. I've just been having to save my picture into my camera roll and view it that way

Maybe you are looking for

  • My Safari 5.1 Browser consistently freezes on my iMac with Intel. Help?

    I need help. I am getting frustrated using my Safari browser. It keeps crashing on me - or rather - freezing up. I have re-installed the software, checked for updates. Everything is up to date. Is there anybody who can offer me some help?

  • Embedding video, works on my computers but not theirs, why?

    I have made a flyer that has an embedded video clip using Acrobat Pro 9 Extended.  It opens and plays ok on Professional Extended and Reader on one computer, also opens ok on Professional (non extended) and Reader on another computer.  I emailed the

  • Missing ink level indicator deskjet 6980

    Hi, I am trying to restore the ink level indicator on this deskjet 6980. I have gone through all the properties to no avail. I downloaded the HP tool, however, it when through the motions with progress boxes and just vanished. I thought the tool woul

  • Button Binding in JDEV 9.0.5.2

    I'm trying to create a Boolean button binding to a Y/N attribute in a view Object. I want a simple JCheckbox. I created the following in my UiModel with the binding wizard.. <DCControl id="AcctTypePreAuth" DefClass="oracle.jbo.uicli.jui.JUButtonDef"

  • Batch number as po number

    hello all, i have a requirement like in place of batch number i need to print po number either while creating po or while shiipping so i need the exit for that .