Function Module to Create Logo

Similar documents
A Simple search program for Dictionary objects

Triggering the Process Chains at Particular Date using Events

SDN Community Contribution

How to Create Tables in MaxDB using SQL Studio

Using Radio Buttons in Web Template

ABAP Code Sample to Attach F1 and F4 Help Fields in ALV Grid

SDN Community Contribution

Applies To:...1. Summary...1. Table of Contents...1. Procedure..2. Code... Error! Bookmark not defined.0

Integration of Web Dynpro for ABAP Application in Microsoft Share Point Portal

POWL: Infoset Generation with Web Dynpro ABAP

SDN Community Contribution

How to use Boolean Operations in the Formula as Subsidiary for IF Condition

BW 3.1 Open Hub Extraction Enhancement: Using Literal Filename & Path

Selection-Screen Design

Limitation in BAPI Scheduling Agreement (SA) Create or Change

Open Text DocuLink Configuration - To Access Documents which are Archived using SAP

Customizing Characteristic Relationships in BW-BPS with Function Modules

Step by Step Procedure for DSO Creation

Using Customer Exit Variables in BW/BI Reports: Part - 14

Hierarchy in Business Objects with Expanded Hierarchy Logic

Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports

Extraction of Hierarchy into Flat File from R/3 and Loading in BW System

Information Broadcasting Part 3 Scheduling the First Report

Creating a Development Component

How to Create Top of List and End of List of the ALV Output in Web Dynpro for ABAP

Linking Documents with Web Templates

Procedure to Trigger Events in Remote System Using an ABAP Program

SMT (Service Mapping Tool)

Standalone BW System Refresh

Developing Crystal Reports on SAP BW

Using Query Extract to Export Data from Business warehouse, With Pros and Cons Analyzed

Step By Step: the Process of Selective Deletion from a DSO

Graphical Mapping Technique in SAP NetWeaver Process Integration

This article explains the steps to create a Move-in letter using Print Workbench and SAPScripts.

DB Connect with Delta Mechanism

Displaying SAP Transaction as Internet Application in Portal

How to Create and Execute Dynamic Operating System Scripts With XI

Restricting F4 (Input Help) Values While Running a SAP BW Query

Freely Programmed Help- Web Dynpro

ABAP Code Sample for Data Browser Using ALV Grid

Using Customer Exit Variables in BW/BI Reports: Part - 4

Material Master Archiving in Simple Method

Table Row Popup in Web Dynpro Component

Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable

SAP BW Copy Existing DTP for Data Targets

How to Display Result Row in One Line While Reporting On Multiproviderer

How to Extend an Outbound IDoc

Routines in SAP BI 7.0 Transformations

Download SAP Query Output to Local/ Network Folders in Background

Step by Step Guide How to Use BI Queries in Visual Composer

Easy Lookup in Process Integration 7.1

Setting up Connection between BW and R/3 for Data Load

Customized Transaction to Trigger Process Chain from Failed Step

Step by Step Guide to Creating a Process Type to Close an Open Request in a Cube in BI 7.0

Validity Table in SAP BW/BI

How to Default Variant Created for Report Developed In Report Painter/Writer

MDM Syndicator: Custom Items Tab

Errors while Sending Packages from OLTP to BI (One of Error at the Time of Data Loads through Process Chains)

SAP BI BO Unit/Currency Logic for Unknown Units Case Study

Data Extraction & DS Enhancement in SAP BI Step by Step

Replacement Path: Explained with an Illustrated Example

Reporting Duplicate Entries

How to Create your Own Rule in Workflow?

Extracting Missing Fields of Data Source Which Are Present In Their Extract Structure

Step by Step Guide on How to Use Cell Definition in BEx Query

Material Listing and Exclusion

Creating, Configuring and Testing a Web Service Based on a Function Module

Data Flow During Different Update Mode in LO Cockpit

ABAP Code - Recipients (Specific Format) SAP BW Process Chain

