EJEMPLO IMPRESIÓN PDF desde llamada RFC a SAP utilizando una variable binaria SAP (XSTRING)



Similar documents
Mandatory Field Check in Web Dynpro- ABAP

SRFax Fax API Web Services Documentation

Visual basic string search function, download source code visual basic 6.0 gratis. > Visit Now <

Building a Multi-Threaded Web Server

Developer Guide. Android Printing Framework. ISB Vietnam Co., Ltd. (IVC) Page i

Manual Steps for SAP note

ABAP. Finding Appropriate Abstractions for Business Application Programming. Horst Keller, SAP AG Tobias Wenner, SAP AG

Schema Classes. Polyhedra Ltd

Web Services API Developer Guide

ALV List with Radio Buttons

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

B A S I C S C I E N C E S

BC - XBP Background Processing, Job Scheduling System Test Catalogue for BC-XBP 6.10 (Version 2.0) and BC-XBP 7.0 (Version 3.0)

Problem 1 (2.5 points)

Writing Bluetooth Mobile Apps

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

Migration Instructions for MS Dynamics CRM

Cabot Consulting Oracle Solutions. The Benefits of this Approach. Infrastructure Requirements

Global Search Developers Guide. Rev 2.7.5

Making SAP Information Steward a Key Part of Your Data Governance Strategy

First Java Programs. V. Paúl Pauca. CSC 111D Fall, Department of Computer Science Wake Forest University. Introduction to Computer Science

Illustration 1: Diagram of program function and data flow

Unit Testing & JUnit

DEPLOYMENT GUIDE DEPLOYING F5 WITH SAP NETWEAVER AND ENTERPRISE SOA

SAP" Interactive Forms by Adobe*

µtasker Document FTP Client

Services. Relational. Databases & JDBC. Today. Relational. Databases SQL JDBC. Next Time. Services. Relational. Databases & JDBC. Today.

HP Service Manager. Software Version: 9.40 For the supported Windows and Linux operating systems. Request Management help topics for printing

How To Use Syntheticys User Management On A Pc Or Mac Or Macbook Powerbook (For Mac) On A Computer Or Mac (For Pc Or Pc) On Your Computer Or Ipa (For Ipa) On An Pc Or Ipad

CREATING AN IMAGE FROM AUTOCAD CADD NOTE 16. MENU: AutoCAD, File, Plot COMMAND: plot ICON:

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

How To Use Senior Systems Cloud Services

Message handling in SAP CRM Web UI

Splitting the Custom Container & Display more than one ALV

PE Training and Event Management. SAP ERP Central Component

SAP BI Generic Extraction Using a Function Module

RT Support Ticket System

Working with the ERP Integration Service of EMC Documentum Process Services for SAP

Using CertAgent to Obtain Domain Controller and Smart Card Logon Certificates for Active Directory Authentication

Installation Description

Brekeke PBX Web Service

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

Reach 4 million Unity developers

Forensic Analysis of Internet Explorer Activity Files

Using scanners with Axapta Document Management

CHAPTER 10: WEB SERVICES

Application Development with TCP/IP. Brian S. Mitchell Drexel University

Implementing Object Tracking on Cisco IOS XR Software

LabVIEW Internet Toolkit User Guide

Pilot CSI Project Setup Guide

DEVELOPING DATA PROVIDERS FOR NEEDFORTRADE STUDIO PLATFORM DATA PROVIDER TYPES

SQL Server 2005 Reporting Services (SSRS)

Web Service Caching Using Command Cache

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

PRESTASHOP VTIGER CRM CONNECTOR

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation

Image Verification. Finding Feature Information. Restrictions for Image Verification

Configuring AnyConnect VPN Client Connections

Using the Studio Source Control Hooks

DB2 Web Query Interfaces

SMTP-32 Library. Simple Mail Transfer Protocol Dynamic Link Library for Microsoft Windows. Version 5.2

BSc (Hons) Business Information Systems, BSc (Hons) Computer Science with Network Security. & BSc. (Hons.) Software Engineering

Damian Kolasa. Summary. Experience. Freelancer SAP ABAP programmer ABAP developer ERP Specialist

Deploying the BIG-IP System v10 with SAP NetWeaver and Enterprise SOA: ERP Central Component (ECC)

COSC344 Database Theory and Applications. Java and SQL. Lecture 12

13 File Output and Input

ESCI 386 IDL Programming for Advanced Earth Science Applications Lesson 6 Program Control

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

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

