Splitting the Custom Container & Display more than one ALV



Similar documents
ALV List with Radio Buttons

Step by Step Guide for Language Translation Tool

Display Options in Transaction SE16

Web Dynpro: Multiple ALV Grids and Layouts in ALV

Step by Step Guide How to Copy Flat File from Other Application Server to BI and Load through Info Package

Table of Contents. Passing Data across Components through Component Controller between Two Value Nodes

Web Dynpro ABAP: ALV and Table in Popup Window

Mandatory Field Check in Web Dynpro- ABAP

SAP BW - Excel Pivot Chart and Pivot Table report (Excel)

Step by Step Procedure to Block and Debug a CIF Queue Flowing from R/3 to APO System

Creating Transaction and Screen Variants

Quick Viewer: SAP Report Generating Tool

How to Assign Transport Request for Language Translation?

Restricting Search Operators in any Search View

SAP FI - Automatic Payment Program (Configuration and Run)

BW Performance Monitoring

Embedding Crystal Reports inside ECC ALV Reports

SAP CRM System 6.0/7.0. For more information, visit the Customer Relationship Management homepage

Deleting the User Personalization done on Enterprise Portal

Creating Content Using SO10 Objects and Text Symbols

Configuration of Enterprise Services using SICF and SOA Manager

How to Modify, Create and Delete Table Entries from SE16

Creating Web Service from Function Modules/BAPIs & Integrating with SAP Interactive Forms

How to Develop Programs for SAP Mobile RF

Reverse Transport Mechanism in SAP BI

Creating New Unit of Measure in SAP BW

SAP CRM 7.0 E2C Setup: CRM via Toolset

SAP CRM Campaign Automation

Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

First step to Understand a Payroll Schema

ABAP How To on SQL Trace Analysis

ABAP Debugging Tips and Tricks

Table of Content. SAP Query creation and transport Procedure in ECC6

Order Split Usage in Production Orders

How to Generate Stack Xml for Ehp4 and Above Upgrade

Release Strategy Enhancement in Purchase Order

Multi Provider Creation Based on Sales and Planning Info Cubes

Tutorial - Creating Pop Up Window Using New Features in WebDynpro Java CE 7.1 Ehp1

Step by Step Guide to Extract Batch Master Data via Generic and Classification Datasource to BW

ALE Settings, for Communication between a BW System and an SAP System

Extractor in R/3 and Delta Queue

Standard SAP Configuration of SMS through HTTP with Third Party SMS Gateway

Understanding BW Non Cumulative Concept as Applicable in Inventory Management Data Model

This document applies to SAP ECC 6.0, SAP Netweaver 2004s. For more information, visit the Web Dynpro ABAP homepage.

Message handling in SAP CRM Web UI

SAP BI Generic Extraction Using a Function Module

Data Flow from LBWQ/SMQ1 to RSA7 in ECC and Delta Extraction in BI

SAP CRM 7.0 for Newbies: (Part 1) Simple BOL Object Creation for CRM Webclient UI

Deleting the Requests from the PSA and Change Log Tables in Business Intelligence

Deploying Crystal Reports on Top of a SAP BI Query

Understanding BEx Query Designer: Part-2 Structures, Selections and Formulas

Step by Step Procedures to Load Master Data (Attribute and Text) from FlatFile in BI 7.0

How to Create an ecatt?

Step by Step guide of Report-to- Report Interface in BW Reporting

Converting and Exporting Data in XML Format

ABAP Proxy Interfacing

SAP CRM-BW Adapter an Overview

Create Automatic Mail Notification/ Alert for Process Chain Monitoring

Understanding OLAP Processor and RSRT

Workflow Troubleshooting and Monitoring in SAP ECC 6.0

SAP NetWeaver Developer Studio 7.30 Installation Guide

Step by Step Guide to Create a Generic Datasource Based on Infoset Query Populated Via External Program

SAP BW - Generic Datasource Function Module (Multiple Delta Fields)

Creation and Configuration of Business Partners in SAP CRM

Invoice Collaboration: Self Billing Invoice

Upload Data in Web Dynpro Table from a Text File with Delimiters

