<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Report output as PDF Based in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/report-output-as-pdf-based/m-p/4701334#M1104728</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I have a requirement where in I have to show the output of a custom report in PDF. I have specific layout in which the PDF has to be with header and item details. Can anyone suggest me if i have to go for Adobe forms for this...if yes, then how do i do it? or is there any other way i can show the output in specified PDF format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Priya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Oct 2008 14:31:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-30T14:31:28Z</dc:date>
    <item>
      <title>Report output as PDF Based</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report-output-as-pdf-based/m-p/4701334#M1104728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I have a requirement where in I have to show the output of a custom report in PDF. I have specific layout in which the PDF has to be with header and item details. Can anyone suggest me if i have to go for Adobe forms for this...if yes, then how do i do it? or is there any other way i can show the output in specified PDF format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Priya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2008 14:31:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report-output-as-pdf-based/m-p/4701334#M1104728</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-30T14:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: Report output as PDF Based</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report-output-as-pdf-based/m-p/4701335#M1104729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
SET PF-STATUS 'Z_PDF'.
*----------------------------------------------------------------------
*Table Declarations
*----------------------------------------------------------------------
TABLES: MARA, MARC, MAKT.
*----------------------------------------------------------------------
*Internal Table Declarations
*----------------------------------------------------------------------
DATA: BEGIN OF TS_MARA OCCURS 0,
         MATNR LIKE MARA-MATNR,
         MTART LIKE MARA-MTART,
         MATKL LIKE MARA-MATKL,
         LVORM LIKE MARA-LVORM,
       END   OF TS_MARA.
*----------------------------------------------------------------------
*Selection Screen Parameters
*----------------------------------------------------------------------
SELECTION-SCREEN BEGIN OF BLOCK B1.

  SELECT-OPTIONS: S_MATNR FOR MARA-MATNR OBLIGATORY.


SELECTION-SCREEN END OF BLOCK B1.
*----------------------------------------------------------------------
TOP-OF-PAGE.
*----------------------------------------------------------------------
write: 40 'Generating PDF from List Output' color 1 intensified on.
  skip 1.
  write: /1 'Date        :',  SY-DATUM,
         /1 'User ID     :',  SY-UNAME,
         /1(112) SY-ULINE.
*----------------------------------------------------------------------
START-OF-SELECTION.
*----------------------------------------------------------------------
*Perform for Basic Selection
PERFORM GET_MARA.
*Perform to Display Data
PERFORM DISPLAY_MARA.
*----------------------------------------------------------------------------------
AT USER-COMMAND.
*----------------------------------------------------------------------------------
*User Command to generate PDF Form
  AT USER-COMMAND.
  CASE SY-UCOMM.
    WHEN 'PDF'.
    DATA: L_PARAMS TYPE PRI_PARAMS,
            L_VALID TYPE STRING,
            W_SPOOL_NR LIKE TSP01-RQIDENT.
*TO GET PRINT PARAMETERS
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        IMPORTING
          OUT_PARAMETERS = L_PARAMS
          VALID          = L_VALID.
      IF SY-SUBRC &amp;lt;&amp;gt; 0.
      ENDIF.
*Internal table for Selection Screen
DATA: BEGIN OF I_RSPARAMS OCCURS 0.
       INCLUDE STRUCTURE RSPARAMS.
DATA: END OF I_RSPARAMS.
*Store the current selection screen details
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
  EXPORTING
    CURR_REPORT           = SY-REPID
*IMPORTING
*   SP                    =
  TABLES
    SELECTION_TABLE       = I_RSPARAMS
EXCEPTIONS
   NOT_FOUND             = 1
   NO_REPORT             = 2
   OTHERS                = 3
          .
IF SY-SUBRC &amp;lt;&amp;gt; 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

*SUBMIT TO GET THE SPOOL NUMBER
SUBMIT ZSB_TEST_08 WITH SELECTION-TABLE I_RSPARAMS
                             TO SAP-SPOOL
                             SPOOL PARAMETERS L_PARAMS
                             WITHOUT SPOOL DYNPRO
                             AND RETURN.
*SELECT THE RECENTLY CREATED SPOOL
      SELECT MAX( RQIDENT ) INTO W_SPOOL_NR FROM TSP01
                                 WHERE RQCLIENT = SY-MANDT
                                 AND   RQOWNER  = SY-UNAME.
*REPORT TO GENERATE SPOOL NUMBER FOR PDF CONVERT
      SUBMIT RSTXPDF5 WITH SPOOLNO  = W_SPOOL_NR
                      WITH DSTDEVIC = 'LOCL' AND RETURN .

      IF SY-SUBRC EQ 0.
        CLEAR W_SPOOL_NR.
*SELECT THE RECENTLY CREATED SPOOL FOR PDF
        SELECT MAX( RQIDENT ) INTO W_SPOOL_NR FROM TSP01
                                   WHERE RQCLIENT = SY-MANDT
                                   AND   RQOWNER  = SY-UNAME.
*REPORT TO DOWNLOAD PDF SPOOL TO GUI
        SUBMIT RSTXPDFT5 WITH SPOOLID = W_SPOOL_NR
                         AND RETURN.
      ENDIF.
  ENDCASE.
*  &amp;amp;---------------------------------------------------------------------
*&amp;amp;      Form  GET_MARA
*&amp;amp;---------------------------------------------------------------------
*       text
*----------------------------------------------------------------------
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------
FORM GET_MARA .
CLEAR  : TS_MARA.
REFRESH: TS_MARA.
*To select Materials based on Selection Criteria
SELECT MATNR
       MTART
       MATKL
       LVORM
  FROM mara
  INTO CORRESPONDING FIELDS OF TABLE TS_MARA
  WHERE MATNR IN S_MATNR.


ENDFORM.                    " GET_MARA
*&amp;amp;---------------------------------------------------------------------
*&amp;amp;      Form  DISPLAY_MARA
*&amp;amp;---------------------------------------------------------------------
*       text
*----------------------------------------------------------------------
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------
FORM DISPLAY_MARA .
CLEAR  : TS_MARA.
WRITE: /1   '|', 2(18)  'Material Number' COLOR 7,
         28  '|', 29(13) 'Material Type  ' COLOR 7,
         42  '|', 43(14) 'Material Group ' COLOR 7,
         57  '|', 58(13) 'Deletion Flag  ' COLOR 7,
         112 '|'.
WRITE: /1(112) SY-ULINE.
LOOP AT TS_MARA.
  WRITE: /1   '|', 2(18)   TS_MARA-MATNR,
          28  '|', 29(13)  TS_MARA-MTART,
          42  '|', 43(14)  TS_MARA-MATKL,
          57  '|', 58(13)  TS_MARA-LVORM,
          112 '|'.
WRITE: /1(112) SY-ULINE.
ENDLOOP.
ENDFORM.                    " DISPLAY_MARA

&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2008 15:05:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report-output-as-pdf-based/m-p/4701335#M1104729</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-30T15:05:17Z</dc:date>
    </item>
  </channel>
</rss>

