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

BSP navigation SUS

$
0
0

Hello all, please can you help me its urgent

 

I have requirement in SUS i added a custom button on  sus ASN  now clicking that button i have to open another window i'm able to open a new window but current page goes blank

 

i handled DO_HANDLE_EVENT of class CL_SUS_C_ASN_DETAIL_EDIT code is below

 

CASE event.

   WHEN lc_zatt_btn.

 

     cl_wd_utilities=>construct_wd_url( EXPORTING application_name = 'ZWD_TEST'  IMPORTINGout_absolute_url = l_wd_url ) .

 

     navigation->CALL_APPLICATIONurl = l_wd_url  ).

*

     navigation->use_auto_submit_form( '1' ).

 

 

ENDCASE.

 

Capture.PNG

 

 

 

Regards

Mohammed Sajid


Could not figure out the exact reason why page view and button is changing to Link and page color is changing when bsp page url uses a public IP

$
0
0

Hello Expert,

 

My requiremet :  I have to call a bill desk(for online payment like VISA/Msstercard) url from one bsp page .BSP page URL should be (in Public IP) from which bill desk gateway will be called. I call my bsp page from  webdynpro button event in srm portal.

 

For example :  Lets say my BSP page url is as below and when I click  “My Payment” button Some bill desk url will be called:

http://abc11.sdc.def:8000/sap/bc/bsp/sap/ztenderpayment/zpaymentreq.htm

and above link is actually called with parameter as below :

http://abc11.sdc.def:8000/sap/bc/bsp/sap/ztenderpayment/zpaymentreq.htm?VNO=0001000050&VID=AT&T=&TNO=0000003845&TDESC=SDEMC001%2029%2e01%2e2016%2011%3a28&PGV=TPSL&CRN=INR&PTYPE=EMD&AMT=0%2e00

 

bsp  working.PNG

When I use public IP as http://stv.erp.vvv:8080/zpaymentdev ( which is from another box and redirects to original one , not sure) , then correct data came but the BSP page color is changing and button like “Make Payment” is showing like a link as below:

  http://stv.erp.vvvv:8080/sap(bD1lbiZjPTEwMA==)/bc/bsp/sap/ztenderpayment/zpaymentreq.htm?VNO=0001000050&VID=AT&T=&TNO=0000003845&TDESC=SDEMC001%2029%2e01%2e2016%2011%3a28&PGV=TPSL&CRN=INR&PTYPE=EMD&AMT=0%2e00

bsp not working.PNG


I could not figure out the exact reason why button is changing to Link and page color is changing while rendering html.Most probably theme is not getting loading properly, but not sure.

 

Can anybody help with proper solution, I tried with pure html elements instead of htmlb elements but same result came. Is there any configuration or role or profile need to be changed? Or any other solution.


Thanks & Regards,

Partha

Service cannot be reached-(error code 403 and for the reason Forbidden.)

$
0
0

Hi All,

 

I am working on BSP's.

 

I built a BSP application.  It was working fine.  Now after 1 month when i excuted the same BSP, It is throughing error as

 

below:

 

Service cannot be reached

 

 

What has happened?

URL http://klang.synopsys.com:9004/sap/bc/bsp/sap/zhr_voe/first.htm call was terminated because the corresponding service is not available.

 

   

Note

 

The termination occurred in system DV4 with error code 403 and for the reason Forbidden.

 

The selected virtual host was 0 .

 

 

   

 

What can I do?

Please select a valid URL.

 

If you do not yet have a user ID, contact your system administrator.

 

 

 

ErrorCode:ICF-NF-http-c:000-u:SAPSYS-l:E-i:klang_DV4_04-v:0-s:403-r:Forbidden

 

 

 

HTTP 403 - Forbidden

 

 

Your SAP Internet Communication Framework Team

 

 

 

 

Note : An other BSP application is working fine...

 

Can any boady please help me to sort the iussue.

 

Regards,

Kishan

PDF Output

$
0
0

So what am I missing?

 

<b>BSP Programming: Handling Of Non-HTML Documents</b>

/people/mark.finnern/blog/2003/09/23/bsp-programming-handling-of-non-html-documents

 

<b>Generate file .doc or .pdf as from a text</b>