Maintaining Roles and Authorizations in BI7.0 - RSECADMIN

SDN Community Contribution

How to Create View on Different Tables and Load Data through Generic Datasource based on that View

About ITAB Duplicate_Key (SAP lrsaods) Runtime Error

Using Nested Exception Aggregation in BEx Reports- Scenario

Currency Translation in SAP BI Step by step Guide

MDM Import Manager - Taxonomy Data (Attribute Text Values) Part 3

Custom Process types Remote Trigger and End Time

To Check the Files/Reports in Application Server and Trigger Mail Alerts

Creation of Key Figures with Higher Decimal Place Precision

Template Designer: Create Automatic PDF Documents for Attachment or Print Purpose

A Step-by-Step Guide on IDoc-ALE between Two SAP Servers

How to Configure User Status in mysap SRM

Internationalization in WebDynpro ABAP Applications

How to Display Traffic Lights for Exceptions in BI Web Reports

Data Mining: Scoring (Linear Regression)

Purpose of Goods Receipt Message indicator in Purchase Orders

Recreating BIA Indexes to Address the Growth of Fact Index Table

Implying Security on Business Object XI 3.1 Universe having SAP BW as Source

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

Process Chain Log Deletion

Implementing a BAdI in an Enhancement Project (CMOD)

Creating Custom SU01 Transaction Code with Display and Password Reset Buttons

ABAP Code Sample to Display Data in ALV Grid Using Object-Oriented Programming

Database Statistics During ODS Activation

Step by Step Method for File Archival in BW

Xcelsius Tricks Part 5 Create a Loading Bar in SAP Crystal Dashboard and Presentation Design (Xcelsius 2008)

SAP BW vs. SAP BusinessObjects Web Intelligence Functionalities

Implementing Customer Exit Reporting Variables as Methods

ecatt Part 6 System Data Container

Add /Remove Links on ESS Home Page in Business Package 1.5

Transcription:

Applies To: SAP 4.0-4.7 Summary Utilities Function Module to create a Logo on a Custom Control Container. By: Arpit Nigam Company and Title: Hexaware Tech. Ltd., SAP Consultant Date: 26 Sep 2005 Table of Contents Applies To:... 1 SAP 4.0-4.7... 1 Summary... 1 Table of Contents... 1 Usage... 1 Sample Code... 1 Disclaimer & Liability Notice... 6 Author Bio... 6 Usage This useful Function Module avoids unnecessary coding to implement a Logo on a Custom Control Container. Use the module to easily implement the logo. Sample Code Screen Shots. Import Parameters: NAME LIKE W3QUERY-NAME '_OBJECT_ID' Name for WWW query string name/value pair VALUE LIKE W3QUERY-VALUE Value for WWW query string name/value pair CONTAINER TYPE C 2005 SAP AG 1

2005 SAP AG 2

FUNCTION ZVAS_CUSTOM_CONTROL_CREATE. *"---------------------------------------------------------------------- *"*"Local interface: *" IMPORTING *" VALUE(NAME) LIKE W3QUERY-NAME DEFAULT '_OBJECT_ID' *" VALUE(VALUE) LIKE W3QUERY-VALUE *" VALUE(CONTAINER) TYPE C *" *" ERROR *"---------------------------------------------------------------------- *PROGRAM... ZVAS_CUSTOM_CONTROL_CREATE * *TITLE... FM to create Logo * *AUTHOR... ARPIT NIGAM * *Package... Z001 * *Request Number. * *PROGRAM TYPE...Function Module * *DESCRIPTION: This FM serves the automatic creation of Logo on * Custom Control * 2005 SAP AG 3

