Converting a pdf to word_produces garbage

a pdf (in English) created in Shanghai by a Chinese person using a local OS, looks ok at this end.
However using the adobe online conversion tool only garbage is produced and parts of the original (one page) document float now across two pages.
Can adobe conversion tools be used on foreign OS? Can the adobe tools be adapted in some way?

Hi 5dock,
I'm sorry that the ExportPDF service isn't meeting your expectations. The quality of the conversion is very dependent on the quality of the original PDF. Some applications produce more well-structured PDFs than others.
That said, what happens when you disable OCR as described here: How to disable Optical Character Recognition (OCR) when converting PDF to Word or Excel? Does that produces a better looking Word document?
Best,
Sara

Similar Messages

  • Converting a pdf online to word produces only garbage!!

    converting a pdf online to word produces only garbage!!
    One page becomes to pages and sections float all OVER the place.
    There are plenty of complaints of adobe online NOT working - Adobe what do you do apart form offering crap online software.

    Hi 5dock,
    I'm sorry that the ExportPDF service isn't meeting your expectations. The quality of the conversion is very dependent on the quality of the original PDF. Some applications produce more well-structured PDFs than others.
    That said, what happens when you disable OCR as described here: How to disable Optical Character Recognition (OCR) when converting PDF to Word or Excel? Does that produces a better looking Word document?
    Best,
    Sara

  • When I convert my PDF file to either Word or Excel, the result is garbage and not usable.  What am I doing wrong?

    I have converted two PDF files to both Word and Excel.  The result is garbage and unreadable.  I want to edit the content of the PDF file and thought that this was the solution.  What am I doing wrong?

    It's probably not something wrong you're doing, just the way the file was
    created. You can look under File - Properties - Description and see what
    application and PDF producer were used to generate it. My guess is it was
    not produced using Adobe software.
    At any rate, there's no a lot you can do about it, I'm afraid. You can try
    re-frying it, ie sending it to the PDF Printer to produce a new copy, and
    then exporting that to Word/Excel, but that's about it.

  • ALL MY DESKTOP APPS CONVERTED TO PDF FILES.

    After sending an urgent email attachment in Adobe PDF to Government Offcom, all my Desktop applications in windows 7 64 bit have been converted to PDF files and cannot be opened.   The attachment used was sent to me by my Secretary remotely using an old MAC.
    I can return my laptop to normal operation by un installing my Adobe Reader 11 app, but the problem returns when I re Download Adobe Reader
    11 again.     After discussing this with Adobe Technical in London they advised me to raise this issue with your Adjudicators in this Forum. 
    Please assist asap as this is very urgent right now for several genuine reasons.
    Many thanks.   Derek Horder.

    See if anything in here helps: https://helpx.adobe.com/acrobat/kb/application-file-icons-change-acrobat.html

  • Error in converting a pdf document to a Word document

    I have Adobe Acrobat 6 running under Win XP.
    My Panasonic Lumix camera manual is a pdf file that I wish to place on my Kindle 4. I copied the pdf file across but, although Kindle is supposed to be able to handle pdf files, it wouldn't with this one - it simply froze when I opened it in the Kindle. I therefore decided to convert the pdf file to a Word document file and email it to Amazon for a free conversion to a Kindle azw file. I attempted to use Save As in Acrobat to save the pdf file as a doc file but, after a few pages, I got the error message:
    Bad pdf; could not read page structure. <Bad pdf; error in processing fonts: cannot find CMap resource file> [26-27].

    For what it's worth I pulled in some of the product line's user guide PDFs. Those I looked over were authored with FrameMaker or InDesign.
    As these both support solid PDF output and from a quick look-see I'd not attribute the core issue to a poorly created PDF.
    With that said; two things are evident. They are not Tagged and, with the heavy graphics content, of a healthy file size.
    Tagged PDF is more than a little important as this is what provides the essential ingredient for export of PDF content (retaining font info, format, layout, etc.).
    A healthy file size associated with the significant graphics content means that what is "under the hood" of the computer in use is significant as export puts a load on these resources.
    Example: A local machine having  integrated graphics is hard pressed compared to a local machine having a dedicated graphics card with a comfortable amount of onboard RAM.
    Due to "design" improvements over the years Acrobat X does a much better job of "export"/"save as" for untagged PDF.
    But, "export"/"save as" of a well-formed Tagged PDF trumps.
    Be well...

  • Trying to add filename and path in footer of Word doc and it only lets me "Convert to PDF"?

    I am running MS Office 03 and just installed Acrobat 9.0 Pro. When I try to insert the Filename and Path from the insert option of the footer properties, it only gives me the option to "Convert to PDF". I don't know why it's doing this, but it started after the install of Acrobat 9.0. What should I do?

      To get the path ... event.target.path;
    To get the file name .... event.target.documentFileName;

  • How do I convert a pdf in Adobe Acrobat 9 to Microsoft Word document?

    How do I convert a pdf in Acrobat 9 to a Microsoft Word document?

    Hi fireatty,
    In Acrobat 9, you can use the Export command (File > Export) to export your PDF to Word format.
    Please let us know if you need additional assistance.
    Best,
    Sara

  • My .jpg's have ALL suddenly been converted to .pdf's and I am unable to open them

    Using Windows 8.1, when I went to view some jpg's earlier today, I found they now show as "Adobe Acrobat Documents." When I try to open one, I get the error message that they are jpg's and Adobe is unable to open a jpg.???

    And it was easy -- once I went to "Properties" in Windows Explorer. That was the tough part -- finding where to make the change.
    Thank you for your help.
    Bob Slone
    [privated information removed by moderator]
          From: ~graffiti <[email protected]>
    To: Robert Slone <[email protected]>
    Sent: Wednesday, January 7, 2015 4:09 PM
    Subject:  My .jpg's have ALL suddenly been converted to .pdf's and I am unable to open them
    My .jpg's have ALL suddenly been converted to .pdf's and I am unable to open them
    created by ~graffiti in Adobe Reader - View the full discussionEasy enough to fix. You need to change your system file associations to whatever program you used in the past to open .jpg files. Here's how -
    > Choose the apps Windows uses by default - Windows Help If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7075247#7075247 and clicking ‘Correct’ below the answer Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7075247#7075247 To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"  Start a new discussion in Adobe Reader by email or at Adobe Community For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • Why won't my word document converted to PDF save?

    When in word, I select the option to convert to PDF, the document is scanned and I'm prompted to save as PDF. All seems to work except it doesn't actually save! This was working previously until an update a few months ago. Any help is appreciated.
    Thanks!
    L

    First, have you removed from Printer Utility the Adobe PDFPrinter 9.x fom the list then close Printer Utility.
    Then open Acrobat or Adobe Reader and go to help menu and choose to repair or rplace. Choose to replace the PDFPrinter only.
    (One thing that we can't seem to get Aodobe to fix is that (at least in X.4.11 and I've heard some folks using X.5.x talk about.
    When you go to page setup in Acrobat you can not select any Printer what so ever.
    Does not even pickup choices in the Print/Fax Control panel in system preferences.
    However you can choose it in the Print menu.
    IF you decided to install Reader, you may or may not be able to set printer in Page setup.
    However, if you can set up in Reader's page setup. It will show up in Acrobat's.
    Its an obvious bug Adobe refuses to admit or can't fix. I've heard some say they've heard the problem but never seen it.)
    Next, open Word 2008 or 2004 (don't remove 2004 it has far more features than 2008)
    create your Document.
    Save a copy as DOC or DOCX document first.
    Now go to Print menu and choose Acrobat PDFPrinter 9.x(x being the most current revision).
    and choose Print. with the version 9.x  the pdf will automatically be set to desktop and you have no choice where it save.
    All versions previous to 9.0 a window would come up giving you a chance to choose the dsired location.
    9.0 does not. THis is a super major bug, that only a rank amature would committ.
    One thing Apple has preached fro day one; do not save any file you want to keep to the desktop.
    The desktop is a Temporary file. and in event of a crash the desktop is rebuilt and the file may go missing.
    Items such a Yahoo widgets get by, by using a special Database that tells where each widget is supposed to go, and and in event of  crash simply recreates them.

  • All my excel files were converted to pdf. Why would this happen and how do i stop it from doing so?

    All my excel files were converted to pdf. Why would this happen and how do i stop it from doing so?

    shloimypt wrote:
    All my excel files were converted to pdf. Why would this happen and how do i stop it from doing so?
    Relax, they weren't converted to PDF.
    You can tell by right clicking ANY of them and choosing "Properties". You'll see there that they're STILL .xls or .xlsx files. The "association" has changed and Windows now indicates that they open with Reader, which isn't right.
    Where it says "Open With" under the General tab, you can click "Change" and re-select Excel as the default app to open thim.
    See: http://helpx.adobe.com/acrobat/kb/application-file-icons-change-acrobat.html

  • Some CGM graphics do not appear when FrameMaker files are converted to PDF

    CGM files are exported from ISO (Arbortext Isodraw 7.0 CadProcess) files. Then they are imported into Adobe FrameMaker 7.2, where all elements of the illustration are visible and can be printed. The FrameMaker FM file is converted to a PDF file using the Adobe PDF converter function of Frame. When the PDF file is opened by Adobe Acrobat 8,0 Professional, some, but not all of the illustrations in the file exhibit this problem (The callouts and other text may appear, but the lines, curves, etc. do not). The illustration prints the same way it appears on the screen. When exporting the ISO file as a CGM, the following selections are made.
    When importing file into Frame, "Import by Reference" is selected.
    When creating PDF in Frame, the following selections are made.
    Any Suggestions would be greatly appreciated. Thanks very much.

    Thanks, Michael.
    I will give it a try.
    Avox Systems Web Site: http://www.avoxsys.com
    AVOX SYSTEMS
    AIRCRAFT SYSTEMS
    Rick Barusic
    Senior Technical Writer
    225 Erie Street - Lancaster, NY 14086 - USA
    Tel: 716-686-1706
    [email protected]
    http://www.zodiacaerospace.com
    The information transmitted is intended only for the person or entity to
    which it is addressed and may contain confidential and/or privileged
    material. Any review, retransmission, dissemination, or other use of or
    taking any action in reliance upon this information by persons or entities
    other than the intended recipient is prohibited. If you received this in
    error, please contact the sender and delete the material from any
    computer.
    From:   MichaelKazlow <[email protected]>
    To:     rick barusic <[email protected]>
    Date:   11/24/2010 10:32 PM
    Subject:        Some CGM graphics do not appear when
    FrameMakerfiles are converted to PDF
    First you should update to the latest version of Acrobat 8, since you say
    you are running Acrobat 8, you should update to 8.2.5. Update your
    FrameMaker to 7.2p158. Those two steps might do the trick. If that fails
    try using a different settings file. Perhaps High Quality or Press
    Quality. I would never use Standard for anything where fidelity is
    important.

  • I paid for adobe to convert a PDF to word -- now I can't save PDFs to my computer -- and I'm saving to the cloud -- HELP

    I'm so depressed -- what happened to the old days when you could actually get a person in support and not have to join a forum -?
    I purchased adobe acrobat to convert a PDF to a word document - that's all I wanted --
    Now every damn PDF I receive or try to open can only be saved in the adobe cloud -- which I have no interest in -- and not on my computer --
    How can I resolve this situation --
    I can't seem to find "settings" or "support" --
    Yes, I'm over 50 -- and I struggle with this maddening technology -- nothing is simple or straightforward --
    I scanned a document, emailed it to myself and would like to name it and save it to my computer -- used to be a 3 minute process -- now its 30 minutes (of valuable, but wasted time later) -- and here I am -- seeking help from no one in particular!  The anonymous "forum" --

    No -- I installed adobe acrobat -- and now, whether I'm signed in or not -- the little disc/save icon is whited out and it can no longer be selected -- when I open a PDF I can only save it to the cloud
    I am a physician, and a lot of what I look at is protected health information --- I can't be saving it in the cloud!!!  I have to find a way to disable this feature -- and restore my ability to save to my hard drive ONLY --
    Thanks -- but if you can tell me those things, I'll be grateful
    tried to attach screen shot to show you, but it was too big .......

  • Problem with Multiple Page convert in PDF

    Hi all,
    I done one invoice printing and convert in pdf report.  but with smartform i get all thing and giving perfect out put.
    But when i give second option for direct create a file of PDF this time only one page can convert in PDF. Means when i give multiple input like print invoice 0000910 to 0000925 so this time only invoice no. 0000925 is convert in pdf. But actually i need all invoice like 910 to 925 convert in one PDF with 25 pages.
    And i done coding which is show below for this issue.
    so please help me out and kindly guide me what is the mistake in my below code for make multiple page in one pdf.
    FORM get_FORM1.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = w_form_name
    * VARIANT = ' '
    * DIRECT_CALL = ' '
    IMPORTING
    fm_name = w_fmodule
    EXCEPTIONS
    no_form = 1
    no_function_module = 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.
    w_cparam-no_dialog = 'X'.
    w_cparam-preview = space. " Suppressing the dialog box
                                                        " for print preview
    w_cparam-getotf = 'X'.
    * Printer name to be used is provided in the export parameter
    * OUTPUT_OPTIONS
    w_outoptions-tddest = 'LP01'.
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      ITABz[]                       = itab[].
      ITABz1[]                      = itab1[].
      IT_ADDRESSz[]                = it_address[].
      LOOP at itab1.
        delete ITABz where vbeln ne  itab1-vbeln.
        delete ITABz1 where vbeln ne  itab1-vbeln.
        delete it_addressz where KUNNR ne  itab1-KUNRG.
    *      delete itab1 where vbeln ne  itab1-vbeln.
        TOTAL_QNT                  = ITAB1-TOTAL_QNT.
        TOTAL_AMT                  = itab1-TOTAL_AMT.
        I_FKIMG = itab1-I_FKIMG.
        BILL_DATE                  = itab1-BILL_DATE.
        IJ_1ICSTNO                 = itab1-IJ_1ICSTNO.
        VECHICAL_NO                = itab1-VECHICAL_NO.
        TAX                        = itab1-TAX.
        INV_TXT                    = ITAB1-INV_TXT.
        inv_name                   = ITAB1-INV_NAME.
        INVOICE                    = ITAB1-INVOICE.
        TAX1                       = itab1-TAX1.
        TAX_VAL                    = itab1-TAX_VAL.
        TAX_ADD_VAL                = itab1-TAX_ADD_VAL   .
        Text_inv                   = itab1-Text_inv.
        TEXT1                      = itab1-TEXT1.
        TEXT2                      = itab1-TEXT2.
        TEXT3                      = itab1-TEXT3.
        TEXT4                      = itab1-TEXT4.
        TEXT5                      = itab1-TEXT5.
        P_DOCNO                    = itab1-vbeln.
    CALL FUNCTION w_fmodule
    EXPORTING
              WERKS                      = WERKS
              TOTAL_QNT                  = TOTAL_QNT
              TOTAL_AMT                  = TOTAL_AMT
              I_FKIMG                    = I_FKIMG
              STATE                      = STATE
              LAND1                      = LAND1
              LANDX                      = LANDX
              P_DOCNO                    = P_DOCNO
              BILL_DATE                  = BILL_DATE
              IJ_1ICSTNO                 = IJ_1ICSTNO
              T_WERKS                    = T_WERKS
              VECHICAL_NO                = VECHICAL_NO
              TAX                        = TAX
              TAX1                       = TAX1
              TAX_VAL                    = TAX_VAL
              TAX_ADD_VAL                = TAX_ADD_VAL
              inv_txt                    = inv_txt
              inv_name                   = inv_name
              INVOICE                    = INVOICE
              Text_inv                   = Text_inv
              TEXT1                      = TEXT1
              TEXT2                      = TEXT2
              TEXT3                      = TEXT3
              TEXT4                      = TEXT4
              TEXT5                      = TEXT5
    *   ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
       CONTROL_PARAMETERS         = w_cparam
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
        OUTPUT_OPTIONS             = w_outoptions
    *   USER_SETTINGS              = 'X'
    IMPORTING
    * DOCUMENT_OUTPUT_INFO =
    job_output_info = t_otf_from_fm
    * JOB_OUTPUT_OPTIONS =
    TABLES
            ITAB                       = itabz
            ITAB1                      = itabz1
            IT_ADDRESS                 = it_addressz
         EXCEPTIONS
           FORMATTING_ERROR           = 1
           INTERNAL_ERROR             = 2
           SEND_ERROR                 = 3
           USER_CANCELED              = 4
           OTHERS                     = 5
    iF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ITABz[]                       = itab[].
        ITABz1[]                      = itab1[].
        IT_ADDRESSz[]                = it_address[].
      ENDLOOP.
    t_otf[] = t_otf_from_fm-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    FORMAT = 'PDF'
    MAX_LINEWIDTH = 132
    * ARCHIVE_INDEX = ' '
    * COPYNUMBER = 0
    * ASCII_BIDI_VIS2LOG = ' '
    * PDF_DELETE_OTFTAB = ' '
    IMPORTING
    BIN_FILESIZE = W_bin_filesize
    * BIN_FILE =
    TABLES
    otf = T_OTF
    lines = T_pdf_tab
    EXCEPTIONS
    ERR_MAX_LINEWIDTH = 1
    ERR_FORMAT = 2
    ERR_CONV_NOT_POSSIBLE = 3
    ERR_BAD_OTF = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    * To display File SAVE dialog window
    CALL METHOD cl_gui_frontend_services=>file_save_dialog
    CHANGING
    filename = w_FILE_NAME
    path = w_FILE_PATH
    fullpath = w_FULL_PATH
    * USER_ACTION =
    * FILE_ENCODING =
    EXCEPTIONS
    CNTL_ERROR = 1
    ERROR_NO_GUI = 2
    NOT_SUPPORTED_BY_GUI = 3
    others = 4
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    * Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
    * presentation server
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = W_bin_filesize
    filename = w_FULL_PATH
    FILETYPE = 'BIN'
    tables
    data_tab = T_pdf_tab
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    EndFORM .               "get_FORM1
    thanks
    Keyur
    Edited by: keyur chauhan on Aug 30, 2010 11:56 AM
    Edited by: keyur chauhan on Aug 30, 2010 11:57 AM
    Edited by: keyur chauhan on Aug 30, 2010 12:37 PM

    Thank you!
    Unfortunately I didn't find any work around.
    Thanks,
    Federico

  • When I convert my pdf doc to word, the fonts go really weird and it also puts some text into boxes. when I try to select the test and change the font, it does not change it properly?

    When I convert my pdf doc to word, the fonts go really weird and it also puts some text into boxes. when I try to select the text and change the font, it does not change it properly? This is making it impossible to amend.

    Hi Janedance1,
    If the PDF that you converted already has searchable text, please try disabling OCR as described in this document: How to disable Optical Character Recognition (OCR) when converting PDF to Word or Excel. (If the PDF was created from a scanned document and doesn't already have searchable text, disabling OCR isn't a great option, as the text won't be searchable/editable in the converted Word doc.)
    Please let us know how it goes.
    Best,
    Sara

  • ALV output converted into PDF format and send that PDF to user through mail

    Hi Experts,
    I have report earlier its output was in alv grid.
    Now i want that ALV output converted into PDF format.And that PDF output send to user through mail.
    Can u please tell how to do?
    My code is here(output is displaying in ALV grid).
    INCLUDE <icon>.
    TYPE-POOLS: slis, kkblo.
    TABLES : zmsd_freight_hdr, zmsd_freight_det, zmsd_blinfo, zmsd_diheader.
    TABLES : lfa1.
    DATA : t_hdr   LIKE   zmsd_freight_hdr   OCCURS 0 WITH HEADER LINE,
           T_DET   LIKE   ZMSD_FREIGHT_DET   OCCURS 0 WITH HEADER LINE,
           t_bl    LIKE   zmsd_blinfo        OCCURS 0 WITH HEADER LINE,
           t_di    LIKE   zmsd_diheader      OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF t_det OCCURS 0.
            INCLUDE STRUCTURE zmsd_freight_det.
    DATA    type(30).
    DATA: END OF t_det.
    DATA: v_target2(30),
          v_zsammg LIKE t_det-zsammg,
          v_gsttotal LIKE t_det-zamount.
    DATA : BEGIN OF t_data OCCURS 0,
             zsammg       LIKE  zmsd_freight_hdr-zsammg,
             zdidbl       LIKE  zmsd_freight_hdr-zdidbl,
             zvkorg       LIKE  zmsd_freight_hdr-zvkorg,
             zinvno       LIKE  zmsd_freight_hdr-zinvno,
             zttlamt      LIKE  zmsd_freight_hdr-zttlamt,
             zstatus      LIKE  zmsd_freight_hdr-zstatus,
             ztype        LIKE  zmsd_freight_hdr-ztype,
             zconfirm     LIKE  zmsd_freight_hdr-zconfirm,
             zconfirmdate LIKE  zmsd_freight_hdr-zconfirmdate,
             erdat        LIKE  zmsd_freight_hdr-erdat,
             ernam        LIKE  zmsd_freight_hdr-ernam,
             erzet        LIKE  zmsd_freight_hdr-erzet,
             aedat(10),
             aenam        LIKE  zmsd_freight_hdr-aenam,
             aezet        LIKE  zmsd_freight_hdr-aezet,
             zline        LIKE  zmsd_freight_det-zline,
             zfptype      LIKE  zmsd_freight_det-zfptype,
             zchrcode     LIKE  zmsd_freight_det-zchrcode,
             zcurcode     LIKE  zmsd_freight_det-zcurcode,
             zqty         LIKE  zmsd_freight_det-zqty,
             zuom         LIKE  zmsd_freight_det-zuom,
             zrate        LIKE  zmsd_freight_det-zrate,
             zamount      LIKE  zmsd_freight_det-zamount,
             zexrate      LIKE  zmsd_freight_det-zexrate,
           zccode       LIKE  zmsd_blinfo-zccode,      "MADK991565
             zccode       like  ZMSD_FREIGHT_HDR-zfcode, "MADK991565
             zbldate(10),
             zbl          LIKE  zmsd_blinfo-zbl,
             type(3),
             waerk        LIKE  zmsd_freight_det-zcurcode,
             zamountl     LIKE  zmsd_freight_det-zamount,
           END OF t_data.
    DATA : w_layout      TYPE   slis_layout_alv,
           w_catalog     TYPE   slis_fieldcat_alv,
           t_catalog     TYPE   slis_t_fieldcat_alv,
           w_sort        TYPE   slis_sortinfo_alv,
           t_sort        TYPE   slis_t_sortinfo_alv.
    DATA   V_ZINVNO    like   T_HDR-ZINVNO.                   "MADK991565
    DATA : v_count  TYPE  i.
    SELECTION-SCREEN BEGIN OF BLOCK a0 WITH FRAME TITLE text-001.
    PARAMETERS     :  p_zvkorg LIKE zmsd_freight_hdr-zvkorg  OBLIGATORY .
    SELECT-OPTIONS :  s_zdidbl FOR  zmsd_freight_hdr-zdidbl             ,
                      s_zccode FOR  lfa1-lifnr                          ,
                      s_status FOR  zmsd_freight_hdr-zstatus            ,
                      s_ztype  FOR  zmsd_freight_hdr-ztype              ,
                      s_erdat  FOR  zmsd_freight_hdr-erdat              ,
                      s_ernam  FOR  zmsd_freight_hdr-ernam              ,
                      s_zconfd FOR  zmsd_freight_hdr-zconfirmdate       .
    PARAMETERS     :  p_zconf  AS   CHECKBOX                            .
    SELECTION-SCREEN END OF BLOCK a0.
    SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-002.
    PARAMETERS     :  p_hdr    RADIOBUTTON GROUP rad DEFAULT 'X'        ,
                      p_det    RADIOBUTTON GROUP rad                    .
    SELECTION-SCREEN END OF BLOCK a1.
    INITIALIZATION.
    AT SELECTION-SCREEN.
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM process.
      PERFORM display.
    END-OF-SELECTION.
      PERFORM fm_get_num_pages.
    AT USER-COMMAND.
    AT LINE-SELECTION.
    TOP-OF-PAGE.
      PERFORM fm_top_of_page USING '7010' sy-title space.
    FORM get_data.
      SELECT   *
        FROM   zmsd_freight_hdr
        INTO   TABLE t_hdr
       WHERE   zvkorg        EQ  p_zvkorg
         AND   zdidbl        IN  s_zdidbl
         AND   zstatus       IN  s_status
         AND   ztype         IN  s_ztype
         AND   erdat         IN  s_erdat
         AND   ernam         IN  s_ernam
         AND   zconfirmdate  IN  s_zconfd
         AND   ZFCODE        IN  S_ZCCODE.                      "MADK991565
      IF p_zconf = 'X'.
        DELETE t_hdr WHERE zconfirm NE 'C'.
      ENDIF.
      CHECK NOT t_hdr[] IS INITIAL.
      SELECT   *
        FROM   zmsd_blinfo
        INTO   TABLE t_bl
         FOR   ALL ENTRIES IN t_hdr
       WHERE   zsammg = t_hdr-zsammg.
      SORT t_bl BY zsammg.
      SELECT   *
        FROM   zmsd_diheader
        INTO   TABLE t_di
         FOR   ALL ENTRIES IN t_hdr
       WHERE   zsammg = t_hdr-zsammg.
      SORT t_di BY zsammg.
    IF P_DET = 'X'. "MADK933361
      SELECT   *
        FROM   zmsd_freight_det
        INTO   TABLE t_det
         FOR   ALL ENTRIES IN t_hdr
       WHERE   zsammg  =  t_hdr-zsammg
       AND ZINVNO =  T_HDR-ZINVNO .                           "MADK991565
    SORT t_det BY zsammg zline.                            "MADK991565
       SORT T_DET BY ZSAMMG ZINVNO ZLINE.                     "MADK991565
    ENDIF. "MADK933361
    ENDFORM.
    FORM process.
      REFRESH t_data.
      CLEAR v_gsttotal.                                         "MADK933361
      LOOP AT t_hdr.
    Start of MADK933361
        CLEAR: v_target2.
        v_zsammg = t_hdr-zsammg.
        V_ZINVNO = T_HDR-ZINVNO.                                "MADK991565
       AT NEW zsammg.                                         "MADK991565
         AT NEW ZINVNO.                                         "MADK991565
          PERFORM get_gst_value.
        ENDAT.
    End of MADK933361
        PERFORM move_header.
        CHECK t_data-zccode IN s_zccode.
        IF p_det = 'X'.
    CSF Project Changes Starts   DEV34    MADK985782
        LOOP AT T_DET WHERE ZSAMMG = T_HDR-ZSAMMG..
          LOOP AT t_det WHERE zsammg = t_hdr-zsammg AND
                              zinvno = t_hdr-zinvno.
    CSF Project Changes Ends     DEV34    MADK985782
            PERFORM move_header.
            CHECK t_data-zccode IN s_zccode.
            MOVE-CORRESPONDING t_det TO t_data.
            t_data-zamountl = t_data-zamount * t_data-zexrate.
            APPEND t_data.
            CLEAR t_data.
          ENDLOOP.
        ELSE.
          APPEND t_data.
          CLEAR t_data.
        ENDIF.
        AT END OF zsammg.
          CLEAR v_gsttotal.
        ENDAT.
    *Start of changes for  IS090901289-PIA MADK991565
        AT END OF ZINVNO.
          CLEAR V_GSTTOTAL.
        ENDAT.
    *End of changes for  IS090901289-PIA MADK991565
      ENDLOOP.
    ENDFORM.
    FORM move_header.
      MOVE-CORRESPONDING t_hdr TO t_data.
      t_data-zttlamt = t_data-zttlamt + v_gsttotal.             "MADK933361
      t_data-waerk = 'SGD'.
      IF NOT t_hdr-aedat IS INITIAL.
        WRITE: t_hdr-aedat TO t_data-aedat.
      ELSE.
        CLEAR : t_data-aedat.
      ENDIF.
      READ TABLE t_bl WITH KEY zsammg = t_hdr-zsammg BINARY SEARCH.
      IF sy-subrc EQ 0.
      t_data-zccode  = t_bl-zccode.   "MADK991565
        T_DATA-ZCCODE = T_HDR-ZFCODE.   "MADK991565     
        IF NOT t_bl-zbldate IS INITIAL.
          WRITE: t_bl-zbldate TO t_data-zbldate.
        ENDIF.
        t_data-zbl     = t_bl-zbl.
        t_data-type    = 'DBL'.
      ELSE.
        READ TABLE t_di WITH KEY zsammg = t_hdr-zsammg BINARY SEARCH.
        IF sy-subrc EQ 0.
        t_data-zccode  = t_di-zdiforcode.     "MADK991565
          T_DATA-ZCCODE = T_HDR-ZFCODE.         "MADK991565
          t_data-type    = 'DI'.
        ENDIF.
      ENDIF.
    ENDFORM.
    FORM display.
      IF t_data[] IS INITIAL.
        MESSAGE s398(00) WITH 'No Data Selected'.
        EXIT.
      ENDIF.
      DATA : l_repid LIKE sy-repid.
      l_repid = sy-repid.
      REFRESH t_catalog.
      CLEAR   t_catalog.
      w_layout-cell_merge = 'X'.
      PERFORM map_fields.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = l_repid
                i_callback_user_command = 'ALV_USER_COMMAND'
                is_layout               = w_layout
                it_fieldcat             = t_catalog[]
                i_grid_title            = sy-title
                i_save                  = 'A'
                it_sort                 = t_sort[]
           TABLES
                t_outtab                = t_data
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
      IF sy-subrc <> 0.
      ENDIF.
    ENDFORM.
    FORM map_fields.
    Sort Order
      CLEAR v_count.
      PERFORM sf USING 'ZDIDBL'   'X'  'X'.
    Fields to be displayed
      CLEAR v_count.
      IF p_hdr = 'X'.
        PERFORM af USING :
       DESCRIPTION       FIELD        LEN   RTABLE             RFIELD
        'DI/DBL         ' 'ZDIDBL'     '14' '                ' '        ',
        'Type           ' 'TYPE'       '04' '                ' '        ',
        'Forwarder Code ' 'ZCCODE'     '14' '                ' '        ',
        'BL Number      ' 'ZBL'        '14' '                ' '        ',
        'BL Date        ' 'ZBLDATE'    '10' '                ' '        ',
        'Invoice Number ' 'ZINVNO'     '15' '                ' '        ',
        'Extraction     ' 'ZSTATUS'    '05' 'ZMSD_FREIGHT_HDR' 'ZSTATUS ',
        'Freight Type   ' 'ZTYPE'      '05' 'ZMSD_FREIGHT_HDR' 'ZTYPE   ',
        'Confirmation   ' 'ZCONFIRM'   '05' 'ZMSD_FREIGHT_HDR' 'ZCONFIRM',
        'Confirm Date   ' 'ZCONFIRMDATE' '10' 'ZMSD_FREIGHT_HDR'
    'ZCONFIRMDATE',
        'Total Amount   ' 'ZTTLAMT'    '18' '                ' '        ',
        'Created On     ' 'ERDAT'      '10' '                ' '        ',
        'Created By     ' 'ERNAM'      '10' '                ' '        ',
        'Changed On     ' 'AEDAT'      '10' '                ' '        ',
        'Changed By     ' 'AENAM'      '10' '                ' '        '.
      ELSE.
        PERFORM af USING :
       DESCRIPTION         FIELD     LEN   RTABLE             RFIELD
        'DI/DBL           ' 'ZDIDBL'   '14' '                ' '        ',
        'Type             ' 'TYPE'     '04' '                ' '        ',
        'Forwarder Code   ' 'ZCCODE'   '14' '                ' '        ',
        'BL Number        ' 'ZBL'      '14' '                ' '        ',
        'BL Date          ' 'ZBLDATE'  '10' '                ' '        ',
        'Invoice Number   ' 'ZINVNO'   '15' '                ' '        ',
        'Extraction       ' 'ZSTATUS'  '05' 'ZMSD_FREIGHT_HDR' 'ZSTATUS ',
        'Freight Type     ' 'ZTYPE'    '05' 'ZMSD_FREIGHT_HDR' 'ZTYPE   ',
        'Confirmation     ' 'ZCONFIRM' '05' 'ZMSD_FREIGHT_HDR' 'ZCONFIRM',
        'Confirm Date     ' 'ZCONFIRMDATE' '10' 'ZMSD_FREIGHT_HDR'
    'ZCONFIRMDATE',
        'Total Amount     ' 'ZTTLAMT'  '18' '                ' '        ',
        'Freight Payment  ' 'ZFPTYPE'  '14' '                ' '        ',
        'Charge Code      ' 'ZCHRCODE' '10' '                ' '        ',
        'Currency         ' 'ZCURCODE' '08' '                ' '        ',
        'Quantity         ' 'ZQTY'     '13' '                ' '        ',
        'UoM              ' 'ZUOM'     '04' '                ' '        ',
        'Rate             ' 'ZRATE'    '15' '                ' '        ',
        'Amt(Foreign Curr)' 'ZAMOUNT'  '16' '                ' '        ',
        'Exchange Rate    ' 'ZEXRATE'  '13' '                ' '        ',
        'Amt(Local Curr)  ' 'ZAMOUNTL' '16' '                ' '        ',
        'Created On       ' 'ERDAT'    '10' '                ' '        ',
        'Created By       ' 'ERNAM'    '10' '                ' '        ',
        'Changed On       ' 'AEDAT'    '10' '                ' '        ',
        'Changed By       ' 'AENAM'    '10' '                ' '        '.
      ENDIF.
    ENDFORM.
    FORM af USING text
                  field
                  len
                  table
                  reffield.
      v_count = v_count + 1.
      w_catalog-col_pos       = v_count.
      w_catalog-fieldname     = field.
      w_catalog-ref_tabname   = table.
      w_catalog-ref_fieldname = reffield.
      w_catalog-seltext_s     = text.
      w_catalog-seltext_m     = text.
      w_catalog-seltext_l     = text.
      w_catalog-outputlen     = len.
      IF field = 'ZTTLAMT' OR field = 'ZAMOUNTL'.
        w_catalog-no_zero     = 'X'.
        w_catalog-cfieldname  = 'WAERK'.
        w_catalog-datatype    = 'CURR'.
      ENDIF.
    IF FIELD = 'ZRATE' OR FIELD = 'ZAMOUNT'.
      IF field = 'ZAMOUNT'.
        w_catalog-no_zero     = 'X'.
        w_catalog-cfieldname  = 'ZCURCODE'.
        w_catalog-datatype    = 'CURR'.
      ENDIF.
      IF field = 'ZQTY' OR field = 'ZRATE'.
        w_catalog-no_zero     = 'X'.
        w_catalog-datatype  =  'DEC'.
      ENDIF.
      APPEND w_catalog TO t_catalog.
      CLEAR  w_catalog.
    ENDFORM.
    FORM sf    USING   fieldname  sortup  group.
      v_count = v_count + 1.
      CLEAR w_sort.
      w_sort-fieldname = fieldname.
      w_sort-spos      = v_count.
      w_sort-up        = sortup.
      w_sort-group     = group.
      APPEND w_sort TO t_sort.
    ENDFORM.
    FORM alv_user_command USING  in_ucomm    LIKE sy-ucomm
                                 in_selfield TYPE slis_selfield.
      DATA: lfs_data LIKE t_data.
      IF in_ucomm = '&IC1'.
        READ TABLE t_data INDEX in_selfield-tabindex INTO lfs_data.
        CHECK NOT lfs_data-zdidbl IS INITIAL.
        IF lfs_data-type = 'DBL'.
          DATA: l_zdbl LIKE zmsd_diheader-zdinum.
          l_zdbl = in_selfield-value.
          EXPORT l_zdbl TO MEMORY ID 'VBL'.
          CALL TRANSACTION 'ZMSD_BL01'.
        ENDIF.
        IF lfs_data-type = 'DI'.
          DATA: v_dinum LIKE zmsd_diheader-zdinum.
          v_dinum = in_selfield-value.
          EXPORT v_dinum TO MEMORY ID 'VDI'.
          CALL TRANSACTION 'ZMSD_DI01'.
        ENDIF.
      ENDIF.
    ENDFORM.
    FORM get_gst_value.
      LOOP AT t_det WHERE zsammg = v_zsammg
         AND ZINVNO = V_ZINVNO.                              "MADK991565
        CHECK t_data-zccode IN s_zccode.
        t_det-zamount  = t_det-zamount * t_det-zexrate.
        SELECT SINGLE  y0mmtarget2
                INTO   v_target2
                FROM   y0mmipstranslate
                WHERE  y0mmdatatype = '70' AND
                       y0mmsource = t_det-zchrcode.
        SELECT SINGLE y0mmtarget1
               INTO   t_det-type
               FROM   y0mmipstranslate
               WHERE  y0mmdatatype = '76' AND
                      y0mmsource = v_target2.
        IF t_det-type NE '3Z'.
          v_gsttotal    = v_gsttotal +
                               ( t_det-zamount * 5 / 100 ).
        ENDIF.
      ENDLOOP.
    Regards,
    Raj.

    Hello,
    Following is the procedure to convert alv output to spool and then it to PDF Format.
    After we display the ALV, we can check whether it is running in the background using system field u2018sy-batchu2018. Then,we call an function module named u2018GET_JOB_RUNTIME_INFOu2019 to get the current job information. Then go to spool request table tbtcp to get the spool id.
    Get current job details
      CALL FUNCTION u2018GET_JOB_RUNTIME_INFOu2019
           IMPORTING
                eventid                 = gd_eventid
                eventparm               = gd_eventparm
                external_program_active = gd_external_program_active
                jobcount                = gd_jobcount
                jobname                 = gd_jobname
                stepcount               = gd_stepcount
           EXCEPTIONS
                no_runtime_info         = 1
                OTHERS                  = 2.
    SELECT * FROM  tbtcp
                     INTO TABLE it_tbtcp
                     WHERE      jobname     = gd_jobname
                               AND jobcount = gd_jobcount
                               AND stepcount = gd_stepcount
                               AND listident <> u20180000000000u2032
                               ORDER BY   jobname
                                                   jobcount
                                                   stepcount.
      READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
    Finally, we can call function module u2018CONVERT_ABAPSPOOLJOB_2_PDFu2018 to convert spool reqeust(which is stored in OTF format) to PDF format. Then we can call either function module u2018SO_DOCUMENT_SEND_API1u2032 or SAP BCS (Business Communication Service) to send the pdf as an email attachment.
    CALL FUNCTION u2018CONVERT_ABAPSPOOLJOB_2_PDFu2019
           EXPORTING
                src_spoolid              = gd_spool_nr
                no_dialog                = c_no
                dst_device               = c_device
           IMPORTING
                pdf_bytecount = gd_bytecount
           TABLES
                pdf = it_pdf_output
           EXCEPTIONS
                err_no_abap_spooljob     = 1
                err_no_spooljob          = 2
                err_no_permission        = 3
                err_conv_not_possible    = 4
                err_bad_destdevice       = 5
                user_cancelled           = 6
                err_spoolerror           = 7
                err_temseerror           = 8
                err_btcjob_open_failed   = 9
                err_btcjob_submit_failed = 10
                err_btcjob_close_failed  = 11
                OTHERS                   = 12.
    Regards,
    Sayali
    Edited by: Sayali Paradkar on Apr 20, 2010 12:51 PM

Maybe you are looking for

  • Large 1.7 gig file fails on server error with new CC desktop app

    Repeated attempts to upload a large 1.7 gig PDF fail. Is there a size limit for uploads? I have a fast Internet connection which works fine.

  • ALE or EDI ?

    Hi Guru's  , One of our client wants to exchange transactional data(Purchase Order and Invoice related dat only) with one of their client . Both the parties have SAP system behind their own firewalls. Business data related to purchase order and Invoi

  • DPM 2012 R2 console crash after RU5 install

    Hello all, recently I update my DPM to RU5 and since then then I click on management tab the console crash. I tried Islam's solution but it is not working for me. In the event I get this: The description for Event ID 999 from source MSDPM cannot be f

  • Reading P2 quicktime mov files

    Hi. My computer opens & can read the Quicktime movie files that are created through Final Cut Pro from P2 cards. My client's computer cannot. Is that because she doesn't have Quicktime Pro?..or something else? TIA, Heather

  • How to disable mac address filtering

    Hello I have a macbook pro. I am using a Westell 7500 wireless router and my hp photosmart 110 printer stopped working, saying that "MAC address filtering may be enabled on your wirelss router". Not sure how to dissble this and/or why it all of a sud