Generate file .doc or .pdf as from a text

 

<b>Page Layout</b>

<%@page language="abap" %><%@extension name="htmlb" prefix="htmlb" %><htmlb:content design="design2002" >  <htmlb:page>    <htmlb:form method       = "post"                encodingType = "multipart/form-data" >      <htmlb:radioButtonGroup id="display_type" >        <htmlb:radioButton id   = "inline"                           text = "Display Inline" />        <htmlb:radioButton id   = "html"                           text = "Display Inside HTML Page" />        <htmlb:radioButton id   = "window"                           text = "Display In New Window" />        <htmlb:radioButton id   = "convert"                           text = "Convert to PDF Inside HTML Page" />        <htmlb:radioButton id   = "convertnew"                           text = "Convert to PDF In New Window" />      </htmlb:radioButtonGroup>      <htmlb:fileUpload id          = "myUpload"                        onUpload    = "HandleUpload"                        upload_text = "Display"                        size        = "90" />      <hr>      <br>Name = <%= file_name%>      <br>MIME-Type = <%= file_mime_type%>      <br>Length = <%= file_length%>      <%  IF ( display_type = 'html' OR display_type = 'convert' ) AND  display_url IS NOT INITIAL.      %>      <iframe src="<%= display_url%>" width="100%" height="500px">      </iframe>      <%  ENDIF.  IF ( display_type = 'window' OR display_type = 'convertnew' ) AND display_url IS NOT INITIAL.      %>      <script language="Javascript">        window.open("<%= display_url%>").focus();      </script>      <%  ENDIF.      %>    </htmlb:form>  </htmlb:page></htmlb:content>

 

<b>OnInputProcessing</b>

* event handler for checking and processing user input and
* for defining navigation

DATA: radioButtonGroup TYPE REF TO CL_HTMLB_RADIOBUTTONGROUP.
DATA: fileUpload TYPE REF TO CL_HTMLB_FILEUPLOAD.
DATA: cached_response TYPE REF TO if_http_response.
DATA: response TYPE REF TO if_http_response.
DATA: guid TYPE guid_32.

fileUpload ?= CL_HTMLB_MANAGER=>GET_DATA(                       request = request                       id      = 'myUpload'                       name    = 'fileUpload' ).

file_name      = fileUpload->file_name.
file_mime_type = fileUpload->file_content_type.
file_length    = fileUpload->file_length.
file_content   = fileUpload->file_content.

radioButtonGroup ?= CL_HTMLB_MANAGER=>GET_DATA(                       request = request                       id      = 'display_type'                       name    = 'radioButtonGroup' ).

display_type = radioButtonGroup->selection.

IF display_type = 'inline' AND XSTRLEN( file_content ) > 0.  response = runtime->server->response.  response->set_data( file_content ).  response->set_header_field( name  = if_http_header_fields=>content_type                              value = file_mime_type ).  " response->set_header_field( name  = if_http_header_fields=>content_length  "                             value = file_length ).  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 ).
* signal that response is complete  navigation->response_complete( ).   RETURN.
ENDIF.

IF ( display_type = 'html' OR display_type = 'window' ) AND XSTRLEN( file_content ) > 0.  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 ).  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 display_url.  cl_http_server=>server_cache_upload( url      = display_url                                       response = cached_response ).  RETURN.

ENDIF.

IF ( display_type = 'convert' OR display_type = 'convertnew' ) AND XSTRLEN( file_content  ) > 0.  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 = '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 ).  RETURN.

ENDIF.

 

Again so what am I missing? If I select the Convert to PDF with a text file and open in a new window I get my page then I do a save as and I save it as a .PDF but then Adobe can't open it. So I must be missing something easy...

How to get SAP Session Management accepting session token?

$
0
0

We have an issue trying to use SAP Security Session Management instead of SSO cookies.

 

We have Netweaver 7.02 SP11 and we are trying to allow the external HTTP callers to access system using SAP Session Management and session access token. However we are getting response "Session doesn't exist".

 

Details:

 

We have activated Security Session Management in our system and we deactivated SSO completely. Here are the relevant system parameters:

 

login/create_sso2_ticket = 0 

login/accept_sso2_ticket = 0 

