21.03.2013 Views

Object Oriented ABAP

Object Oriented ABAP

Object Oriented ABAP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

_control TYPE REF TO i_oi_container_control,<br />

r_proxy TYPE REF TO i_oi_document_proxy,<br />

r_error TYPE REF TO i_oi_error,<br />

wf_retcode TYPE soi_ret_string.<br />

************************************************************************<br />

* Selection Screen<br />

************************************************************************<br />

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.<br />

* User will enter the agent ids to be modified<br />

SELECT-OPTIONS: s_agent FOR ysm_agents-agentid OBLIGATORY.<br />

* Details of table template in BDS to be entered<br />

PARAMETERS: p_clsnam TYPE sbdst_classname DEFAULT 'YSM_TESTBDS' OBLIGATORY,<br />

p_clstyp TYPE sbdst_classtype DEFAULT 'OT' OBLIGATORY,<br />

p_objkey TYPE sbdst_object_key DEFAULT 'TEST' OBLIGATORY,<br />

p_desc TYPE char255 DEFAULT 'TABLE TEMPLATE' OBLIGATORY.<br />

SELECTION-SCREEN END OF BLOCK b1.<br />

************************************************************************<br />

* START OF SELECTION<br />

************************************************************************<br />

START-OF-SELECTION.<br />

* Call Excel Inplace Display<br />

CALL SCREEN 100. "Create a screen 100 with custom container 'EXCEL'<br />

************************************************************************<br />

* SCREEN LOGIC<br />

************************************************************************<br />

*&---------------------------------------------------------------------*<br />

*& Module STATUS_0100 OUTPUT<br />

*&---------------------------------------------------------------------*<br />

MODULE status_0100 OUTPUT.<br />

SET PF-STATUS 'STAT100'. "Enable SAVE, BACK, EXIT, CANCEL<br />

SET TITLEBAR 'TITLE100'. "Set title<br />

* Get table data<br />

PERFORM f_get_table_data.<br />

* Open the excel template in BDS in-place<br />

PERFORM f_open_document USING p_clsnam<br />

p_clstyp<br />

p_objkey<br />

p_desc.<br />

* Display table data in the excel template<br />

PERFORM f_dis_table_data.<br />

* Protect the whole sheet except the editable fields<br />

PERFORM f_protect_sheet.<br />

ENDMODULE. " STATUS_0100 OUTPUT<br />

*&---------------------------------------------------------------------*<br />

*& Module USER_COMMAND_0100 INPUT<br />

*&---------------------------------------------------------------------*

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

Saved successfully!

Ooh no, something went wrong!