cancel
Showing results for 
Search instead for 
Did you mean: 

Bsp Dump

Former Member
0 Kudos

Hi all,

we had created an application in bps_wb.as we all know the 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 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.

Accepted Solutions (0)

Answers (2)

Answers (2)

thomas_gaberthel
Explorer
0 Kudos

Hi Bharan,

I have exactly the same issue in my flat file upload, using a Web browser. How could you solve the problem?

Thanks for support

Thomas

Former Member
0 Kudos

Hi Bharan

Why dont you look at the code that is written here in the How To ... of File Upload to BPS using GUI: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7034028c-ad1d-2a10-2c94-868e7707...

I think it should give you some leads...

Just make sure you have the ".._INIT" also defined and set the global data.

Srikanth