login/ticketcache_entries_max = 1000 

login/ticketcache_off = 0 

login/ticket_only_by_https = 0 

icf/set_HTTPonly_flag_on_cookies = 0 

icf/user_recheck = 0 

http/security_session_timeout = 1800

http/security_context_cache_size = 2500 

rdisp/plugin_auto_logout = 1800 

rdisp/autothtime = 60 

 

(list comes from SICF_SESSIONS).

Also, in SICF_SESSIONS we have activated Security Session Management for our current client.

 

Then we have developed BSP application with controller. This BSP application authenticates user (employing standard authentication mechanisms of Netweaver) and then it prepares the URL to be called by external HTTP caller. Here is the code of DO_REQUEST method of the controller:

 

method DO_REQUEST.

 

data: lf_cntntype type string,

lf_mimetype type string.

 

lf_cntntype = skwhc_c_http_content_type.

lf_mimetype = 'text/plain'.

response->set_header_field( name = lf_cntntype value = lf_mimetype ).

 

data: lf_error type string.

lf_error = space.

 

data: lf_url_path type string.

lf_url_path  = request->get_form_field( 'URL' ).          "#EC NOTEXT

if lf_url_path is initial.

   lf_error = 'URL is missing'.

else.

 

data: lf_stateful_path type string.

lf_stateful_path = lf_url_path.

CALL METHOD server->set_session_stateful_via_url

   EXPORTING

     stateful    = server->co_enabled

   CHANGING

     rewrite_url = lf_stateful_path.

 

data: lf_token type string.

CALL METHOD server->enable_foreign_session_access

   EXPORTING

     url_path = lf_url_path

     one_time_access_token     = abap_false

   IMPORTING

     session_access_token      = lf_token

   EXCEPTIONS

     url_path_is_not_supported = 1

     session_is_not_stateful   = 2

     user_unknown = 3

     internal_error = 4

     others = 5.

  if sy-subrc ne 0.

    case sy-subrc.

      when 1.

        lf_error = 'Register failed with exception url_path_is_not_supported'.

      when 2.

        lf_error = 'Register failed with exception session_is_not_stateful'.

      when 3.

        lf_error = 'Register failed with exception user_unknown'.

      when others.

        lf_error = 'Register failed with exception internal_error'.

    endcase.

  endif.

 

endif.

 

if lf_error is not initial.

  response->set_status( code = 501  reason = lf_error ).

  write( 'Error processing the URL into token' ).

  write( cl_abap_char_utilities=>cr_lf ).

  write( lf_error ).

else.

  write( lf_stateful_path ).

  write( cl_abap_char_utilities=>cr_lf ).

  write( lf_token ).

endif.

 

endmethod.

 

Method takes the parameter URL and adds the session context to the URL (changing the path from .../sap/bc... into .../sap(session-context-id)/bc...) and it also generates the access token for the URL. Both values are then returned with plain text mime type.

 

In SM05, we can see the session properly created.

 

When we use the URL with parameter SAP-SESSION_ACCESS_TOKEN, we get the response "400 Session timed out - please log in again".

 

When we check the HTTP trace (transaction SMICM), it says that the session "no longer exists". Here is the part of the trace file:

 

HttpSAPR3Handler: Call SAP AppServer for URI: /, java: 0

DpFindWebContext: check context T24/U6677/M0, 1,1

stat:1, use:1, len:40

DpFindWebContext: no context found, id=>8E0kZhnTPDBIF7G9rS7h8G3BC2ds1won9jev1MAg<

DTRACE(8/16774/2): {root-id=000C29D761591EE1B2B6BDFA0C1C0EEF}_{conn-id=000C29D761591EE1B2B6BDFA0C1C2EEF}_1

IcmFlushBuf: Flushing 847 Bytes, buf_status: 6

flush buffer with mpi buffer id 6

MPI<26b3>2b#12 FlushOutbuf 6 1 0 225560 919 6 -> 00000000079A55B0 MPI_OK

IcmCreateDpRequest: Send request to AppServer

IcmSendRq called with session key: SID:ANON:XXXXXX0090_YYY_00:8E0kZhnTPDBIF7G9rS7h8G3BC2ds1won9jev1MAg-ATT

