Display Popup Window and Dialog Box in ALV



Similar documents
Step by Step Guide for Language Translation Tool

Application Logging in SAP Using ABAP

ALV List with Radio Buttons

Display Options in Transaction SE16

Embedding Crystal Reports inside ECC ALV Reports

Offsetting Account Description in FBL3N and FAGLL03 GL Line Item Display Reports

SAP BI Generic Extraction Using a Function Module

Release Strategy Enhancement in Purchase Order

Web Dynpro ABAP: ALV and Table in Popup Window

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

Reverse Transport Mechanism in SAP BI

Creating Content Using SO10 Objects and Text Symbols

Web Dynpro: Multiple ALV Grids and Layouts in ALV

Splitting the Custom Container & Display more than one ALV

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

Quick Viewer: SAP Report Generating Tool

Step by Step Guide to Fiscal Week and Fiscal Quarter

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

How to Assign Transport Request for Language Translation?

Creating Transaction and Screen Variants

How to Modify, Create and Delete Table Entries from SE16

SAP FI - Automatic Payment Program (Configuration and Run)

ABAP Proxy Interfacing

BW Performance Monitoring

Restricting Search Operators in any Search View

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

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

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

Mandatory Field Check in Web Dynpro- ABAP

ABAP Debugging Tips and Tricks

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

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

A Wrapper to Call Dynamically Function via RFC

ABAP How To on SQL Trace Analysis

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

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

Compounding in Infoobject and Analyzing the Infoobject in a Query

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

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

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

How to Generate Stack Xml for Ehp4 and Above Upgrade

SAP CRM 7.0 E2C Setup: CRM via Toolset

Creation and Configuration of Business Partners in SAP CRM

Creating New Unit of Measure in SAP BW

Extractor in R/3 and Delta Queue

Configuration of Enterprise Services using SICF and SOA Manager

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

How to Develop Programs for SAP Mobile RF

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

Creating Mobile Applications on Top of SAP, Part 1

Process Controlled Workflow SRM 7.0 (Using BRF)

SAP CRM Campaign Automation

Changing Partner s Address Data of the Sales Order

Guidelines for Effective Data Migration

Provisional Master Data in Integrated Business Planning for SAP Simple Finance An Example-Based How-To Guide

Dynamic Authorization Concept and Role Assignment in BI

SAP NetWeaver Developer Studio 7.30 Installation Guide

Create Automatic Mail Notification/ Alert for Process Chain Monitoring

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

SAP Workflow in Plain English

Deleting the User Personalization done on Enterprise Portal

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

Workflow Troubleshooting and Monitoring in SAP ECC 6.0

Merge PDF files in ABAP

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

Converting and Exporting Data in XML Format

SPDD & SPAU Adjustments Handbook

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

Working with SAP BI 7.0 Data Transfer Process (DTP)

Salesforce.com Integration Using SAP PI: A Case Study

XSLT Mapping in SAP PI 7.1

How to Integrate CRM 2007 WebClient UI with SAP NetWeaver Portal

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

How to Get Work Items from Workflow in your Outlook Inbox

BOM Header and Item Extraction in SAP - Business Intelligence

SDN Community Contribution

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

Invoice Collaboration: Self Billing Invoice

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

Organizational Management- Organizational Structure Creation

Multi Provider Creation Based on Sales and Planning Info Cubes

This article demonstrates in a step-by-step process to write ABAP Reports that use BAPI function modules.

Deploying Crystal Reports on Top of a SAP BI Query

Step by Step Process of Preparing with HTML body and HTML Attachment

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

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

SAP MM: Purchase Requisition with Classification and Workflow Approval

Creating and Scheduling Publications for Dynamic Recipients on SAP Business Objects Enterprise

Sending an Image File Through XI in a File-to-Mail Scenario

First step to Understand a Payroll Schema

Web Application Designer for Beginners

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

How to Create an ecatt?

Currency Conversion using Variables in SAP BI -Reporting