Currency Conversion using Variables in SAP BI -Reporting

The New ABAP Debugger - An Introduction. Boris Gebhardt Christoph Stoeck SAP AG

Compounding in Infoobject and Analyzing the Infoobject in a Query

Customer Exit Variables in SAP BW/BI Reports First day of the Current/Previous Month

Working with SAP BI 7.0 Data Transfer Process (DTP)

ALV Object Model Simple 2D Table Event Handling

XSLT Mapping in SAP PI 7.1

Configuring HTTPs Connection in SAP PI 7.10

Organizational Management- Organizational Structure Creation

LSMW: Upload Master Data using Batch Input Recording

Drag and Drop Functionality in Web Dynpro ABAP Application

Inventory Management (0IC_C03) Part - 3

SAP MM: Purchase Requisition with Classification and Workflow Approval

Scenario... 3 Step-by-Step Solution Virtual Infocube... 4 Function Module (Virtual InfoCube)... 5 Infocube Data Display... 7

SPDD & SPAU Adjustments Handbook

Step by Step Guide to Archiving and Deleting of XML Messages in SAP NetWeaver PI

Process Controlled Workflow SRM 7.0 (Using BRF)

Transfer of GL Master from Source SAP System to a Target SAP System through IDOCS

Dynamic Authorization Concept and Role Assignment in BI

Step By Step Procedure to Create Logical File Path and Logical File Name

Business Scenario Using GP/Web Dynpro with Back and Forth 3 Level Process and Dynamic Approvers in a Loop

SDN Community Contribution

Forgot or Lock "Administrator or J2EE_ADMIN" Password

SAP Workflow in Plain English

A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1

Multi Level Purchase Order Release Strategy

Salesforce Integration Using PI: How to Perform Query and Other DML Operations Using the Enterprise WSDL

Salesforce.com Integration Using SAP PI: A Case Study

Merge PDF files in ABAP

Consuming Services in SOA Manager

How to Integrate CRM 2007 WebClient UI with SAP NetWeaver Portal

Sales Commission Calculation & Settlement Handling through Order Processing

Query OLAP Cache Optimization in SAP BW

How to Get Work Items from Workflow in your Outlook Inbox

Transcription:

Splitting the Custom Container & Display more than one ALV Applies to: This document applies to SAP ECC 6.0, SAP Netweaver 2004s. For more information, visit the ABAP homepage. Summary This article contains the step by step procedure to guide you to display more than one Internal Table in a Custom Container by splitting it. The requirement is to display 3 different reports in single container. Author: Chinnaiya Pandian Company: HCL AXON Created on: 09 February 2011 Author Bio Chinnaiya Pandian is working for HCL AXON. He is Computer Science Graduate and working on Technologies like ABAP, Web Dynpro ABAP, Floor Plan Manager & SAP Interactive forms 2011 SAP AG 1

Table of Contents Scenario... 3 Step by step Solution... 3 Step 1: Creating Screen... 3 Step 2: Flow Logic... 4 Step 3: Programming Report... 4 Output... 7 Related Content... 8 Disclaimer and Liability Notice... 9 2011 SAP AG 2

Scenario Displaying more than one table in a report by splitting the custom container TABLE 1 TABLE 2 TABLE 3 Step by step Solution Step 1: Creating Screen Go to Screen painter Transaction Code SE51,Create a screen with no 9010,provide description for the screen and click on the Layout Button, Place a Custom container UI element and give name as CCONTAINER now you will have a screen with custom container as below screen shot. Activate the Object. 2011 SAP AG 3