DpFindWebContext: check context T24/U6677/M0, 1,1

stat:1, use:1, len:40

DpFindWebContext: no context found, id=>8E0kZhnTPDBIF7G9rS7h8G3BC2ds1won9jev1MAg<

IcmSendRq: Session not found for context id: SID:ANON:DEHDSV0090_D65_00:8E0kZhnTPDBIF7G9rS7h8G3BC2ds1won9jev1MA

MPI<26b3>2b#13 Cancel 7 -> MPI_OK

MPI<26b4>2c#14 Cancel 7 -> MPI_OK

HttpSrvHdlRequest: Error return: 701

IcmPlCheckRetVal: Plugin retval: PLUGIN_RET_ERROR (701)

IcmHandleNetRead(id=8/16774): read_len: 847, HandleNetData returned: 701

IcmHandleNetRead(id=8/16774): PlugInHandleNetData failed (rc=701)

MPI<26b3>2b#14 Cancel 7 -> MPI_OK

MPI<26b4>2c#15 Cancel 7 -> MPI_OK

PlugInStopConn: role: Server(1), error: -11, write_err: 1

PlugInStopConn: write error response

HttpPlugInWriteErrorText: return static error for "Session no longer exists" (-11)

HttpPlugInWriteErrorText: templ_path: D:\usr\sap\YYY\DVEBMGS00\data\icmandir/error_templ, err_idx: -1

ICT: IctIHttpOpenMessage: 0000000002E2E220 typ=2

 

 

Example of the calls:

 

- first we call

 

http://<host>:<port>/sap/bc/bsp/ztest/token.do?url=/sap/bc/bsp/ztest/token.do

 

The response is

 

sap(cz1TSUQlM2FBTk9OJTNhREVIRFNWMDA5MF9ENjVfMDAlM2E4RTBrWmhuVFBEQklGN0c5clM3aDhHM0JDMmRzMXdvbjlqZXYxTUFnLUFUVA==)/bc/bsp/ehr/ztest/token.do

c3N0PTIzQjE1NkVBQzlBNTU5NDY4RjhBREI3MERDMjRBMEYzMDAwQzI5RDc2MTU5MUVFMUIyQjZCOEEwMDhEQTBFRUY=

 

So we close browser, open it again and call

 

http://<host>:<port>/sap(cz1TSUQlM2FBTk9OJTNhREVIRFNWMDA5MF9ENjVfMDAlM2E4RTBrWmhuVFBEQklGN0c5clM3aDhHM0JDMmRzMXdvbjlqZXYxTUFnLUFUVA==)/bc/bsp/ztest/token.do?sap-session_access_token=c3N0PTIzQjE1NkVBQzlBNTU5NDY4RjhBREI3MERDMjRBMEYzMDAwQzI5RDc2MTU5MUVFMUIyQjZCOEEwMDhEQTBFRUY=

 

And the result is error page "400 Session timed out - please log in again"

 

The solution is described in OSS note 1420203 and we did all what's described there, but it still doesn't work.

 

Do you have any idea what's missing?

"IT_SPFLI" is not an internal table "OCCURS n" specification is missing.

CX_SY_DYN_CALL_ILLEGAL_TYPE

$
0
0

Hello,

 

I am calling a function from my BSP application (in do_handle_event) and I am getting this exception..

 

Following error text processed in system:

An exception with the type CX_SY_DYN_CALL_ILLEGAL_TYPE occurred, but was neither handled locally, nor declared in a RAISING clause

 

i dont find anything in st22. Has anyone got any idea what might be the problem? The actual and formal parameters looks fine....

 

any help is greatly appreciated

 

thanks

thilothama

How to get SAP Session Management accepting session token?

$
0
0

We have an issue trying to use SAP Security Session Management instead of SSO cookies.

 

We have Netweaver 7.02 SP11 and we are trying to allow the external HTTP callers to access system using SAP Session Management and session access token. However we are getting response "Session doesn't exist".

 

Details:

 

We have activated Security Session Management in our system and we deactivated SSO completely. Here are the relevant system parameters:

 

login/create_sso2_ticket = 0 

login/accept_sso2_ticket = 0 

login/ticketcache_entries_max = 1000 

