Purchase order format

Hi,
i have created purchase order. Here vendor currency is USD. So when i am creating the purchase order for material which currency i have to mention. In program is it necessary to convert the currency.
Edited by: Hima on Mar 25, 2008 5:30 AM

Hello,
  Document currency is copied from Vendor Master Purchasing Data view. This can be modified during PO creation or afterwards prior to Goods Receipt.
Thanks,
Venu

Similar Messages

  • How do I modify a Purchase Order format

    I need to modify a PO doc which is built using a XML publisher... How do I change this?
    Thanks.

    Not sure exactly what the problem is, but when you modify such an event and tap "Done" you will be asked if this change is for this event only or for all future events, and can select whichever applies.  This is true for any feature of the event you change.

  • Purchase order form printing is required in preprinted stationary format

    Dear All,
    I need one VERY URGENT HELP from you.
    Client wants to do printing Purchase order form in preprinted stationary format i.e. using this format they want to print PO document only for certain variable fields each time in our Laser printer,but some fields (which are already) lying will not be printed. (But in the PDF Download of the form for each document number all the fields must appear).
    Could you please guide me what are the sequential steps need to be followed, where & how in order to incorporate "preprinted stationary format" scenario in my
    Purchase order form. Also, if possible, please tell me in brief what is the meaning of preprinted stationary format & why we are using it / purpose of it.
    Awaiting your favorable reply at the earliest.
    FYI. Anyways, I have convinced Client that we will provide PDF attachment of form only to them, not Excel attachment. Thanks very much for encouraging me.
    Thanks & Regards
    Sudipta

    Hi,
    Thank you for your valuable input.
    Please tell me what should be my approach i.e. sequential steps need to be followed & where ( with the related configuration / settings changes, necessary coding changes & where, if possible, please send me one realtime scenario and its related documentation related to my concerned issues at the earliest as it will be very beneficial for mine. I have come across this scenario for the 1st time. Kindly guide me with your documents) in order the incorporate the below requirement:
    After modication of standard Purchase order form using SAPSCRIPT I / Client want to download it into PDF attachment individually corresponding to each PO number. In this PDF attachment all the fields will appear.
    But when I / Client will take Printout of this modified PO form (say for example ZMEDRUCK) only certain important information / certain field values will be getting printed, not all.
    User will be able to give ranges of PO document numbers for printing at a time based on their requirement, here all documents as specified by the user will be getting printed at a time, but one document printout followed by another document printout , and so on.
    We want to print PO sapscript form in "Print output" only. Also, please guide me how many & which output types, message type etc we need to configure & how for the above requirement ( i.e. download of the ZMEDRUCK form into PDF with its all the fields values + printing this ZMEDRUCK form for printing certain important information using "preprinted stationary format".)
    FYI. We are using Laser Printer for printing SAPSCRIPT forms.
    Awaiting your valuable fruitful feedback with necessary documents at the earliest.
    Thanks a lot.
    Have a very nice time ahead.
    Thanks & Regards
    Sudipta

  • Purchase Order print in PDF format directly to vendor

    Hi Experts,
    I have two requirements regarding PO print out to vendor. I am using release strategy for Purchase Order.
    1. When the Purchase Order is fully approved, a mail should go to corrosponding vendor with PO print out in PDF format as an attachment.
    2. When PO is cancelled (all PO lines are deleted) then mail should go to vendor that PO has been cancelled.
    Please let me know the steps / procedure for these requirements.
    regards,
    Anand.

    Anand,
    Hi again!!
    Are you planning to send an email to the vendor?
    This is possible in many ways..
    1. you could send a normal out put via EDI and the vendor can convert the xml file to PDF at his end
    2. You could send it as a FAx and the vendor can still receive it as a PDF
    3. You can email the vendor in a PDF format
    I am sure you understand how an email is sent to the vendor.. You'd have to work with samrtforms to convert the O/p to PDF or convert the spool to PDF.

  • OTF Format of Purchase Order in email unreadable

    We have setup emailing of purchase orders and this is working fine. However, the file that is sent to the vendor is in format .OTF
    How is this file read? Is it possible to send a different format? We can see the order in SOST, but the email that the vendor receives can not be read.
    Can someone help please.
    Thank you
    Karen

    See the sample FORM below.
    In fact the CLOSE_FORM will return the OTF format table. Just pass that to this form. It will convert the OTF file to a PDF format and sent it to User. Change the body of the text accordingly.
    CHeers,
    THomas.
    * FORM MAIL_OBJECT                                              *
    *       This routine receives OTF data. OTF data is converted to PDF
    *       format and send to the Partner's email address
    FORM mail_object TABLES otf_data STRUCTURE itcoo .
      DATA: pdf_size TYPE i,                             " PDF Size
            pdf_itab_size TYPE i,                        " Attachment size
            mailtxt_size TYPE i,                         " Text in mail size
            l_vbeln LIKE vbdka-vbeln.                    " Order Doc
      DATA:
      it_mailtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,    " Mail Text
      it_pdf TYPE TABLE OF tline WITH HEADER LINE,           " OTF output
      it_mailpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE, " Dist details
      it_mailhead LIKE solisti1   OCCURS  1 WITH HEADER LINE," Header data
      it_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,   " Rec List
      it_pdfdata LIKE solix OCCURS 0 WITH HEADER LINE.  " Attachment data
      DATA: it_doc_att LIKE sodocchgi1.                 " Attri of new doc
      DATA: BEGIN OF it_pdfout OCCURS 0,                " PDF in 255 length
               tline TYPE char255,
            END OF it_pdfout.
    * Sales doc and Customer
      DATA: BEGIN OF i_vbeln OCCURS 0,
              vbeln LIKE vbpa-vbeln,       " Sales Document
              adrnr LIKE vbpa-adrnr,       " Customer
            END   OF i_vbeln.
    * Sender Address no and SMTP address
      DATA: BEGIN OF i_addrs OCCURS 0,
              addrnumber LIKE adr6-smtp_addr,
              smtp_addr  LIKE adr6-smtp_addr,
            END   OF i_addrs.
    * Convert OTF to PDF
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format       = 'PDF'
        IMPORTING
          bin_filesize = pdf_size
        TABLES
          otf          = otf_data
          lines        = it_pdf.
    * Make each line 255 characters
      CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
        TABLES
          content_in  = it_pdf
          content_out = it_pdfout.
    * Create the PDF File
      CLEAR it_pdfdata.
      REFRESH it_pdfdata.
    *  it_pdfdata[] = it_pdfout[].
      LOOP AT it_pdfout.
        MOVE it_pdfout-tline TO it_pdfdata-line.
        APPEND it_pdfdata.
        CLEAR it_pdfdata.
      ENDLOOP.
      DESCRIBE TABLE it_pdfdata LINES pdf_itab_size.
    * Text in the mail.
      it_mailtxt-line  = 'ORDER ACKNOWLEDGEMENT'.
      APPEND it_mailtxt.
      it_mailtxt-line  = ' This is a test mail,  Line Number--1'.
      APPEND it_mailtxt.
      it_mailtxt-line = ' This is a test mail,  Line Number--2' &
                        ' This is a test mail,  Line Number--2'.
      APPEND it_mailtxt.
      it_mailtxt-line = ' This is a test mail,  Line Number--3' &
                        ' This is a test mail,  Line Number--3' &
                        ' This is a test mail,  Line Number--3'.
      APPEND it_mailtxt.
      it_mailtxt-line = ' This is a test mail,  Line Number--4' &
                        ' This is a test mail,  Line Number--4' &
                        ' This is a test mail,  Line Number--4' &
                        ' This is a test mail,  Line Number--4'.
      APPEND it_mailtxt.
      it_mailtxt-line = ' This is a test mail,  Line Number--5' &
                        ' This is a test mail,  Line Number--5' &
                        ' This is a test mail,  Line Number--5' &
                        ' This is a test mail,  Line Number--5' &
                        ' This is a test mail,  Line Number--5'.
      APPEND it_mailtxt.
      DESCRIBE TABLE it_mailtxt LINES mailtxt_size.
    * Document Number for Output
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
        EXPORTING
          input  = vbdka-vbeln
        IMPORTING
          output = l_vbeln.
    * Attributes of new doc
      CONCATENATE 'Order' space 'Acknowledgement' space l_vbeln
                  INTO it_doc_att-obj_descr SEPARATED BY space.
      it_doc_att-sensitivty = 'F'.
      it_doc_att-doc_size   = mailtxt_size * 255.
    * Create Pack to text in mail body.
      CLEAR it_mailpack-transf_bin.
      it_mailpack-head_start   = 1.
      it_mailpack-head_num     = 0.
      it_mailpack-body_start   = 1.
      it_mailpack-body_num     = mailtxt_size.
      it_mailpack-doc_type     = 'RAW'.
      APPEND it_mailpack.
    * Create Pack to PDF Attach.
      it_mailpack-transf_bin   = 'X'.
      it_mailpack-head_start   = 1.
      it_mailpack-head_num     = 1.
      it_mailpack-body_start   = 1.
      it_mailpack-body_num     = pdf_itab_size.
      it_mailpack-doc_type     = 'PDF'.
      CONCATENATE l_vbeln '.pdf' INTO it_mailpack-obj_name.
      CONCATENATE 'Order Ack' space l_vbeln INTO it_mailpack-obj_descr.
      it_mailpack-doc_size     = pdf_itab_size * 255.
      APPEND it_mailpack.
    *Get email addresses based on Sales document.
      SELECT vbeln adrnr INTO TABLE i_vbeln
             FROM vbpa
             WHERE vbeln = vbdka-vbeln AND
                   parvw = nast-parvw.
      IF NOT i_vbeln[] IS INITIAL.
        SELECT addrnumber smtp_addr INTO TABLE i_addrs
               FROM adr6 FOR ALL ENTRIES IN i_vbeln
               WHERE addrnumber =  i_vbeln-adrnr AND
                     smtp_addr NE space.
      ENDIF.
      IF i_addrs[] IS NOT INITIAL.
        LOOP AT i_addrs.
          it_reclist-receiver   = i_addrs-smtp_addr.
          it_reclist-express    = 'X'.
          it_reclist-rec_type   = 'U'.
          it_reclist-notif_del  = 'X'. " request delivery notification
          it_reclist-notif_ndel = 'X'. " request not delivered notification
          APPEND it_reclist.
          CLEAR: i_addrs.
        ENDLOOP.
      ENDIF.
    * Call FM to send email
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = it_doc_att
          put_in_outbox              = 'X'
        TABLES
          packing_list               = it_mailpack
          object_header              = it_mailhead
          contents_txt               = it_mailtxt
          contents_hex               = it_pdfdata
          receivers                  = it_reclist
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorizationfiltered= 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 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.
    ENDFORM.                    " MAIL_OBJECT

  • Purchase order in PDF formate

    Hi experts,
    How can i get a purchase order  NUMBER PDF formate  .
    when i save the PURCHASE order  allways the file name is Purchase order.
    but we need it like   PO-4500096   
    with PO number ...  is thre any settings where can i take thi table and fealds to save PO in PDF with number..
    Regards,
    Anthyodaya.

    Thank you fo r the reply,
    when i save po now getting allways same file name like ( purchas order)
    but the problem is  I need to save PO  as PDF formate with PO number in PDF file name like ( PO450094)
    depends on po number ..
    How can i get a purchase order NUMBER PDF formate .
    when i save the PURCHASE order allways the file name is Purchase order.
    but we need it like PO-4500096
    with PO number ... is thre any settings where can i take thi table and fealds to save PO in PDF with number

  • How to modify date format for Standard Purchase Order  Template XSL-FO

    I am editing the XSL-FO for the Standard Purchase Order.
    I need to modify the promised date column to 'DD-MON-YYYY’' , tried to use substring in below line but it didn't work
    <xsl:value-of select="LINE_LOCATIONS/LINE_LOCATIONS_ROW/PROMISED_DATE"/>
    Any solution for this ?
    thanks
    Pravin

    Thanks for your response.
    I tried to change the code in below format but it was giving error.
    Original code
    <xsl:value-of select="LINE_LOCATIONS/LINE_LOCATIONS_ROW/PROMISED_DATE"/>
    modified to
    <xsl:value-of select="xdoxslt:format_date(LINE_LOCATIONS/LINE_LOCATIONS_ROW/PROMISED_DATE,'dd-mmm-yyyy','dd/mmm/yyyy hh24:mi:ss',$_XDOLOCALE,$_XDOTIMEZONE)"/>
    also tried with
    <xsl:value-of select="xdoxslt:format_date(LINE_LOCATIONS/LINE_LOCATIONS_ROW/PROMISED_DATE,'dd-mmm-yyyy','dd-mmm-yyyy hh24:mi:ss',$_XDOLOCALE,$_XDOTIMEZONE)"/>
    also tried like
    <xsl:value-of select="xdoxslt:format_date(LINE_LOCATIONS/LINE_LOCATIONS_ROW/PROMISED_DATE,'dd-mmm-yyyy','dd/mmm/yyyy',$_XDOLOCALE,$_XDOTIMEZONE)"/>
    Tried above 3 methods but it didn't work.
    right now the date format in pdf file is 24-MAY-2011 21:56:24 i need to remove 21:56:24 and have only 24-MAY-2011
    any suggestions.
    thanks

  • How to modify date format for Standard Purchase Order

    In the Standard Purchase Order I have been trying to modify the date format of the Need by and Promised Date. To display DD-MON-YYYY please could some advise.
    Thanks

    The varaibles and prarameters I am using are.
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ora="http://www.oracle.com/XSL/Transform/java/" xmlns:xdofo="http://xmlns.oracle.com/oxp/fo/extensions" xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions" xmlns:xdoxliff="urn:oasis:names:tc:xliff:document:1.1">
    <xsl:param name="_XDOCALENDAR">GREGORIAN</xsl:param>
    <xsl:param name="_XDOLOCALE">en-US</xsl:param>
    <xsl:param name="_XDOTIMEZONE">GMT</xsl:param>
    <xsl:param name="_XDODFOVERRIDE">;</xsl:param>
    <xsl:param name="_XDOCTX">#</xsl:param>
    <xsl:variable name="_XDOXSLTCTX" select="xdoxslt:set_xslt_locale($_XDOCTX, $_XDOLOCALE, $_XDOTIMEZONE, $_XDOCALENDAR, $_XDODFOVERRIDE)" />

  • Sapscript for purchase order - wrong format

    HI all,
      I am looking at a custom zmedruk form.  In the MAIN, there is a line "IL "  ",,Deliv. Date &EKET-EINDT&,,,<B> " etc..
    The question is the delivery date (Eket-eindt).  In the purchase order, sometimes the date format comes in 5/17/2010 or 17.05.2010.     Also, i have declared a global variables &Tot_po(12.2)& which is used in the form.  This is a packed dcimal.
    Sometime this Tot-Po comes out as,for ex, $35.100,50  instead of  $35,100.50.
      Where i can find out ?    English is used. Can anyone pls let me know what is wrong ?
    thanks
    Joyce

    do you get differing formats for the same user? or do different users see different formats?
    meaning, if 1 user always sees 1,234.50 and another users always see 1,234,50 it's most likely a setting in their User Data.

  • Invalid format in Purchase order Amount colum

    Dear Guru's
    In my one of purchase order doc in print preview the amount showing:
    10.100,00
    How can I solve this. Please advice your procedure.
    Thanks and B/R
    Bishnu
    19/01

    The logic of SAP is to display the quantity, prices and values in the format that is used in the vendors country, so that a CSR of your vendor can easily understand how much you want.
    Example:  in USA the format for 1000  is  1,000.00, while in Germany the same is written 1.000,00
    Assume an US company  orders in EAches at a German vendor.
    The US company has customized their unit of measure to have zero decimals
    And has changed the decimal settings for the countries.
    The German company is used to have 3 decimals for a quantity.
    The order arrive and shows 1,000 EA
    The American expects to get 1000  the German CSR would create an order for just 1.
    (it had happened, I am telling you experience I made)

  • Problem in date format in purchase order printout

    Hello Experts,
    We have problem in date format of some Purchase Order  in printout, the format of PO document date and delivery date are customized for example  PO document date Mar 02, 2011 and Delivery date Mar 15, 2011.
    In printout it shows:
    PO doc. date:  20, 3.02
    Delivery date: 20, 3.15
    How come this format? some PO's are ok in their date format.
    hoping your best solution to fixed this issue.
    Thanks

    Hi,
    1st get help from  ABAPer  & check how PO doc. date  & Delivery date of PO set in "PDF/Smart Form" which you used for PO print can be checked in NACE t.code with EF application for you PO output type.
    Also check  in t.code: SU3 , in the default tab how Date Format is selected for user.
    Regards,
    Biju K

  • Formatted Search to pull Sales Order Remarks field onto Purchase Order

    Hi Guys,
    I need a formatted search for a Purchase Order remarks field, which will pull the remarks field from the linked Sales Order
    (When a PO is done through the logistics tab of the Sales Order)
    I have made this query but it is not working:
    SELECT distinct T0.[Comments] FROM ORDR T0 , POR1 T1 WHERE T0.[DocNum] = T1.[BaseRef]
    It is just pulling the remarks for the first sales order - purchase order link.
    Any help will be appreciated.
    Thanks
    Best Regards
    Dario Moutinho

    Hi Dario Moutinho,
    Try:
    SELECT distinct T0.Comments FROM ORDR T0
    WHERE T0.DocEnthy = $[POR1.BaseEntry\]
    Thanks,
    Gordon

  • Formatted Search - Purchase Order Lines, Price Field

    Hello Experts,
    I have wrote this formatted search for Purchase Order Lines, Price Field
    The problem is that i gets 0...
    What is wrong in it?....
    select
    case
    when T2.[ItemCode] Like N'u05D7u05DC%%' AND U_Thickness >= 1 AND U_Thickness <=3 then U_Contour*2.17
    end
    FROM OITM T0
    INNER JOIN ITM1 T1 ON T0.ItemCode = T1.ItemCode
    INNER JOIN POR1 T2 ON T0.ItemCode = T2.ItemCode
    WHERE T2.itemcode = $[$38.1.0[
    Thank You,
    Meital

    Hi.....
    Try this
    select
    case
    when T2.[ItemCode] Like N'u05D7u05DC%%' AND U_Thickness >= 1 AND U_Thickness <=3 then U_Contour*2.17
    end
    FROM OITM T0
    INNER JOIN ITM1 T1 ON T0.ItemCode = T1.ItemCode
    INNER JOIN POR1 T2 ON T0.ItemCode = T2.ItemCode
    WHERE T2.itemcode = $[$38.1.0]
    Regards,
    Rahul

  • Error adding Goods Receipt PO based on Purchase Order

    I am working on an add-on that was working against a 2005A version of SAP Business One and I am upgrading it to run against a 2007A Company (PL41)
    I am receiving strange errors when testing the add-on.
    I can add a Purchase order not based on a Goods Receipt PO without any problems but as soon as I specify a base type, entry and line I get either -1 General Error, or the Tried to Read/Write Protected Memory Error.  The error I receive seems to arbitrarily change between the two.
    I have read a few notes on the forums about this but none of them have proven useful in solving my problem.  I have checked the DI-API version on my PC and it is definitely using 8.0.177.0 which matches the version of SBO that I am running.  I have re-installed the DI etc without any success.
    The following is the code snippet which I am using to test:  I have verified that the referenced purchase order is open, contains the correct item, customer etc
    int iResult = -1;
    string sResult = string.Empty;
    string sOutput = string.Empty;
    try
    sOutput += Environment.NewLine + "Connecting to company...";
          sbocoy = new SAPbobsCOM.Company();
          sbocoy.Server = "<insert server name here>";
          sbocoy.CompanyDB = "<insert database name here>";
          sbocoy.LicenseServer = "<insert server name here>:30000";
          sbocoy.UseTrusted = true;
          sbocoy.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2005;
          sbocoy.UserName = "manager";
          sbocoy.Password = "<inser sap user here>";
          iResult = sbocoy.Connect();
          sOutput += Environment.NewLine + "Connected";
          SAPbobsCOM.Documents PO = (SAPbobsCOM.Documents)sbocoy.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseOrders);
          SAPbobsCOM.Documents GoodsReceiptPO = (SAPbobsCOM.Documents)sbocoy.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes);
          sOutput += Environment.NewLine + "Get Purchase Order";
          PO.GetByKey(1402);
          sOutput += Environment.NewLine + String.Format("DocNum: {0}; DocEntry: {1}; ItemCode: {2}; LineNum: {3}", PO.DocNum, PO.DocEntry, PO.Lines.ItemCode, PO.Lines.LineNum);
          GoodsReceiptPO.CardCode = PO.CardCode;
          GoodsReceiptPO.CardName = PO.CardName;
          GoodsReceiptPO.Lines.ItemCode = PO.Lines.ItemCode;
          GoodsReceiptPO.Lines.ItemDescription = PO.Lines.ItemDescription;
          GoodsReceiptPO.Lines.Quantity = 1.0;
          GoodsReceiptPO.Lines.BaseType = int.Parse(PO.DocObjectCodeEx); // If I comment out this and the next two lines the document will add
          GoodsReceiptPO.Lines.BaseEntry = PO.DocEntry;
          GoodsReceiptPO.Lines.BaseLine = PO.Lines.LineNum;
          sOutput += Environment.NewLine + "Adding Goods Receipt...";
          iResult = GoodsReceiptPO.Add();
          sResult = sbocoy.GetLastErrorDescription();
          sOutput += Environment.NewLine + string.Format("Result [{0}] {1}", iResult, sResult);
    catch (Exception ex)
    sOutput += string.Format(Environment.NewLine + "Exception: {0}{1}SBOError: {2}", ex.Message, Environment.NewLine, sbocoy.GetLastErrorDescription());
    The results when I try and reference the purchase order are:
    Connecting to company...
    Connected
    Get Purchase Order
    DocNum: 301396; DocEntry: 1402; ItemCode: SEANTESTITEM; LineNum: 1
    Adding Goods Receipt...
    Exception: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    If I comment out the 3 lines that reference the base document the Goods Receipt Adds and the following is the output...
    Connecting to company...
    Connected
    Get Purchase Order
    DocNum: 301396; DocEntry: 1402; ItemCode: SEANTESTITEM; LineNum: 1
    Adding Goods Receipt...
    Result [0]
    The above code will work correctly if we base a Delivery Note on a Sales Order so it appears to be specifically related to the Purchasing Documents.
    Edited by: Sean Archer on Feb 2, 2009 2:23 PM

    Hi Ganesh,
    Thank you for the reply.
    I ran the add-on against another database and it is working.
    I also verified that the document was failing to create if done via the Data Transfer Workbench so it would appear the issue affects the DI-API irrespective of add-on.
    I will need to do more testing to confirm whether this is a bug with PL41 of 2007A or a corrupt database as you suggest.
    Cheers,
    Sean

  • Purchase Order

    Hi all,
    i have two doubts related to the purchase order.
    1. How to know the Status of the purchase order
    ex: Open , Closed
    2. How to get the Purchasing Quantity (KOMV-KAWRT)
    Please Advice me..
    Many thanks for all of your help.
    Regards,
    Lakshma.

    Hi
    Here is the code to find out the open purchase order.
    List of open purchase orders for a given plant/delivery period      *
      A purchase order is open when the delivery completed indicator = ' '*(field elikz.ekpo = space)
    Tables
    TABLES: EKKO,                          "Purchase order - header"
            EKPO,                          "Purchase order - lines"
            EKET,                          "Purchase order - delivery date"
            EKBE,                          "Purchase order - history
            LFA1,                          "Supplier - general info"
            STXH,                          "Text table - header info"
            T001W,                         "Plant description table
            MARA,                          "Material master
            MAKT,                          "Material description table
            T163X.
    DATA: BEGIN OF TXTF_HEADER.            "Purchase order header texts
            INCLUDE STRUCTURE THEAD.
    DATA: END OF TXTF_HEADER.
    DATA: BEGIN OF TXTF_LINES OCCURS 2.    "Purchase order header texts
            INCLUDE STRUCTURE TLINE.
    DATA: END OF TXTF_LINES.
    DATA: WNAME(70),
          WLPEIN(1),
          WEINDT(10),
          WMENGE LIKE EKET-MENGE,
          WBISMT LIKE MARA-BISMT,
          W_HISTORY(1).
    SELECT-OPTIONS : S-EINDT FOR EKET-EINDT.
    SELECT-OPTIONS : S-WAERS FOR EKKO-WAERS.
    FIELD-GROUPS : HEADER, GROUP1.
    INSERT EKPO-WERKS
           EKET-LPEIN
           EKET-EINDT
           EKPO-EBELN
           EKPO-EBELP
           EKPO-MATNR
           EKKO-WAERS
           EKKO-WKURS
           EKKO-KUFIX
           EKKO-BEDAT INTO HEADER.
    INSERT EKKO-SPRAS
           EKKO-EKGRP
           T163X-EPSTP
           EKPO-TXZ01
           EKPO-KONNR
           EKPO-KTPNR
           EKET-MENGE
           EKPO-MEINS
           EKPO-LGORT
           EKET-WEMNG
           EKPO-NETPR
           EKPO-PEINH
           EKPO-BPRME
           EKPO-NETWR
           EKKO-LIFNR
           W_HISTORY  INTO GROUP1.
    General data
    INITIALIZATION.
    EM_SELKB = 'X'.
    EM_SELKK = ' '.
    EM_SELKL = ' '.
    EM_SELKA = ' '.
    Start of program
    START-OF-SELECTION.
    Read purchase order items for this plant with delivery completed
    indicator = space
    GET EKPO.
      SELECT * FROM T163X WHERE SPRAS EQ SY-LANGU
                          AND   PSTYP EQ EKPO-PSTYP.
        EXIT.
      ENDSELECT.
      IF SY-SUBRC NE 0.
        T163X-EPSTP = EKPO-PSTYP.
      ENDIF.
      CHECK S-WAERS.
    GET EKET.
      CHECK S-EINDT.
      IF EKPO-ELIKZ = ' ' AND EKPO-LOEKZ = ' '.
       if eket-wemng = 0 and eket-wamng = 0.
            CLEAR : W_HISTORY.
            SELECT * FROM EKBE WHERE EBELN = EKPO-EBELN
                               AND   EBELP = EKPO-EBELP.
               EXIT.
            ENDSELECT.
            IF SY-SUBRC = 0.
               MOVE '*' TO W_HISTORY.
            ENDIF.
            EXTRACT GROUP1.
       endif.
      ENDIF.
    END-OF-SELECTION.
    Sort by plant - delivery date
      SORT.
      FORMAT INTENSIFIED OFF.                      "PPL26041995
      LOOP.
      read vendor
        SELECT SINGLE * FROM  LFA1
               WHERE  LIFNR       = EKKO-LIFNR.
        IF SY-SUBRC <> 0.
          MOVE '???' TO LFA1-NAME1.
        ENDIF.
      search old materialnumber if needed
        SELECT SINGLE * FROM  MARA
               WHERE  MATNR       = EKPO-MATNR.
        IF SY-SUBRC <> 0.
          MOVE '???' TO WBISMT.
        ELSE.
          MOVE MARA-BISMT TO WBISMT.
        ENDIF.
      read purchase order header text - first 2 lines of delivery text
        CLEAR TXTF_LINES.
        CLEAR TXTF_HEADER.
        REFRESH TXTF_LINES.
        MOVE EKPO-EBELN TO WNAME.
        MOVE EKPO-EBELP TO WNAME+10.
        SELECT SINGLE * FROM STXH
             WHERE TDID     = 'F04' AND
                   TDOBJECT = 'EKPO' AND
                   TDNAME   = WNAME AND
                   TDSPRAS  = EKKO-SPRAS.
        IF SY-SUBRC = 0.
          CALL FUNCTION 'READ_TEXT'
               EXPORTING
                    ID              = 'F04 '
                    LANGUAGE        = EKKO-SPRAS
                    OBJECT          = 'EKPO      '
                    NAME            = WNAME
               IMPORTING
                    HEADER          = TXTF_HEADER
               TABLES
                    LINES           = TXTF_LINES
               EXCEPTIONS
                    ID              = 01
                    LANGUAGE        = 02
                    NAME            = 03
                    NOT_FOUND       = 04
                    OBJECT          = 05
                    REFERENCE_CHECK = 06.
        ENDIF.
        READ TABLE TXTF_LINES INDEX 1.
    print list
        RESERVE 3 LINES.
        AT NEW EKPO-WERKS.
          SELECT SINGLE * FROM T001W WHERE WERKS = EKPO-WERKS.
          IF SY-SUBRC NE 0. CLEAR T001W. ENDIF.
          NEW-PAGE.
        ENDAT.
        CLEAR WEINDT.
        CLEAR WLPEIN.
        AT NEW EKET-EINDT.
          CALL FUNCTION 'PERIOD_AND_DATE_CONVERT_OUTPUT'
               EXPORTING
                    INTERNAL_DATE   = EKET-EINDT
                    INTERNAL_PERIOD = EKET-LPEIN
               IMPORTING
                    EXTERNAL_DATE   = WEINDT
                    EXTERNAL_PERIOD = WLPEIN.
        ENDAT.
        WRITE: /    WLPEIN,
                  3 WEINDT,
                 13 SY-VLINE(1),
                 14 EKPO-EBELN,
                 25 EKPO-EBELP+3(2),
                 28 T163X-EPSTP,
                 31 EKPO-MATNR,
    add old material number
               52 wbismt,
                 62 EKET-MENGE,
                 80 EKPO-MEINS,
                 85 EKKO-LIFNR,
                116 SY-VLINE(1),
              127 txtf_lines-tdline(40),
                118 EKKO-WAERS,
                122 EKPO-NETPR,
                142 EKPO-PEINH,
                152 EKPO-BPRME,
                157 EKPO-NETWR,
                177 EKKO-WKURS,
                190 EKKO-KUFIX,
                193 EKKO-BEDAT,
                206 EKKO-EKGRP,
                211 SY-VLINE,
                216 W_HISTORY.
    add storage location
              171 sy-vline, ekpo-lgort,
              178 sy-vline.
        READ TABLE TXTF_LINES INDEX 2.
        SELECT SINGLE * FROM MAKT WHERE MATNR = EKPO-MATNR
                                  AND   SPRAS = SY-LANGU.
        IF SY-SUBRC NE 0.
          MOVE EKPO-TXZ01 TO MAKT-MAKTX.
        ENDIF.
        WMENGE = EKET-MENGE - EKET-WEMNG.
        IF EKPO-KONNR = SPACE.
          WRITE:/13 SY-VLINE(1),
                  MAKT-MAKTX(30) UNDER EKPO-MATNR,
                  WMENGE     UNDER EKET-MENGE,
                  LFA1-NAME1 UNDER EKKO-LIFNR,
            126 sy-vline(1),
                txtf_lines-tdline(40) under txtf_lines-tdline,
              116 SY-VLINE(1),
            171 sy-vline(1),
              211 SY-VLINE(1).
        ELSE.
          WRITE:/13 SY-VLINE(1),
                ekpo-konnr under ekpo-ebeln,
                ekpo-ktpnr+3(2) under ekpo-ebelp,
                  MAKT-MAKTX(30) UNDER EKPO-MATNR,
                  WMENGE     UNDER EKET-MENGE,
                  LFA1-NAME1 UNDER EKKO-LIFNR,
            126 sy-vline(1),
                txtf_lines-tdline(40) under txtf_lines-tdline,
            167 sy-vline(1),
              116 SY-VLINE(1),
              211 SY-VLINE(1).
        ENDIF.
        ULINE /13(207).
        AT END OF EKET-EINDT.
           ULINE 1(12).
        ENDAT.
      ENDLOOP.
    print delivery date with first line.
    TOP-OF-PAGE.
       CALL FUNCTION 'PERIOD_AND_DATE_CONVERT_OUTPUT'
            EXPORTING
                 INTERNAL_DATE   = EKET-EINDT
                 INTERNAL_PERIOD = EKET-LPEIN
            IMPORTING
                 EXTERNAL_DATE   = WEINDT
                 EXTERNAL_PERIOD = WLPEIN.
      CALL FUNCTION 'Z_PRINT_TITEL'               "PPL24041995
           EXPORTING PROGNAME = 'ZMCH0089'         "PPL24041995
                     TEXTTYPE = 'T'                "PPL24041995
                     ORG_PROGNAME = ' '
                     PARAM_1  = EKPO-WERKS                "PPL24041995
                     PARAM_2  = T001W-NAME2                "PPL24041995
                     PARAM_3  = ' '                "PPL24041995
                     PARAM_4  = ' '                "PPL24041995
                     PARAM_5  = ' '.               "PPL24041995
    Reward if helpful.
    Chandralekha

