How to change a SAP script output without changing Print Program

Hi,
I want to change output of standard PO report printing object. I have to change the ZSAPSCRIPT but I have to keep the print program intact. please give me ideas.

Hi for that you have to do following.
1. Create a ZPROGRAM
2. Write a Perform in your SAP Script.
3. Write Form inside it your ZPROGRAM.
Hope this will help you.
<i><b>Reward points for helpful ans.</b></i>

Similar Messages

  • To convert Sap Script output to PDF format and send it via email.

    Hi Friends,
    Could any one please tell me, how to convert the Sap Script output to PDF format and send it via email. If any one have the code, kindly mail me to [email protected]
    Thanks & Regards,
    John

    Plese check this sample code from other thread.
    REPORT zzz_jaytest .
    Types Declaration
    TYPES : BEGIN OF ty_pa0001,
    pernr TYPE pa0001-pernr,
    bukrs TYPE pa0001-bukrs,
    werks TYPE pa0001-werks,
    END OF ty_pa0001.
    Internal Table Declaration
    DATA : i_pa0001 TYPE STANDARD TABLE OF ty_pa0001, "For pa0001 Details
    i_otf TYPE STANDARD TABLE OF itcoo, "For OTF data
    i_content_txt TYPE soli_tab, "Content
    i_content_bin TYPE solix_tab, "Content
    i_objhead TYPE soli_tab,
    Work Area Declaration
    w_pa0001 TYPE ty_pa0001, "For pa0001 Details
    w_res TYPE itcpp, "SAPscript output
    "parameters
    w_otf TYPE itcoo, "For OTF
    w_pdf TYPE solisti1, "For PDF
    w_transfer_bin TYPE sx_boolean, "Content
    w_options TYPE itcpo, "SAPscript output
    "interface
    Variable Declaration
    v_len_in TYPE so_obj_len,
    v_size TYPE i.
    Constants Declaration
    CONSTANTS : c_x TYPE c VALUE 'X', "X
    c_locl(4) TYPE c VALUE 'LOCL', "Local Printer
    c_otf TYPE sx_format VALUE 'OTF', "OTF
    c_pdf TYPE sx_format VALUE 'PDF', "PDF
    c_printer TYPE sx_devtype VALUE 'PRINTER', "PRINTER
    c_bin TYPE char10 VALUE 'BIN', "BIN
    c_name TYPE string VALUE 'C:\ZZZ_JAYTEST.PDF',"Downloading
    "File Name
    c_form(11) TYPE c VALUE 'ZZZ_JAYTEST'. "Form Name
    START-OF-SELECTION.
    Selecting the records from pa0001
    SELECT pernr bukrs werks FROM pa0001
    INTO TABLE i_pa0001 UP TO 10 ROWS.
    Setting the options
    w_options-tdcopies = 1 ."Number of copies
    w_options-tdnoprev = c_x."No print preview
    w_options-tdgetotf = c_x."Return of OTF table
    w_options-tddest = c_locl."Spool: Output device
    Opening the form
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    form = c_form
    device = c_printer
    language = sy-langu
    OPTIONS = w_options
    IMPORTING
    RESULT = w_res.
    LOOP AT i_pa0001 INTO w_pa0001.
    Writting into the form
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    element = 'MAIN'
    window = 'MAIN'.
    ENDLOOP.
    Closing the form
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
    RESULT = w_res
    TABLES
    otfdata = i_otf
    EXCEPTIONS
    unopened = 1
    bad_pageformat_for_print = 2
    send_error = 3
    spool_error = 4
    codepage = 5
    OTHERS = 6.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Converting OTF data to single line
    LOOP AT i_otf INTO w_otf.
    CONCATENATE w_otf-tdprintcom w_otf-tdprintpar
    INTO w_pdf.
    APPEND w_pdf TO i_content_txt.
    ENDLOOP.
    Converting to PDF Format
    CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
    EXPORTING
    format_src = c_otf
    format_dst = c_pdf
    devtype = c_printer
    CHANGING
    transfer_bin = w_transfer_bin
    content_txt = i_content_txt
    content_bin = i_content_bin
    objhead = i_objhead
    len = v_len_in
    EXCEPTIONS
    err_conv_failed = 1
    OTHERS = 2.
    v_size = v_len_in.
    Downloading the PDF File
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    bin_filesize = v_size
    filename = c_name
    filetype = c_bin
    TABLES
    data_tab = i_content_bin.
    The extension is put the it_mailpack-obj_name parameter of 'SO_NEW_DOCUMENT_ATT_SEND_API1'.

  • Dispalying SAP script output in landscape format

    Hello All,
    Could anyone please tell me the step by step process to display a SAP Script output in landscape format?
    Also is it possible to display a column name in 2 lines if it does not fit into 1 line.
    Regards
    Indrajit.

    Hi,
    Here is the way to print the SAPSCRIPT in landscape ..
    Goto SE71, then give you layout name then press change, then press the Header button(CAP ICON), then you will get the Header infomation, then select the Basic Settings pushbutton, then there we have an option to Print the Layout in  Portrait format or Landscapr format, then select the LANDSCAPR format Radio button then activate it
    Regards
    Sudheer

  • How to debugg the SAP Script

    Hi to all.....
    How to Debug the SAP Script when it get's triggered with the Transaction.
    And how to Align the Standard Text data ..That is Justifing the statements.
    Advance Thanks to all
    Chinnu

    In se71, Chose from menu:
    Utilities-> Activate Debugger
    From the transaction, In the output message screen, you chose chose your output type, Go to Further options, Chose the dispatch option as Send at periodically scheduled jobs . then save the transaction. And run the prigram RSNAST00 It would stop at the debugging.
    Regards,
    ravi

  • Change the SAP Script Package

    Hi,
    How to change the SAP Script Package..when i use option copy from client option, it ask for a package but after copied it shows in the $TMP package...
    how can i change it.
    Regards,

    Hi,
    Goto SE80 --> select LOCAL OBJECTS from the drop down and hit enter.
    You will be displayed a list of all local objects.
    Locate your SAP SCRIPT --> right click on this script name --> click More Functions --> click Change Package Assignment and you will be prompted for a package name.
    Give new package name and click done.
    Your script is now assigned into the specified package.
    Regards,
    Tarun

  • Displaying Page number in all pages of sap script output

    Hi All,
    I have a issues in displaying page number in all pages of sap script output.
    I have created a seperate window just above main window to display page number.
    I have given &PAGE& in the layout editor.
    Now in the sap script output i am getting page number as 1 in all the pages page number is not changing for pages-2,3, etc..
    Can anybody tell me the reason for the same!
    In some other objects same syntax is working fine. For this object it is not working!
    Is there any setting changes!
    Thanks i
    Thanks,
    Deep.

    Hi,
    Just check the Page Counter of the Next or Second Page which you defined.
    First page
    Mode                     START
    Numbering Type           ARABIC
    Second Page
    Mode                     INC
    Numbering Type           ARABIC
    Regards
    Bala Krishna
    Edited by: Bala Krishna on Oct 17, 2008 11:23 AM

  • Regarding SAP Script Output validation in Layout set

    Hi All,
    I have a issue in SAP Script Output.
    I have a <b>Standard Print Program</b>. and layout set.
    I can do validations only in Layout set.
    The actual issue is i have a <b>internal table field</b> in <b>print program</b> that i am displaying in <b>layout set</b>. Now i want it to be subtracted with number <b>20</b>, since i can not edit code in <b>Print Program</b>. i want to subtract that internal table field with 20 in layout set itself.
    Can anybody tell me how can i solve this issue.
    <b>Note:</b>  I need to do calculation only in layout set.
    Can anybody give me the solution.
    Thanks in advance.
    Thanks & Regards,
    Rayeez.

    Hi,
    Thanks for that reply.
    so with <b>SUMMING</b> command i can do calculation.
    I am already having <b>i_tab1-sum</b> coming from print program and i have declared one symbol using
    DEFINE &v_val& = 20 in layout set.
    Then i want to subtract &v_val& with &i_tab1-sum&.
    using the follow syntax tell me wether syntax is correct or not.
    SUMMING &i_tab1-sum&-&v_val& INTO &i_tab1-sum&.
    will it work.
    once again thanks for that reply.
    Thanks & Regards,
    Rayeez.

  • Sending SAP Script output as a PDF attachment through mail

    Dear Guru,
    I am using SAP 4.0B version, DATABASE Oracle 8i, OS is sun solaris 7.5.
    I want to send SAP script output as a
    PDF attachement through mail.Please suggest a solution.
    Regards,
    Rajesh

    Hi Rajesh,
    In your print program, while calling OPEN_FORM, pass options-TDGETOTF = 'X'. This is used for returning print output in OTF format.
    Then in CLOSE_FORM, get the table OTFDATA returned from the function module. for example
    DATA: OTF_DATA LIKE ITCOO OCCURS 0 WITH HEADER LINE.
        CALL FUNCTION 'CLOSE_FORM'
          IMPORTING
            RESULT  = RESULT
          TABLES
            OTFDATA = OTF_DATA.
    now you can convert this OTF data to PDF using function module CONVERT_OTF
    Then send this data as attachment to a mail using function module SO_NEW_DOCUMENT_ATT_SEND_API1
    Regards,
    Komal.

  • How to change height of Input/output field in dialog program

    How to change height of Input/output field in dialog program.
    I want to big message text box like e-mail message box.
    so could anybody help me on this please
    Thanks
    Basu

    Hi,
        This is not possible directly.Place the icon button in the table field.when u click on that button a popup window will appear in that window place the text editor there u can write text and u can save it ok..
    Award points if helpful.
    Kiran Kumar.G.A

  • SAP Script output extra page is coming

    Dear friends
                             In my sap script output i m getting one extra page with empty main window. Even i have  not used NEW-PAGE Command,
    No Empty lines and window size also correct. Can anyone solute for this issue.
    Regards
    Balamurugan N

    Hi,
    check those details:
    1) In your SAPSCRIPT contains one page or two pages?
    2) In the sapscript check did u assign any nextpage as different page?
    Regards,
    Dhina..

  • How to open mew tab in google without changing home page

    how to open mew tab in google without changing home page

    Your solution will be client setting dependent.  The home page navigation and tab options for opening in the frame or new window are merely setting the href target in the home page html when the screen is rendered by the personalization service.  As far as I know the tab behavior new to IE in version 7, and the tab behavior in other browsers like Mozilla/Firefox are both managed at the application level and will be client PC bound.  The home page process just uses target="_blank" for opening links in a new window.  I don't know if there is a browser neutral setting for something like target="_newtab", but it doesn't appear to be the case:  http://www.w3.org/TR/html401/types.html#h-6.16
    If something like this does creep into the standard then it would make a nice feature enhancement request for 3 radio button options when defining a link in the navigation editor.

  • Download Sap script output in XL.

    hi all,
    can anybody plz tell me that is there any possibility to download SAP script output in editable XL format? actually i got a new requirement in my company so plz can anybody help me for this?
    regards saurabh.

    Hi, Below code used for convert output into PDF format. May be you can convert into XL.
    In close form, collect output data into OTF format.
        call function 'CLOSE_FORM'
          TABLES
            otfdata                  = it_otfdata
          EXCEPTIONS
            unopened                 = 1
            bad_pageformat_for_print = 2
            send_error               = 3
            others                   = 4.
        if sy-subrc <> 0.
          PERFORM protocol_update.
          retcode = 1.
        endif.
      call function 'CONVERT_OTF'
        EXPORTING
          format                = c_pdf
        IMPORTING
          bin_filesize          = h_size
        TABLES
          otf                   = it_otfdata
          lines                 = it_pdf
        EXCEPTIONS
          err_max_linewidth     = 1
          err_format            = 2
          err_conv_not_possible = 3
          others                = 4.
      if sy-subrc <> 0.
       MOVE sy-subrc                 TO   h_retcode.
      endif.
      perform table_shift.
    form table_shift.
      describe table it_pdf    lines  hltlines.
      DESCRIBE FIELD IT_PDF    LENGTH FLE1 in character mode.
      DESCRIBE FIELD X_OBJCONT LENGTH FLE2 in character mode.
      clear   x_objcont.
      refresh x_objcont.
      clear off1.
      clear hfeld.
      loop at it_pdf.
        htabix = sy-tabix.
        move it_pdf to hfeld+off1.
        if htabix = hltlines.
          fle1 = strlen( it_pdf ).
        endif.
        off1 = off1 + fle1.
        if off1 ge fle2.
          clear x_objcont.
          x_objcont = hfeld(fle2).
          append x_objcont.
          shift hfeld by fle2 places.
          off1 = off1 - fle2.
        endif.
        if htabix = hltlines.
          if off1 gt 0.
            clear x_objcont.
            x_objcont = hfeld(off1).
            append x_objcont.
          endif.
        endif.
      endloop.
    endform.                    " TABLE_SHIFT

  • OAF: Creating PDF output without calling concurrent program.

    Hi Everyone,
    i want to Create PDF output in OAF.
    I wil be having one button “Convert PDF” on my OAF page. On clicking on that button my page should generate pdf output without calling concurrent program(Because running a concurrent program may take much time sometimes.).
    How can I do that?
    I have never generated pdf outputs so plz help me to get out of this.
    What are the possible ways to get this?
    Any example?
    Any suggestions wil be really useful.
    Thanks.....

    Hi ,
    Please refer to -
    http://apps2fusion.com/at/85-daxesh/515-oa-framework-xml-publisher-integration
    http://apps2fusion.com/at/51-ps/260-integrating-xml-publisher-and-oa-framework
    Regards,
    Ashish

  • Ho to find script and the related print program for print preview of PO

    Hi All,
    We are getting some text output on the print preview of a purchase order.
    How can we determine the driver script and the corresponding print program for this.
    Can you please guide on this.
    Thanks in advance.
    Regards,
    Sanjeet

    U Can check Driver program and form related to that program table is TNAPPR
    Goto NACE t.code
    Selct Application ---> click on output types
    then u wil get one window there select proper output type and
    double click on  processing  routines u wil get form name and related driver program name also
    Plz try this....
    Edited by: Upender Verma on Feb 9, 2009 1:33 PM
    Edited by: Upender Verma on Feb 9, 2009 1:37 PM

  • How to save sap script output in  pdf document

    hi abapers
    how to save the output of sap script in sap so that can retrieve the saved document later.
    i have to save the rcia output from sap script in pdf document in sap so that it can be retrieved later
    how to use dms

    PDF Creation + connection to DMS
    cheers
    Aveek

Maybe you are looking for

  • Windows installation problems.....

    Hi, I have a little problem with an installation of oracle 8.1.7 on windows xp profesional services pack 2 version 2002, with 256 MB of ram. When I make a click on the septup icon the computer make nothing, I think that the problem is the memory, bec

  • LabVIEW FPGA driver for Xilinx SPARTAN 3E Starter Board

    i need drivers for spartan 3E .

  • Anyone using the Adobe AutoComplete component?

    I am using the auto complete component from Adobe off of the Adobe Exchange site. I'm having an issue when I start typing some text, the drop down shows however, if I press enter the auto complete does not add the rest of the text. I am using an unto

  • "Error 0x400110020000100A If this issue continues, please contact HP support"

     I have purchased the system recovery disks from HP for my dr9225nr pavilion and purchased a new hard drive at their request because my first attempt to install the recovery image ended with the same error code. So I now have a new hard drive the HP

  • Need Help Converting Video

    Hello - I have a couple of separate questions that I need help with.  I know basic FCP.  I have FCP7.  I recently shot a wedding with 2 different cameras.  Both are HiDef Cameras.  1 Camera is a Prosumer Camera where the files were taking off the cam