EPM2000 LabVIEW Building Applications Instructions

Document Management: Document Imaging System Setup

Web Application Report

Visual Basic Programming. An Introduction

SQL Server An Overview

... Introduction... 17

ControlCenter WebCenter

WESTMORELAND COUNTY PUBLIC SCHOOLS Integrated Instructional Pacing Guide and Checklist Computer Math

Adobe Document Service Configuration and Troubleshooting Guide

The following program is aiming to extract from a simple text file an analysis of the content such as:

ADOBE READER AND ACROBAT

Next Generation ABAP Development

Create a New Stock Item. Click Stock on top bar of buttons on main screen. To enter a new stock item onto the system click New.

Kofax Export Connector for Microsoft SharePoint

White Paper. The integration of Formate and Alchemy

SAP Senior Consultant Master of Engineering Diploma in business administration

sngraph * Optimal software to manage scale-free networks

Copyright Bizagi. Change Management Construction Document Bizagi Process Modeler

Using XACML Policies to Express OAuth Scope. Hal Lockhart Oracle June 27, 2013

AT&T VERIFY CONNECT (V3.2.0) GETTING STARTED GUIDE FOR MOBILE SDK

Data Mailbox. support.ewon.biz. Reference Guide

ClientAce WPF Project Example

HP Service Manager. Software Version: 9.40 For the supported Windows and Linux operating systems. Application Setup help topics for printing

s sent to the FaxFinder fax server must meet the following criteria to be processed for sending as a fax:

Web Server Manual. Mike Burns Greg Pettyjohn Jay McCarthy November 20, 2006

Mini Project Report ONLINE SHOPPING SYSTEM

Level 3 Develop software using Java (7266/ )

DocuSign for SharePoint

by NetMedia, Inc. All rights reserved. Basic Express, BasicX, BX-01, BX-24 and BX-35 are trademarks of NetMedia, Inc. 2.

User Guide. Trade Finance Global. Reports Centre. October nordea.com/cm OR tradefinance Name of document 8/8 2015/V1

gomobi Traffic Switching Guide Version 0.9, 28 September 2010

Transcription:

En SAP R/3. EJEMPLO IMPRESIÓN PDF desde llamada RFC a SAP utilizando una variable binaria SAP (XSTRING) Crear formulario Z_TEST2 con transacción SFP Entonces si tenemos function RFC function zhr1_certs_via_portal_action. *"---------------------------------------------------------------------- *"*"Local Interface: *" IMPORTING *" VALUE(REQUESTOR_ID) TYPE UNAME *" VALUE(I_ACTION) TYPE CHAR10 *" VALUE(I_FORM) TYPE NUMC01 OPTIONAL *" EXPORTING *" VALUE(E_PDF) TYPE XSTRING *" EXCEPTIONS *" PERNR_NOT_FOUND *" RUT_NOT_FOUND *" CONTRACT_DATE_NOT_FOUND *" PAYMENT_NOT_FOUND *" SHIFT_NOT_FOUND *" ASSET_NOT_FOUND *"---------------------------------------------------------------------- * FUNCITON MODULE: # ZHR1_CERTS_VIA_PORTAL_ACTION * RELEASE # ECC 5.0 * DATE WRITTEN # 25.07.2008 * MODULE # HR * TYPE # Remote Function Module * AUTHOR # Wdjacn * TITLE # HR Certificates via Portal * PURPOSE # Provides required data for Web Dynpro front end * to HR Certificates * ASSOCIATED # Class: ZCL_HR_CERTS_EFORM * RESTRICTIONS # * DESCRIPTION # WD validates the user on the portal, and passes * the REQUESTOR_ID(UNAME) to retrieve data for. * AMENDMENTS # * VER DATE CHANGE # CHANGE DESCRIPTION User *====================================================================== * 1.0 25/07/08 GHDK9B0GJO New for WO992462. Wdjacn data: wo_form type ref to zcl_hr_certs_eform.

* Copy to Export Structure translate requestor_id to upper case. create object wo_form type zcl_hr_certs_eform. * Process the Action case i_action. when 'PDF'. endcase. endfunction. Donde call method wo_form->print_pdf i_get_pdf = X e_pdf = e_pdf pernr_not_found = 1 rut_not_found = 2 contract_date_not_found = 3 payment_not_found = 4 shift_not_found = 5 asset_not_found = 6. if sy-subrc ne 0. case sy-subrc. when 1. raise pernr_not_found. when 2. raise rut_not_found. when 3. raise contract_date_not_found. when 4. raise payment_not_found. when 5. raise shift_not_found. when 6. raise asset_not_found. endcase. exit. method print_pdf. data: fm_name type rs38l_fnam, fp_outputparams type sfpoutputparams, fp_docparams type sfpdocparams, fp_formoutput type fpformoutput, wc_fpname type fpname,

