21.03.2013 Views

Object Oriented ABAP

Object Oriented ABAP

Object Oriented ABAP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

locwa_signature LIKE LINE OF locint_signature,<br />

locwa_uris LIKE LINE OF locint_uris.<br />

IF NOT r_document IS INITIAL.<br />

RETURN.<br />

ENDIF.<br />

* Create container control<br />

CALL METHOD c_oi_container_control_creator=>get_container_control<br />

IMPORTING<br />

control = r_control<br />

retcode = wf_retcode.<br />

IF wf_retcode NE c_oi_errors=>ret_ok.<br />

CALL METHOD c_oi_errors=>raise_message<br />

EXPORTING<br />

type = 'E'.<br />

ENDIF.<br />

* Initialize Custom Control<br />

CREATE OBJECT r_container<br />

EXPORTING<br />

container_name = 'EXCEL'. "Custom Control Name<br />

CALL METHOD r_control->init_control<br />

EXPORTING<br />

r3_application_name = 'EXCEL INPLACE BDS'<br />

inplace_enabled = abap_true<br />

inplace_scroll_documents = abap_true<br />

parent = r_container<br />

IMPORTING<br />

retcode = wf_retcode.<br />

IF wf_retcode NE c_oi_errors=>ret_ok.<br />

CALL METHOD c_oi_errors=>raise_message<br />

EXPORTING<br />

type = 'E'.<br />

ENDIF.<br />

* Create object for cl_bds_document_set<br />

CREATE OBJECT r_document.<br />

* Get Document with URL<br />

locwa_signature-prop_name = 'DESCRIPTION'.<br />

* Description of the table template in OAOR<br />

locwa_signature-prop_value = l_desc.<br />

APPEND locwa_signature TO locint_signature.<br />

CALL METHOD r_document->get_with_url<br />

EXPORTING<br />

classname = l_clsnam<br />

classtype = l_clstyp<br />

object_key = l_objkey<br />

CHANGING<br />

uris = locint_uris<br />

signature = locint_signature<br />

EXCEPTIONS<br />

nothing_found = 1<br />

error_kpro = 2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!