login/ticketcache_off = 0 

login/ticket_only_by_https = 0 

icf/set_HTTPonly_flag_on_cookies = 0 

icf/user_recheck = 0 

http/security_session_timeout = 1800

http/security_context_cache_size = 2500 

rdisp/plugin_auto_logout = 1800 

rdisp/autothtime = 60 

 

(list comes from SICF_SESSIONS).

Also, in SICF_SESSIONS we have activated Security Session Management for our current client.

 

Then we have developed BSP application with controller. This BSP application authenticates user (employing standard authentication mechanisms of Netweaver) and then it prepares the URL to be called by external HTTP caller. Here is the code of DO_REQUEST method of the controller:

 

method DO_REQUEST.

 

data: lf_cntntype type string,

lf_mimetype type string.

 

lf_cntntype = skwhc_c_http_content_type.

lf_mimetype = 'text/plain'.

response->set_header_field( name = lf_cntntype value = lf_mimetype ).

 

data: lf_error type string.

lf_error = space.

 

data: lf_url_path type string.

lf_url_path  = request->get_form_field( 'URL' ).          "#EC NOTEXT

if lf_url_path is initial.

   lf_error = 'URL is missing'.

else.

 

data: lf_stateful_path type string.

lf_stateful_path = lf_url_path.

CALL METHOD server->set_session_stateful_via_url

   EXPORTING

     stateful    = server->co_enabled

   CHANGING

     rewrite_url = lf_stateful_path.

 

data: lf_token type string.

CALL METHOD server->enable_foreign_session_access

   EXPORTING

     url_path = lf_url_path

     one_time_access_token     = abap_false

   IMPORTING

     session_access_token      = lf_token

   EXCEPTIONS

     url_path_is_not_supported = 1

     session_is_not_stateful   = 2

     user_unknown = 3

     internal_error = 4

     others = 5.

  if sy-subrc ne 0.

    case sy-subrc.

      when 1.

        lf_error = 'Register failed with exception url_path_is_not_supported'.

      when 2.

        lf_error = 'Register failed with exception session_is_not_stateful'.

      when 3.

        lf_error = 'Register failed with exception user_unknown'.

      when others.

        lf_error = 'Register failed with exception internal_error'.

    endcase.

  endif.

 

endif.

 

if lf_error is not initial.

  response->set_status( code = 501  reason = lf_error ).

  write( 'Error processing the URL into token' ).

  write( cl_abap_char_utilities=>cr_lf ).

  write( lf_error ).

else.

  write( lf_stateful_path ).

  write( cl_abap_char_utilities=>cr_lf ).

  write( lf_token ).

endif.

 

endmethod.

 

Method takes the parameter URL and adds the session context to the URL (changing the path from .../sap/bc... into .../sap(session-context-id)/bc...) and it also generates the access token for the URL. Both values are then returned with plain text mime type.

 

In SM05, we can see the session properly created.

 

When we use the URL with parameter SAP-SESSION_ACCESS_TOKEN, we get the response "400 Session timed out - please log in again".

 

When we check the HTTP trace (transaction SMICM), it says that the session "no longer exists". Here is the part of the trace file:

 

HttpSAPR3Handler: Call SAP AppServer for URI: /, java: 0

DpFindWebContext: check context T24/U6677/M0, 1,1

stat:1, use:1, len:40

DpFindWebContext: no context found, id=>8E0kZhnTPDBIF7G9rS7h8G3BC2ds1won9jev1MAg<

DTRACE(8/16774/2): {root-id=000C29D761591EE1B2B6BDFA0C1C0EEF}_{conn-id=000C29D761591EE1B2B6BDFA0C1C2EEF}_1

IcmFlushBuf: Flushing 847 Bytes, buf_status: 6

flush buffer with mpi buffer id 6

MPI<26b3>2b#12 FlushOutbuf 6 1 0 225560 919 6 -> 00000000079A55B0 MPI_OK

IcmCreateDpRequest: Send request to AppServer

IcmSendRq called with session key: SID:ANON:XXXXXX0090_YYY_00:8E0kZhnTPDBIF7G9rS7h8G3BC2ds1won9jev1MAg-ATT

