related page 1
related page 2
related page 3


NOTE: Before beginning, the XLSX Workbench functionality must be available in the your system.

Let’s use standard demo report BCALV_GRID_DEMO is available in the every system (the report demonstrates how to use ALV-Grid control). We will export an output table to the Excel based form.

1 PREPARE A PRINTING PROGRAM.

1.1 Copy standard demo report BCALV_GRID_DEMO to the customer namespace, for example Z_BCALV_GRID_DEMO :

IMAGE_4.PNG

1.2 In the copied report, add new button to GUI-status ‘MAIN100’:

IMAGE_5.PNG

1.3 In the report line number 40, insert next code to processing the new OK-code :

IMAGE_7.PNG

1.4 Activate objects:

IMAGE_8.PNG

2 PREPARE A FORM.

2.1 Launch XLSX Workbench, and in the popup window specify a form name TEST_GRID , and then press the button «Create»:

IMAGE_9.PNG

Empty form will be displayed:

/wp-content/uploads/2014/11/444_19_1_760393.png

2.2 Push button444_19_2.PNGto save the form.

2.3 Assign context FLIGHTTAB to the form:

IMAGE_12.PNG

Herewith, you will be prompted to create a form’s structure automatically (based on context):


We will create form structrure manually,

therefore we should press the button

2.4 Add a «Grid» component into the Sheet:

IMAGE_26.PNG

2.5 Make markup in the Excel template:

IMAGE_38.PNG

2.6 Select the «Grid» component node and go to the Properties tab:

  1. Select the marked cell range in the Excel-template and press the button IMAGE_39.PNG located in the Item «Area in the template»

  2. Press the button IMAGE_39.PNG in the Item «Value» and pick the Context Table (FLIGHTTAB) from the popup-list.
  3. Press the button IMAGE_98.PNG in the Item «Layout options» and choose columns for output.

IMAGE_99.PNG

2.7 Activate form by pressing button444_30.PNG.

3 EXECUTION.


Run your report Z_BCALV_GRID_DEMO; ALV-grid will be displayed :

IMAGE_48.PNG


Press button444_43.PNGto export Grid to Excel form :

IMAGE_49.PNG


To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply