Language issue in PDF Format

Hi experts,
I am facing a weird issue. I have a smartform that can be printed or send to mail as pdf in Ukrainian. It is being printed correctly, but when it send it to mail as PDF (Using output type), the characters on the form are being merged together. Its in Ukrainian, but since the characters overlap each other, we can uncerstand what is written.
Anyone knows how to solved this?
Regards,
Zaheed

1.Go to REGEDIT ==>HKEY_LOCAL_MACHINE==>SOFTWARE==>ORACLE==>KEY_DEVSUITEHOME
2.SELECT NLS_LANG :ARABIC_UNITED ARAB EMIRATES. AR8MSWIN1256.
3.Make your Regional&Language setting as Arabic environment.
4.set all fonts should be in Tahoma.
5.Generate RDF file in report builder and then convert into REX.
6.Finally generated the reports.

Similar Messages

  • Problem in Asian language conversion in pdf format? Need Help!

    Dear All,
                I have created an SAPscript form in Chinese, and Korean versions. The print preview of the form layout is coming properly when I am using corresponding output type options. But when I am trying to get a pdf format of the invoice layout, the Korean and Chinese fonts are not coming properly. What to do?
                        My second question is how to access Archieved database in SAP?
    Eagerly waiting for your reply.
    Regards,
    Pulokesh

    Hi,
    Time Statement works only you implement Time Evalutation, once you run the Time Evalutationn than you activate the  HR FORM =SAP_TIMESLIP , and maintain the Feature HRFOR.
    Hope this will help you!!
    Regards,
    Samba.

  • Issue with PDF

    Hi All,
    i facing issue with PDF format .
    we developed smartform and we are using standard program SAPF150D2.
    we did translation for that form englsih to  EURO.
    Now if we  see output in OTF format , it showing correct way in EURO.
    but , i we see same layout in PDF format,
    Insted of showing ( ' )this letter, it is showing # in the PDF layout.
    Is there any pointer to know soultion for this.
    Thanks in advance,
    regards,
    JBR

    This is likely a problem with the way those links are coded in the PDF file, so the file may have to be saved again using different settings to make it work with PDF Viewers other than the Adobe Reader.

  • Chinese char issue in smartform preview as pdf format

    Hi chinese guy!!
    please help me with chinese char in smartform preview as pdf format
    i created smartform with chinese char and then when executing this smartform by t-code smartforms, it show as simplified chinese char, but when getting JOB_OUTPUT_INFO in order to convert OTF as pdf format, although smartforms performed as pdf format, only chinese char were broken. smartform with english or korean language does not have any issue, only chinese issue now.
    i got into r/3 as logon ZH by SAP GUI english version  and i used adobe acrobat reader chinese simplifed version. r/3 version is ecc60 unicode system***
    please help me,, any chinese guy there?
    1.  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    2.    CONTORL_PARAMETERS-NO_DIALOG = 'X'.
           CONTORL_PARAMETERS-GETOTF = 'X'.
           OUTPUT_OPTIONS-TDNOPREV = 'X'.
           CLEAR JOB_OUTPUT_INFO.
    3.    
    CALL FUNCTION FUNCTION
        EXPORTING
          CONTROL_PARAMETERS = CONTORL_PARAMETERS
          OUTPUT_OPTIONS     = OUTPUT_OPTIONS
        IMPORTING
          JOB_OUTPUT_INFO    = JOB_OUTPUT_INFO
        TABLES
          ITEM               = ITEM
        EXCEPTIONS
          FORMATTING_ERROR   = 1
          INTERNAL_ERROR     = 2
          SEND_ERROR         = 3
          USER_CANCELED      = 4.
      OTF_TAB[] = JOB_OUTPUT_INFO-OTFDATA[].
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          FORMAT                = 'PDF'
        IMPORTING
          BIN_FILESIZE          = PDF_FSIZE
        TABLES
          OTF                   = OTF_TAB
          LINES                 = PDF_TABLE
        EXCEPTIONS
          ERR_MAX_LINEWIDTH     = 1
          ERR_FORMAT            = 2
          ERR_CONV_NOT_POSSIBLE = 3
          OTHERS                = 4.

    hi,
    please see the notes 999712.
    thanks

  • Issues in exporting SSRS report to PDF format in Report Server - Blank spaces are deleted

    Hi Gurus,
    I have a problem in exporting SSRS report to PDF format. It deletes all the blank spaces when I use bullet in a Text box and try to export to PDF formt in Report Server . For example
    •             Project submitted to the TRC
    Result in PDF format:
         • ProjectsubmittedtotheTRC
    I also noted that when I try to export to PDF in Visual Stuio 2005 (Business Intelligence development studio), it does not delete any blank spaces and shows the correct aligned Data in PDF format.
    Please help me as it is frustrating a lot
    I would highly appreciate for your quick response 

    Was there ever a solution found for this as i have the same issue.
    When bullet point is entered in a field all the spaces are removed when exported to PDF
    i tried exporting to excel and it does not remove spaces, however this is no use to me as it needs to be in PDF
    Using IE 7 (Don't think the browser has anything to do with it as this happened via a subscription)
    Didn't know SSRS had specific Service Packs, i though they came as patches to SQL Server (SQL Server is on Service Pack 3)
    This should be easy to replicate all you need to do is copy text containing a bullet point into a sql server database field and then add this field to a report export to pdf and the spaces are gone
    Thanks in advance,
    Mark Brunton
    brunzire

  • Issue in printing table to PDF format

    Hi all,
    I am really facing an issue in designing reports. I have to customize the report that i am displaying in the dashboard while printing or sending it as mail.I need to create a multipage report.
    I have a table displayed on the dashboard. Now with the help of the print button i can print the table to PDF format. But before printing in need to add some pages to the report like on first page i have a introduction(static) then on second page i have a table of content then after that i need to place the table that is on the dashboard etc.
    Could it be possible to modify a report like this or any other alternative?
    Thanks a lot.

    I found the solution .
    I incorporated query,infofield,company logo in report designer and then i imported the report designer into WAD

  • PDF formatting issues on BO 4

    We are migrating from SAP BusinessObjects Enterprise XI to SAP BusinessObjects BI Platform 4.1 Support Pack 2 Patch 1. Our Crystal reports were in version 2008. We are having issues with text formating in our PDF documents. For example: lines will either overflow or wrap too soon, fonts on charts are sometimes off.
    Can anyone help quide me on where I can look to fix this?

    Hi,
    Regarding to "lines will either overflow or wrap too soon", registries change may be needed.
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\SavedData and the HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\SavedData keys and create a string value and set the TruncateClippedFieldStrings value to "Yes".
    Check out SAP BO KB 1218653 - Crystal Report fields overlap rather than truncate when viewed in InfoView or BI Launchpad  on http://service.sap.com/sap/support/notes/1218653 for detail.
    Hope this helps,
    Jin-Chong

  • Email delievery Issues with scheduled advanced reports XLS and PDF format

    Has anyone experienced problems with not recieving XLS, PDF formatted advanced reports via email?
    Is anyone using the TAW/WEB-INF/web.xml parameter:
    <context-param>
    <param-name>scheduledReportUrl</param-name>
    <param-value>http://reportservers.mydomain.com</param-value>
    </context-param>
    <context-param>
    <param-name>reportServerUrl</param-name>
    <param-value>http://reportservers.mydomain.com</param-value>
    </context-param>
    <context-param>
    <param-name>isReportServer</param-name>
    <param-value>true</param-value>
    </context-param>

    Thanks for the reply Sebastian,
    I created APS with only CVOM service and changed the parameter Xmx6g, but the result is the same. But there are some strange thing, since com at the time of shipment and PDF generation dedicated to the APS, the value of the metric "Maximum Memory (MB)" was 5.461Mg that corresponds to the parameter Xmx6g, but the metric "Total Memory (MB)" value was 1792Mg and "Free Memory (MB)" the 1.052Mg value. Is it possible that the APS does not use all available memory is allocated to it? At the time of generating the server had memory available to grow.
    Tnks,
    Calres

  • Handling Non English language characters in PDF output

    Hi All,
    We have a requirement wherein we have to display an existing Smartform output in a PDF format.
    We have used OTF to PDF conversion and displayed the PDF output in a container.
    The issue is if certain characters are of non english language then the PDF is displaying these characters as special symbols.
    The following string is getting dispalyed in the SmartForm as follows:
    ОРЕНБУРГАВТОРЕМСЕРВИС_ 
    The same string is displayed as follows in the PDF form :
    Any pointers on how to handle such cases would be highly appreciated.
    Thanks in advance.
    regards
    Chaitanya
    9703019495

    Before calling the smartform, use the FM 'SSF_GET_DEVICE_TYPE' and get  the device type based on the language.
    For eg:
      CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
        EXPORTING
          i_language = l_langu
        IMPORTING
          e_devtype  = lwa_output_options-tdprinter.
    Then you need to build the other control parameters like this:
    Build control parameters.
      lwa_control_parameters-getotf  = c_charx.
      lwa_control_parameters-device = 'PRINTER'.
      lwa_control_parameters-preview = ''.
      lwa_control_parameters-no_dialog = c_charx.
      lwa_output_options-tddest = 'LOCL'.
    Pass this lwa_output_options & lwa_control_parameters to output_options & control_parameters respectively in the Smartform FM.
    This should ideally solve this issue.
    Regards,
    Amirth

  • Unicode support in PDF format :: Crystal Reports XI R2

    Hi,
    We are using crystal reports XI at present. While generating the report using JRC and exporting the same in PDF format does not display the unicode characters (japanese). However, exporting the reports in RTF format or displaying HTML content using crystalviewer displays the unicode data properly.
    We have heard that CR XI R2 package does this support in displaying the unicode characters for PDF format.
    So we have downloaded the latest files from BO forum and we tried. But the result is the same, it does not display the unicode characters.
    Is there any work around to display the japanese characters??
    Changing the font type to MS-MINCHO in the respective fields in the RPT object does this trick. But we almost have 35 rpt files and needs to be supported for European and as well asian languages.
    Changing for the font type for every reports or keeping different RPT files for differnet languages will be tedious to do.
    Is there any JRC method available to set the font type @ runtime?
    Thanks in advance.

    Do you have a current support contract?  Or do you wish to purchase support?  Or are you looking for the old Assist support case?
    As for your post and why no-one's responding:
    [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/x/fgq]
    You're discouraging others from replying to your post by not following the forum rules.
    You're multi-posting.  You're not providing sufficient information.  You state a very general issue with no detailed information.
    Is JBoss on the supported platform list for your version of Crystal?
    Which SDK are you using - there are multiple SDKs for Java?
    How is the export being corrupted?
    [Fiddler|http://www.fiddlertool.com/fiddler/] or [Charles|http://www.charlesproxy.com/] may help in this regard.
    Sincerely,
    Ted Ueda

  • How to broadcast reports in pdf format

    Hello Experts,
    I am running reports on the web and I need to broadcast report via email in the pdf format. I do not see the option of pdf at all in the braodcasting tabl. Here's what I am doing. I right click on the report and click Broadcast -and Export > Broadcast E-mail -> Information Broadcasting tab -> Settings query -> choose the query i want to broadcast -> select the option broadcast e-mail and when I select the output format , it only shows me MHTML, HTML and Online Link to Current Data. But it does not show me the pdf option. We do have the free pdf connected to the sap server. Please let me know what I should do to get it in the pdf format.
    Thanks
    Sruthi

    Hello,
    There are two possible reasons for this issue:
    1st:
    You are using the old BExBroadcaster.
    ONLY BExBroadcaster 7.0 is able to broadcast on PDF format.  
    2nd:
    If you are already using BExBroadcaster 7.0, the PDF output format is suppressed.
    You can manage this on the following table:
    > RSRD_OUTFORM
    Check this table and remove the FLAG 'x' on SUPRESS column of PDF OUTFORM.
    Best Regards,
    Edward John

  • IllegalArgumentException error while exporting report in PDF format

    Hi all,
    we are using Crystal Report 2008, Java 1.5.22 and JRC 11.8.4.1094 to export reports in pdf format within java.
    It is working fine for all reports except for a specific report where it gives IllegalArgumentException while exporting the PDF.
    Below the error occurred:
    12:39:16,875 ERROR [c] Disk Exporter: no output file was created by an exporter
    12:39:16,875 ERROR <b> PdfExporter: caught Exception in PDFFormatter.finalizeFormatJob (from destination?); aborting export
    java.lang.IllegalArgumentException
         at com.crystaldecisions.reports.exporters.destination.disk.c.a(Unknown Source)
         at com.crystaldecisions.reports.exporters.format.page.pdf.b.a(Unknown Source)
         at com.crystaldecisions.reports.a.e.if(Unknown Source)
         at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
         at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
         at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.NonDCPAdvancedReportSource.export(Unknown Source)
         at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.export(Unknown Source)
         at com.crystaldecisions.report.web.event.br.a(Unknown Source)
         at com.crystaldecisions.report.web.event.w.a(Unknown Source)
         at com.crystaldecisions.report.web.event.b7.broadcast(Unknown Source)
         at com.crystaldecisions.report.web.event.av.a(Unknown Source)
         at com.crystaldecisions.report.web.WorkflowController.do(Unknown Source)
         at com.crystaldecisions.report.web.WorkflowController.doLifecycle(Unknown Source)
         at com.crystaldecisions.report.web.ServerControl.a(Unknown Source)
         at com.crystaldecisions.report.web.viewer.ReportExportControl.a(Unknown Source)
         at com.crystaldecisions.report.web.ServerControl.getHtmlContent(Unknown Source)
    12:39:16,875 INFO  [c] Disk Exporter: finalizing export to destination
    12:39:16,875 ERROR [JRCCommunicationAdapter] Failed to export report
    com.crystaldecisions.reports.exporters.format.page.pdf.a.a: Unknown exception is thrown
         at com.crystaldecisions.reports.exporters.format.page.pdf.b.a(Unknown Source)
         at com.crystaldecisions.reports.a.e.if(Unknown Source)
         at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
         at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
         at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.NonDCPAdvancedReportSource.export(Unknown Source)
         at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.export(Unknown Source)
         at com.crystaldecisions.report.web.event.br.a(Unknown Source)
         at com.crystaldecisions.report.web.event.w.a(Unknown Source)
         at com.crystaldecisions.report.web.event.b7.broadcast(Unknown Source)
         at com.crystaldecisions.report.web.event.av.a(Unknown Source)
         at com.crystaldecisions.report.web.WorkflowController.do(Unknown Source)
         at com.crystaldecisions.report.web.WorkflowController.doLifecycle(Unknown Source)
         at com.crystaldecisions.report.web.ServerControl.a(Unknown Source)
         at com.crystaldecisions.report.web.viewer.ReportExportControl.a(Unknown Source)
         at com.crystaldecisions.report.web.ServerControl.getHtmlContent(Unknown Source)
    Caused by: java.lang.IllegalArgumentException
         at com.crystaldecisions.reports.exporters.destination.disk.c.a(Unknown Source)
         ... 56 more
    Have an idea?
    Thanks

    Hello Andrea.
    I searched through the SAP Notes for the error that you are encountering.  There is an SAP Note that exists titled the following:
    1332907 - Report being exported to PDF format using the Crystal Reports for Eclipse 1.x runtime, errors with the exception: PdfExporter: caught Exception in PDFFormatter.finalizeFormatJob
    Since you may not have access to the SAP Notes, I will extract the details that are mentioned in the note here:
    =============================================
    Symptom
    Attempting to export a report to Adobe PDF format using the Crystal Reports for Eclipse 1.x runtime results in an exception.
    The exception indicates "PdfExporter: caught Exception in PDFFormatter.finalizeFormatJob"
    Environment
    Windows 2003
    Apache Tomcat 5.0
    Crystal Reports for Eclipse version 1.x
    Reproducing the Issue
    Using the Crystal Reports for Eclipse runtime version 1.x attempt to export a report to PDF format that has the "Repeat Group Header on Each Page" option enabled.
    Note: This does not occur if this option is enabled in a subreport.
    Cause
    When the "Repeat Group Header on Each Page" is enabled for a group in a main report the Crystal Reports for Eclipse 1.x runtime is unable to correclty format the PDF document which results in an exception.
    Resolution
    Updating the application to use Crystal Reports for Eclipse version 2.x runtime will resolve the issue.
    The most recent updates to the Crystal Reports for Eclipse runtime can be freely downloaded from the SAP SDN Website. 
    http://www.sdn.sap.com/irj/boc/crystalreports-java
    =============================================
    Since you are on JRC 11.8.4.1094 which is Crystal Reports for Eclipse 1.x, this may be the cause of your problem.
    I hope that this helps.
    Regards.
    - Robert

  • Read PDF Formatted Spool and write PDF File to Application Server

    Hi Experts,
    After ECC 6.0, HR-W2 and W2C Form Spools are getting generated in PDF format.
    We have a requirement wherein we want to read the PDF Spool Programatically and write the PDF file to Application server (Using OPEN DATASET and CLOSE DATASET)
    PARAMETERS : p_spono LIKE tsp01-rqident.
    DATA: pdf_data type FPCONTENT.
    types: lt_pdf_table(1000) type x.
    data:  l_pdf_data type standard table of lt_pdf_table,
           l_pdf_line type lt_pdf_table,
           l_offset type i,
           l_len type i,
           p_file(100) VALUE '\sapout\DVH\pdf2.pdf'.
    *Read the spool content
    CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL'
        EXPORTING
             i_spoolid = p_spono
             i_partnum = '1'
        IMPORTING
               e_pdf = pdf_data
    *         e_pdf_file = file
        EXCEPTIONS
             ads_error = 1
             usage_error = 2
             system_error = 3
             internal_error = 4
        OTHERS = 5.
    * Modify the spool  contents to prepare internal table
      l_len = xstrlen( pdf_data ).
      while l_len >= 1000.
        l_pdf_line = pdf_data+l_offset(1000).
        append l_pdf_line to l_pdf_data.
        add 1000 to l_offset.
        subtract 1000 from l_len.
      endwhile.
      if l_len > 0.
        l_pdf_line = pdf_data+l_offset(l_len).
        append l_pdf_line to l_pdf_data.
      endif.
    * GUI DOWNLOAD Works Fine
    * Now pdf contents is ready , lets store in local PC
    *CALL FUNCTION 'GUI_DOWNLOAD'
    *  EXPORTING
    *   filename                        = 'C:\Documents and Settings\Desktop\shital.pdf'
    *   filetype                        = 'BIN'
    *  TABLES
    *    data_tab                        = l_pdf_data.
    OPEN DATASET p_file FOR OUTPUT IN BINARY MODE.
    IF sy-subrc <> 0.
      MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
              ' Error opening file:'(Z03) p_file.
    ENDIF.
    LOOP AT l_pdf_data INTO l_pdf_line.
      TRANSFER l_pdf_line TO p_file.
    ENDLOOP.
    CLOSE DATASET p_file.
    IF sy-subrc <> 0.
      MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
              ' Error closing file:'(Z04) p_file.
    ENDIF.
    Currently as you can see I have commented out GUI_DOWNLOAD Function Module, But it works perfect when I try to Download file to Local Desktop.
    But when I try to pass the same Contents to Application server file and then try to open it by downloading file then it opens BLANK pdf file.
    As per requirements I should be able to write the file correctly on Application server and If I dowload it from there it should open PDF file correctly.
    Let me know if you require further details about the issue.
    Regards
    Shital
    Edited by: shital phadake on Apr 8, 2009 9:39 PM

    Thanks Selçuk for your reply and taking time for understanding the Issue,
    I went thru Functionality of the program you suggested but dont think it matches my requirement.
    Regards
    Shital

  • Reports in PDF format does not show up on solaris box

    Hi,
    I am trying to generate a report in pdf format.
    This shows up a blank page.
    But i could see that the cache file is generated for the report.
    This works fine in Win 2000.
    I have fixed the IE adobe issue.
    IS there anything special i need to do while
    generating this output.
    Your help will be highly appreciated.
    Thanks in advance,
    shailesh
    null

    I did all the config as mentioned on adobe site. It seems to me the dataset problem.
    I am running 2 reports one for which i have more data and for the other less data.
    The one with more data comes up properly on browser. But the one with less data is showing me blank page.
    shailesh
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by david Mille ([email protected]):
    hi,
    Did you install the nppdf32.dll of acrobat reader in your plugins directory in your browser ?<HR></BLOCKQUOTE>
    null

  • Error while sending PO output through mail in PDF format - Urgent

    Dear friends,
    Developed program to send sapscript output through mail in pdf format, the program running properly, even function module SO_NEW_DOCUMENT_ATT_SEND_API1 returning sy-subrc 0. But the external mail is not going to user lying in SAP outbox with message <b>"Wait for communications service"</b> . SCOT is properly configured, tested mails sending through SAP office.
    Find below the source code:
    REPORT  zmm_porder_gm
                NO STANDARD PAGE HEADING.
    TABLES: ekko, ekpa, t161t, t052, komv, j_1imocomp, t001, esll.
    Internal Tables
    DATA : txt LIKE tline-tdline,  "HEADER LINE
           your_ref LIKE ekko-ihrez, "your ref
           our_ref  LIKE ekko-unsez, "our ref
           mcompname  LIKE  t001-butxt,
           itemname   LIKE  ekpo-txz01,
           del_text LIKE tline-tdline, "delivery text
           mat_po_text LIKE tline-tdline. "material po text
    DATA: g_ind TYPE i.
    DATA: it_esll LIKE esll OCCURS 0 WITH HEADER LINE.
    DATA: sub_packno LIKE esll-sub_packno.
    DATA : po_flag(1) TYPE c.
    DATA : it_erev LIKE erev OCCURS 0 WITH HEADER LINE.
    DATA : nmebeln LIKE thead-tdname,
           obj LIKE thead-tdname.
    DATA : tline LIKE tline OCCURS 0 WITH HEADER LINE.  "HEADER TEXT
    DATA  : it_ekko LIKE ekko OCCURS 0 WITH HEADER LINE.
    DATA  : it_ekpo LIKE ekpo OCCURS 0 WITH HEADER LINE.
    DATA  : it_zmm_porder  LIKE zmm_porder OCCURS 0 WITH HEADER LINE.
    DATA  : it_konv        LIKE konv OCCURS 0 WITH HEADER LINE.
    DATA  : it_konv_ftr    LIKE konv OCCURS 0 WITH HEADER LINE.
    DATA  : it_konv_rate   LIKE konv OCCURS 0 WITH HEADER LINE.
    DATA  : it_komv_tax    LIKE komv OCCURS 0 WITH HEADER LINE.           " For Tax Calculation
    DATA  : it_zmm_house_bank LIKE zmm_house_bank OCCURS 0 WITH HEADER LINE.
    *DATA  : mrate TYPE konv-kbetr VALUE 0, mrate1(15).  rmoved by ganes and added following logic
    DATA  : mrate TYPE p VALUE 0 DECIMALS 2, mrate1(15).
    DATA  : mrate_gm TYPE p  DECIMALS 2.
    DATA  : BEGIN OF it_konv1 OCCURS 0,
                  knumv LIKE konv-knumv,
                  kschl LIKE konv-kschl,
    END OF it_konv1.
    DATA : BEGIN OF it_t052u OCCURS 0.
            INCLUDE STRUCTURE t052u.
    DATA : END OF it_t052u.
    DATA  : mpay_terms LIKE t052u-text1.
    DATA  : mwaers     LIKE konv-waers.
    DATA : BEGIN OF xt052 OCCURS 0.
            INCLUDE STRUCTURE t052.
    DATA : END OF xt052.
    DATA : it_t16ct LIKE t16ct OCCURS 0 WITH HEADER LINE.
    DATA : BEGIN OF ztext OCCURS 0.
            INCLUDE STRUCTURE ttext.
    DATA : END OF ztext.
    DATA  : it_t001      LIKE t001 OCCURS 0 WITH HEADER LINE.
    DATA  : mtext(15)    TYPE c.
    DATA  : it_adrc      LIKE adrc OCCURS 0 WITH HEADER LINE.
    DATA  : it_adrc_ven  LIKE adrc OCCURS 0 WITH HEADER LINE.
    DATA  : it_adrc_plt  LIKE adrc OCCURS 0 WITH HEADER LINE.
    DATA :  it_makt      LIKE makt OCCURS 0 WITH HEADER LINE.
    DATA :  it_eket      LIKE eket OCCURS 0 WITH HEADER LINE.               " Schedulling
    DATA :  it_eikp      LIKE eikp OCCURS 0 WITH HEADER LINE.               " Export
    DATA :  it_t001w     LIKE t001w OCCURS 0 WITH HEADER LINE.
    DATA  : it_t685t     LIKE t685t OCCURS 0 WITH HEADER LINE.
    DATA  : it_t618t     LIKE t618t OCCURS 0 WITH HEADER LINE.
    DATA  : it_t685t_ftr LIKE t685t OCCURS 0 WITH HEADER LINE.
    DATA  : it_lfa1  LIKE lfa1 OCCURS 0 WITH HEADER LINE.
    DATA : it_bapi_mltx_ga LIKE bapi_mltx_ga OCCURS 0 WITH HEADER LINE. "Material long text
    DATA : mfirst   TYPE i  VALUE 0,
           mpay_flag(1) TYPE c VALUE 'X',
           mwerks   LIKE    t001w-werks,
           msr      TYPE i  VALUE 0,
           l_rate   TYPE p  DECIMALS 2  VALUE 0,
           l_amt    TYPE p  DECIMALS 2  VALUE 0,
           mflag(1) TYPE c,
           mlctr    TYPE i  VALUE 0,
           mfamt    TYPE p DECIMALS 2 VALUE 0,
           mcfamt(15) TYPE c,
           mfword(100) TYPE c,
           mkschl   LIKE konv-kschl,
           mchgamt  TYPE p  DECIMALS 2 VALUE 0,
           mkbetr   TYPE p  DECIMALS 2 VALUE 0,
           mkwert   TYPE p  DECIMALS 2 VALUE 0.
    DATA : j_1iexcd     TYPE  j_1imocomp-j_1iexcd,
           j_1icstno    TYPE  j_1imocomp-j_1icstno,
           j_1ilstno    TYPE  j_1imocomp-j_1ilstno.
    DATA : mjmop_r    TYPE p DECIMALS 2 VALUE 0,
           mjmoq_r    TYPE p DECIMALS 2 VALUE 0,
           mjecs_r    TYPE p DECIMALS 2 VALUE 0,
           mjvcs_r    TYPE p DECIMALS 2 VALUE 0,
           mjvrd_r    TYPE p DECIMALS 2 VALUE 0,
           mjsep_r    TYPE p DECIMALS 2 VALUE 0.
    DATA : mjmop_a    TYPE p DECIMALS 2 VALUE 0,
           mjmoq_a    TYPE p DECIMALS 2 VALUE 0,
           mjecs_a    TYPE p DECIMALS 2 VALUE 0,
           mjvcs_a    TYPE p DECIMALS 2 VALUE 0,
           mjvrd_a    TYPE p DECIMALS 2 VALUE 0,
           mjsep_a    TYPE p DECIMALS 2 VALUE 0.
    DATA  : mtitle   LIKE  t161t-batxt.
    DATA :         no_ammend(10),request_by(50),ver_txt(100),ver_reason(100),stext(200).
    begin of Email data declarations**************
    DATA: BEGIN OF otf OCCURS 0.
            INCLUDE STRUCTURE itcoo .
    DATA: END OF otf.
    DATA: itcpo LIKE itcpo.
    DATA: itcpp LIKE itcpp.
    DATA: it_docs  TYPE STANDARD TABLE OF docs,
          v_bin_filesize          TYPE i,
          it_lines TYPE STANDARD TABLE OF tline,
          wa_lines TYPE tline.
    DATA : i_pdf LIKE tline OCCURS 1000 WITH HEADER LINE,
    v_pdf_bytecount TYPE i,
    v_pdf_spoolid TYPE tsp01-rqident,
    v_otf_pagecount TYPE i,
    v_btc_jobname TYPE tbtcjob-jobname,
    v_btc_jobcount TYPE tbtcjob-jobcount.
    DATA: objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
    DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
    DATA: objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE.
    DATA: objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
    DATA: reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE.
    DATA: doc_chng LIKE sodocchgi1.
    DATA: tab_lines LIKE sy-tabix.
    DATA: vafilename(100) VALUE 'po_output.pdf'.
    DATA: jobdata TYPE sxjobdata.
    DATA arc_params TYPE arc_params.
    DATA print_params TYPE pri_params.
    DATA g_send_prog TYPE syrepid VALUE 'ZVF03_TEST_PROG'.
    DATA immediate TYPE btcchar1.
    DATA: i_jobname TYPE tbtcp-jobname,
    i_jobcount TYPE tbtcp-jobcount,
    i_jobstepcount TYPE tbtcp-stepcount.
    DATA recipient_obj LIKE swotobjid.
    CONSTANTS: sx_true TYPE sx_boolean VALUE 'X'.
    TABLES: tbtcp.
    end of Email data declarations**************
    SELECTION-SCREEN : BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS   : mebeln FOR ekko-ebeln OBLIGATORY .               " 75
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 12.
    SELECTION-SCREEN COMMENT (20) text-b01.
    PARAMETERS: b1 AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN : END OF BLOCK block1.
    SELECTION-SCREEN: BEGIN OF SCREEN 200 TITLE text-001 AS WINDOW.
    PARAMETERS :  p_email TYPE ad_smtpadr.     "E-Mail Address
    SELECTION-SCREEN: END OF SCREEN 200.
    INITIALIZATION.
      SET PF-STATUS 'ZMMPORD_STAT'.
    AT SELECTION-SCREEN.
      CASE sy-ucomm.
        WHEN 'EMAIL'.
          PERFORM zemail.
        WHEN '&IC1'.
          PERFORM load_data.
          PERFORM process.
          IF NOT p_email IS INITIAL.
            PERFORM send_mail.
          ENDIF.
      ENDCASE.
    *START-OF-SELECTION.
    PERFORM load_data.
    PERFORM process.
    FORM load_data .
      DATA : gindex LIKE sy-tabix.
      SELECT * FROM t16ct INTO TABLE it_t16ct WHERE spras = 'EN'.
      SELECT * FROM ekko INTO TABLE it_ekko WHERE ebeln IN mebeln.
      IF sy-subrc EQ 0.
        SELECT * FROM erev INTO CORRESPONDING FIELDS OF TABLE it_erev FOR ALL ENTRIES IN it_ekko
        WHERE edokn = it_ekko-ebeln AND rscod <> '' .
        SORT it_erev BY edokn revno DESCENDING.
        LOOP AT it_ekko.
          IF NOT ( it_ekko-frgke EQ 'O'  OR it_ekko-frgke EQ '0' ) .
            MESSAGE e000(zsd) WITH 'Purchase Order is not Realeased'.
          ENDIF.
        ENDLOOP.
        SELECT * FROM ekpo INTO TABLE it_ekpo WHERE ebeln IN mebeln.
        IF sy-subrc EQ 0.
          SELECT * INTO TABLE it_makt
          FROM   makt
          FOR    ALL ENTRIES IN it_ekpo
          WHERE  matnr EQ it_ekpo-matnr.
          SELECT * INTO TABLE it_lfa1
          FROM   lfa1
          FOR    ALL ENTRIES IN it_ekko
          WHERE  lifnr EQ it_ekko-lifnr.
        ENDIF.
        SELECT *
          INTO TABLE it_t052u
          FROM t052u
           FOR ALL ENTRIES IN it_ekko
         WHERE zterm EQ it_ekko-zterm
          AND  spras EQ 'EN'.
        IF sy-subrc EQ 0.
          SORT it_t052u BY zterm.
        ENDIF.
        SELECT * FROM eket INTO TABLE it_eket WHERE ebeln IN mebeln.
        IF sy-subrc EQ 0.
          SORT it_eket BY ebeln ebelp.
        ENDIF.
        SELECT  *
          INTO TABLE it_eikp
          FROM eikp
           FOR ALL ENTRIES IN it_ekko
         WHERE exnum EQ it_ekko-exnum.
        IF sy-subrc EQ 0.
          SORT it_eikp BY exnum.
          SELECT  *
            INTO TABLE it_t618t
            FROM t618t
             FOR ALL ENTRIES IN it_eikp
           WHERE expvz EQ it_eikp-expvz
             AND spras EQ 'E'
             AND land1 EQ 'IN'.
          IF sy-subrc EQ 0.
            SORT it_t618t BY expvz.
          ENDIF.
        ENDIF.
        REFRESH : it_zmm_porder.
        CLEAR   : it_zmm_porder.
        SELECT * INTO TABLE it_zmm_porder
          FROM zmm_porder
         WHERE flag EQ 'L'.
        IF sy-subrc EQ 0.
          SORT it_zmm_porder BY kschl.
        ENDIF.
        SELECT * FROM konv INTO TABLE it_konv
        FOR ALL ENTRIES IN it_ekko
        WHERE knumv = it_ekko-knumv
          AND  kwert NE 0.
        LOOP AT it_konv.
          gindex = sy-tabix.
          READ TABLE it_zmm_porder WITH KEY kschl = it_konv-kschl BINARY SEARCH.
          IF sy-subrc NE 0.
            DELETE it_konv INDEX gindex.
          ENDIF.
        ENDLOOP.
        IF sy-subrc EQ 0.
          SORT it_konv BY knumv kherk kschl.
        ENDIF.
        REFRESH : it_zmm_porder.
        CLEAR   : it_zmm_porder.
        SELECT * INTO TABLE it_zmm_porder
          FROM zmm_porder
         WHERE flag EQ 'F'.
        IF sy-subrc EQ 0.
          SORT it_zmm_porder BY kschl.
        ENDIF.
       SELECT * INTO TABLE IT_KONV_FTR FROM KONV
          FOR ALL ENTRIES IN IT_EKKO
         WHERE KNUMV = IT_EKKO-KNUMV
           AND  ( KSCHL = 'ZIN1'
              OR  KSCHL = 'ZIN2'
              OR  KSCHL = 'ZINS'
              OR  KSCHL = 'ZPF1'
              OR  KSCHL = 'ZPF2'
              OR  KSCHL = 'ZPF3'
              OR  KSCHL = 'ZPKG'
              OR  KSCHL = 'ZPKF'
              OR  KSCHL = 'FRA1'
              OR  KSCHL = 'FRB1'
              OR  KSCHL = 'FRC1'
              OR  KSCHL = 'FRD1'
              OR  KSCHL = 'FRD2'
              OR  KSCHL = 'FRD3'
              OR  KSCHL = 'FRD4'
              OR  KSCHL = 'FRD5'
    *****Added one condition type below ZFBC as on 05.06.2007 :Rajiv as per mail of Sadiq via mathew sir(RTDK906646)
              OR  KSCHL = 'ZFBC' )
           AND  KWERT NE 0
           AND  KPOSN GT '000000'.
          AND ( KRECH = 'B'                       " RTDK906167
           OR  KRECH = 'A' ).
        SELECT * INTO TABLE it_konv_ftr FROM konv
           FOR ALL ENTRIES IN it_ekko
          WHERE knumv = it_ekko-knumv
            AND  kwert NE 0
            AND  kposn GT '000000'.
        LOOP AT it_konv_ftr.
          gindex = sy-tabix.
          READ TABLE it_zmm_porder WITH KEY kschl = it_konv_ftr-kschl BINARY SEARCH.
          IF sy-subrc NE 0.
            DELETE it_konv_ftr INDEX gindex.
          ENDIF.
        ENDLOOP.
        IF it_konv_ftr[] IS NOT INITIAL.
          SORT it_konv_ftr BY knumv kschl.
        ENDIF.
       SELECT  KNUMV KSCHL INTO CORRESPONDING FIELDS OF TABLE IT_KONV1 FROM KONV
       FOR ALL ENTRIES IN IT_EKKO
       WHERE KNUMV = IT_EKKO-KNUMV
           and kherk = 'D'
         AND  ( KSCHL = 'ZIN1'
            OR  KSCHL = 'ZIN2'
            OR  KSCHL = 'ZINS'
            OR  KSCHL = 'ZPF1'
            OR  KSCHL = 'ZPF2'
            OR  KSCHL = 'ZPF3'
            OR  KSCHL = 'ZPKG'
            OR  KSCHL = 'ZPKF'
            OR  KSCHL = 'FRA1'
            OR  KSCHL = 'FRB1'
            OR  KSCHL = 'FRC1'
            OR  KSCHL = 'FRD1'
            OR  KSCHL = 'FRD2'
            OR  KSCHL = 'FRD3'
            OR  KSCHL = 'FRD4'
            OR  KSCHL = 'FRD5'
    *****Added one condition type below ZFBC as on 05.06.2007 :Rajiv as per mail of Sadiq via mathew sir(RTDK906646)
            OR  KSCHL = 'ZFBC' )
         AND  KWERT NE 0.
           AND ( KRECH = 'B'                       RTDK906167
            OR  KRECH = 'A' ).
        SELECT  knumv kschl INTO CORRESPONDING FIELDS OF TABLE it_konv1 FROM konv
        FOR ALL ENTRIES IN it_ekko
        WHERE knumv = it_ekko-knumv
          AND  kwert NE 0.
        DELETE ADJACENT DUPLICATES FROM it_konv1 COMPARING knumv kschl.
        LOOP AT it_konv1.
          gindex = sy-tabix.
          READ TABLE it_zmm_porder WITH KEY kschl = it_konv1-kschl BINARY SEARCH.
          IF sy-subrc NE 0.
            DELETE it_konv1 INDEX gindex.
          ENDIF.
        ENDLOOP.
        IF sy-subrc EQ 0.
          SORT it_konv1 BY knumv kschl.
        ENDIF.
        SELECT * INTO TABLE it_t685t
        FROM   t685t
        FOR    ALL ENTRIES IN it_konv
        WHERE  kschl EQ it_konv-kschl
          AND  kappl EQ it_konv-kappl
          AND  spras EQ 'E'.
        SELECT * INTO TABLE it_t685t_ftr
        FROM   t685t
        FOR    ALL ENTRIES IN it_konv_ftr
        WHERE  kschl EQ it_konv_ftr-kschl
          AND  kappl EQ it_konv_ftr-kappl
          AND  spras EQ 'E'.
        it_t685t_ftr-kschl = 'JVCS'.
        it_t685t_ftr-vtext = 'IN CST in vat'.
        APPEND it_t685t_ftr.
        SELECT * INTO TABLE it_zmm_house_bank
          FROM zmm_house_bank
         WHERE ebeln IN mebeln.
      ELSE.
        MESSAGE e899(mm) WITH 'Data not found for selection criteria...'.
      ENDIF.
    ENDFORM.                    " Load_data
    FORM process .
      DATA : mctr   TYPE i VALUE 1.
      DATA : gindex LIKE sy-tabix.
      DATA : mline(75) TYPE c.
      DATA : mlifn2    LIKE ekpa-lifn2.
      DATA :  mv_name LIKE lfa1-name1,
             madrnr  LIKE lfa1-adrnr.
      CLEAR itcpo.
      itcpo-tdgetotf = 'X'.
      CALL FUNCTION 'OPEN_FORM'
        EXPORTING
          form     = 'ZMM_PORDER'
          language = sy-langu
          OPTIONS  = itcpo
          dialog   = ' '
        EXCEPTIONS
          OTHERS   = 1.
      LOOP AT it_ekko.
        CALL FUNCTION 'START_FORM'
          EXPORTING
            form = 'ZMM_PORDER'.
        SELECT SINGLE *
         FROM  t001
         INTO  it_t001
        WHERE  bukrs EQ it_ekko-bukrs.
        mcompname = it_t001-butxt.
        TRANSLATE mcompname TO UPPER CASE.
        Document Type
        SELECT SINGLE batxt
          INTO mtitle
          FROM t161t
         WHERE bstyp EQ 'F'
         AND   spras EQ 'E'
         AND   bsart EQ it_ekko-bsart.
        REFRESH it_adrc.
        SELECT SINGLE werks
          INTO mwerks
          FROM ekpo
         WHERE ebeln EQ it_ekko-ebeln.
        SELECT SINGLE *
          INTO it_t001w
          FROM t001w
         WHERE werks EQ mwerks.
        REFRESH it_adrc.
        SELECT SINGLE *
          INTO it_adrc_plt
          FROM adrc
         WHERE addrnumber EQ it_t001w-adrnr.
        REFRESH : xt052.
        mfamt  = 0.
        msr    = 0.
    in 500c this statement failed.
       SELECT SINGLE * FROM T052 INTO XT052 WHERE ZTERM = IT_EKKO-ZTERM.
       CALL FUNCTION 'FI_TEXT_ZTERM'
         EXPORTING
           I_T052  = XT052
         TABLES
           T_ZTEXT = ZTEXT.
        As per Preeti... Shipment address should be shown on top as purchase order company address. 27.04.
        PERFORM writeform USING 'PLANT' 'PLANT'.
        SELECT  SINGLE name1 adrnr
          INTO  (mv_name,madrnr)
          FROM  lfa1
         WHERE  lifnr EQ it_ekko-lifnr.
        REFRESH it_adrc[].
        CLEAR   it_adrc[].
        FREE it_adrc[].
        SELECT SINGLE *
          INTO it_adrc_ven
          FROM adrc
         WHERE addrnumber EQ madrnr.
        READ TABLE it_lfa1 WITH KEY lifnr = it_ekko-lifnr.
        PERFORM writeform USING 'VENDOR' 'VENDOR'.
         Shipment
        SELECT SINGLE werks
          INTO mwerks
          FROM ekpo
         WHERE ebeln EQ it_ekko-ebeln.
           up to 1 rows.
        SELECT SINGLE *
          INTO it_t001w
          FROM t001w
         WHERE werks EQ mwerks.
        SELECT SINGLE j_1iexcd j_1icstno j_1ilstno
                 INTO (j_1iexcd,j_1icstno,j_1ilstno)
               FROM    j_1imocomp
                WHERE  werks  = mwerks.
        REFRESH it_adrc.
        SELECT SINGLE *
          INTO it_adrc
          FROM adrc
         WHERE addrnumber EQ it_t001w-adrnr.
        PERFORM writeform USING 'SHIPMNT' 'SHIPMNT'.
        READ TABLE it_eikp WITH KEY exnum = it_ekko-exnum.
        IF sy-subrc EQ 0.
          READ TABLE it_t618t WITH KEY expvz = it_eikp-expvz.
        ENDIF.
        your_ref = it_ekko-ihrez.
        our_ref  = it_ekko-unsez.
        READ TABLE it_erev WITH KEY edokn = it_ekko-ebeln.
        IF sy-subrc = 0.
          no_ammend  = it_erev-revno.
          request_by = it_erev-crnam.
          ver_txt    = it_erev-txz01.
          READ TABLE it_t16ct WITH KEY rscod = it_erev-rscod.
          IF sy-subrc = 0.
            ver_reason = it_t16ct-rstxt.
          ELSE.
            ver_reason = ''.
          ENDIF.
        ELSE.
          no_ammend  = ''.
          request_by = ''.
          ver_txt    = ''.
          ver_reason = ''.
        ENDIF.
        PERFORM writeform USING 'PO_INFO' 'PO_INFO'.
        IF it_zmm_house_bank[] IS NOT INITIAL.
          READ TABLE it_zmm_house_bank INDEX 1.
          PERFORM writeform USING 'BANKDTL' 'BANKDTL'.
        ENDIF.
        PERFORM writeform USING 'HDR_INFO' 'HDR_INFO'.
        PERFORM writeform USING 'BRK_TTL' 'MAIN'.
        msr     = 1.
        mlctr   = 1.
    *added by ganesh to prevent deleted items to appear in print out
       LOOP AT IT_EKPO WHERE EBELN EQ IT_EKKO-EBELN.
        LOOP AT it_ekpo WHERE ebeln EQ it_ekko-ebeln AND loekz NE 'L'.
    *end of change
          CLEAR: mrate, mrate1.
          SELECT * FROM konv INTO TABLE it_konv_rate
                   WHERE knumv EQ it_ekko-knumv
                   AND   kposn EQ it_ekpo-ebelp
                   AND  ( kschl EQ 'PBXX' OR kschl EQ 'PB00'  OR kschl EQ 'P001' ).
          LOOP AT it_konv_rate.
           IF it_konv_rate-kpein > 0.             " added by ganesh as per sudhir 12.10.2007
             mrate_gm = it_konv_rate-kbetr / it_konv_rate-kpein.
             mrate  = mrate + mrate_gm. " added by ganesh as per sudhir 12.10.2007
           ELSE.
            mrate  = mrate + it_konv_rate-kbetr.
           ENDIF.
            IF it_konv_rate-waers IS NOT INITIAL.
              mwaers = it_konv_rate-waers.
            ENDIF.
          ENDLOOP.
        For Japanies Yen   "RTDK906759
          IF it_ekko-waers = 'JPY'.
            mrate = mrate * 100.
          ENDIF.
        End for japanies Yen
          mrate1 = mrate.
               End rate
          mfirst  = 0.
                MFAMT  = MFAMT + ( IT_EKPO-NETPR * IT_EKPO-MENGE ).
          mfamt  = mfamt + ( mrate * it_ekpo-menge ).
          PERFORM get_mat_long_text.
          DATA: lt_ctr TYPE i VALUE 0,lt_ctr1 TYPE i, lt_count TYPE i VALUE 0. " Long text counter
          DESCRIBE TABLE it_bapi_mltx_ga LINES lt_count.
          CLEAR it_bapi_mltx_ga.
    *Added by Rajiv 10.05.2007 Read and if condition RTDK906165
          READ TABLE it_konv WITH KEY knumv = it_ekko-knumv
                                      kposn = it_ekpo-ebelp.
          mkbetr  = 0.
          mkwert  = 0.
          IF sy-subrc EQ 0.
            LOOP AT it_konv  WHERE knumv EQ it_ekko-knumv
                               AND kposn EQ it_ekpo-ebelp.
              IF it_konv-krech EQ 'A'.
                mkbetr  = it_konv-kbetr / 10.
              ELSE.
                mkbetr  = it_konv-kbetr.
              ENDIF.
            For Japanies Yen "RTDK906759
              IF it_ekko-waers = 'JPY'.
                mkbetr = mkbetr * 100.
              ENDIF.
            End for japaies Yen
              IF mkbetr LT '0'.
                mkbetr = mkbetr * ( -1 ).
              ENDIF.
              mkwert   = it_konv-kwert.
            For Japanies Yen "RTDK906759
              IF it_ekko-waers = 'JPY'.
                mkwert = mkwert * 100.
              ENDIF.
            End for japaies Yen
              mfamt  = mfamt + mkwert.
              IF mkwert LT '0'.
                mkwert = mkwert * ( -1 ).
              ENDIF.
              IF it_ekpo-matnr IS INITIAL.
                itemname = it_ekpo-txz01.
              ELSE.
                READ TABLE it_makt  WITH KEY matnr = it_ekpo-matnr.
                itemname = it_makt-maktx.
              ENDIF.
              READ TABLE it_t685t WITH KEY kschl = it_konv-kschl BINARY SEARCH.
              READ TABLE it_eket  WITH KEY ebeln = it_ekpo-ebeln
                                           ebelp = it_ekpo-ebelp BINARY SEARCH.
              IF mfirst EQ 0.
                PERFORM writeform USING 'BRK_INFO' 'MAIN'.
                mfirst = 1.
              ELSE.
                ADD 1 TO lt_ctr.
                CLEAR it_bapi_mltx_ga.
                READ  TABLE it_bapi_mltx_ga INDEX lt_ctr. "For long text
                IF sy-subrc NE 0.
                  CLEAR it_bapi_mltx_ga.
                ENDIF.
                PERFORM writeform USING 'BRK_INFO1' 'MAIN'.
              ENDIF.
              mlctr = mlctr + 1.
            ENDLOOP.               "   it_konv.
          ELSE.
            IF it_ekpo-matnr IS INITIAL.
              itemname = it_ekpo-txz01.
            ELSE.
              READ TABLE it_makt  WITH KEY matnr = it_ekpo-matnr.
              itemname = it_makt-maktx.
            ENDIF.
                        READ TABLE IT_T685T WITH KEY KSCHL = IT_KONV-KSCHL BINARY SEARCH.
            READ TABLE it_eket  WITH KEY ebeln = it_ekpo-ebeln
                                         ebelp = it_ekpo-ebelp BINARY SEARCH.
            mfirst = 0.
            IF mfirst EQ 0.
              PERFORM writeform USING 'BRK_INFO' 'MAIN'.
              mfirst = 1.
            ELSE.
              ADD 1 TO lt_ctr.
              CLEAR it_bapi_mltx_ga.
              READ  TABLE it_bapi_mltx_ga INDEX lt_ctr. "For long text
              IF sy-subrc NE 0.CLEAR it_bapi_mltx_ga.ENDIF.
              PERFORM writeform USING 'BRK_INFO1' 'MAIN'.
            ENDIF.
          ENDIF.
    *Commented by rajiv 10.05.2007 used this code in above condition.
    added by ganesh on 260407 to print record
                if it_konv is initial.
                        READ TABLE IT_MAKT  WITH KEY MATNR = IT_EKPO-MATNR.
                        READ TABLE IT_T685T WITH KEY KSCHL = IT_KONV-KSCHL BINARY SEARCH.
                        READ TABLE IT_EKET  WITH KEY EBELN = IT_EKPO-EBELN
                                                     EBELP = IT_EKPO-EBELP BINARY SEARCH.
                        mFirst = 0.
                        if mFirst eq 0.
                             PERFORM WRITEFORM USING 'BRK_INFO' 'MAIN'.
                             mFirst = 1.
                        else.
                             add 1 to lt_ctr.
                             clear it_bapi_mltx_ga.
                             read  table IT_BAPI_MLTX_GA index lt_ctr. "For long text
                             if sy-subrc ne 0.clear it_bapi_mltx_ga.endif.
                             PERFORM WRITEFORM USING 'BRK_INFO1' 'MAIN'.
                        Endif.
                endif.
    end of change
          REFRESH it_komv_tax.
          PERFORM get_tax_cal USING it_ekpo-ebeln
                                    it_ekpo-ebelp.
                                 Changing it_komv_tax.
          REFRESH : it_zmm_porder.
          CLEAR   : it_zmm_porder.
          SELECT * INTO TABLE it_zmm_porder
            FROM zmm_porder
           WHERE flag EQ 'T'.
          IF sy-subrc EQ 0.
            SORT it_zmm_porder BY kschl.
          ENDIF.
          LOOP AT it_komv_tax.
            gindex = sy-tabix.
            READ TABLE it_zmm_porder WITH KEY kschl = it_komv_tax-kschl BINARY SEARCH.
            IF sy-subrc NE 0.
              DELETE it_komv_tax INDEX gindex.
            ENDIF.
          ENDLOOP.
          LOOP AT it_komv_tax WHERE kwert IS NOT INITIAL.
           IF ( IT_KOMV_TAX-KSCHL EQ 'JMOP' OR
                IT_KOMV_TAX-KSCHL EQ 'JECS' OR
                IT_KOMV_TAX-KSCHL EQ 'JSEP' OR
                IT_KOMV_TAX-KSCHL EQ 'JMOQ' OR
                IT_KOMV_TAX-KSCHL EQ 'JVCS' OR
                IT_KOMV_TAX-KSCHL EQ 'JVRD' OR
                IT_KOMV_TAX-KSCHL EQ 'JMIP' OR
    *             IT_KOMV_TAX-KSCHL EQ 'JEIP' OR
                IT_KOMV_TAX-KSCHL EQ 'JSEI' OR
                IT_KOMV_TAX-KSCHL EQ 'JSRT' OR
                IT_KOMV_TAX-KSCHL EQ 'JEC3' OR
                IT_KOMV_TAX-KSCHL EQ 'JVRN' )
                AND IT_KOMV_TAX-KWERT IS NOT INITIAL.
            SELECT SINGLE vtext
                   INTO   mtext
                   FROM   t685t
                  WHERE   kschl EQ it_komv_tax-kschl
                    AND   spras EQ 'E'.
            l_rate    = it_komv_tax-kbetr / 10.
            l_amt     = it_komv_tax-kwert.
            For Japanies Yen "RTDK906759
            IF it_ekko-waers = 'JPY'.
              l_amt = l_amt * 100.
            ENDIF.
            End for japaies Yen
            ADD l_amt TO mfamt.
            IF lt_ctr LT lt_count. "Long text
              ADD 1 TO lt_ctr.
              READ TABLE it_bapi_mltx_ga INDEX lt_ctr.
            ELSE.
              CLEAR it_bapi_mltx_ga.
            ENDIF.
            IF l_rate EQ 0 OR l_amt EQ 0.
              l_rate = ''.
              l_amt  = ''.
            ENDIF.
            PERFORM writeform USING 'TAX_LINE_ITEM' 'MAIN'.
           ENDIF.
          ENDLOOP.
          IF lt_ctr LT lt_count.
            DATA mbal_line TYPE i.
            mbal_line = ( lt_count - lt_ctr ).
            DO mbal_line TIMES.
              ADD 1 TO lt_ctr.
              READ TABLE it_bapi_mltx_ga INDEX lt_ctr.
              IF sy-subrc = 0.
                PERFORM writeform USING 'LTEXT' 'MAIN'.
              ENDIF.
            ENDDO.
          ENDIF.
          CONCATENATE it_ekko-ebeln it_ekpo-ebelp INTO nmebeln.
          REFRESH tline.
          CALL FUNCTION 'READ_TEXT'
            EXPORTING
              id                      = 'F04'
              language                = sy-langu
              name                    = nmebeln
              object                  = 'EKPO'
            TABLES
              lines                   = tline
            EXCEPTIONS
              id                      = 1
              language                = 2
              name                    = 3
              not_found               = 4
              object                  = 5
              reference_check         = 6
              wrong_access_to_archive = 7
              OTHERS                  = 8.
          IF sy-subrc <> 0.
          ENDIF.
          LOOP AT tline.
            IF tline-tdline IS NOT INITIAL.
              del_text = tline-tdline.
            ENDIF.
            CONDENSE del_text.
          ENDLOOP.
          CONCATENATE it_ekko-ebeln it_ekpo-ebelp INTO nmebeln.
          REFRESH tline.
          CALL FUNCTION 'READ_TEXT'
            EXPORTING
              id                      = 'F03'
              language                = sy-langu
              name                    = nmebeln
              object                  = 'EKPO'
            TABLES
              lines                   = tline
            EXCEPTIONS
              id                      = 1
              language                = 2
              name                    = 3
              not_found               = 4
              object                  = 5
              reference_check         = 6
              wrong_access_to_archive = 7
              OTHERS                  = 8.
          IF sy-subrc <> 0.
                 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
               refresh.
          CLEAR : po_flag, mat_po_text.
          LOOP AT tline.
            IF tline-tdline IS NOT INITIAL.
              MOVE tline-tdline TO mat_po_text.
              CONDENSE mat_po_text.
              PERFORM writeform USING 'MTRL_PO_TEXT' 'MAIN'.
              po_flag = 'X'.
              CLEAR : mat_po_text.
            ENDIF.
          ENDLOOP.
    *Added lines below for Schedule delivery for line item on 09.05.2007:Rajiv
          CLEAR g_ind.
          READ TABLE it_eket  WITH KEY ebeln = it_ekpo-ebeln
                                       ebelp = it_ekpo-ebelp BINARY SEARCH.
          g_ind = sy-tabix.
          LOOP AT it_eket FROM g_ind.
            IF it_eket-ebeln EQ it_ekpo-ebeln AND it_eket-ebelp = it_ekpo-ebelp.
              PERFORM writeform USING 'SCHEDULE' 'MAIN'.
            ELSE.
              EXIT.
            ENDIF.
          ENDLOOP.
    *End Addition:Rajiv
          PERFORM writeform USING 'REQSLP' 'MAIN'.
          mlctr = mlctr + 1.
          msr = msr + 1.
          CLEAR: lt_ctr, lt_ctr1.
      following lines added by ganesh to add service po details as per Mr. sadiq 21.08.2007
          IF it_ekpo-packno IS NOT INITIAL.
            CLEAR sub_packno.
            SELECT SINGLE sub_packno INTO sub_packno FROM esll WHERE packno = it_ekpo-packno.
            IF sub_packno IS NOT INITIAL.
              CLEAR it_esll.
              REFRESH it_esll.
              SELECT * FROM esll INTO CORRESPONDING FIELDS OF TABLE it_esll
              WHERE packno = sub_packno.
              IF sy-subrc = 0.
                PERFORM writeform USING 'SERVICE_PO_TEXT' 'MAIN'.
              ENDIF.
              LOOP AT it_esll.
                CONCATENATE sub_packno it_esll-introw INTO obj.
                CALL FUNCTION 'READ_TEXT'   "4500002446  C300
                  EXPORTING
                    id       = 'LTXT'
                    language = sy-langu
                    name     = obj
                    object   = 'ESLL'
                  TABLES
                    lines    = tline
                  EXCEPTIONS
                    id                      = 1
                    language                = 2
                    name                    = 3
                    not_found               = 4
                    object                  = 5
                    reference_check         = 6
                    wrong_access_to_archive = 7
                    OTHERS                  = 8.
                IF sy-subrc <> 0.
                ENDIF.
                CLEAR stext.
                LOOP AT tline.
                  CONCATENATE stext tline-tdline  INTO stext SEPARATED BY space.
                ENDLOOP.
                FREE tline.
                CLEAR tline.
                REFRESH tline.
                PERFORM writeform USING 'SERVICE_PO' 'MAIN'.
                PERFORM writeform USING 'SERVICE_TEXT' 'MAIN'.
              ENDLOOP.
            ENDIF.
          ENDIF.
        end of change
        ENDLOOP.             " it_ekpo.
        IF mlctr < 15.
          DO 5 TIMES.
            PERFORM writeform USING 'LINEFEED' 'MAIN'.
          ENDDO.
        ENDIF.
        added by ganesh  for allding line before ECC No.
        IF it_ekko-bsart NE 'ZIM'.               " IF EXPORT NO NEED TO PRINT ECC.
          PERFORM writeform USING 'LIN' 'MAIN'.
          PERFORM writeform USING 'WERKS_TAX_DETAIL' 'MAIN'.
        ENDIF.
        end of change
         MFLAG = 'Y'.
        PERFORM writeform USING 'TERMS_VAL' 'MAIN'.
        LOOP AT it_konv1 WHERE knumv EQ it_ekko-knumv.
          mkschl = it_konv1-kschl.
          mchgamt = 0.
          LOOP AT it_konv_ftr  WHERE knumv EQ it_konv1-knumv
                               AND kschl EQ mkschl.
            mchgamt = mchgamt + it_konv_ftr-kwert.
          ENDLOOP.
            For Japanies Yen "RTDK906759
          IF it_ekko-waers = 'JPY'.
            mchgamt = mchgamt * 100.
          ENDIF.
            End for japaies Yen
          mfamt = mfamt + mchgamt.
          IF mchgamt LT '0'.
            mchgamt = mchgamt * ( -1 ).
          ENDIF.
          READ TABLE it_t685t_ftr WITH KEY kschl = mkschl.
          PERFORM writeform USING 'TERMS_FTR_VAL' 'MAIN'.
          mlctr = mlctr + 1.
        ENDLOOP.
        mflag = 'T'.
        CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
          EXPORTING
            amt_in_num         = mfamt
          IMPORTING
            amt_in_words       = mfword
          EXCEPTIONS
            data_type_mismatch = 1
            OTHERS             = 2.
        CONDENSE mebeln.
        nmebeln = it_ekko-ebeln.
        REFRESH tline.
        CALL FUNCTION 'READ_TEXT'
          EXPORTING
            id                      = 'F01'
            language                = sy-langu
            name                    = nmebeln
            object                  = 'EKKO'
          TABLES
            lines                   = tline
          EXCEPTIONS
            id                      = 1
            language                = 2
            name                    = 3
            not_found               = 4
            object                  = 5
            reference_check         = 6
            wrong_access_to_archive = 7
            OTHERS                  = 8.
        IF sy-subrc <> 0.
        ENDIF.
    *---- CHANGED BY MATHEW BECAUSE THIS STATMENT WORKING FINE IN 300 BUT NOT IN 500C.
       LOOP AT ZTEXT.
         IF ZTEXT-TEXT1 IS NOT INITIAL.
           PERFORM WRITEFORM USING 'TERMS_COND_VAL_PAY' 'MAIN'.
         ENDIF.
         MPAY_FLAG = 'Y'.
       ENDLOOP.
        READ TABLE it_t052u WITH KEY zterm = it_ekko-zterm.
        LOOP AT it_t052u WHERE zterm EQ it_ekko-zterm.
          IF it_t052u-text1 IS NOT INITIAL.
            PERFORM writeform USING 'TERMS_COND_VAL_PAY' 'MAIN'.
          ENDIF.
          mpay_flag = 'Y'.
        ENDLOOP.
        PERFORM writeform USING 'TERMS_COND_VAL' 'MAIN'.
        LOOP AT tline.
          IF tline-tdline IS NOT INITIAL.
            PERFORM writeform USING 'TERMS_COND_VAL_HDR' 'MAIN'.
          ENDIF.
          CONDENSE txt.
        ENDLOOP.
        PERFORM writeform USING 'FTR' 'FTR_LIN3'.
        PERFORM writeform USING 'FTR_LIN1' 'FTR_LIN1'.
        CALL FUNCTION 'END_FORM'.
      ENDLOOP.                    "   It_ekko.
      CALL FUNCTION 'CLOSE_FORM'
       IMPORTING
       RESULT                         = itcpp
      RDI_RESULT                     =
       TABLES
         otfdata                        = 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.
    ENDFORM.                    " Process
    *&      Form  WRITEFORM
          text
         -->P_0150   text
         -->P_0151   text
    FORM writeform  USING    value(p_0150)
                             value(p_0151).
      CALL FUNCTION 'WRITE_FORM'

    Hi
    I think some basis related configuartions to be done
    Try like this and inform me
    A cyclic job runs, which processes the messages seen in the SOST queue.
    Are you sure it's not the frequency of the cyclic job, rather than the
    number of messages in the queue, that you are observing? In messages
    that are queued and before the cyclic job runs, "wait for comm. service"
    is the normal status.
    If you mean that there are always 4 items queued in SOST regardless of
    the cyclic send job, then I have no ideas. I would have thought there
    was no way to do that.
    when the send job runs it just never
    picks them up & sends them, while it picks up many others. The send job
    is somehow blind to these; no error message occurs. In this case, I
    'delete' them from the queue (in SOST) and then 'undelete' (drop down
    menu -> /Go to /Deleted Items) them and then re-queue them. THEN they
    actually get picked up & sent when the next cyclic send job executes.
    Regards
    Pavan

Maybe you are looking for