Step 2: Flow Logic Go to the Flow Logic Tab to write coding for PBO & PAI. Step 3: Programming Report Go to SE38 and create a program in Z name space and paste the below code snippet. *& Report ZPC_CONTAINER_CONTROL *& *& *& REPORT zpc_container_control. *~~~ Declaration DATA splitter_1 TYPE REF TO cl_gui_splitter_container. DATA splitter_2 TYPE REF TO cl_gui_splitter_container. DATA container TYPE REF TO cl_gui_custom_container. DATA container_1 TYPE REF TO cl_gui_container. DATA container_2 TYPE REF TO cl_gui_container. DATA container_3 TYPE REF TO cl_gui_container. DATA : gt_sflight_1 TYPE TABLE OF sflight, gt_sflight_2 TYPE TABLE OF sflight, gt_sflight_3 TYPE TABLE OF sflight, g_container TYPE scrfname VALUE 'CCONTAINER', grid1 TYPE REF TO cl_gui_alv_grid, grid2 TYPE REF TO cl_gui_alv_grid, grid3 TYPE REF TO cl_gui_alv_grid. DATA : ok_code TYPE sy-ucomm. * fetching data from table for different internal tables SELECT * FROM sflight INTO TABLE gt_sflight_1. itab 1 SELECT * FROM sflight INTO TABLE gt_sflight_2 UP TO 3 ROWS. itab 2 SELECT * FROM sflight INTO TABLE gt_sflight_3 UP TO 2 ROWS. itab 3 CALL SCREEN 9010. *& Module STATUS_9010 OUTPUT 2011 SAP AG 4

* text *----------------------------------------------------------------------* MODULE status_9010 OUTPUT. SET PF-STATUS 'TEST'. * SET TITLEBAR 'TESTBAR'. * creating object reference for container CREATE OBJECT container container_name = 'CCONTAINER'. " pass name of the container created in Screen no 9010 *Spliting the main container in to 1 row & 2 coloum CREATE OBJECT splitter_1 parent = container rows = 1 columns = 2. *getting the reference for the splited container( row 1 & col 1 container ) CALL METHOD splitter_1->get_container row = 1 column = 1 RECEIVING container = container_1. *getting the reference for the splited container (row 1 & col 2 container) CALL METHOD splitter_1->get_container row = 1 column = 2 RECEIVING container = container_2. * now spliting the 2nd coloum container in to 2 rows & 1 coloum CREATE OBJECT splitter_2 parent = container_2 rows = 2 columns = 1. *getting the reference for the splited container2 ( row 1 & col 2 container ) CALL METHOD splitter_2->get_container row = 1 column = 1 RECEIVING container = container_2. *getting the reference for the splited container2 ( row 2 & col 1 container ) CALL METHOD splitter_2->get_container row = 2 column = 1 RECEIVING container = container_3. * Populating first internal table to the container CREATE OBJECT container 2011 SAP AG 5

container_name = g_container. CREATE OBJECT grid1 i_parent = container_1. CALL METHOD grid1->set_table_for_first_display i_structure_name = 'SFLIGHT' CHANGING it_outtab = gt_sflight_1. * Populating second internal table CREATE OBJECT container container_name = g_container. CREATE OBJECT grid2 i_parent = container_2. CALL METHOD grid2->set_table_for_first_display i_structure_name = 'SFLIGHT' CHANGING it_outtab = gt_sflight_2. ** Populating third internal table CREATE OBJECT container container_name = g_container. CREATE OBJECT grid3 i_parent = container_3. CALL METHOD grid3->set_table_for_first_display i_structure_name = 'SFLIGHT' CHANGING it_outtab = gt_sflight_3. * * ENDIF. ENDMODULE. " STATUS_9010 OUTPUT *& Module EXIT INPUT * text *----------------------------------------------------------------------* MODULE exit INPUT. * free the container memory when exit CALL METHOD container->free. LEAVE PROGRAM. ENDMODULE. " EXIT INPUT *& Module USER_COMMAND_9010 INPUT * text *----------------------------------------------------------------------* 2011 SAP AG 6

MODULE user_command_9010 INPUT. CALL METHOD cl_gui_cfw=>dispatch. CASE ok_code. WHEN 'BACK'. LEAVE SCREEN. WHEN 'CANCEL'. LEAVE PROGRAM. WHEN 'EXIT'. LEAVE SCREEN. ENDCASE. ENDMODULE. " USER_COMMAND_9010 INPUT Output The report will display as below screen shot. 2011 SAP AG 7

Related Content SAP HELP ABAP Wiki WDAbap OVS search Help In Select Option For more information, visit the ABAP homepage. 2011 SAP AG 8

Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document. 2011 SAP AG 9