What is code for to open a pdf format for scripts and smartforms

hi
experts
can we help for this

Hi Raviteja,
Here is the code for converting a smartform into a PDF File..
DATA: BIN_FILESIZE TYPE I,
BIN_FILE TYPE XSTRING,
T_OTF LIKE ITCOO OCCURS 200 WITH HEADER LINE,
T_DOC LIKE DOCS OCCURS 200 WITH HEADER LINE,
T_LINES1 LIKE TLINE OCCURS 200 WITH HEADER LINE,
T_FINAL_PDF LIKE TLINE OCCURS 500 WITH HEADER LINE,
filename TYPE string VALUE 'EXP.pdf',
path TYPE string VALUE 'C:\DESKTOP\..',
fullpath TYPE string VALUE 'C:\DESKTOP\PDF\EXP.pdf',
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
use_otf_mc_cmd = 'X'
ARCHIVE_INDEX =
IMPORTING
bin_filesize = bin_filesize
TABLES
otf = t_otf
doctab_archive = t_doc
lines = t_lines1
EXCEPTIONS
err_conv_not_possible = 1
err_otf_mc_noendmarker = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT t_lines1 INTO t_lines1.
APPEND t_lines1 TO t_final_pdf.
ENDLOOP.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
default_file_name = 'EXPO_INVpdf'
prompt_on_overwrite = 'X'
CHANGING
filename = filename
path = path
fullpath = fullpath.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = bin_filesize
filename = fullpath
filetype = 'BIN'
append = 'X'
IMPORTING
filelength = bin_filesize
TABLES
data_tab = t_final_pdf.
IF sy-subrc EQ 0.
MESSAGE s018(zmsg) WITH 'PDF Generated Successfully'.
ELSE.
MESSAGE s011(zmsg) WITH 'PDF Not Generated !!!'.
ENDIF.

