Quantcast
Channel: SCN : Popular Discussions - Business Server Pages (BSP)
Viewing all 1497 articles
Browse latest View live

consuming a https webservice from 6.20

$
0
0

Hi all,

I am trying to consume a webservice from 6.20 version.  I have the WSDL file of the service and I am trying to build a SOAP message out of it.

Then I call the methods in my program to create the client and send the request data.

In the response/receive  I am getting a 404 Resource not found, Partnernot reached..

 

I am unable to troubleshoot this problem. I am unable to find if it is related to the the SOAP message I am building or is it the client creation thats failing?

 

Interestingly ,IF I use cl_http_cleint create by URL, Iam able to connect to the actual URL of the webservice and could see the data in the response' Hi, there is form to invoke the service'. This is what you see if you go to that url in the browser.

 

Code:

****************************************************************************

CONCATENATE

  '<?xml version="1.0" encoding="utf-8"?>'

 

'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'

  ' xmlns:xsd="http://www.w3.org/2001/XMLSchema"'

  ' xmlns:soap="http://www.w3.org/2001/12/soap-envelope">'

  '<soap:Body>'

'<Authenticator'

' xmlns="https://xxxyyy.com/XXXWebServices/services/authenticator">'

  '<authenticate>'

    '<userId0>'  user  '</userId0>'

    '<credential>'  password  '</credential>'

  '</authenticate>'

  '</Authenticator>'

  '</soap:Body>'

  '</soap:Envelope>'

  INTO wf_string.

 

 

  CLEAR :rlength , txlen .

  rlength = STRLEN( wf_string ) .

  MOVE: rlength TO txlen .

 

   

  CALL METHOD cl_http_client=>create

    EXPORTING

      host  =      'xxx.com/TUFWebServices'

      service       = '443'

      scheme        = '2'

      ssl_id        = 'ABC'

    IMPORTING

      client        = http_client.

 

 

 

  CALL METHOD http_client->request->set_header_field

    EXPORTING

      name  = '~request_method'

      value = 'GET'.

 

 

 

  CALL METHOD http_client->request->set_cdata

    EXPORTING

      data   = wf_string

      offset = 0

      length = rlength.

 

  CALL METHOD http_client->send

    EXCEPTIONS

      http_communication_failure = 1

      http_invalid_state         = 2.

 

  CALL METHOD http_client->receive

    EXCEPTIONS

      http_communication_failure = 1

      http_invalid_state         = 2

      http_processing_failed     = 3.

 

 

  data fields type tihttpnvp.

  CLEAR wf_string1.

  wf_string1 = http_client->response->get_cdata( ).

*************************************************************************

If  I just use:

 

I am able to reach the URL.

 

Please suggest.


Output JS code in MVC

$
0
0

Hi,

 

I need to trigger some messages using javascript code. The problem is that the code must be triggered from my controller classes and displayed inmediately, before calling the view: this means the JS code is not in the view !!

 

I had thought of something like this:

 

CONCATENATE        the whole JS code goes here       into mensaje.

I do not know how to render the page, so that the message is displayed.

 

Does somebody have an example ??  what should I do ??

 

Thanks

 

 

P.S. - I cannot publish the code. This damned site cancels the navigation and and get a white page with error message.

Passing parameters from BSP to BW report

$
0
0

How to pass parameters from a BSP application to BW in order to execute the BW report

Elementary Navigation->GotoPage question

$
0
0

Morning All,

 

I've searched the Forum and the blogs but can't find an answer to this hence posting the question...

 

Question, within the OnInitialisation Event of a page can I make a redirect/forced reload of the same page and including a Url parameter - from my experience I get Page Not Found when I try the reload of the same page with a Url parameter included, but if I put a different page name in the redirect it works fine - except I want to redirect back to this page and have a different layout triggered by the parameter in the Url ?

 

I have a page, a.htm

 

in the OnInitialisation Event I have a re-direct:

 

if my condition is met...

 