DpFindWebContext: check context T24/U6677/M0, 1,1

stat:1, use:1, len:40

DpFindWebContext: no context found, id=>8E0kZhnTPDBIF7G9rS7h8G3BC2ds1won9jev1MAg<

IcmSendRq: Session not found for context id: SID:ANON:DEHDSV0090_D65_00:8E0kZhnTPDBIF7G9rS7h8G3BC2ds1won9jev1MA

MPI<26b3>2b#13 Cancel 7 -> MPI_OK

MPI<26b4>2c#14 Cancel 7 -> MPI_OK

HttpSrvHdlRequest: Error return: 701

IcmPlCheckRetVal: Plugin retval: PLUGIN_RET_ERROR (701)

IcmHandleNetRead(id=8/16774): read_len: 847, HandleNetData returned: 701

IcmHandleNetRead(id=8/16774): PlugInHandleNetData failed (rc=701)

MPI<26b3>2b#14 Cancel 7 -> MPI_OK

MPI<26b4>2c#15 Cancel 7 -> MPI_OK

PlugInStopConn: role: Server(1), error: -11, write_err: 1

PlugInStopConn: write error response

HttpPlugInWriteErrorText: return static error for "Session no longer exists" (-11)

HttpPlugInWriteErrorText: templ_path: D:\usr\sap\YYY\DVEBMGS00\data\icmandir/error_templ, err_idx: -1

ICT: IctIHttpOpenMessage: 0000000002E2E220 typ=2

 

 

Example of the calls:

 

- first we call

 

http://<host>:<port>/sap/bc/bsp/ztest/token.do?url=/sap/bc/bsp/ztest/token.do

 

The response is

 

sap(cz1TSUQlM2FBTk9OJTNhREVIRFNWMDA5MF9ENjVfMDAlM2E4RTBrWmhuVFBEQklGN0c5clM3aDhHM0JDMmRzMXdvbjlqZXYxTUFnLUFUVA==)/bc/bsp/ehr/ztest/token.do

c3N0PTIzQjE1NkVBQzlBNTU5NDY4RjhBREI3MERDMjRBMEYzMDAwQzI5RDc2MTU5MUVFMUIyQjZCOEEwMDhEQTBFRUY=

 

So we close browser, open it again and call

 

http://<host>:<port>/sap(cz1TSUQlM2FBTk9OJTNhREVIRFNWMDA5MF9ENjVfMDAlM2E4RTBrWmhuVFBEQklGN0c5clM3aDhHM0JDMmRzMXdvbjlqZXYxTUFnLUFUVA==)/bc/bsp/ztest/token.do?sap-session_access_token=c3N0PTIzQjE1NkVBQzlBNTU5NDY4RjhBREI3MERDMjRBMEYzMDAwQzI5RDc2MTU5MUVFMUIyQjZCOEEwMDhEQTBFRUY=

 

And the result is error page "400 Session timed out - please log in again"

 

The solution is described in OSS note 1420203 and we did all what's described there, but it still doesn't work.

 

Do you have any idea what's missing?


Creating MIME objetct inside a BSP application using ABAP code

$
0
0

Hi friends!

My task is: I need to read Purchase Order Attachmets and create a LINK to this file, according to acces this file outside the ECC landscape (will be accessed and downloaded), as It was a web link.

To do that, I'm trying to design a BSP Application, and upload the attachment to a MIME folder.

It's ok to me read the attachments and display the content in the screen of the BSP, I'm having trouble just to upload to a MIME repository.

 

 

a) I need to know if it's possible create MIME inside a BSP application (I'm thinking that it could have some erros of access or authorization).

 

b) I need to know, if inside my BSP application, will this code work?

 

 

"Create the MIME file

   CALL METHOD o_mr_api->put

     EXPORTING

       i_url                                     = lv_url

       i_content                             = lv_content

       i_check_authority                 = space

        i_dev_package                     = 'ZPACKAGE'

       i_suppress_package_dialog   = 'X'

       i_new_loio                            = lv_loio

     EXCEPTIONS

       parameter_missing         = 1

       error_occured                 = 2

       cancelled                       = 3

       permission_failure          = 4

       data_inconsistency        = 5

       OTHERS                      = 6.

 

