| Home • Tips • Tutorials • Forums • Certification Q's • Interview Q's • Jobs • Testimonials • Contact Us | ||
Document Categories:
What's New?
Contribute?Sample SpecsWhat's Hot? |
Step-by-Step guide to develop Outbound ABAP Proxy from SAP with PDF attachmentBy Ajay Kumar In order to develop a ABAP Proxy first we need to have a Proxy Configured in the transaction SPROXY, this is to be done by PI or XI consultant, as a ABAPer you are not concerned with this. The Proxy configured in SPROXY will look like.
By Clicking on the structure we can also see the structure of the Proxy, which is in tree structure.
In this case, proxy have 4 structured to be filled with data and then trigger the proxy to PI. In order to
create the proxy from the namespace given, we need to do following
g_t_header TYPE zintercompany_data _send .
attch_protocol TYPE REF TO if_wsprotocol_attachments, g_attachment TYPE REF TO if_ai_attachment, g_attachments TYPE prx_attach, "Internal table for attachment g_attach_xstring TYPE xstring, "variable of xstring type. g_spool_id TYPE tsp01-rqident, g_pripar TYPE pri_params, g_arcpar TYPE arc_params, g_pdfspoolid TYPE tsp01-rqident, "SPOOL ID g_jobname TYPE tbtcjob-jobname, "Jobname parameter for SPOOL g_jobcount TYPE tbtcjob-jobcount, "Jobcount Paramater for SPOOL g_string TYPE string, "To convert 132 character data into 255 character data. *Reference variables exception class lo_sys_exception TYPE REF TO cx_ai_system_fault, *Object declaration for Proxy Class obj_invoice1 TYPE REF TO “Proxy class name”. * creating proxy object CREATE OBJECT obj_invoice1.
g_t_header-invoice_details-invoice_line_item[] = g_t_tab_det[]. g_t_header-invoice_properties = wa_inv_pro.
NEW-PAGE
PRINT ON PARAMETERS
g_pripar ARCHIVE
PARAMETERS g_arcpar NO DIALOG. “Write your data that need to be printed , with the format required for PDF. Whatever written here will be converted into SPOOL. g_spool_id
= sy-spono. NEW-PAGE
PRINT OFF.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF' EXPORTING src_spoolid = g_spool_id " SPOOL ID no_dialog = ' ' IMPORTING pdf_bytecount = g_size_bytes pdf_spoolid = g_pdfspoolid btc_jobname = g_jobname btc_jobcount = g_jobcount TABLES pdf = g_table " All the data will be in this Data table |
|
|
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us ©2006-2007 SAPTechnical.COM. All rights reserved. All
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG. Graphic Design by Round the Bend Wizards |
||