* MODIFICATION HISTORY * * Date Name Transport Description * * MM/DD/YY Request * *$$ GLOBAL VARIABLES DATA: QUERY_TABLE TYPE STANDARD TABLE OF W3QUERY WITH header line, HTML_TABLE type STANDARD TABLE OF W3HTML, RETURN_CODE type W3PARAM-RET_CODE, CONTENT_TYPE type W3PARAM-CONT_TYPE, CONTENT_LENGTH type W3PARAM-CONT_LEN, PIC_DATA type W3MIME OCCURS 0, PIC_SIZE type I. * DATA: CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER. DATA: PICTURE TYPE REF TO CL_GUI_PICTURE. DATA: LOGO_CONTAINER DATA: LOGO TYPE REF TO CL_GUI_CUSTOM_CONTAINER. TYPE REF TO CL_GUI_PICTURE. DATA: URL(255) TYPE C. * Appending to query table QUERY_TABLE-NAME = NAME. QUERY_TABLE-VALUE = VALUE. APPEND QUERY_TABLE. *$$ CREATE THE CUSTOM CONTAINER CREATE OBJECT LOGO_CONTAINER CONTAINER_NAME = CONTAINER OTHERS = 1. IF SY-SUBRC <> 0. RAISE ERROR. CHECK SY-SUBRC IS INITIAL. *$$ CREATE THE SAP PICTURE CONTROL CREATE OBJECT LOGO PARENT = LOGO_CONTAINER OTHERS = 1. IF SY-SUBRC <> 0. RAISE ERROR. CHECK SY-SUBRC IS INITIAL. CALL FUNCTION 'WWW_GET_MIME_OBJECT' 2005 SAP AG 4

TABLES QUERY_STRING = QUERY_TABLE HTML = HTML_TABLE MIME = PIC_DATA CHANGING RETURN_CODE = RETURN_CODE CONTENT_TYPE = CONTENT_TYPE CONTENT_LENGTH = CONTENT_LENGTH OBJECT_NOT_FOUND = 1 PARAMETER_NOT_FOUND = 2 OTHERS = 3. IF SY-SUBRC = 0. PIC_SIZE = CONTENT_LENGTH. ELSE. RAISE ERROR. *$$ GET THE ITERNAL TABLE GENERATED BY THE DATA PROVIDER CALL FUNCTION 'DP_CREATE_URL' TYPE = 'IMAGE' SUBTYPE = CNDP_SAP_TAB_UNKNOWN SIZE = PIC_SIZE LIFETIME = CNDP_LIFETIME_TRANSACTION TABLES DATA = PIC_DATA CHANGING URL = URL OTHERS = 1. *$$ SEND DATA TO FRONTEND CALL METHOD LOGO->LOAD_PICTURE_FROM_URL URL = URL OTHERS = 1. ENDFUNCTION. Usage: CALL FUNCTION 'ZVAS_CUSTOM_CONTROL_CREATE' NAME = '_OBJECT_ID' VALUE = 'ZLOGO' --------- Name of the Logo CONTAINER = 'LOGO' --------- Name of the Custom Control 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. 2005 SAP AG 5

Disclaimer & Liability Notice This document may discuss sample coding, which does not include official interfaces and therefore is not supported. 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 of the code and methods suggested here, and anyone using these methods, is doing it under his/her own responsibility. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of the technical article, including any liability resulting from incompatibility between the content of the technical article and the materials and services offered by SAP. You agree that you will not hold SAP responsible or liable with respect to the content of the Technical Article or seek to do so. Author Bio Arpit is an experienced consultant in application software design, development, scope analysis and integration for business applications requirements. He has been involved in SAP R/3 - ABAP/4, to develop reports, transactions, function modules, layout sets, queries, debugging, Workflows, and batch-input programs, Exit Writing, ALE, IDOC and EDI. As a BW consultant he has been involved in BW architecture, data modeling and BEx Analyzer. His technical abilities are backed by remarkable academic background. Copyright 2005 SAP AG, Inc. All Rights Reserved. SAP, mysap, mysap.com, xapps, xapp, 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 in several other countries all over the world. All other product, service names, trademarks and registered trademarks mentioned are the trademarks of their respective owners. 2005 SAP AG 6