Maybe you are looking for

  • How to link Value Helps in Visual Composer?

    I would like to know, how to link value helps in VC...??? It's like.....after selecting a value from Value Help 1, how do i restrict my Value Help 2 values so that it contains the values that are relevant to the value selected from Value Help 1 only.

  • Example of how to call a BadI from an Abap and use the NEW OO ALV Grid

    Very easy to do. <b>REPORT  Z_BADI_TEST. test call Badi from standard abap. *Only from rel 6.40 do the following 1) define the Badi  (SE18). For Abap call test uncheck multiple use and filter boxes 2) Implement the badi (SE19). Add any methods here i

  • How to configure JMS listener in separate jvm

    Hi Guys, I am new to this forums so please let me know if iam making any mistake. I have 2 instances of tomcat running on different port numbers. I am using apache ActiveMq as my message broker for sending the jms message using queue. Code for sendin

  • MISSING FIRMWARE 6230i PLEASE HELP

    MISSING ONE SMALL FIRMWARE FOR NOKIA 6230i WAS LAST SPOKE ABOUT ON THIS FORUM IF YOU SEE IT ANYWHERE ON HERE ESPECIALLY ON THE NSU THEN PLEASE DONT HESITATE TO CONTACT ME . THE OWNER MISSES HIS LITTLE PET FIRMWARE AND WHANTS TO SEE HIM SOON. THANK YO

  • Font-weight attribute only works for bold?

    Hello, this has been bothering me for a while. When I set a font weight attribute on my css stylesheet it only makes a difference when I go bold; lighter font weights 100, 200 and medium numbers do nothing. I use safari and firefox, not sure if that