wstr_fields type z_csr_eform, wstr_texts type z_csr_longtext, wstr_data type z_csr_eform. fp_outputparams-getpdf = i_getpdf. fp_outputparams-device = 'PRINTER'. fp_outputparams-dest = 'LP01'. fp_outputparams-nodialog = 'X'. fp_outputparams-preview = 'X'. * Sets the output parameters and opens the spool job call function 'FP_JOB_OPEN' changing ie_outputparams = fp_outputparams cancel = 1 usage_error = 2 system_error = 3 internal_error = 4 others = 5. perform get_data changing wstr_data. *Sets formname here *wc_fpname = * Get the name of the generated function module call function 'FP_FUNCTION_MODULE_NAME' i_name = 'Z_TEST2' e_funcname = fm_name. * Call the generated function module call function fm_name /1bcdwb/docparams = fp_docparams otb_ben_detail = wstr_data /1bcdwb/formoutput = fp_formoutput usage_error = 1 system_error = 2 internal_error = 3. * Close the spool job call function 'FP_JOB_CLOSE' usage_error = 1 system_error = 2 internal_error = 3 others = 4. e_pdf = fp_formoutput-pdf. endmethod.

En NW Developer Studio. public void retrievereviewpdf( ) //@@begin retrievereviewpdf() // we only call this model if it hasn't been called before - otherwise we just relaunch the url form and if (wdcontext.currentcontextelement().getreviewpdfwebcacheurl()!= null) launchnewpdfwindow(); else // we now have two parameters - which are then used to get the status of the // the type of eform reviewpdfmodel.seti_dgs_application(getdgsapplicationcode()); reviewpdfmodel.seti_eform_id(geteformid()); //@@end try reviewpdfmodel.execute(); wdcontext.nodezhr1_certs_via_portal_action_output().invalidate(); catch (Exception e) logger.errort( Category.APPLICATIONS, e.tostring() + " : " + reviewpdfmodel.getclass().getname()); // report message fpm.getmessagemanager().reportmessage( wdcomponentapi, "LOGGED_ERROR", WDMessageType.ERROR, IMessageFcGbsHrDgsReuse.LOGGED_ERROR)); return; // now we have to open a new window with this data if (writepdftowebcache()) launchnewpdfwindow();

private void launchnewpdfwindow() reviewpdfwindow = wdcomponentapi.getwindowmanager().createnonmodalexternalwindow( wdcontext.currentcontextelement().getreviewpdfwebcacheurl(), IMessageFcGbsHrDgsReuse.REVIEW_DATA)); reviewpdfwindow.removewindowfeature(wdwindowfeature.address_bar); reviewpdfwindow.removewindowfeature(wdwindowfeature.menu_bar); reviewpdfwindow.removewindowfeature(wdwindowfeature.status_bar); reviewpdfwindow.removewindowfeature(wdwindowfeature.tool_bar); reviewpdfwindow.open(); private boolean writepdftowebcache() String filename = wdcomponentapi.gettextaccessor().gettext(imessagefcgbshrdgsreuse.review_data).concat(".pdf"); IWDCachedWebResource cachedpdfresource = null; byte[] reviewpdf; try reviewpdf = wdcontext.currentzhr1_certs_via_portal_action_outputelement().gete_pdf(); // create a cached Web Dynpro for the given byte array and filename if (reviewpdf!= null) cachedpdfresource = WDWebResource.getWebResource(reviewPDF, WDWebResourceType.PDF); cachedpdfresource.setresourcename(filename); // Store URL and file name of cached Excel resource in context. if (cachedpdfresource!= null) wdcontext.currentcontextelement().setreviewpdfwebcacheurl( cachedpdfresource.geturl()); return true; else return false; catch (Exception e) logger.errort( Category.APPLICATIONS, e.tostring() + " : " + reviewpdfmodel.getclass().getname() + " : " + IWDCachedWebResource.class.getName()); // report message fpm.getmessagemanager().reportmessage( wdcomponentapi, "LOGGED_ERROR", WDMessageType.ERROR, IMessageFcGbsHrDgsReuse.LOGGED_ERROR)); return false;. private IWDWindow reviewpdfwindow;