Similar Messages

  • What is the functionality of &VBDKR-NETWR( 10)& in sap script and smartform

    Dear All,
    I came across this &VBDKR-NETWR(<10)&  when I was migrating the script as smartform. I would like to know wht is functionality of  &VBDKR-NETWR(<10)&  i.e. <10's meaning. I am facing problem in printing the amount. So many alignment problems are coming.
    Please help me on this.
    Thanks in Advance.
    J.

    hi,
    &VAR(<10)& means output will be printed with sign to tjhe left (<) and output length is 10  (10)
    here an overview with the most use formating symbols
    &VAR(En)&  Exponent number (n)
    &VAR(Ff)& Fill character
    &VAR(K)&   Ignore conversion rules
    &VAR(<)&   sign to the left
    &VAR(>)&   sign to the right
    &VAR(.n)&  number of decimals
    &VAR(+n)& offset
    &VAR(Z)&  omit leading zeroes
    &VAR(S)&  omit leading sign
    &VAR(T)&  omit thousand sepearator
    &VAR(n)&  outputlength n
    &VAR(R)&  right justified
    &VAR(C)&  condensed
    &VAR(I)&    suppress initial value
    success,
    Gr,. Frank

  • Adobe Reader hangs after opening a PDF file for a minuet

    Adobe Reader hangs after opening a PDF file for a minuet

    Pat. Thanks for your promote reply. I have resolved the issue.
    Closing the tools pane at the right side:
    open Adobe Reader without opening a PDF file
    collapse 'Tools' pane
    then open some PDF
    It shouldn't hang anymore

  • Hi I would like to know, how do I add a Hyperlink on Flash, that opens a PDF in adobe reader and not the web browser.

    Hi I would like to know, how do I add a Hyperlink on Flash, that opens a PDF in adobe reader and not the web browser.

    Yoh, what is FSCCommanr ? sorry man I am an absolute beginner in Flash. I tried the code:
    /* Click to Go to Web Page
    Clicking on the specified symbol instance loads the URL in a new browser window.
    Instructions:
    1. Replace http://www.adobe.com with the desired URL address.
       Keep the quotation marks ("").
    instance_name_here.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage);
    function fl_ClickToGoToWebPage(event:MouseEvent):void {
      navigateToURL(new URLRequest("http://www.adobe.com"), "_blank");
    this is the same code I used before and it opens a pdf file in a web browser, and it doesn't open an AutoCAD file.

  • I have tried a lot to find an app or some way in email to attach multiple of pdf files in one email. I could not find anything that sends multiple pdf file in one email and still keeping the file in simple pdf format for the recipient.

    I have tried a lot to find an app or some way in email to attach multiple of pdf files in one email. I could not find anything that sends multiple pdf file in one email and still keeping the file in simple pdf format for the recipient.

    I am not aware of a way except for photos that allows you to select multiple files in an email. I even checked settings in the Adobe Reader app, and it does not show that ability.

  • When trying to open a PDF format using Adobe XI I get an error message that there's a problem opening the document (57)

    When trying to open a PDF format using Adobe XI I get an error message that there's a problem opening the document (57)

    Hi chasore,
    Are you still facing this issue?
    Is this issue happening with all the documents you have. If yes, i would suggest try uninstall and reinstall. Or if the documents are located on some shared drive try to copy them on local machine and test again.
    Regards,
    Ajlan Huda.

  • When i open a pdf it is transparent and i can see my desktop wallpaper behind it making it hard to read

    when i try to open a PDF it is transparent and i can see the wallpaper behind it this makes it very hard to read

    Try to disable hardware acceleration in Firefox.
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    *https://hacks.mozilla.org/2010/09/hardware-acceleration/
    Try to disable transparency in Windows.
    Right click in a free space on your desktop.<br />
    Left click on Personalization.<br />
    There are four options at the bottom of the screen, choose "Window Color and Appearance".<br />
    Select a border color<br />
    Uncheck: "Enable transparency"
    * http://www.howtogeek.com/howto/7955/how-to-fix-no-aero-transparency-in-windows-7/

  • Material for sap scripts and smartforms

    hi SDNs,
              can anyone send links to download SAP SCRIPTS and SMARTFORMS? thanks in advance.
                                regards,
                                 aravind.

    hi Aravind,
    check the below linkss for scripts
    SAP Scripts
    http://www.sap-img.com/sapscripts.htm
    http://sappoint.com/abap/
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://help.sap.com/saphelp_crm40/helpdata/en/16/c832857cc111d686e0000086568e5f/content.htm
    http://www.sap-basis-abap.com/sapabap01.htm
    http://www.sap-img.com/sapscripts.htm
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci943419,00.html
    http://sap.ittoolbox.com/topics/t.asp?t=303&p=452&h2=452&h1=303
    http://www.sapgenie.com/phpBB2/viewtopic.php?t=14007&sid=09eec5147a0dbeee1b5edd21af8ebc6a
    Other Links
    http://www.virtuosollc.com/PDF/Get_Reporter.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/da/6ada3889432f48e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/66/bc7d2543c211d182b30000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/5b/d22cee43c611d182b30000e829fbfe/frameset.htm
    http://www.virtuosollc.com/PDF/Get_Reporter.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/da/6ada3889432f48e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/66/bc7d2543c211d182b30000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/5b/d22cee43c611d182b30000e829fbfe/frameset.htm
    http://www.thespot4sap.com/Articles/Code_CostCentreReport.asp
    http://www.allsaplinks.com/dialog_programming.html
    http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/frameset.htm
    http://www.allsaplinks.com/files/using_table_in_screen.pdf
    http://www.geocities.com/ZSAPcHAT
    and for smartforms
    most imp link
    http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
    Check these links.In this,I am explaining everything step-by-step.Kindly reward points by clikcing the star on the left of reply,if it is useful.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
    Check these links also.
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapgenie.com/abap/smartforms.htm
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://sap.niraj.tripod.com/id67.html
    http://myweb.dal.ca/hchinni/sap/smartforms_home.htm
    Step by StepGood one):
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    if u need more info on either of these topics shoot me a test mail to [email protected]
    If u find it useful plz mark the points
    Regards,
    Naveen

  • I've imported a giant cd collection for my work in wav format for the best quality audio using iTunes version 11.1.1.  I need to transfer this library to our Music workstation using iTunes 11.0.1.  That workstation version of iTunes can't be upgraded for

    I've imported a giant cd collection for my boss in wav format for the best quality audio using iTunes version 11.1.1.  I need to transfer this library to our Music workstation using iTunes 11.0.1.  That workstation version of iTunes can't be upgraded for compatability reasons with other software using iTunes.  When I try to transfer the library I lose all of the CD metadata and end up with only track names.  Is there a way to transfer everything along with the metadata?

    Not easily.  WAV format does not store tag information in the file.  Realize both AIFF (equivalent to WAV) and Apple Lossless (full quality but smaller files) do, so WAV was unfortunately the worst format to chose.
    If you have to go with what you have you will have to explore exporting the library as .xml, moving it and the files to the other computer, then rebuilding a lower version library with the two sets.  I am not sure if you can do it with the library.xml file that already exists or if it too differs according to version.  You may end up having to export the files as a playlist.  You will, of course, lose artwork too, though you can try fetching it from the iTunes Store later.
    Some of what you need to do is outlined in these articles though you have the added limitation that you are not building a library of the same version.  (It really is a piity you choose WAV, otherwise you could have simply added the ripped files and most of the data would have traveled with them.)
    https://discussions.apple.com/message/20401436 - turingtest2 11/2012 post on rebuilding empty/corrupt library after upgrade/crash from previous iTunes library file.
    iTunes: How to re-create your iTunes library and playlists - http://support.apple.com/kb/ht1451

  • FI transaction code used in script and smartforms

    hiii  dudes,
                     i want the FI transaction codes which is used in the script and smartforms.......

    Hi Sonia,
    I re-loged, but in vain.
    Regards,
    rajesh

  • What type of errors generally we wil get in script and smartform?

    what type of errors generally we wil get in script and smartform?

    Hi,
    Script and Smartforms are used to Output the outgoing Document print in any orgn.
    Mostly the problem is the allignment of windows on the page.
    Data problems are very little. printing of pages, ie. particular data should come in first page and other on second page,
    and the address should not come in 2 pages,
    displaying of currency related fields errors, texts related errors are the mostly occuring errors.
    reward if useful
    regards,
    Anji

  • Where can we find the standard program for scripts and smartform for vl02

    where can we find the standard program for scripts and smartform for vl02
    regard,
    anil

    If it is a standard Script Output see that all config in NACE tcode was done correctly and in the Application document the output type was properly defined and attached to a medium, partner and all communication related things like printer name, when to print the output and number of messages etc are entered in the document
    the go to the related application Tcode
    (for sales order goto VA02 or VA03)
    (delivery -VL02N or VL03N)
    for Invoice VF02 or VF03
    for PO -goto ME9F
    enter doc number, Issue Output to -> screen/printer
    then see the output
    step 1 : copy the z layout into testing client thru SCC1.
    step2 : go to se71 and check modified layout.
    step3 : if it is under logistics.. go to TCODE "NACE".
    u will see various applictions for each business process.
    there u have configure ur related layout according to requirments,
    for example u consider for Request fo Quatation..
    there is APPLICATION called "EA"
    click and enter into it. configure it with ur requirments, for help consult with ur functonal consaltant, and save it.
    step 4 : goto tcode ME9A for requst for quatation(RFQ).
    step 5 : enter test data avalable and check it with message display.
    it is same for other applications like Contract agreament --> ME9k
    invoice --> vl02n
    and goes on..
    Reward points for useful Answers

  • Im unable to open the pdf file for the code to redeem Mountain Lion:the '*****'file could not be opened. it may be damaged or in a format that preview doesn't recognise

    I've tried opening the file in ibooks, on ipad, in Safari, and straight from e-mail, but it can't open the .pdf file. Could it be corrupted? I'm brand new to the MBP so may be missing something obvious!

    If Preview won't read the pdf file, try Adobe Reader. It is possible, of course, that the file may actually be damaged, as Preview should be able to open the file.
    Clinton

  • When I open a pdf file in Firefox and then save, how do I set the initial directory to be closer to what I want instead of a temp directory?

    When I choose to save a pdf file directly when using Firefox, it works perfectly. However, when I choose to open a pdf instead and then save it, the save directly displayed will always be a temp directory and it would be more convenient for me to choose a directory closer to where most of my files normally go. How do I change this?

    Hi,
    I partially answered your question in another posting but I feel that you´re in the wrong forum for your problem. This is for BSP development and you talk about CRM.

  • What are methods for converting otf to pdf format in sap script

    Hi,
    I have a requirement in script i have to convert that that otf file to pdf format,when i use function modules its corrupting that pdf file,So i want convert otf to pdf using class method any one can help me for that.If any sample coding for class method.
    Thanks.

    ok
    CALL FUNCTION 'CONVERT_OTF'
         EXPORTING
           format                = 'PDF'
    *      max_linewidth         = 255
         IMPORTING
           bin_filesize          = lv_bin_filesize
    *      bin_file              = pdf_xstring
         TABLES
           otf                   = lt_otf
           lines                 = lt_pdf_table
         EXCEPTIONS
           err_max_linewidth     = 1
           err_format            = 2
           err_conv_not_possible = 3
           err_bad_otf           = 4
           OTHERS                = 5.
    CALL FUNCTION 'GUI_DOWNLOAD'
         EXPORTING
          bin_filesize                    = lv_bin_filesize
          filename                        = c_name
          filetype                        = 'BIN'
    *     APPEND                          = ' '
    *     WRITE_FIELD_SEPARATOR           = ' '
    *     HEADER                          = '00'
    *     TRUNC_TRAILING_BLANKS           = ' '
    *     WRITE_LF                        = 'X'
    *     COL_SELECT                      = ' '
    *     COL_SELECT_MASK                 = ' '
    *     DAT_MODE                        = ' '
    *     CONFIRM_OVERWRITE               = ' '
    *     NO_AUTH_CHECK                   = ' '
    *     CODEPAGE                        = ' '
    *     IGNORE_CERR                     = ABAP_TRUE
    *     REPLACEMENT                     = '#'
    *     WRITE_BOM                       = ' '
    *     TRUNC_TRAILING_BLANKS_EOL       = 'X'
    *     WK1_N_FORMAT                    = ' '
    *     WK1_N_SIZE                      = ' '
    *     WK1_T_FORMAT                    = ' '
    *     WK1_T_SIZE                      = ' '
    *     WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
    *     SHOW_TRANSFER_STATUS            = ABAP_TRUE
    *     VIRUS_SCAN_PROFILE              = '/SCET/GUI_DOWNLOAD'
    *   IMPORTING
    *     FILELENGTH                      =
         TABLES
           data_tab                        = lt_pdf_table
    *     FIELDNAMES                      =
        EXCEPTIONS
          file_write_error                = 1
          no_batch                        = 2
          gui_refuse_filetransfer         = 3
          invalid_type                    = 4
          no_authority                    = 5
          unknown_error                   = 6
          header_not_allowed              = 7
          separator_not_allowed           = 8
          filesize_not_allowed            = 9
          header_too_long                 = 10
          dp_error_create                 = 11
          dp_error_send                   = 12
          dp_error_write                  = 13
          unknown_dp_error                = 14
          access_denied                   = 15
          dp_out_of_memory                = 16
          disk_full                       = 17
          dp_timeout                      = 18
          file_not_found                  = 19
          dataprovider_exception          = 20
          control_flush_error             = 21
          OTHERS                          = 22.
       IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
    TRY.
           GET PARAMETER ID 'RECEIPTENT' FIELD lvs_recipient1.
           send_request = cl_bcs=>create_persistent( ).
    *      lt_attach_bin = cl_document_bcs=>xstring_to_solix( ip_xstring = lt_solix ).
           APPEND 'Test message' TO lt_text.
           l_sub_50 = lc_test1.
           document = cl_document_bcs=>create_document( i_type    = 'RAW'
                                                        i_text    = lt_text
                                                        i_subject = l_sub_50 ).
           document->add_attachment( i_attachment_type    = 'PDF'
                                     i_attachment_subject = 'script.pdf'
                                     i_att_content_hex    =  lt_attach_bin ).
           l_sub_line = lc_test1.
           TRY.
    * Build subject line for email.
               CALL METHOD send_request->set_message_subject
                 EXPORTING
                   ip_subject = l_sub_line.
             CATCH cx_send_req_bcs INTO loref_obj_error.
               PERFORM sub_catch_error1 USING loref_obj_error.
           ENDTRY.
           send_request->set_document( document ).
    *      sender    = cl_cam_address_bcs=>create_internet_address( '[email protected]' ).
           recipient1 = lvs_recipient1-objkey.
           recipient = cl_cam_address_bcs=>create_internet_address( '[email protected]' ).
    *      send_request->set_sender( sender ).
           send_request->add_recipient( i_recipient = recipient
                                        i_express   = 'X' ).
           sent_to_all = send_request->send( i_with_error_screen = 'X' ).
           COMMIT WORK.
         CATCH cx_bcs INTO bcs_exception.
           MESSAGE 'eee' TYPE 'S'.
           EXIT.
       ENDTRY.

Maybe you are looking for