Thank you!

Alysson Dias.

Calling a secondary page (htm) manually in the browser

$
0
0

Hi all,

 

if a page1.htm calls page2.htm to process something. I noticed that if page2.htm is called manually by typing on the browser, page2.htm is loaded.

 

is there anything in BSP to controll that? I mean I don't want to load page2.htm unless is coming from page1.htm since there are certain paramaters that are been sent to

 

or this control has to be done manually on html and nothing to do with BSP?

 

thanks

Neo

Convert binary to base64

$
0
0

I've a special problem. I've a BSP for uploading files from Windows XP-Clients. The file should be transferred to a .NET web service where the file is written to disc (1:1, means the binary is written like it is to disc). The transfer from the file to the web service must be in base64.

My problem is, that the web service write a file with exact the same size as the file I uploaded, but I couldn’t read the file correctly. Only text files (.csv, .txt, ...) works correctly. I compared the uploaded file with the written file and there are some characters which could not converted in ABAP (hex 23 instead of the correct char). So I think I've a problem with the codepages.

I use a Unicode WAS 6.20 with UTF-8.

 

Please see my code:

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

  • Layout *

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

<%@page language="abap"%>

<%@extension name="htmlb" prefix="htmlb"%>

<%@ extension name="xhtmlb" prefix="xhtmlb" %>

 

<htmlb:content design="design2003">

 

  <htmlb:page title = "Testupload">

 

        <htmlb:form method= "post"

                    encodingType = "multipart/form-data"

                    id = "FRM_Pflege">

          <htmlb:fileUpload id   = "and"

                            size = "40" />

          <htmlb:button id      = "file_upload_and"/>

    </htmlb:form>

  </htmlb:page>

</htmlb:content>

 

 

 

 

 

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

  • oninputprocessing   *

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

  • here you see an extract from my code.

  • the myfile64 will be transfered to the web service

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

  CASE event->server_event.

    WHEN 'file_upload_and'.

      TRY.

          fileupload ?= cl_htmlb_manager=>get_data(

                                request = runtime->server->request

                                name    = 'fileUpload'

                                id      = 'and').

          IF fileupload IS NOT INITIAL.

            name         = fileupload->file_name.

            content      = fileupload->file_content.

            length       = fileupload->file_length.

            content_type = fileupload->file_content_type.

          ENDIF.

 

          conv = cl_abap_conv_in_ce=>create(

             encoding = '1160'

       endian = 'L'

             input = fileupload->file_content ).

          conv->read( IMPORTING data = input_string len = len ).

          CREATE OBJECT obj.

 

 

          CALL METHOD obj->encode_base64

            EXPORTING

              unencoded = input_string

            RECEIVING

              encoded   = myfile64.

          CLEAR wf_string .

 

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

the string myfile64 will be used for sending to the webservice

How to include structure in Types Definition ???

$
0
0

Hello All,

 

      I want a declaration like this in BSP :-

 

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

DATA : BEGIN OF imkop OCCURS 100.

               INCLUDE STRUCTURE mkop.

DATA :   waers LIKE mepro-waers.      

DATA : END OF imkop.

 

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

 

<b>In BSP: Type Definitions</b>

 

I wrote like this :-

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

Types : BEGIN OF imkop.

                INCLUDE STRUCTURE mkop.

Types :   waers type mepro-waers.      

Types : END OF imkop. 

 

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

 

               I'm getting an error saying that I can't use structures in this .

 

Now what should I do ?

Can anyone help me out ?

 

Regards,

Deepu.K

Calling a secondary page (htm) manually in the browser

$
0
0

Hi all,

 

if a page1.htm calls page2.htm to process something. I noticed that if page2.htm is called manually by typing on the browser, page2.htm is loaded.

 

is there anything in BSP to controll that? I mean I don't want to load page2.htm unless is coming from page1.htm since there are certain paramaters that are been sent to

 

or this control has to be done manually on html and nothing to do with BSP?

 

thanks

Neo

CX_SY_DYN_CALL_ILLEGAL_TYPE

$
0
0

Hello,

 

I am calling a function from my BSP application (in do_handle_event) and I am getting this exception..

 

Following error text processed in system:

