Applies to: SAP ABAP Workbench that supports Web Dynpro development. For more information, visit the Web Dynpro ABAP homepage. Summary This article explains how to pass parameters via Web Dynpro Application. In general, data can be shared via context of different controller only in the same session (i.e. in the same web page) but data cannot be shared between two different sessions (i.e. two different web pages). So to pass the data between two different sessions, we pass data through the web Dynpro Application (URL). Author: Sankar Gelivi Company: Incture Technologies Created on: April 1 2013 Author Bio Sankar Gelivi is working with Incture Technologies as a Senior Net Weaver ABAP Consultant. He has over 3 years of experience in developing applications using ABAP, Web Dynpro ABAP, POWL and FPM.
TABLE OF CONTENTS SUMMARY... 1 AUTHOR BIO... 1 PRE-REQUISITES:... 3 REQUIREMENT:... 3 COMPONENT CREATION:... 3 OUTPUT1:..... 7 OUTPUT2:..... 7 RELATED CONTENT... 8 COPYRIGHT... ERROR! BOOKMARK NOT DEFINED. 2
PRE-REQUISITES: Basic knowledge in Web Dynpro ABAP concepts like context mapping and calling the web dynpro component using external window. BASIC INFORMATION: Generally, we use context mapping for sharing data between the views of same component or different components. Data can be passed via context only in a same session but data cannot be passed or accessed between different sessions via context mapping. For accessing the data between the different sessions, we have to pass parameters via Web Dynpro Application (URL). REQUIREMENT: Display the list of materials in the application 1 and then display the sales item details of the selected material in the new page (new session) COMPONENT CREATION: 1. Create a Component YSG_MATERIAL with a view and a window and embed view to the respective window. a. View 1 : V_Main Window 1 : W_Main 2. Create a node MATERIAL with cardinality 0-n and design layout with a table in the MAIN view. 3. Implement logic in WDDOINIT( ) to display list of materials in the table, when the application is called 4. Activate and execute the application 3
5. Create component YSG_SALES with a view and a window. a. View: V_MAIN Window: W_MAIN 6. Create node SALES in the component controller with the cardinality 1-1 7. Define context mapping with the node sales in V_MAIN and W_MAIN View Window 4
8. Design the view with a Form 9. Define parameters and business logic in the HANDLEDEFAULT( ) of a window W_MAIN 10. Save and active the component 5
11. On click of the material, sales item details should be displayed. 12. Implement the logic in the onaction event of the LINK_TO_ACTION UI element of the YSG_MATERIAL component 6
Output1: Output 2: Click on the M-16 material link 7
RELATED CONTENT http://scn.sap.com/community/web-dynpro-abap http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0b01544-4ecb-2e10-30aad8e1286c4022?quicklink=index&overridelayout=true&52355651383494 8
www.sap.com 2013 SAP AG. All rights reserved. SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork, SAP HANA, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company. Sybase and Adaptive Server, ianywhere, Sybase 365, SQL Anywhere, and other Sybase products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase Inc. Sybase is an SAP company. Crossgate, m@gic EDDY, B2B 360, and B2B 360 Services are registered trademarks of Crossgate AG in Germany and other countries. Crossgate is an SAP company. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.