Order Split Usage in Production Orders

Connecting to SAP BW with Microsoft Excel PivotTables and ODBO

SAP BW Configuration Basic System Settings

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

Data Extraction and Retraction in BPC-BI

Using PI to Exchange PGP Encrypted Files in a B2B Scenario

Transcription:

Display Popup Window and Dialog Box in ALV Applies to: SAP ECC 6.0, SAP Net weaver 2004s. Summary This document explains how to display an ALV in a popup and dialog box.from the popup the required entries can be displayed in a dialog box. Author: Christy Jacob Company: Applexus Technologies Pvt.Ltd. Created on: 30 June 2011 Author Bio Christy Jacob,SAP ABAP Consultant with Applexus Technologies. 2011 SAP AG 1

Table of Contents Introduction... 3 Purpose... 3 Technical Process.... 3 Step by step solution... 3 1. Creating a Program... 3 2. Program... 3 Output.... 7 Conclusion.... 8 Related Content... 9 Disclaimer and Liability Notice... 10 2011 SAP AG 2

Introduction The article is about ALV display in popup window and dialog box.from the popup window the required data can be selected and viewed in the dialog box. Purpose If data needs to be selected from a popup and corresponding details displayed Technical Process. Step by step solution 1. Creating a Program Go to SE38 and create an Z report progam as below. 2. Program REPORT zsapr_alvpopdialog. *& Type-pools declaration * TYPE-POOLS : slis. *& Types declaration * TYPES : BEGIN OF ty_final, matnr TYPE matnr, ersda TYPE ersda, ernam TYPE ernam, mtart TYPE mtart, mbrsh TYPE mbrsh, matkl TYPE matkl, maktx TYPE maktx, checkbox(1), END OF ty_final. * Internal table and work area for table MARA DATA : t_mara TYPE TABLE OF mara, x_mara TYPE mara. * Internal table and work area for table MAKT DATA : t_makt TYPE TABLE OF makt, x_makt TYPE makt. * Internal table and work area for output in pop-up DATA : t_final TYPE TABLE OF ty_final, x_final TYPE ty_final. * Internal table and work area for ALV dialog display DATA : t_dialog TYPE TABLE OF ty_final, x_dialog TYPE ty_final. 2011 SAP AG 3

* for ALV display DATA : t_fieldcat1 TYPE slis_t_fieldcat_alv, t_fieldcat2 TYPE slis_t_fieldcat_alv, t_layout TYPE slis_layout_alv, x_fieldcat1 TYPE slis_fieldcat_alv, x_fieldcat2 TYPE slis_fieldcat_alv. * Subroutine for data fetching PERFORM data_fetch. * Subroutine for pop-up display PERFORM popup_disp. * Subroutine for dialog display PERFORM dialog_disp. *& Form DATA_FETCH * text * --> p1 text * <-- p2 text FORM data_fetch. *Fetch materials and related data from table MARA SELECT matnr ersda ernam mtart mbrsh matkl FROM mara INTO CORRESPONDING FIELDS OF TABLE t_mara WHERE mbrsh = 'M'AND ernam = 'D046387'. IF t_mara IS NOT INITIAL. *Fetch description of materials from table MAKT SELECT matnr maktx FROM makt INTO CORRESPONDING FIELDS OF TABLE t_makt FOR ALL ENTRIES IN t_mara WHERE matnr = t_mara-matnr. ENDIF. * Appending the selected values in to the final table LOOP AT t_mara INTO x_mara. x_final-matnr = x_mara-matnr. x_final-ersda = x_mara-ersda. x_final-ernam = x_mara-ernam. x_final-mtart = x_mara-mtart. x_final-mbrsh = x_mara-mbrsh. x_final-matkl = x_mara-matkl. 2011 SAP AG 4