An exception with the type CX_SY_DYN_CALL_ILLEGAL_TYPE occurred, but was neither handled locally, nor declared in a RAISING clause

 

i dont find anything in st22. Has anyone got any idea what might be the problem? The actual and formal parameters looks fine....

 

any help is greatly appreciated

 

thanks

thilothama

BSP - How to set header-field "no-store"

$
0
0

Hello.

 

I need to set the HTTP-header-field "no-store" in a BSP-application. The Problem is, that i do'nt know, how to do this.

 

I just do'nt know, which strings have to be passed to the method "set_header_field". The W3C-RFC gives the following information:

 

-

-


 

    Cache-Control   = "Cache-Control" ":" 1#cache-directive

 

    cache-directive = cache-request-directive

         | cache-response-directive

 

    cache-request-directive =

           "no-cache"                          ; Section 14.9.1

         | "no-store"                          ; Section 14.9.2

         | "max-age" "=" delta-seconds         ; Section 14.9.3, 14.9.4

         | "max-stale" [ "=" delta-seconds ]   ; Section 14.9.3

         | "min-fresh" "=" delta-seconds       ; Section 14.9.3

         | "no-transform"                      ; Section 14.9.5

         | "only-if-cached"                    ; Section 14.9.4

         | cache-extension                     ; Section 14.9.6

 

     cache-response-directive =

           "public"                               ; Section 14.9.1

         | "private" [ "=" <"> 1#field-name <"> ] ; Section 14.9.1

         | "no-cache" [ "=" <"> 1#field-name <"> ]; Section 14.9.1

         | "no-store"                             ; Section 14.9.2

         | "no-transform"                         ; Section 14.9.5

         | "must-revalidate"                      ; Section 14.9.4

         | "proxy-revalidate"                     ; Section 14.9.4

         | "max-age" "=" delta-seconds            ; Section 14.9.3

         | "s-maxage" "=" delta-seconds           ; Section 14.9.3

         | cache-extension                        ; Section 14.9.6

 

    cache-extension = token "=" ( token

-

-


 

 

I already tried some combinations, but none of them worked. As i have already searched the SDN-Forum and google, i hope that somebody in this forum knows, how to do the trick...

 

 

Regards

 

Jörg Neumann

 


Multiple File Upload in BSP Application

$
0
0

Hi team,

 

i am developing a WEB Request in CRM using BSP application . Could you please help out to achive multiple file upload in BSP application . Currently i can able to attach single file . But user need Multiple with delete option in the screem.

 

 

Regards

Anbu B

How to upload image to MIME in BSP

$
0
0

Hi,

 

I have created one folder named 'images' in BSP MIME.

 

How can I upload images to the folder using FM or ABAP Coding.

 

With regards,

 

Rajesh.

Javascript Array to BSP ABAP Internal Table

$
0
0

Hi, do you know how to convert a javascript array to a BSP ABAP Internal table? I have a bidimensional array and I want to transfer the information into an internal table on the server side, when the OnInputProcessing method is execute it.

Thanks in advance!

ASSIGN JAVA VARIABLE TO ABAP VARIABLE IN BSP

$
0
0

Hello SAP,

 

I am trying to get the windows user id in WDA.

I am unable to do it in WDA.

So , I started developing BSP to get the windows user id.

I write the java code where we can get the windows user id.

But, This vale I am unable to capture into abap variable.

Could you please let me know solution for this.

 

<%@page language="abap"%>

<%@extension name="htmlb" prefix="htmlb"%>

 

 

 

<input type="text" name="curruser" id="curruser" disabled="disabled" value="[ UserName ]">

<script language="javascript" type="text/javascript">

 

 

     function getWindowsUserName()

     {

         var WinNetwork = new ActiveXObject("WScript.Network");

 

 

 

 

  var UserName =  ( WinNetwork.UserName );

 

    document.getElementById('curruser').value = UserName;

}

   window.onload=getWindowsUserName;

 

</script>

here User name is java variable.

styles in iterator

$
0
0

Hi

 

How to use styles P_STYLE in iterator.  I have used tableview in my bsp application, but i do not know how to use this p_style in my program.  Please help.

 

Regards,

Vijay

Viewing all 1497 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>