Skip to Content
avatar image
Former Member

BSP Dump

Hi all,

we had created an web application in bps.than Bsp will be created correspondingly.i had made some changes in the view of page 1 of the bsp application.i had added a button,in that view.in the oninputprocessing i wrote the below code it is giving me dump (i had mentioned below where it is giving me dump) msg.please let me know where iam doing wrong,i did not write anything in the layout of the page..

this is the code.

CLASS CL_HTMLB_MANAGER DEFINITION LOAD.

CONSTANTS:

c_memory_id_file_upload TYPE memory_id VALUE 'Z_SEM_BPS_FILE_UPLOAD'.

DATA:

lv_objname TYPE lxeobjname,

lr_page TYPE REF TO if_http_entity,

l_content_path TYPE string,

l_content TYPE string,

l_subrc TYPE sy-subrc,

ls_bapiret TYPE bapiret2,

lt_bapiret TYPE STANDARD TABLE OF bapiret2,

ls_mesg TYPE upc_ys_mesg,

lt_mesg TYPE upc_yt_mesg.

DATA: event TYPE REF TO CL_HTMLB_EVENT.

REFRESH lt_mesg.

IF event_id = CL_HTMLB_MANAGER=>EVENT_ID.

event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).

IF event->name = 'button' AND event->event_type = 'click'.

DATA: button_event TYPE REF TO CL_HTMLB_EVENT_BUTTON.

button_event ?= event.

ENDIF.

endif.

case event->id.

when 'upload'.

lv_objname = request->get_form_field( 'file' ).

lr_page = request->get_multipart( 1 ).-->no value returned here.

l_content_path = lr_page->get_header_field( '~content_filename' ).----> dump here as null

l_content = lr_page->get_cdata( ).

IF l_content IS NOT INITIAL.

  • Export file contents to memory

EXPORT content FROM l_content TO MEMORY ID c_memory_id_file_upload.

endif.

endcase.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Oct 10, 2007 at 01:56 PM

    Did you use fileUpload tag of HTMLB? If so, use below code...

    DATA: event            TYPE REF TO if_htmlb_data,
               fileUpload_event TYPE REF TO CL_HTMLB_FILEUPLOAD.
    
               event = cl_htmlb_manager=>get_event_ex( request ).
      
             IF event IS NOT INITIAL AND event->event_name =  htmlb_events=>fileupload.
    
               fileUpload_event ?= event.
    
    * "To get File name, use fileUpload_event->file_name
    * "Content Type,  fileUpload_event->file_content_type
    * "File Length,  fileUpload_event->file_length
    * "File Content,  fileUpload_event->file_content
    
             ENDIF.

    Hope this will help you.

    <i>* Reward each useful answer</i>

    Raja T

    Add comment
    10|10000 characters needed characters exceeded