READ TABLE t_makt INTO x_makt WITH KEY matnr = x_mara-matnr. x_final-maktx = x_makt-maktx. APPEND x_final TO t_final. CLEAR x_final. ENDLOOP. ENDFORM. " DATA_FETCH *& Form POPUP_DISP * text * --> p1 text * <-- p2 text FORM popup_disp. * Fieldcatelog for popup using macros CLEAR x_fieldcat1. DEFINE fieldcat1. x_fieldcat1-row_pos = &1. x_fieldcat1-col_pos = &2. x_fieldcat1-fieldname = &3. x_fieldcat1-tabname = &4. x_fieldcat1-seltext_m = &5. x_fieldcat1-outputlen = &6. append x_fieldcat1 to t_fieldcat1. clear x_fieldcat1. END-OF-DEFINITION. fieldcat1 1 1 'CHECKBOX' 'T_FINAL' 'Select' ' '. fieldcat1 1 2 'MATNR' 'T_FINAL' 'Material Number' 10. fieldcat1 1 3 'MAKTX' 'T_FINAL' 'Description' 22. * Function module for ALV popup CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT' EXPORTING i_title = 'MATERIAL SELECTION' i_zebra = 'X' i_checkbox_fieldname = 'CHECKBOX' i_tabname = 'T_FINAL' it_fieldcat = t_fieldcat1 i_callback_program = sy-repid TABLES t_outtab = t_final EXCEPTIONS PROGRAM_ERROR = 1 OTHERS = 2. * Appending the selected materials into the internal table LOOP AT t_final INTO x_final WHERE checkbox = 'X'. x_dialog-matnr = x_final-matnr. 2011 SAP AG 5

x_dialog-ersda = x_final-ersda. x_dialog-ernam = x_final-ernam. x_dialog-mtart = x_final-mtart. x_dialog-mbrsh = x_final-mbrsh. x_dialog-matkl = x_final-matkl. x_dialog-maktx = x_final-maktx. APPEND x_dialog TO t_dialog. CLEAR x_dialog. ENDLOOP. ENDFORM. " POPUP_DISP *& Form DIALOG_DISP * text * --> p1 text * <-- p2 text FORM dialog_disp. * Fieldcatelog for dialog box using macros CLEAR x_fieldcat2. DEFINE fieldcat2. x_fieldcat2-row_pos = &1. x_fieldcat2-col_pos = &2. x_fieldcat2-fieldname = &3. x_fieldcat2-tabname = &4. x_fieldcat2-seltext_m = &5. x_fieldcat2-outputlen = &6. append x_fieldcat2 to t_fieldcat2. clear x_fieldcat2. END-OF-DEFINITION. fieldcat2 1 1 'MATNR' 'T_DIALOG' 'Material Number' 19. fieldcat2 1 2 'ERSDA' 'T_DIALOG' 'Created On' 9. fieldcat2 1 3 'ERNAM' 'T_DIALOG' 'Name of Person' 14. fieldcat2 1 4 'MTART' 'T_DIALOG' 'Material Type' 11. fieldcat2 1 5 'MBRSH' 'T_DIALOG' 'Industry Sector' 12. fieldcat2 1 6 'MAKTX' 'T_DIALOG' 'Description' 25. * Layout for ALV grid display t_layout-zebra = 'X'. * Function module for ALV grid display CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING i_callback_program = sy-repid i_grid_title = 'MATERIAL DETAILS' is_layout = t_layout it_fieldcat = t_fieldcat2 TABLES t_outtab = t_dialog 2011 SAP AG 6

EXCEPTIONS PROGRAM_ERROR = 1 OTHERS = 2. IF sy-subrc <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. ENDFORM. " DIALOG_DISP Output. ALV popup display of materials and its description. 2011 SAP AG 7

Click the checkbox in the popup for selecting required materials fields ALV dialog box display of the selected materials Conclusion. Required fields can be displayed in an ALV dialog box after selecting the required checkbox in the ALV popup. 2011 SAP AG 8

Related Content ALV Tutorial ALV Programming ALV 2011 SAP AG 9

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 10