Not able to print purchase order..

Dear All,
I am not able to print one import  purchase order.
I have checked everything and also able to print another import Purchase orders..but particular this PO print out is not coming.
I have deleted message and again created the same..also condition record is maintained...
Not able to see print preview also (Not generating)
What could be the reason?
Please help..
Naren

Hi Naren,
try the note :111062.
[https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=111062]
Please check the setting mentioned in the note and revert.
Thanks,
Hrishi

Similar Messages

  • Not able to create purchase orders

    Hi Experts,
    I am not able to create purchase order , it is not allowing me to save , I I am giving purchase requisition number in Po and trying to crete po .When i give purchase requistion number  all the revelant data is copied and when i click on item level tab of delivery address following error occurs : Address doesn't exist  T001W 2000  00010.  Then the entire PO is cancelled.  not able to save going out of po screen
    Please give me your valuable advice so that it can help me in resolving this issue
    Please do the need ful
    Regards
    Ayub

    Hi
    We had to change the name text of he plant  from ABCD COMPANY TO ABCD COMPANY PRIVATE LTD so , we had change and in both name 1:ABCD COMPANY PRIVATE LTD  and NAme 2: ABCD COMPANY PRIVATE LTD 
    but in print out it the plant name  appearing twice we decided to to erase name 1 that is we left blank and gave name 2:ABCD COMPANY PRIVATE LTD 
    But while creatimg Po from req ad the clicking item level adress tab eror pops up , and if i click on error tick mark it will take you out from Po screen
    Regards
    Ayub

  • Not able to see Purchase Order No in FBL1N Report

    Dear All,
    I am not able to see Purchase Order Number in FBL1N report. I have tried in change layout by selecting the purchase document but system is not displaying.
    Kindly help me on this.
    Regards,
    Yadayya

    Dear Yadayya,
    in reference to your query please review the SAP note
    152335  Field EBELN in line layout variant for cust./vendor
    Please note that field BSEG-EBELN is not possible for being shown
    with a value in FBL1N and FBL5N as explained in the note above.
    Since Release 3.0, several purchase orders can be offset in one invoice.
    As a result, different purchasing document numbers (BSEG-EBELN) can be
    contained in the different G/L account line items.
    As a result, it is no longer possible to enter a unique purchasing
    document number in the customer/vendor line item.Field BSEG-EBELN is not
    filled in the vendor line item and therefore cannot be displayed in the
    line item display for customers/vendors.
    Hope this information helps to clarify the standard system behaviour.
    Mauri

  • Not able to save purchase order

    hi
    i am a super user i have related the PO with the SO when i am saving the purchase order i am getting the error message " you cannot open rows in document [purchase order-rows-row status][line:0][message 131-194]
    Regards
    Manish

    hi the proble is resolved actually i had to disable the coding done in transitional notification and was able to save the purchase order
    Regards,
    Manish

  • Not able to print on Purchase order whatever we fill in item text

    not able to print on Purchase order whatever we fill in item text, from where can we link to get printed item text on purchase order

    while doing in quality whatever we fill in text in item details of p.o we are getting it printed on p.order
    but same thing when we are doing in production we are not able to print on purchase order. where we should look out
    for e.g in spro-mm-purchasing-purchase order..

  • Issues with printing purchase order

    Dear friends,
    I'm having some issues with printing purchase orders.
    Normally when I create a purchase order via ME21N and then when I save the purchase order it then gets automatically printed.
    Suddenly it is not anymore working. I have created a purchase order this morning and it did not get printed. I get the message "frontend is not available"when i check the spool in SP01
    The funny think is if i call up the spool nr via SP01and then do a reprint then i'm able to reprint.
    What can be possibly the issue that I can't print the purchase order when I create the purchase order via ME21 when I save the purchase order? Can you help me with any guide on where I need to check why the PO is not printing immediatelly when i create the PO via ME21N?
    kind regards,
    Camilla

    hello all,
    thanks so far for your reply.
    i have checked today my user settings and that shows that my prints should go to LOCL (local default printer)
    The output conditions fpr purchase order have also LOCL (local printer)
    The weird thing is that I can print other reports to the default printer without any issues. The issue arise when I create a purchase order via ME21N. Normally when I save the PO it automatically prints. So no manual print instructions are required from my side. Because if I give manual instructions then I'm able to print the purchase order.
    Is it possible that the automatic printing is switched off and that it only prints when I hit manually the print button?
    Is the automatic printing something that is maintained in SPAD?
    kind regards and thanks for your help sofar

  • Printing Purchase Order from ME9F using custom program and smartform

    I was able to use my custom program which calls a smartform to print purchase orders from transaction ME9F. I did this using transaction NACE.
    However, when I call "Output Message" from ME9F, the output always fails (shown by an 'X' icon after the checkbox). When I try to put back the standard program in NACE, it does not show an 'X' but a check which indicates that the printing was successful.
    Do you know why this happens? What did I miss?
    Here's my call to my smartform from my custom driver program:
        " Change Smartform ZP_MMSF_P01_PURCHASE_ORDER
        " to internal Function module name
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
            EXPORTING
                FORMNAME   = 'ZP_MMSF_P01_PURCHASE_ORDER'
            IMPORTING
                FM_NAME    = fmname
        wa_cparam-no_dialog = 'X'.
        wa_output-tddest = 'LOCL'. "or 'LP01'.  "Spool: Output device
        CALL FUNCTION fmname
            EXPORTING
                control_parameters         = wa_cparam
                output_options             = wa_output
                i_data                     = i_data
                wa_lookup                  = wa_data_lookup
                goods_amt                  = goods_amt
                discount_amt               = discount_amt
                vat                        = vat
                total_amt                  = total_amt
                total_amt_inwords          = total_amt_inwords

    Vijaya,
    I have this problem though,
    Whenever I try to provide values for CONTROL_PARAMETERS and OUTPUT_OPTIONS to the sapscript call in your code, the PO printing (even the preview) does not proceed. I do this because I wanted to suppress the printer dialog.
    here is a fragment of the code:
    " code I added
    LS_COMPOSER_PARAM-tddest = 'LOCL'. "or 'LP01'.  "Spool: Output device
    LS_COMPOSER_PARAM-bcs_langu = sy-langu.
    LS_CONTROL_PARAM-preview = 'X'.
    LS_CONTROL_PARAM-no_open = 'X'.
    LS_CONTROL_PARAM-no_close = 'X'.
    LS_CONTROL_PARAM-device = 'PRINTER'.
    LS_CONTROL_PARAM-no_dialog = 'X'.
    DO NAST_ANZAL TIMES.
    *--In case of repetition only one time archiving
    * if sy-index > 1 and nast-tdarmod = 3.
    * nast_tdarmod = nast-tdarmod.
    * nast-tdarmod = 1.
    * ls_composer_param-tdarmod = 1.
    * endif.
    IF SY-INDEX NE 1 AND REPEAT IS INITIAL.
    REPEAT = 'X'.
    ENDIF.
    CALL FUNCTION LF_FM_NAME
    EXPORTING
    ARCHIVE_INDEX = TOA_DARA
    ARCHIVE_PARAMETERS = ARC_PARAMS
    CONTROL_PARAMETERS = LS_CONTROL_PARAM
    MAIL_RECIPIENT = LS_RECIPIENT
    MAIL_SENDER = LS_SENDER
    OUTPUT_OPTIONS = LS_COMPOSER_PARAM
    USER_SETTINGS = SPACE
    IS_NAST = NAST
    IS_REPEAT = REPEAT
    I tried to trace it to the function module generated by smartform. The error propagates this way: From the function module, there is a call to function SSFCOMP_PROCESS_DOCUMENT. Then inside that function, there is a perform operation to tr_ssfcomp_process_doc
    perform tr_ssfcomp_process_doc using startpage docstruc
                                           header.
    Inside that form, it calls the macro tr_active which checks the value of ssfcstat-trlevel (tracelevel) against c_trlevel_document. In the macro, if ssfcstat-trlevel is less than c_trlevel_document, the smartform will fail. c_trlevel_document is 15 and ssfcstat-trlevel is 0, and so the smartform fails.
    (you can see the macro tr_active in include LSTXBCMAC and the form tr_ssfcomp_process_doc is in the include LSTXBCFTR)
    When I do not put values in CONTROL_PARAMETERS and OUTPUT_OPTIONS, everything is ok.
    Do you know why this happens?
    Thanks in advance!
    Edit: I have found out about transaction SFTRACE, but this is disabled.
    Kyle

  • Not able to print on samsung scx 4623f from windows

    I successfully installed bonjour on a pc, can see the printer connected to my time capsule, can add it as default printer, but while i can easily can print from mac book, when I try to print from the pc running windows 7 the printer warms up, but then it doesn't print. no error reported on the printer window, the file seems to be lost somewhere
    any idea?
    thanks a lot

    while doing in quality whatever we fill in text in item details of p.o we are getting it printed on p.order
    but same thing when we are doing in production we are not able to print on purchase order. where we should look out
    for e.g in spro-mm-purchasing-purchase order..

  • Customizing 'Print Purchase Order' Report

    Hi All,
    We need to customize the 'Print Purchase Orders' report, for communicating the PO to supplier. But the Fax commnds, and the output format we have to change accordingly. Also we need to move the generated output file to another directory.
    Please let me know the recommended customizing procedure for the above.
    Thans,
    Gowri.

    Hi,
    If you want to modify Print PO Report (POXPOPDF), refer to the following document.
    Note: 305307.1 - How To Modify Print PO Report POXPOPDF With Custom Template
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=305307.1
    Regards,
    Hussein

  • Customize printed purchase order report

    Hi all
    i need to customize Printed purchase order report
    i need to add supplier item number to printed purchase order report
    where(group) i need to add item number i think it g_lines right?
    item number is sengment from tml_system_items_b is it correct
    ple reply it is urgent
    ashok

    Ashok,
    Try to get a sample and understand the concern from your users. See if that is already customized to not show the supplier item number (as far as I remember I don't think there are any conditions in the standard report that qulify the printing of the supplier item number, it should print as long as it is entered in the supplier item number field in the PO lines). So see where your users are entering this in PO lines.
    Yes it is vendor_product_num in PO lines table.
    Thanks
    Nagamohan

  • Printed Purchase order Report

    Hi all
    i need to customize Printed purchase order report(Lanadsacp)
    i need to add supplier item number to printed purchase order report
    where(group) i need to add item number i think it is g_lines right?
    item number is sengment1 from tml_system_items_b is it correct?
    ple reply it is urgent
    ashok

    Ashok,
    Try to get a sample and understand the concern from your users. See if that is already customized to not show the supplier item number (as far as I remember I don't think there are any conditions in the standard report that qulify the printing of the supplier item number, it should print as long as it is entered in the supplier item number field in the PO lines). So see where your users are entering this in PO lines.
    Yes it is vendor_product_num in PO lines table.
    Thanks
    Nagamohan

  • Not able to create sales order  using BAPI - BAPI_SALESORDER_CREATEFROMDAT2

    Hi Experts,
    I am not able to create sales order . I am using BAPI - BAPI_SALESORDER_CREATEFROMDAT2
    to create sales order .I am passing external sales order number to the parameter
    SALESDOCUMENTIN.
    I am getting following error.
    "524   |Only quantity 1 EA is allowed (Item 00001"
    Here EA is UOM(Unit of measurement).
    Below is the sample program through which i am trying to create the sales order.
    *& Report  ZSDC_SALES_TEST
    report  zsdc_sales_test.
    *DATA: wa_bapi_header    TYPE bapisdhd1.
    Include Name    - ZSDC_SALES_ORD_UPLOAD_TOP
    Program Name    - ZSDC_SALES_ORD_UPLOAD_1393
    Program Title   - Include for Data Declaration  and selection screen
    Created by      - Lalitha W
    Created on      - 18-Nov-2008
    Object ID       - SD_C_1393_SALES_ORDER_UPLOAD
    Request Id      - SD3K905579
    Description - This is a common INCLUDE for data declarations and
    *selection screen details.
                            HISTORY
    Date    |Developer |Req by    | Description              |Reference ID
            |          |          |                          |
            |          |          |                          |
                               TYPE-POOLS
    *TYPE-POOLS: truxs, abap, slis.
                              TABLES
    *TABLES: t100.
                               TYPES
    types:begin of   ty_header,
            auart(4)    type c,    " Sales Order Type
            vkorg(4)    type c,    " Sales Organization
            vtweg(2)    type c,    " Distrubution Channel
            spart(2)    type c,    " Division
            kunnr_1(10) type c,    " Sold to Party
            kunnr_2(10) type c,    " Ship to Party
            augru(3)    type c,    " Order Reason
            bstkd(35)   type c,    " PO Number
            bstdk(10)   type c,    " PO Date
            ketdat(10)  type c,    " Required Delivery Date
            zterm(4)    type c,    " Payment Terms
            inco1(3)    type c,    " Inco Terms -1
            inco2(28)   type c,    " Inco Terms -2
            prsdt(10)   type c,    " pricing date
            waerk(5)    type c,    " Document Currency
            vkbur(4)    type c,    " Sales Office
            vkgrp(3)    type c,    " Sales group
            pltyp(2)    type c,    " Price List type
            kdgrp(2)    type c,    " Customer Group
            bstkd_e(35) type c,    " Ship-to-party PO number
            submi(10)   type c,    " Collective Number
            bname(35)   type c,    " Name
            ihrez(12)   type c,    " Your Reference
            kschl_1(4)   type c,    " Condition Type
            kbetr_1(11)  type c,    " Amount
            kschl_2(4)   type c,    " Condition Type
            kbetr_2(11)  type c,    " Amount
            kschl_3(4)   type c,    " Condition Type
            kbetr_3(11)  type c,    " Amount
           partner_1(25) TYPE c,    "  Partner(Bill To Party Number)
           partner_2(25) TYPE c,    "  Partner(Payer Number)
           partner_3(25) TYPE c,    "  Partner(Sales Responsible Number)
           partner_4(25) TYPE c,    "  Partner(Order admin)
           partner_5(25) TYPE c,    "  Partner(Contact person)
            partner_1(10) type c,    "  Partner(Bill To Party Number)
            partner_2(10) type c,    "  Partner(Payer Number)
            partner_3(10) type c,    "  Partner(Sales Responsible Number)
            partner_4(10) type c,    "  Partner(Order admin)
            partner_5(10) type c,    "  Partner(Contact person)
            tdspras_1(2)  type c,
            text_1(500)   type c,    " Text Before Items Z012
            tdspras_2(2)  type c,
            text_2(500)   type c,    " Invocie Up Z034
            tdspras_3(2)  type c,
            text_3(500)   type c,    " Invocie Down Z035
            tdspras_4(2)  type c,
            text_4(500)   type c,    " Customer Reference Continue Z018
            tdspras_5(2)  type c,
            text_5(500)   type c,    " Dispatch Marks/ Order Z019
            tdspras_6(2)  type c,
            text_6(500)   type c,    " Ordered By  Z003
            tdspras_7(2)  type c,
            text_7(500)   type c,    " Sales Parameters Z002
            kvgr1(3)      type c,    " Industry
            kvgr2(3)      type c,    " customer BU
    end of ty_header.
    types: begin of ty_item,
              bstkd(35)     type c,    " PO Number
              bstdk(10)     type c,    " PO Date
              bstkd_e(35)   type c,    " Ship-to-party PO number
              posnr(6)      type c,    " POSTION NUMBER
              matnr(18)     type c,    " Material Number
              kwmeng(18)    type c,    " Order Quantity
              pstyv(4)      type c,    " Sales doc. item categ
              kursk(18)     type c,    " EXCHANGE RATE****
              ffprf(8)      type c,    " DIP PROFILE
              werks(4)      type c,    " Delivering Plant
              vstel(4)      type c,    " SHIPPING POINT
              lgort(4)      type c,    " STORAGE LOCATION
              route(6)      type c,    " Route
              kurrf(18)     type c,    " EXCHANGE RATE-FI
              ntgew(18)     type c,    " Net Weight
              brgew(18)     type c,    " Gross Weight
              gewei(3)      type c,    " Weight Unit
              prctr(10)     type c,    " profit center
              abgrs(6)      type c,    " RESULT ANALYSIS KEY
              kalsm_k(4)    type c,    " COSTING SHEET
              kschl_1(4)    type c,    " Condition Type
              kbetr_1(11)   type c,    " Amount
              kschl_2(4)    type c,    " Condition Type
              kbetr_2(11)   type c,    " Amount
              kschl_3(4)    type c,    " Condition Type
              kbetr_3(11)   type c,    " Amount
              text_1(500)    type c,    " material Text 0001
              tdspras_1(1)   type c,
              text_2(500)    type c,    " Pr Text 9001
              tdspras_2(1)   type c,
           end of ty_item.
    types:  begin of ty_schedule_line,
             bstkd(35)       type c, "PO number
             bstdk(10)       type c, "PO date
             bstkd_e(35)     type c, "Ship-to-party PO number
             posnr(6)        type c, "sales doc.Item
             etdat(10)       type c, "Schedule line date
             wmeng(2)        type c, "Order Quantity
            end of ty_schedule_line.
    types: begin of ty_err  ,
            auart(4)    type c,    " Sales Order Type
            vkorg(4)    type c,    " Sales Organization
            vtweg(2)    type c,    " Distrubution Channel
            spart(2)    type c,    " Division
            kunnr_1(10) type c,    " Sold to Party
            kunnr_2(10) type c,    " Ship to Party
            augru(3)    type c,    " Order Reason
            bstkd(35)   type c,    " PO Number
            bstdk(10)   type c,    " PO Date
            ketdat(10)  type c,    " Required Delivery Date
            zterm(4)    type c,    " Payment Terms
            inco1(3)    type c,    " Inco Terms -1
            inco2(28)   type c,    " Inco Terms -2
            prsdt(10)   type c,    " pricing date
            waerk(5)    type c,    " Document Currency
            vkbur(2)    type c,    " Sales Office
            vkgrp(3)    type c,    " Sales group
            pltyp(2)    type c,    " Price List type
            kdgrp(2)    type c,    " Customer Group
            bstkd_e(35) type c,    " Ship-to-party PO number
            submi(10)   type c,    " Collective Number
            bname(35)   type c,    " Name
            ihrez(12)   type c,    " Your Reference
            kschl_1(4)   type c,    " Condition Type
            kbetr_1(11)  type c,    " Amount
            kschl_2(4)   type c,    " Condition Type
            kbetr_2(11)  type c,    " Amount
            kschl_3(4)   type c,    " Condition Type
            kbetr_3(11)  type c,    " Amount
            partner_1(25) type c,    "  Partner(Bill To Party Number)
            partner_2(25) type c,    "  Partner(Payer Number)
            partner_3(25) type c,    "  Partner(Sales Responsible Number)
            partner_4(25) type c,    "  Partner(Order admin)
            partner_5(25) type c,    "  Partner(Contact person)
            tdspras_1(2)  type c,
            text_1(500)   type c,    " Text Before Items Z012
            tdspras_2(2)  type c,
            text_2(500)   type c,    " Invocie Up Z034
            tdspras_3(2)  type c,
            text_3(500)   type c,    " Invocie Down Z035
            tdspras_4(2)  type c,
            text_4(500)   type c,    " Customer Reference Continue Z018
            tdspras_5(2)  type c,
            text_5(500)   type c,    " Dispatch Marks/ Order Z019
            tdspras_6(2)  type c,
            text_6(500)   type c,    " Ordered By  Z003
            tdspras_7(2)  type c,
            text_7(500)   type c,    " Sales Parameters Z002
            kvgr1(3)      type c,    " Industry
            kvgr2(3)      type c,    " customer BU
            message(600) type c,
      end of ty_err.
    types: begin of ty_t685a,
            kschl type kschl,
            krech type krech,
          end of ty_t685a.
                       INTERNAL TABLES
    ***header
    data:  g_krech_1(4)    type c,    " Calculation type for condition
           g_krech_2(4)    type c,    " Calculation type for condition
           g_krech_3(4)    type c.    " Calculation type for condition
          g_krech_4(4)    TYPE c,    " Calculation type for condition
          g_krech_5(4)    TYPE c,    " Calculation type for condition
          g_krech_6(4)    TYPE c,    " Calculation type for condition
          g_krech_7(4)    TYPE c,    " Calculation type for condition
          g_krech_8(4)    TYPE c,    " Calculation type for condition
          g_krech_9(4)    TYPE c,    " Calculation type for condition
          g_krech_10(4)   TYPE c,    " Calculation type for condition
          g_krech_11(4)   TYPE c,    " Calculation type for condition
          g_krech_12(4)   TYPE c,    " Calculation type for condition
          g_krech_13(4)   TYPE c,    " Calculation type for condition
          g_krech_14(4)   TYPE c,    " Calculation type for condition
          g_krech_15(4)   TYPE c,    " Calculation type for condition
          g_krech_16(4)   TYPE c,    " Calculation type for condition
          g_krech_17(4)   TYPE c,    " Calculation type for condition
          g_krech_18(4)   TYPE c,    " Calculation type for condition
          g_krech_19(4)   TYPE c,    " Calculation type for condition
          g_krech_20(4)   TYPE c.    " Calculation type for condition
    Items
    data:   g_krech_item_1(4)   type c,    " Calculation type for condition
            g_krech_item_2(4)   type c,    " Calculation type for condition
            g_krech_item_3(4)   type c.    " Calculation type for condition
           g_krech_item_4(4)   TYPE c,    " Calculation type for condition
           g_krech_item_5(4)   TYPE c,    " Calculation type for condition
           g_krech_item_6(4)   TYPE c,    " Calculation type for condition
           g_krech_item_7(4)   TYPE c,    " Calculation type for condition
           g_krech_item_8(4)   TYPE c,    " Calculation type for condition
           g_krech_item_9(4)   TYPE c,    " Calculation type for condition
           g_krech_item_10(4)  TYPE c,    " Calculation type for condition
           g_krech_item_11(4)  TYPE c,    " Calculation type for condition
           g_krech_item_12(4)  TYPE c,    " Calculation type for condition
           g_krech_item_13(4)  TYPE c,    " Calculation type for condition
           g_krech_item_14(4)  TYPE c,    " Calculation type for condition
           g_krech_item_15(4)  TYPE c,    " Calculation type for condition
           g_krech_item_16(4)  TYPE c.    " Calculation type for condition
    data: it_t685a  type standard table of ty_t685a.
    data: wa_bapi_header    type bapisdhd1,
         wa_bapi_headerx   TYPE bapisdhd1x,
          it_bapi_item      type table of bapisditm,
         it_bapi_itemx     TYPE TABLE OF bapisditmx,
          it_bapi_cond      type table of bapicond,
         it_bapi_condx     TYPE TABLE OF bapicondx,
          it_bapi_partner   type table of bapiparnr,
          it_bapi_shdl      type table of bapischdl,
         it_bapi_shdlx     TYPE TABLE OF bapischdlx,
         it_bapi_order_text type TABLE OF BAPISDTEXT,
          it_bapireturn     type table of bapiret2.
    data:  wa_bapi_item       like line of it_bapi_item,
          wa_bapi_itemx      LIKE LINE OF it_bapi_itemx,
           wa_bapi_cond       like line of it_bapi_cond,
          wa_bapi_condx      LIKE LINE OF it_bapi_condx,
           wa_bapi_partner    like line of it_bapi_partner,
           wa_bapi_shdl       like line of it_bapi_shdl,
          wa_bapi_shdlx      LIKE LINE OF it_bapi_shdlx,
          wa_bapi_order_text like LINE OF it_bapi_order_text,
           wa_bapireturn      like line of it_bapireturn.
    *DATA: zmode(1) VALUE 'N'.
    data: it_header      type standard table of ty_header.
    *DATA: it_temp_header TYPE STANDARD TABLE OF ty_header.
    data: it_item        type standard table of ty_item.
    *DATA: it_temp_item   TYPE STANDARD TABLE OF ty_item.
    data: it_err         type standard table of ty_err.
    data: it_fline1 type standard table of tline,
          wa_fline1 type tline.
    data: it_thead1 type thead.
    data: it_fline2 type standard table of tline,
          wa_fline2 type tline.
    data: it_thead2 type thead.
    data: it_fline3 type standard table of tline,
          wa_fline3 type tline.
    data: it_thead3 type thead.
    data: it_fline4 type standard table of tline,
          wa_fline4 type tline.
    data: it_thead4 type thead.
    data: it_fline5 type standard table of tline,
          wa_fline5 type tline.
    data: it_thead5 type thead.
    data: wa_header         like line of it_header,
          wa_item           like line of it_item,
          wa_err            type ty_err,
         wa_bill           LIKE LINE OF it_bill,
         wa_bill1          LIKE LINE OF it_bill,
          wa_iterr          like line of it_err,
          wa_t685a          like line of it_t685a.
         wa_bill_item TYPE ty_bill_item.
    data: it_schedule_line  type standard table of ty_schedule_line,
          wa_schedule_line type ty_schedule_line.
    data: sales_order_no     type bapivbeln-vbeln.
    data: ext_sales_order_no type bapivbeln-vbeln.
    Variable to be used to separate the fields which are concatenated by a
    runtime character
    *DATA: g_tabchar(1) TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
    *DATA: wa_truxs_t_text_data TYPE truxs_t_text_data.
    *DATA: g_filename      TYPE string,
         g_path          TYPE string,
         g_fullpath      TYPE string,
         g_user_action   TYPE i,
         g_file_encoding TYPE abap_encoding.
    *DATA : g_text(8192),
    data : g_mstring1(100) type c,
          g_mstring2(100) type c,
          g_mstring3(100) type c,
          g_mstring4(100) type c,
          g_mstring5(100) type c.
    data: g_count1 type ebelp,
          g_str_count1(6) type c.
    data: g_count type ebelp,
          g_str_count(6) type c.
    *DATA: f_subrc      LIKE sy-subrc,
         f_subrc1     LIKE sy-subrc,
         f_error(500) TYPE c,
         item1(27)    TYPE c,
         item2(27)    TYPE c,
         item3(27)    TYPE c,
         item4(27)    TYPE c,
         i            TYPE ekpo-ebelp.
    *DATA: g_billplan_header TYPE c,
         g_billplan_item TYPE c.
    data : g_external_so type vbak-vbeln. "SO
                          SELECTION-SCREEN
    selection-screen begin of block frame1 with frame title text-001 .
    parameters:p_file1 type rlgrap-filename, "OBLIGATORY, "Header data.
               p_file2 type rlgrap-filename, "OBLIGATORY, "Item Data.
               p_file3 type rlgrap-filename,            "Schedule line.
               p_file4 type rlgrap-filename ."OBLIGATORY. "Error file.
    selection-screen end of block frame1.
    start-of-selection.
      wa_bapi_header-doc_type     =  'Z0MX'. "order type
      wa_bapi_header-sales_org    =  '0130'."sales org
      wa_bapi_header-distr_chan   =  '13'.  "distr channel
      wa_bapi_header-division     =  '13'.  "division
    Old code from copied program
    wa_bapi_header-purch_no_s   =  wa_header-kunnr_2.  " Ship to party
    New code as required in Finland project
    We are using to Header ->Order Tab -> Ship to Party -> Purchase order no (BSTKD_E) to store Old legacy SO number
      wa_bapi_header-purch_no_s   =  'MX100443'.  "External SO i.e Old legacey SO number
      wa_bapi_header-ref_1_s      = '0000666666'. "Sold to party
    wa_bapi_header-ord_reason   =  wa_header-augru.
      wa_bapi_header-purch_no_c   =  'ddr1234'.    " PO number
      wa_bapi_header-purch_date   =  sy-datum.    " PO date
      wa_bapi_header-req_date_h   =  sy-datum.   " Required Delivery Date
      wa_bapi_header-pmnttrms     =  '01'.    " Payment Terms
    wa_bapi_header-incoterms1   =  wa_header-inco1.
    wa_bapi_header-incoterms2   =  wa_header-inco2.
    wa_bapi_header-price_date   =  wa_header-prsdt.    " Pricing date
    wa_bapi_header-currency     =  wa_header-waerk.    " Document Currency
    wa_bapi_header-sales_grp  =  wa_header-vkgrp. " Sales group
    wa_bapi_header-price_list   =  wa_header-pltyp. " Price list type
    wa_bapi_header-cust_group   =  wa_header-kdgrp.   " Cust Group
    wa_bapi_header-ship_type    =  wa_header-vsart.   " Shipping Type
    wa_bapi_header-purch_no_s   =  wa_header-bstkd_e. " Ship-to-party po number
    wa_bapi_header-collect_no   =  wa_header-submi.   " Collective No.
    wa_bapi_header-name         =  wa_header-bname.   " Name
    wa_bapi_header-ref_1        =  wa_header-ihrez.   " Your Reference
    wa_bapi_header-cust_grp1    =  wa_header-kvgr1.   " Industry
    wa_bapi_header-cust_grp2    =  wa_header-kvgr2.   " Customer BU
    *ENDFORM.                    " f_header
    IF wa_header-partner_1 IS NOT INITIAL.
        wa_bapi_partner-partn_role = 'AG'.
        wa_bapi_partner-partn_numb = '0000666666'.
        wa_bapi_partner-itm_number = '000000'.
        append wa_bapi_partner to it_bapi_partner.
        clear wa_bapi_partner.
    ENDIF.
      call function 'CONVERSION_EXIT_ALPHA_INPUT'
        exporting
          input  = wa_header-partner_2
        importing
          output = wa_header-partner_2.
    IF wa_header-partner_2 IS NOT INITIAL.
        wa_bapi_partner-partn_role = 'WE'.
        wa_bapi_partner-partn_numb = '0000666666'.
        wa_bapi_partner-itm_number = '000000'.
        append wa_bapi_partner to it_bapi_partner.
        clear wa_bapi_partner.
    ENDIF.
      perform f_item.
    data : order_items_inx type table of bapisditmx with header line.
      order_items_inx-material          = 'X'.  "
      order_items_inx-target_qty        = 'X'.  "
      order_items_inx-comp_quant        = 'X'.  "
      order_items_inx-trgqty_den        = 'X'.
      order_items_inx-rnddlv_qty        = 'X'.
    order_items_inx-updateflag = 'I'.
    order_items_inx-target_qu = 'X'.
      order_items_inx-plant             = 'X'.  "
      append order_items_inx.
      call function 'BAPI_SALESORDER_CREATEFROMDAT2'
        exporting
          salesdocumentin = 'MX11111152'
      order_header_in      = wa_bapi_header
             order_header_inx     = wa_bapi_headerx
      importing
      salesdocument        = sales_order_no
      tables
      return               = it_bapireturn
      order_items_in       = it_bapi_item
      order_items_inx      =  order_items_inx
      order_partners       = it_bapi_partner
       order_conditions_in  = it_bapi_cond.
      if sy-subrc is initial.
      commit work.
      endif.
    *&      Form  f_item
          text
    form f_item .
      call function 'CONVERSION_EXIT_ALPHA_INPUT'
        exporting
          input  = wa_item-posnr
        importing
          output = wa_item-posnr.
      wa_item-posnr = '000010'.
    IF sy-subrc EQ 0. "IS INITIAL.
      move wa_item-posnr to g_str_count."commented out by shakti
    ENDIF.
      wa_bapi_item-itm_number        =  wa_item-posnr.  " Line item
    WA_BAPI_ITEM-PO_ITM_NO         =  WA_ITEM-EBELP.
    wa_bapi_item-division          = wa_item-spart.
      wa_bapi_item-purch_no_c        = 'ddr1234'.   " po number
      wa_bapi_item-purch_date        = sy-datum.   " po date
      wa_bapi_item-purch_no_s        = 'MX11111112'. " Ship-to-party po number
      wa_item-matnr = 'MAXIMO_SERVICE'.
      call function 'CONVERSION_EXIT_MATN1_INPUT'
        exporting
          input        = wa_item-matnr
        importing
          output       = wa_item-matnr
        exceptions
          length_error = 1
          others       = 2.
      if sy-subrc is initial.
        wa_bapi_item-material        = wa_item-matnr.  "material
      endif.
      wa_bapi_item-target_qty        = '1'. " Order qty
      wa_bapi_item-comp_quant = '1'.
      wa_bapi_item-target_qu = 'EA'.
        wa_bapi_item-fixed_quan = '1'.
    wa_bapi_item-comp_quant        = wa_item-kwmeng.
    wa_bapi_item-trgqty_den        = '1'.
    wa_bapi_item-rnddlv_qty        = wa_item-kwmeng.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
       EXPORTING
         input  = wa_item-ps_psp_pnr
       IMPORTING
         output = wa_item-ps_psp_pnr.
    IF sy-subrc = 0.
       wa_bapi_item-wbs_elem          = wa_item-ps_psp_pnr.
    ENDIF.
      wa_bapi_item-item_categ        = 'ZMAX'.
    wa_bapi_item-ex_rate_fi        = wa_item-kurrf.
    wa_bapi_item-dli_profil        = wa_item-ffprf.   " Dynamic item processor profile
    wa_bapi_item-route             = wa_item-route.   " route
    wa_bapi_item-exchg_rate        = wa_item-kursk.
      wa_bapi_item-plant             = '2090'.   " Plant
      wa_bapi_item-ship_point        = 'FN11'.   " Shipping point
    wa_bapi_item-store_loc         = wa_item-lgort.   " stg loc
    REPLACE ALL OCCURRENCES OF  ',' IN wa_item-ntgew WITH '.'.
    REPLACE ALL OCCURRENCES OF  ',' IN wa_item-brgew WITH '.'.
    wa_bapi_item-net_weight        = wa_item-ntgew.  "
    wa_bapi_item-gross_wght        = wa_item-brgew.  "
      call function 'CONVERSION_EXIT_CUNIT_INPUT'
        exporting
          input    = wa_item-gewei
          language = sy-langu
        importing
          output   = wa_item-gewei.
       EXCEPTIONS
         unit_not_found = 1
         OTHERS         = 2.
    IF sy-subrc <> 0.
    ENDIF.
      wa_bapi_item-untof_wght        =  'KG'.  " weight unit
      replace all occurrences of  ',' in wa_item-kursk with '.'.
      replace all occurrences of  ',' in wa_item-kurrf with '.'.
    wa_bapi_item-profit_ctr        = wa_item-prctr.   " Profit center
    wa_bapi_item-resanalkey        = wa_item-abgrs.   " RESULT ANALYSIS KEY
    wa_bapi_item-cstg_sheet        = wa_item-kalsm_k. " COSTING SHEET
      append wa_bapi_item to it_bapi_item.
    endform.                    " f_item
    Thanks & regards,
    Chetan

    see the following to create sales order:-
    *& Report  ZSALESORDER
    *&DEVELOPED BY JANI KRUPA 4.10.2008
    REPORT  ZSALESORDER.
    Parameters
    Sales document type
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text FOR FIELD p_auart.
    PARAMETERS: p_auart TYPE auart OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Sales organization
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text1 FOR FIELD p_vkorg.
    PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Distribution channel
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text2 FOR FIELD p_vtweg.
    PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Division.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text3 FOR FIELD p_spart.
    PARAMETERS: p_spart TYPE spart OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SKIP 1.
    Sold-to
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text4 FOR FIELD p_sold.
    PARAMETERS: p_sold  TYPE kunnr OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Ship-to
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text5 FOR FIELD p_ship.
    PARAMETERS: p_ship  TYPE kunnr OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SKIP 1.
    Material
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text6 FOR FIELD p_matnr.
    PARAMETERS: p_matnr TYPE matnr   OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Quantity.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text7 FOR FIELD p_menge.
    PARAMETERS: p_menge TYPE kwmeng  OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Plant
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text9 FOR FIELD p_plant.
    PARAMETERS: p_plant TYPE werks_d .
    SELECTION-SCREEN END OF LINE.
    Complete Deliver
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text10 FOR FIELD p_autlf.
    PARAMETERS: p_autlf TYPE autlf DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    Data declarations.
    DATA: v_vbeln            LIKE vbak-vbeln.
    DATA: header             LIKE bapisdhead1.
    DATA: headerx            LIKE bapisdhead1x.
    DATA: item               LIKE bapisditem  OCCURS 0 WITH HEADER LINE.
    DATA: itemx              LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
    DATA: partner            LIKE bapipartnr  OCCURS 0 WITH HEADER LINE.
    DATA: return             LIKE bapiret2    OCCURS 0 WITH HEADER LINE.
    DATA: lt_schedules_inx   TYPE STANDARD TABLE OF bapischdlx
                             WITH HEADER LINE.
    DATA: lt_schedules_in    TYPE STANDARD TABLE OF bapischdl
                             WITH HEADER LINE.
    DATA: lt_schedules_ink    TYPE STANDARD TABLE OF bapisdhead1
                             WITH HEADER LINE.
    Initialization.
    INITIALIZATION.
    v_text   = 'Order type'.
    v_text1  = 'Sales Org'.
    v_text2  = 'Distribution channel'.
    v_text3  = 'Division'.
    v_text4  = 'Sold-to'.
    v_text5  = 'Ship-to'.
    v_text6  = 'Material'.
    v_text7  = 'Quantity'.
    v_text9  = 'Plant'.
    v_text10 = 'Complete delivery'.
    Start-of-selection.
    START-OF-SELECTION.
    Header data
    Sales document type
      header-doc_type = p_auart.
      headerx-doc_type = 'X'.
    Sales organization
      header-sales_org = p_vkorg.
      headerx-sales_org = 'X'.
    Distribution channel
      header-distr_chan  = p_vtweg.
      headerx-distr_chan = 'X'.
    Division
      header-division = p_spart.
      headerx-division = 'X'.
      headerx-updateflag = 'I'.
    *Complete delivery
        header-COMPL_DLV = p_autlf.
        header-COMPL_DLV = 'X'.
    Partner data
    Sold to
      partner-partn_role = 'AG'.
      partner-partn_numb = p_sold.
      APPEND partner.
    Ship to
      partner-partn_role = 'WE'.
      partner-partn_numb = p_ship.
      APPEND partner.
    ITEM DATA
      itemx-updateflag = 'I'.
    Line item number.
      item-itm_number = '000010'.
      itemx-itm_number = 'X'.
    Material
      item-material = p_matnr.
      itemx-material = 'X'.
    Plant
      item-plant    = p_plant.
      itemx-plant   = 'X'.
    Quantity
      item-target_qty = p_menge.
      itemx-target_qty = 'X'.
    item category
      itemx-ITEM_CATEG = 'X'.
      APPEND item.
      APPEND itemx.
      ITEM DATA
      itemx-updateflag = 'I'.
    Line item number.
      item-itm_number = '000020'.
      itemx-itm_number = 'X'.
    Material
      item-material = p_matnr.
      itemx-material = 'X'.
    Plant
      item-plant    = p_plant.
      itemx-plant   = 'X'.
    Quantity
      item-target_qty = p_menge.
      itemx-target_qty = 'X'.
      APPEND item.
      APPEND itemx.
      Fill schedule lines
      lt_schedules_in-itm_number = '000010'.
      lt_schedules_in-sched_line = '0001'.
      lt_schedules_in-req_qty    = p_menge.
      APPEND lt_schedules_in.
      Fill schedule line flags
      lt_schedules_inx-itm_number  = '000010'.
      lt_schedules_inx-sched_line  = '0001'.
      lt_schedules_inx-updateflag  = 'X'.
      lt_schedules_inx-req_qty     = 'X'.
      APPEND lt_schedules_inx.
      Fill schedule lines
      lt_schedules_in-itm_number = '000020'.
      lt_schedules_in-sched_line = '0001'.
      lt_schedules_in-req_qty    = p_menge.
      APPEND lt_schedules_in.
      Fill schedule line flags
      lt_schedules_inx-itm_number  = '000020'.
      lt_schedules_inx-sched_line  = '0001'.
      lt_schedules_inx-updateflag  = 'X'.
      lt_schedules_inx-req_qty     = 'X'.
      APPEND lt_schedules_inx.
    Call the BAPI to create the sales order.
      CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
           EXPORTING
                sales_header_in     = header
                sales_header_inx    = headerx
           IMPORTING
                salesdocument_ex    = v_vbeln
           TABLES
                return              = return
                sales_items_in      = item
                sales_items_inx     = itemx
                sales_schedules_in  = lt_schedules_in
                sales_schedules_inx = lt_schedules_inx
                sales_partners      = partner.
    Check the return table.
      LOOP AT return WHERE type = 'E' OR type = 'A'.
        EXIT.
      ENDLOOP.
      IF sy-subrc = 0.
        WRITE: / 'Error in creating document'.
      ELSE.
    Commit the work.
        COMMIT WORK AND WAIT.
        WRITE: / 'Document ', v_vbeln, ' created'.
      ENDIF.

  • Mass display or print Purchase Order History

    Instead of checking your Purchase Order History one at a time, you can now mass display or print them with this customized abap report.
    Mass display or print Purchase Order History
    You can request report by :
    1.  Change date
    2.  User Name
    3.  Purchase Order Number
    4.  Vendor Code
    Written by : SAP Basis, ABAP Programming and Other IMG Stuff
                 http://www.sap-img.com
    REPORT ZPOCHANGE LINE-SIZE 132 NO STANDARD PAGE HEADING
                     LINE-COUNT 065(001)
                     MESSAGE-ID VR.
    TABLES: DD04T,
            CDHDR,
            CDPOS,
            DD03L,
            DD41V,
            T685T,
            VBPA,
            TPART,
            KONVC,
            EKKO.
    SELECT-OPTIONS: XUDATE FOR CDHDR-UDATE,
                    XNAME  FOR CDHDR-USERNAME,
                    XEBELN FOR EKKO-EBELN,
                    XLIFNR FOR EKKO-LIFNR.
    SELECTION-SCREEN SKIP.
    TEXT-001 - Sorting Sequence
    SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001.
    PARAMETERS: SUDATE RADIOBUTTON GROUP R1,
                SNAME  RADIOBUTTON GROUP R1,
                SOBID  RADIOBUTTON GROUP R1.
    SELECTION-SCREEN END OF BLOCK BLK1.
    DATA: WFLAG,
          WCHANGENR LIKE CDHDR-CHANGENR.
    DATA: INDTEXT(60) TYPE C.
    DATA: BEGIN OF ICDHDR OCCURS 50.
            INCLUDE STRUCTURE CDHDR.
    DATA: END OF ICDHDR.
    DATA: BEGIN OF ICDSHW OCCURS 50.
            INCLUDE STRUCTURE CDSHW.
    DATA: END OF ICDSHW.
    DATA: BEGIN OF EKKEY,
            EBELN LIKE EKET-EBELN,
            EBELP LIKE EKET-EBELP,
            ETENR LIKE EKET-ETENR,
          END OF EKKEY.
    DATA: BEGIN OF ITAB OCCURS 50,
            BEGIN OF EKKEY,
              EBELN LIKE EKET-EBELN,
              EBELP LIKE EKET-EBELP,
              ETENR LIKE EKET-ETENR,
            END OF EKKEY,
            CHANGENR LIKE CDHDR-CHANGENR,
            UDATE    LIKE CDHDR-UDATE,
            UTIME    LIKE CDHDR-UTIME,
            USERNAME LIKE CDHDR-USERNAME,
            CHNGIND  LIKE CDSHW-CHNGIND,
            FTEXT    LIKE CDSHW-FTEXT,
            OUTLEN   LIKE CDSHW-OUTLEN,
            F_OLD    LIKE CDSHW-F_OLD,
            F_NEW    LIKE CDSHW-F_NEW,
          END OF ITAB.
    DATA: OLD_OBJECTID LIKE CDHDR-OBJECTID.
    FIELD-SYMBOLS: <F_OLD>, <F_NEW>.
    SELECT * FROM EKKO WHERE EBELN IN XEBELN AND
                             LIFNR IN XLIFNR.
      CLEAR CDHDR.
      CLEAR CDPOS.
      CDHDR-OBJECTCLAS = 'EINKBELEG'.
      CDHDR-OBJECTID   = EKKO-EBELN.
      PERFORM GETCHGDOCS.
    ENDSELECT.
    IF SUDATE = 'X'.
      SORT ITAB BY UDATE EKKEY-EBELN CHANGENR EKKEY-EBELP
                   EKKEY-ETENR.
    ELSEIF SNAME = 'X'.
      SORT ITAB BY USERNAME EKKEY-EBELN CHANGENR EKKEY-EBELP
                   EKKEY-ETENR.
    ELSE.
      SORT ITAB BY EKKEY-EBELN CHANGENR EKKEY-EBELP EKKEY-ETENR.
    ENDIF.
    LOOP AT ITAB.
      CLEAR: INDTEXT, EKKEY.
      CASE ITAB-CHNGIND.
        WHEN 'U'.
            INDTEXT(50) = ITAB-FTEXT.
            INDTEXT+51  = TEXT-020.
            CONDENSE INDTEXT.
        WHEN 'D'.
            INDTEXT = TEXT-021.
        WHEN 'E'.
            INDTEXT(5) = ITAB-FTEXT.
            INDTEXT+51 = TEXT-021.
            CONDENSE INDTEXT.
          WHEN 'I'.
            INDTEXT = TEXT-022.
        ENDCASE.
        RESERVE 4 LINES.
        IF WCHANGENR NE ITAB-CHANGENR.
          WCHANGENR = ITAB-CHANGENR.
          EKKEY = ITAB-EKKEY.
          WRITE:/ ITAB-UDATE UNDER 'Change Date',
                  ITAB-UTIME UNDER 'Time',
                  ITAB-USERNAME UNDER 'User Name',
                  ITAB-EKKEY-EBELN UNDER 'PO No',
                  ITAB-EKKEY-EBELP UNDER 'Item',
                  ITAB-EKKEY-ETENR UNDER 'Sch No',
                  INDTEXT     UNDER 'Changes'.
        ELSEIF ITAB-EKKEY NE EKKEY.
          WRITE:/ ITAB-EKKEY-EBELP UNDER 'Item',
                  ITAB-EKKEY-ETENR UNDER 'Sch No',
                  INDTEXT     UNDER 'Changes'.
        ENDIF.
        CASE ITAB-CHNGIND.
          WHEN 'U'.
            ASSIGN ITAB-F_OLD(ITAB-OUTLEN) TO <F_OLD>.
            ASSIGN ITAB-F_NEW(ITAB-OUTLEN) TO <F_NEW>.
            WRITE: / TEXT-023  UNDER 'Changes',
                     <F_OLD>.
            WRITE: / TEXT-024 UNDER 'Changes',
                     <F_NEW>.
          WHEN 'E'.
            ASSIGN ITAB-F_OLD(ITAB-OUTLEN) TO <F_OLD>.
            WRITE: TEXT-023 UNDER 'Changes',
                   <F_OLD>.
        ENDCASE.
        SKIP.
    ENDLOOP.
    TOP-OF-PAGE.
    WRITE:/ SY-DATUM,SY-UZEIT,
           50 'P U R C H A S E  O R D E R   H I S T O R Y',
          120 'Page', SY-PAGNO.
    WRITE: / SY-REPID,
             60 'Purchase Orders Changes'.
    SKIP.
    ULINE.
    IF SUDATE = 'X'.
      WRITE:/001 'Change Date',
             014 'Time',
             024 'User Name',
             038 'PO No',
             050 'Item',
             057 'Sch No',
             065 'Changes'.
    ELSEIF SOBID = 'X'.
      WRITE:/001 'PO No',
             013 'Item',
             020 'Sch No',
             028 'Change Date',
             041 'Time',
             051 'User Name',
             065 'Changes'.
    ELSE.
      WRITE:/001 'User Name',
             015 'Change Date',
             028 'Time',
             038 'PO No',
             050 'Item',
             057 'Sch No',
             065 'Changes'.
    ENDIF.
    ULINE.
    FORM GETCHGDOCS.
      CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
           EXPORTING
                DATE_OF_CHANGE    = CDHDR-UDATE
                OBJECTCLASS       = CDHDR-OBJECTCLAS
                OBJECTID          = CDHDR-OBJECTID
                TIME_OF_CHANGE    = CDHDR-UTIME
                USERNAME          = CDHDR-USERNAME
           TABLES
                I_CDHDR           = ICDHDR
           EXCEPTIONS
                NO_POSITION_FOUND = 1
                OTHERS            = 2.
      CHECK SY-SUBRC EQ 0.
      DELETE ICDHDR WHERE CHANGE_IND EQ 'I'.
      CHECK NOT ICDHDR[] IS INITIAL.
      LOOP AT ICDHDR.
        CHECK ICDHDR-UDATE IN XUDATE.
        CHECK ICDHDR-USERNAME IN XNAME.
        CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
                     EXPORTING  CHANGENUMBER       = ICDHDR-CHANGENR
                     IMPORTING  HEADER             = CDHDR
                     TABLES     EDITPOS            = ICDSHW
                     EXCEPTIONS NO_POSITION_FOUND  = 1
                                OTHERS             = 2.
        CHECK SY-SUBRC EQ 0.
        LOOP AT ICDSHW.
          CHECK ICDSHW-TEXT_CASE EQ SPACE.
          MOVE-CORRESPONDING ICDSHW TO ITAB.
          MOVE-CORRESPONDING ICDHDR TO ITAB.
          MOVE ICDSHW-TABKEY+3 TO ITAB-EKKEY.
          APPEND ITAB.
        ENDLOOP.
      ENDLOOP.
    ENDFORM.
    END OF PROGRAM

    Hi,
    copied from          http://www.sap-img.com/mm001.htm

  • Printing purchase order 'in release' !

    Hello,
    we need to add a second printing document for purchase order. I think it's possible with a new message. But i've read that message works only if the purchase order is not 'in realease'.
    Is it possible to print purchase order document when the purchase is 'in release' ?
    Thank's

    hi,
    AS per my knowledge it shd be possible after full release only...because then only it make sense of the printing and sending to the vendor...
    If it would be possible before or within release only, and if the changes are made in between while the release by any officer, then it'll not get reflected....
    Regards
    Priyanka.P

  • Pasta 3.0 - Printing Purchase Order Forms using Pasta

    Has everyone successfully gotten the Pasta utility using the PrintForm functionality to work for printing Purchase Orders in a 11.5.8 environment. We have applied the latest Pasta patches for 3.0.4 and has created a postscript file from a msword document, transferred to a True64 unix machine and converted it to the PrintForm (.pf) file. We have followed all of the setup steps for the print drivers and has run the concurrent job. It appears to have merge the text base report into a postscript file but it will not print out on the printer. When we view the output via the application you can see the data from the report but you do not see the logo image from the printform file. We are under a time constraint so any feedback would be appreciated.
    Bettye

    Has everyone successfully gotten the Pasta utility using the PrintForm functionality to work for printing Purchase Orders in a 11.5.8 environment. We have applied the latest Pasta patches for 3.0.4 and has created a postscript file from a msword document, transferred to a True64 unix machine and converted it to the PrintForm (.pf) file. We have followed all of the setup steps for the print drivers and has run the concurrent job. It appears to have merge the text base report into a postscript file but it will not print out on the printer. When we view the output via the application you can see the data from the report but you do not see the logo image from the printform file. We are under a time constraint so any feedback would be appreciated.
    Bettye

Maybe you are looking for

  • CR with  VS 2010 on 64bits machine

    Hello, I really really need help! Last year, i developed an application with visual studio 2010 and crystal report. I downloaded CRforNET40 beta 2 for 32 bit and every thing was good! Now i want to test it on a 64 bit computer. so i install framework

  • Is there a difference in behaviour between clustered systems vs. standalone

    OpenVMS, MessageQ (could not find another place to ask :(). Suppose 2 nodes, same DMQ bus. Node 1: Application X starts up, binds to group Y (not yet existing and so creates connection) Node 2: Application X starts up, binds to group Y. If node1 and

  • Is there any API for connecting web server and iphone apps

    Hi, I have to retrieve data from Web Server and display in my iphone apps. I want to know that is there any API through which i can connect my apps to server and get data. One way i know that use NSURLConnection and get XML response and prase it and

  • BSIS Index for G/L Accounts contains Customer items ?

    Hello experts, I have some doubts about what i'm seing in database table BSIS. I always thought that this index table was containing only items with account type 'S' for GL account items. But it seems that customer items (with account type = D) can a

  • SSH into remote solaris machine without entering password

    Hi all, I am trying to configure an SSH login-sequence without having to type the password, but it doesn't work : configuration: remote server Solaris8, openSSH 3.8p1 source server: linux, openSSH 3.7 On serverA (source host runs Linux), I did invoke