navigation->goto_page( '../notes_private/a.htm?error1=10' ).

 

 

when I execute this I get Not Found in the browser

 

I have also tried:

 

navigation->set_parameter( name = 'error1' value = '10' ).

navigation->goto_page( '../notes_private/a.htm' ).

 

still get the same, page Not Found

 

if I set it to a different page it works perfectly though, like:

 

navigation->goto_page( '../notes_private/b.htm' ).

 

 

But I want to keep this neat and tidy and redirect/reload this page with the Url parameter acting as a trigger for a change in the Layout.

 

Does anyone have any ideas how I can solve this.

 

Thanks,

 

Tomas.

navigation->goto_page into a new page

$
0
0

Hi All

 

I would like to open a new internet explorer when I execute the code navigation->goto_page( ' name.htm' ) as a target tag with HTML

 

best regards

 

Jérôme

 

No switch to HTTPS occurred, so it is not secure to send a password

$
0
0

Hi I just made a webdynpro application. When I click on test application I get a browser with the URL as

http://9.124.47.250:8011/sap/bc/webdynpro/sap/zz_00_sflight_

 

I enter my user is and password on the web pop up ( that is the screen on the browser which says :- SAP WEBAPPLICATION SERVER.

 

I get the error as below:- 

 

No switch to HTTPS occurred, so it is not secure to send a password

 

 

No switch to HTTPS occurred, so it is not secure to send a password

   

 

My application is ready but due to the error above not able to run it in the browse. Please help.

 

Rgds,

Anupma.

Error:You cannot use an internal table as a work area.

$
0
0

Hi Experts,

I am grring Error(You cannot use an internal table as a work area.) for it2_range

 

 

 

In Type Definition

begin of types_range,     sign(1),     option(2),     low  type kunnr,     high type kunnr,   end of types_range.

types: it_range type STANDARD TABLE OF  types_range WITH DEFAULT KEY INITIAL SIZE 10.

 

In Page Attribute

it1_range TYPE it_range

 

 

OnInputProcessing

data: it2_range like it1_range.

ERROR Is Here -


>>>
select * from kna1 into it_kna1 where kunnr in it2_range.

using ALV in BSP application

$
0
0

hi all,

 

can i use ALV functionality in bsp?if yes.please provide an example with explanation.

 

thanks in advance

 

 

 

 

regards,

Anusha


How to open PDF without open/save-Popup

$
0
0

Hi experts,

 

i have small problem: I need to open a PDF-doc from a BSP without the annoying Pop-up 'do you want to save or open the Doc?'....

 

I  have the following coding, but I just get an empty page in the same window...

 

Can you please help me?

 

CODING:

 

METHOD show_doc.  DATA: lv_xfile         TYPE  xstring,            lv_content_type  TYPE string,            lv_hlp_str       TYPE string,            lv_xdata_len     TYPE i,            lx_response      TYPE REF TO cl_http_response,            lx_navigation    TYPE REF TO cl_bsp_navigation.  lv_xfile = iv_xfile.  IF iv_contenttype IS INITIAL.    s_status-doc_type = iv_doctype.    TRANSLATE s_status-doc_type TO UPPER CASE.           "#EC TRANSLANG    CALL METHOD get_content_type      EXPORTING        iv_doc_type     = s_status-doc_type      IMPORTING        ev_content_type = lv_content_type.  ELSE.    lv_content_type = iv_contenttype.  ENDIF.  IF iv_len IS INITIAL.    lv_xdata_len = XSTRLEN( lv_xfile ).  ELSE.    lv_xdata_len = iv_len.  ENDIF.

*   Daten in die Response schreiben  CREATE OBJECT lx_response    TYPE      cl_http_response    EXPORTING      add_c_msg        = 1.  lx_response->set_data(                     data   = lv_xfile                     length = lv_xdata_len ).  lx_response->set_header_field(                     name = 'Content-Type'                     value = lv_content_type ).  lx_response->set_header_field(                     name  = 'cache-control'                     value = 'max-age=0' ).  CONCATENATE 'attachment; filename=' iv_filename INTO lv_hlp_str.  lx_response->set_header_field(                     name  = 'content-disposition'                     value = lv_hlp_str ).  me->x_navigation->response_complete( ).

*      create object lx_navigation exporting runtime = me.  CALL METHOD cl_bsp_utility=>download  EXPORTING    object_s            = lv_xfile    content_type        = lv_content_type    content_disposition = lv_hlp_str    response            = lx_response    navigation          = me->x_navigation  .  CALL METHOD me->x_navigation->response_complete( ).

ENDMETHOD.

 

XSLT and the pound sign

$
0
0

I'm using an XSL transformation to display some information in a BSP application. And everything's going swimmingly except for one minor problem - all my prices are lacking a pound sign where the currency symbol is pounds sterling. For example:

 

<xslt:apply transformation="ZPRICE">  <price>0.00</price></xslt:apply transformation>

 

followed by...

 

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" xmlns="http://www.w3.org/1999/xhtml" version="1.0">  <xsl:output doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" encoding="iso-8859-1" indent="yes" method="xhtml"></xsl:output>  <xsl:include sap:name="ZCHEAPSUITES_INCLUDE"></xsl:include>  <xsl:template match="default">    <html xml:lang="en">      <xsl:apply-templates select="header"></xsl:apply-templates>      <body>        <div id="price">          <xsl:text>£</xsl:text>          <xsl:value-of select="price"></xsl:value-of>        </div>      </body>    </html>  </xsl:template></xsl:transform>

 

Now, can anyone tell me why on earth a dollar sign will work, and a copyright sign will work, but a pound sign won't?

 

BSP - download xlsx(excel 2007) document - error

$
0
0

Hi all,

 

i have a requirement to download different types of documents saved in server. All MS office documents are downloading correctly. it is supporting .xls files but .xlsx files are beiong saved and opened but with empty data, when opened in text document, it shows unrecognized characters(corrupted data)

 

i am using the  below code.

 

1. FM to get the data in bianry format, file name and mome type.

 

2. then....

    concatenate 'attachment;filename=' <filename> into lv_content_disposition_value .

 

    loop at <binary data> into LT_CONTENT_BIN.   " LT_CONTENT_BIN is of RAW(1022) type

      CONCATENATE xstr LT_CONTENT_BIN-line INTO xstr IN BYTE MODE.

    endloop.

 

 

    me->response->set_data( data = xstr ).

    me->response->set_header_field( name = 'Content-Type' value = lv_mimetype ).

    me->response->set_header_field(

       NAME  = 'content-disposition'

       VALUE = lv_content_disposition_value ).

 

    navigation->response_complete( ).

 

the above code is written in Controller - do_request. no view is being called at the end. only the controller is available.

 

this is of high priority.. so please respond quickly.

 

thanks in advance.

 

Ajay.

Multi File Upload with BSP

$
0
0

Hi,

i have a question: is it possible to create an open file dialog, which has the functionality, that an user can check/select more than one element (file) in BSP ?

 

I hope you can help me.

 

Best Regards Patricia Wolf

 

Edited by: Patricia Wolf on Aug 23, 2011 3:55 PM

BSP & DMS Document Download

$
0
0

Hi All,

 

I'm developing a BSP which can download a folder with documents present in SAP's DMS, to c:\temp.

At the moment I use the EasyDMS function "Z_EASYDMS_FOLDER_EXPORT".

During development, it worked fine because I was going through the program in debug mode. Therefor, the SAPHTTP can connect with the SAP gui.

But when running "normallly" (not in debug), the program runs in error. It turns out that the SAPHTTP (nor SAPFTP) cannot connect and thus the documents cannot be downloaded.

I also tried to use call functions: CVAPI_DOC_CHECKOUTVIEW, SCMS_HTTP_GET_FILE and HTTP_GET_FILE, but all with no result. I also tried to call SAPFTP & SAPHTTP directly via "SYSTEM_START_REG_SERVER" and via the build of a command and the function "RFC_START_PROGRAM".

Again, with no result. The BSP runs in an error (HTTP 500 internal server error).

 

As this is an urgent development, help would be very much appreciated!!!

 

Regards,

 

Sander

formating an excel file by BSP Download

$
0
0

I have made a BSP application which can dowload file into an excel file.But now i have a requirement in which i have to format the excel file with colour and cell width.I have to colour the column  header of the excel file with some colours like blue,red etc.

Please suggest me how we can achieve this?

 

Thanks and regards,

Manish Kumar

AJAX Call to BSP -> avoid intermediary "Your request is being processed"

$
0
0

Hello,

 

I'm performing an AJAX call to  a BSP page (using the jQuer load() function).

Unfortunatelty I'm getting a intermediary response which contains the message "Your request is being processed".

 

This is the complete HTML source of this response:

 

<h t m l><h e a d>   <s t y l e type="text/css">.middle  { vertical-align:middle; }</style></h e a d><b o d y    o n l o a d="document.forms[0].submit()">   <form method="post" action="/sap(bD1lbiZjPTAyMA==)/bc/bsp/sap/zzv5_my_orders/selected_orders.htm">      <input type="hidden" name="partner" value="229440">      <input type="hidden" name="shipto" value="ALL">      <input type="hidden" name="arktx" value="*">      <input type="hidden" name="bstnk" value="*">      <input type="hidden" name="inco1" value="ALL">      <input type="hidden" name="ettype" value="A">      <input type="hidden" name="nbdays" value="14">      <input type="hidden" name="status" value="*">      <input type="hidden" name="nblines" value="50">      <input type="hidden" name="langu" value="EN">   </form><table border="0" width="100%" height="100%">   <tr><td align="center" class="middle">Your request is being processed</td></tr></table></body></html>

(I've added some black in tags in order to avoid SDN proxy problems)

The form contains all parameters I have initialy passed through the AJAX call, is is automaticaly submited in the onload() event.

But It is totaly messing up my AJAX call!

 

This behavious doesn't seem to depend on the content of the BSP page: I'm getting the same result with an empty BSP.

The BSP does not contain <xhtmlb:protectDoubleSubmit>.

 

How can I avoid this intermediary response?

 

Many thanks for your help, experts!

 

Jerome.


advantages and disadvantages of statefull stateless applications

$
0
0

Hello, can you tell e some advantages and disadvantages of statefull or stateless applications? When should i use a statefull and when a stateless application ?

 

Thank you

EXCEL reading through BSP application

$
0
0

HI all,

I want to read a EXCEL file from a BSP application.

In standard R3 there is a function module which reads the file in Row and column format but this is a OLE function module. ( ALSM_EXCEL_TO_INTERNAL_TABLE )

 

how can i read a EXCEL file from the BSP application in the same format.

 

Please help

Regards,

Prasad.

SAPLHTTP_RUNTIME for 12 days????

$
0
0

Hi All -

 

We're in the midst of a major course push on our LSO system at the moment, which runs off BSP Application HCM_LEARNING.  When we took a look at the system monitor in SM50, it looks like SAPLHTTP_RUNTIME has been running for nearly 11 days, and we can't figure out why!  Does anybody have any idea why this would happen?  Thanks for your help!

 

Abby

LSO BSP Changes

$
0
0

Hi all,

 

I have changed the prebooking text by following the below link.

http://wiki.sdn.sap.com/wiki/display/ERPHCM/ModifytextsinLSOPortal

My requirement was to  change the  text in prebooking screen.

 

Could i know the procedure to put a hyperlink( for ex: google.com ) in the same page.

 

Thanks,

Sridar

can i use webcam in my bsp application

$
0
0

hi

 

can i use webcam in my bsp application , actually i m developing a visitor management . According to requirement i want tske snap  snap of visitor  in data entry form so plz guide me how to do it in BSP .

 

Thanks

Viewing all 1497 articles
Browse latest View live