..2 Form

The Form's source is here .

How to import Form into the system see here . 



Create and save a new form

Launch an XLSX Workbench, and create a new form with name ROWSPAN_2 .


Assign a context to the form


Assign a context ZCONTEXT_SUBTOTALS to the form. When an automatically creation of the Form structure will be prompted, you should press the button   to create a structure manually.


Markup of template

Markup an Excel-template as shown below :

 


Create a Form structure

Add a component «Grid» under the component «Sheet»:




Template binding

Assign component «Grid» to the marked-up area of Excel-template :


ABAP Export Grid to Excel


Context binding

Assign component «Grid» to the context root node, according to scheme below :



It's quite easy to do :




Specify the column set of «Grid» .

In the Properties tab, in the «Layout options» item You have to press button , after that popup-screen will be shown. The popup-screen contains two lists:

  • In the Left list are columns (respecting desired order) that should be shown in the Printing form

  • In the Right list are rest available grid columns.

Move required grid columns from right list to the left list and arrange them in required order :



Activate the Form by pressing a button 

Form is ready to use.


Explanations

This example explains that, it is enough a single component «Grid» to insert table into the Printing form.  
You only need to assign it to the the template area and assign it to the table of context, and then just choose displayed columns from the list.
 
Properties tab of the «Grid» :