Can we create purchase order through report programming?

hi experts.....
can we create purchase order through report programming?If yes plz give me the thread details?

Hi,
Use this code in a program by using a BAPI function module
Anothe rway is using classical/ALV report using call transaction from a report for changing the PO
loop at i_header.
    header-ref_1         = i_header-legacy.
    headerx-ref_1        = c_x.
    header-doc_type      = i_header-bsart.
    headerx-doc_type     = c_x.
    header-comp_code     = i_header-bukrs.
    headerx-comp_code    = c_x.
    header-purch_org     = i_header-ekorg.
    headerx-purch_org    = c_x.
    header-pur_group     = i_header-ekgrp.
    headerx-pur_group    = c_x.
    header-vendor        = i_header-lifnr.
    headerx-vendor       = c_x.
    concatenate i_header-bedat+4(4)
                i_header-bedat+0(2)
                i_header-bedat+2(2)
                into header-doc_date.
    headerx-doc_date     = c_x.
    header-created_by    = i_header-ernam.
    headerx-created_by   = c_x.
    header-currency      = i_header-waers.
    headerx-currency     = c_x.
    concatenate i_header-kdatb+4(4)
                i_header-kdatb+0(2)
                i_header-kdatb+2(2)
                into header-vper_start.
    headerx-vper_start   = c_x.
    loop at i_items where legacy = i_header-legacy.
      item-po_item            =  i_items-ebelp.
      itemx-po_item           =  i_items-ebelp.
      itemx-po_itemx          =  c_x.
      if i_header-bsart = 'NB'.
        item-material            =  i_items-ematn.
        itemx-material           =  c_x.
        schedule-quantity        =  i_items-menge * 1000.
        schedulex-quantity       =  c_x.
      else.
        item-short_text          = i_items-ematn.
        itemx-short_text         = c_x.
        item-matl_group          = '1000'.
        itemx-matl_group         = c_x.
        schedule-quantity        =  '1'.
        schedulex-quantity       =  c_x.
      endif.
      item-plant               =  i_items-werks.
      itemx-plant              =  c_x.
      schedule-po_item         = i_items-ebelp.
      schedule-sched_line      = '1'.
      schedulex-po_item        = i_items-ebelp.
      schedulex-sched_line     = '1'.
      schedulex-po_itemx       = c_x.
      schedulex-sched_linex    = c_x.
      concatenate  i_items-eildt+0(2)
                   i_items-eildt+2(2)
                   i_items-eildt+4(4)
                   into schedule-delivery_date.
      schedulex-delivery_date  =  c_x.
      item-price_unit          =  i_items-peinh * 100.
      itemx-price_unit         =  c_x.
      item-tax_code            =  i_items-mwskz.
      itemx-tax_code           =  c_x.
      item-shipping            =  i_items-evers.
      itemx-shipping           =  c_x.
      account-po_item          = i_items-ebelp.
      accountx-po_item         = i_items-ebelp.
      accountx-po_itemx        = c_x.
      if i_header-bsart = 'FO'.
        item-pckg_no  = sy-tabix.
        itemx-pckg_no = 'X'.
        limits-pckg_no        = sy-tabix.
        limits-limit          = i_items-overalllimit.
        limits-exp_value      = i_items-expectedoverall.
        posrvaccessvalues-pckg_no    = sy-tabix.
        posrvaccessvalues-line_no    = '0'.
        posrvaccessvalues-serno_line = '00'.
        posrvaccessvalues-percentage = '100.0'.
        posrvaccessvalues-serial_no  = '01'.
        account-serial_no     = '1'.
        accountx-serial_no    = '1'.
        accountx-serial_nox   = c_x.
        account-quantity  = '1'.
        accountx-quantity = c_x.
        call function 'CONVERSION_EXIT_ALPHA_INPUT'
          exporting
            input  = i_items-kostl
          importing
            output = account-costcenter.
        accountx-costcenter   = c_x.
        call function 'CONVERSION_EXIT_ALPHA_INPUT'
          exporting
            input  = i_items-sakto
          importing
            output = account-gl_account.
        accountx-gl_account   = c_x.
        item-acctasscat       = i_items-knttp.
        itemx-acctasscat      = c_x.
        item-item_cat         = i_items-epstp.
        itemx-item_cat        = c_x.
      endif.
      append:item,itemx,schedule,schedulex,account,accountx,limits,posrvaccessvalues.
      clear :item,itemx,schedule,schedulex,account,accountx,limits,posrvaccessvalues.
    endloop.
    call function 'BAPI_PO_CREATE1'
      exporting
        poheader                     = header
        poheaderx                    = headerx
*   POADDRVENDOR                 =
*   TESTRUN                      =
*   MEMORY_UNCOMPLETE            =
*   MEMORY_COMPLETE              =
*   POEXPIMPHEADER               =
*   POEXPIMPHEADERX              =
*   VERSIONS                     =
*   NO_MESSAGING                 =
*   NO_MESSAGE_REQ               =
*   NO_AUTHORITY                 =
*   NO_PRICE_FROM_PO             =
        importing
        exppurchaseorder             = ponumber
*   EXPHEADER                    =
*   EXPPOEXPIMPHEADER            =
        tables
        return                       = return
        poitem                       = item
        poitemx                      = itemx
*   POADDRDELIVERY               =
        poschedule                   = schedule
        poschedulex                  = schedulex
        poaccount                    = account
*   POACCOUNTPROFITSEGMENT       =
        poaccountx                   = accountx
*   POCONDHEADER                 =
*   POCONDHEADERX                =
*   POCOND                       =
*   POCONDX                      =
        polimits                     = limits
*   POCONTRACTLIMITS             =
*   POSERVICES                   =
   posrvaccessvalues            = posrvaccessvalues.
*   POSERVICESTEXT               =
*   EXTENSIONIN                  =
*   EXTENSIONOUT                 =
*   POEXPIMPITEM                 =
*   POEXPIMPITEMX                =
*   POTEXTHEADER                 =
*   POTEXTITEM                   =
*   ALLVERSIONS                  =
*   POPARTNER                    =
    if ponumber eq space.
      loop at return where type = 'E'.
        clear buffer.
        move-corresponding return to e_return.
        concatenate i_header-legacy e_return into buffer.
        transfer buffer to p2_file.
      endloop.
      move-corresponding i_header to i_eheader.
      transfer i_eheader to p3_file.
      loop at i_items where legacy = i_header-legacy.
        move-corresponding i_items to i_eitems.
        transfer i_eitems to p4_file.
      endloop.
    else.
      commit work and wait.
    endif.
    clear:ponumber,header,headerx,item,itemx,account,accountx,limits,return,schedule,schedulex,posrvaccessvalues.
    refresh:item,itemx,account,accountx,limits,return,schedule,schedulex,posrvaccessvalues.
  endloop.
  close dataset p2_file.
  close dataset p3_file.
  close dataset p4_file.
Regards
Krishna

Similar Messages

  • How can I send purchase order through SAP mail ?

    How can I send purchase order through SAP mail ? Can any one explain whts the NACE settings?

    just  do it as  <b>Anji reddy</b> said to you   ...or else  ...  in the purchase  order trascation  ...print it  ... so that  it will generate the spool request  for that  purchase  order  ....
    so the   the belwo program is for sending <b>the Spool   Request  data   as  Email  to  any Email id  ...</b>
    The code below demonstrates how to retrieve a spool request and email it as a PDF document. Please note for the below program to process a spool request the program must be executed in background otherwise no spool request will be created. Once you have had a look at this there is an modified version of the program which works in both background and foreground. Also see transaction SCOT for SAPConnect administration.
    *& Report  ZSPOOLTOPDF                                                 *
    *& Converts spool request into PDF document and emails it to           *
    *& recipicant.                                                         *
    *& Execution                                                           *
    *& This program must be run as a background job in-order for the write *
    *& commands to create a Spool request rather than be displayed on      *
    *& screen                                                              *
    REPORT  zspooltopdf.
    PARAMETER: p_email1 LIKE somlreci1-receiver
                                        DEFAULT '[email protected]',
               p_sender LIKE somlreci1-receiver
                                        DEFAULT '[email protected]',
               p_delspl  AS CHECKBOX.
    *DATA DECLARATION
    DATA: gd_recsize TYPE i.
    * Spool IDs
    TYPES: BEGIN OF t_tbtcp.
            INCLUDE STRUCTURE tbtcp.
    TYPES: END OF t_tbtcp.
    DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
          wa_tbtcp TYPE t_tbtcp.
    * Job Runtime Parameters
    DATA: gd_eventid LIKE tbtcm-eventid,
          gd_eventparm LIKE tbtcm-eventparm,
          gd_external_program_active LIKE tbtcm-xpgactive,
          gd_jobcount LIKE tbtcm-jobcount,
          gd_jobname LIKE tbtcm-jobname,
          gd_stepcount LIKE tbtcm-stepcount,
          gd_error    TYPE sy-subrc,
          gd_reciever TYPE sy-subrc.
    DATA:  w_recsize TYPE i.
    DATA: gd_subject   LIKE sodocchgi1-obj_descr,
          it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_sender_type     LIKE soextreci1-adr_typ,
          gd_attachment_desc TYPE so_obj_nam,
          gd_attachment_name TYPE so_obj_des.
    * Spool to PDF conversions
    DATA: gd_spool_nr LIKE tsp01-rqident,
          gd_destination LIKE rlgrap-filename,
          gd_bytecount LIKE tst01-dsize,
          gd_buffer TYPE string.
    * Binary store for PDF
    DATA: BEGIN OF it_pdf_output OCCURS 0.
            INCLUDE STRUCTURE tline.
    DATA: END OF it_pdf_output.
    CONSTANTS: c_dev LIKE  sy-sysid VALUE 'DEV',
               c_no(1)     TYPE c   VALUE ' ',
               c_device(4) TYPE c   VALUE 'LOCL'.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    * Write statement to represent report output. Spool request is created
    * if write statement is executed in background. This could also be an
    * ALV grid which would be converted to PDF without any extra effort
      WRITE 'Hello World'.
      new-page.
      commit work.
      new-page print off.
      IF sy-batch EQ 'X'.
        PERFORM get_job_details.
        PERFORM obtain_spool_id.
    *** Alternative way could be to submit another program and store spool
    *** id into memory, will be stored in sy-spono.
    *submit ZSPOOLTOPDF2
    *        to sap-spool
    *        spool parameters   %_print
    *        archive parameters %_print
    *        without spool dynpro
    *        and return.
    * Get spool id from program called above
    *  IMPORT w_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
        PERFORM convert_spool_to_pdf.
        PERFORM process_email.
        if p_delspl EQ 'X'.
          PERFORM delete_spool.
        endif.
        IF sy-sysid = c_dev.
          wait up to 5 seconds.
          SUBMIT rsconn01 WITH mode   = 'INT'
                          WITH output = 'X'
                          AND RETURN.
        ENDIF.
      ELSE.
        SKIP.
        WRITE:/ 'Program must be executed in background in-order for spool',
                'request to be created.'.
      ENDIF.
    *       FORM obtain_spool_id                                          *
    FORM obtain_spool_id.
      CHECK NOT ( gd_jobname IS INITIAL ).
      CHECK NOT ( gd_jobcount IS INITIAL ).
      SELECT * FROM  tbtcp
                     INTO TABLE it_tbtcp
                     WHERE      jobname     = gd_jobname
                     AND        jobcount    = gd_jobcount
                     AND        stepcount   = gd_stepcount
                     AND        listident   <> '0000000000'
                     ORDER BY   jobname
                                jobcount
                                stepcount.
      READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
      IF sy-subrc = 0.
        message s004(zdd) with gd_spool_nr.
        gd_spool_nr = wa_tbtcp-listident.
        MESSAGE s004(zdd) WITH gd_spool_nr.
      ELSE.
        MESSAGE s005(zdd).
      ENDIF.
    ENDFORM.
    *       FORM get_job_details                                          *
    FORM get_job_details.
    * Get current job details
      CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
           IMPORTING
                eventid                 = gd_eventid
                eventparm               = gd_eventparm
                external_program_active = gd_external_program_active
                jobcount                = gd_jobcount
                jobname                 = gd_jobname
                stepcount               = gd_stepcount
           EXCEPTIONS
                no_runtime_info         = 1
                OTHERS                  = 2.
    ENDFORM.
    *       FORM convert_spool_to_pdf                                     *
    FORM convert_spool_to_pdf.
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
                src_spoolid              = gd_spool_nr
                no_dialog                = c_no
                dst_device               = c_device
           IMPORTING
                pdf_bytecount            = gd_bytecount
           TABLES
                pdf                      = it_pdf_output
           EXCEPTIONS
                err_no_abap_spooljob     = 1
                err_no_spooljob          = 2
                err_no_permission        = 3
                err_conv_not_possible    = 4
                err_bad_destdevice       = 5
                user_cancelled           = 6
                err_spoolerror           = 7
                err_temseerror           = 8
                err_btcjob_open_failed   = 9
                err_btcjob_submit_failed = 10
                err_btcjob_close_failed  = 11
                OTHERS                   = 12.
      CHECK sy-subrc = 0.
    * Transfer the 132-long strings to 255-long strings
      LOOP AT it_pdf_output.
        TRANSLATE it_pdf_output USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.
    *       FORM process_email                                            *
    FORM process_email.
      DESCRIBE TABLE it_mess_att LINES gd_recsize.
      CHECK gd_recsize > 0.
      PERFORM send_email USING p_email1.
    *  perform send_email using p_email2.
    ENDFORM.
    *       FORM send_email                                               *
    *  -->  p_email                                                       *
    FORM send_email USING p_email.
      CHECK NOT ( p_email IS INITIAL ).
      REFRESH it_mess_bod.
    * Default subject matter
      gd_subject         = 'Subject'.
      gd_attachment_desc = 'Attachname'.
    *  CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
      it_mess_bod        = 'Message Body text, line 1'.
      APPEND it_mess_bod.
      it_mess_bod        = 'Message Body text, line 2...'.
      APPEND it_mess_bod.
    * If no sender specified - default blank
      IF p_sender EQ space.
        gd_sender_type  = space.
      ELSE.
        gd_sender_type  = 'INT'.
      ENDIF.
    * Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_mess_bod
                                          it_mess_att
                                    using p_email
                                          'Example .xls documnet attachment'
                                          'PDF'
                                          gd_attachment_name
                                          gd_attachment_desc
                                          p_sender
                                          gd_sender_type
                                 changing gd_error
                                          gd_reciever.
    ENDFORM.
    *       FORM delete_spool                                             *
    FORM delete_spool.
      DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
      ld_spool_nr = gd_spool_nr.
      CHECK p_delspl <> c_no.
      CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
           EXPORTING
                spoolid = ld_spool_nr.
    ENDFORM.
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
    *       Send email
    FORM send_file_as_email_attachment tables it_message
                                              it_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
    data:   t_packing_list like sopcklsti1 occurs 0 with header line,
            t_contents like solisti1 occurs 0 with header line,
            t_receivers like somlreci1 occurs 0 with header line,
            t_attachment like solisti1 occurs 0 with header line,
            t_object_header like solisti1 occurs 0 with header line,
            w_cnt type i,
            w_sent_all(1) type c,
            w_doc_data like sodocchgi1.
      ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    * Fill the document data.
      w_doc_data-doc_size = 1.
    * Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    * Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = it_attach[].
    * Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    * Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    * Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_receivers
           EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8.
    * Populate zerror return code
      ld_error = sy-subrc.
    * Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.
    Girish

  • Create Purchase Order through EDI

    Hello Everybody,
    I want to know how to create Purchase order through EDI. I will receive text file from third party system. I have made most of the configuration related to EDI like Port -File, Partner Function etc. I am using message type PORDCR and Idoc type PORDCR05.
    But i do not know how the SAP first will convert the text file into IDoc and then create Purchase order. Can any body help me how to go about it? What steps i have to follow. I will have text file from that i have to create Purchase order through EDI.
    Thanks in advance.
    Regards,
    Manish

    Hi,
    Create Purchase Order through EDI
    Regarding on your query,
    You can use the standard ORDERS05 idoc type itself to send outbound idocs.
    It will be the middleware or the integration team that will send this IDOC to the receiving system.
    or
    Maintain Partner Profile in WE20, RFC Connection to the Middleware in SM59 and Port in WE21.
    Maintain Output Procedure/Output Type/Access Sequences/Condition Records from NACE
    Generate the Outbound 850 (PO) from ME21N
    Regards,
    Sekhar

  • Creating purchase order through coding

    I am trying to create purchase order through Code, for a table field i can insert as :
    odocs = GOD_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseOrders)
    odocs.CardCode = "200173"
    But if the field is not a table field then , how can i insert it in PO?????

    Hi Ashish Patil 
    Not sure what you mean, not sure what table you are talking about. But here is some sample code on how to add a purchase order.
    Dim PO As SAPbobsCOM.Documents
            PO = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseOrders)
            PO.CardCode = "VUL001"
            PO.Lines.ItemCode = "02SILVTS"
            PO.Lines.Quantity = 1
            PO.Lines.Price = 120
            If PO.Add() <> 0 Then
                Dim str As String
                str = oCompany.GetLastErrorDescription()
                MsgBox(str)
            End If
    hope it helps

  • Want to create a Quotation through Report programming

    Hi Expert,
    I need to create an Quotation in my ERP system through report programming. I just want to know, what are the FM Used for this purpose or any idea about this. I really welcome your great ideas.
    <removed by moderator>
    Thanks and Regards,
    Shakun
    Moderator message: please search for available information/documentation before asking.
    Edited by: Thomas Zloch on Oct 23, 2010 6:05 PM

    Hi Niji,
    refer to the following link:
    /people/kevin.wilson2/blog/2007/08/31/what-mechanisms-are-available-to-you-in-order-to-create-a-business-object-event
    hope this will help you.........

  • SRM SUS..can supplier create purchase orders

    Hi,
    In SRM SUS ( Supplier self service)
    1) Is it possible that Supplier/Vendors can able to create purchase orders himself
    2) Can Supplier/vendors able to access cataloges
    3)Can supplier create confirmation himself for both goods , as i knows it is possible for service confimations
    Thx
    Jai

    Hi Jairaj,
    In SRM SUS ( Supplier self service)
    1) Is it possible that Supplier/Vendors can able to create purchase orders himself
    No. The Vendors change can accept or reject PO Lines and change the price.
    They can create POR.
    2) Can Supplier/vendors able to access cataloges
    No.
    3)Can supplier create confirmation himself for both goods , as i knows it is possible for service confimations
    The vendors can create Service entry sheet in SRM 7.0.
    The vendors can create ASN for materials.
    Regards,
    Pavan

  • Problem in creating Purchase order through Idoc

    Hi ABAPers,
    I am trying to post PO document through WE19 t-code using inbound function module BAPI_IDOC_INPUT1 which is calling BAPI_PO_CREATE1 internally.And i am getting below error messages.
    1. Characteristic  does not exist in operating concern AC01
    2. This function only possible for subcontracting items
    3. No instance of object type PurchaseOrder has been created. External reference
    passing data to IDOC:PORDCR102
    Header Segment : E1BPMEPOHEADER and E1BPMEPOHEADERX
    company code    0814
    doc_type            NB
    vendor                0000400001
    poprg-                EPRO
    pgroup               U01
    Item Segment : E1BPMEPOITEM and E1BPMEPOITEMX
    Item                  00010
    material             000000000000000263
    plant                 0374
    Qty                   22.000
    Delivery Segment E1BPMEPOSCHEDULE and E1BPMEPOSCHEDULEX
    Item                  00010
    Schedule line     0001
    delivery date      01.12.2008
    Qty                   22.000
    Note: i am able to create PO successfully, through SE37 by using FM BAPI_PO_CREATE1  with given above data.
    Please confirm me, what else i need to pass to post PO through WE19 t-code using inbound function module BAPI_IDOC_INPUT1.
    Please reply me ASAP.
    Thanks and Regards,
    Sekhar Raju.

    must be data format issue. when you use Function_module/BAPI from SAP GUI, convertion exit is applied automatically. hence data is converted to proper format & submited.

  • During  creating Purchase  order

    Hi alll ,
    My Problem is while creating purchase order through purchase requisition
    How to remove the tick mark against invoice reciept i.e (repos) and gr based i.e ( weber )
    programatically .
    Regards
    Deepak

    hi,
    if you are working in ECC version you can easily resolve your porblem by implementing implecit enhancement.
    the above specifed user exit is not called exactely.
    implement two implecit enhancement in the following include program for resolving your problem
    1.Go to inlcude program LMEGUICI5. in that we have one method implementaion. Here implement implecit enhancement at the beginning of the method like below.
    METHOD transport_to_dynp.
    ENHANCEMENT 50  ZREMOVE_FLAG.    "active version
    clear: mepo1317_pbo-repos,
          mepo1317_pbo-webre,
          mepo1317_pbo-erekz.
    ENDENHANCEMENT.
        mepo1317 = mepo1317_pbo.
      ENDMETHOD. 
    2. Go to include program: MM06EFPO_POT_ETDRK and implement another implecit enhancement at the beginning of the following subroutine.
    FORM pot_etdrk.
    ENHANCEMENT 100  ZREMOVE_POT.    "active version
    loop at pot.
          CLEAR: pot-repos,
          pot-webre,
          pot-erekz.
          MODIFY pot.
    ENDLOOP.
    ENDENHANCEMENT.
    endform.
    If you need any information please let me know.
    Regards,
    Peranandam

  • Creating purchase order from code

    I am importing an excel file and then for each row,trying to create purchase order through coding by using document object. I am successful in creating Order Headers but how can i create Lines if the excel sheet is having Same order but different Item codes????

    I was trying to import excel file in purchase order by following way:-
    I read each row and for each row, call function for creating order. This is my sample code---
    (var30 is previous excel value of order no. & var1 is current value)
    public sub createorder()
    odocs = GOD_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseOrders)
                If irow = 2 Then
                    odocs.CardCode = "200173"
                    odocs.Lines.ItemCode = var16
                    odocs.Lines.Add()
                Else
                    If var1 = var30 Then
                        odocs.CardCode = "200173"
                        odocs.Lines.ItemCode = "3231015"
                        odocs.Lines.Add()
                    Else
                        lRetCode = odocs.Add()
                        odocs.CardCode = "200173"
                        odocs.Lines.ItemCode = var16
                        odocs.Lines.Add()
                    End If
                End If
                lRetCode = odocs.Add()
                Dim x As String
                GOD_Company.GetNewObjectCode(x)
                If lRetCode <> 0 Then
                    GOD_Company.GetLastError(lErrCode, sErrMsg)
                    MsgBox(sErrMsg)
                Else
                    MsgBox("Order Created with no " & x & ".")
                End If
                var30 = var1
    This code is giving error as "Item No. is missing(OPOR.ObjType)", But Item no. is not present in Purchase Order. Please check whether Code is proper or i need to make any changes???????/

  • MRP automatic create Purchase Order ?

    Is anybody knows can MRP create Purchase Order directly skip P.R ?
    Thanks !

    Hi,
    This is possible through PR only.
    Tick the automatic PO and Source List fields in purchase view of the material master for the vendors on whom you would like to release PO automatically. Create a purchase info record. Create source list. In the last column in the details screen of the source list check the field relevant for MRP set the correct parameters for running MRP. But PO can not be created automatically after MRP run.
    The automatic PO creation flag enables you to run a batch job that will convert all selected Purchase Requisitions to be converted Purchase Orders in the background.
    You may consider scheduling agreements if you want MRP to kick out Purchase Orders. Set the flag in the source list for the scheduling agreement to "2" enabling MRP to kick out delivery schedules for future requirements. If you want to fix the schedule within a certain period you have two options.
    1. Using firm zone - firms all orders within this period . Refer additional data screen of the scheduling agreement at the vendor material level.
    2. Planning time - all new orders outside of the planning time fence - refer MRP 1 view of the material master
    Above document i cpied from link <b>Arif Mansuri  <b>New to Materials Management / Warehouse Management?</b></b>
    Raghu

  • Inputs requried to create purchase order report from flat file

    inputs requried to create purchase order report from flat file

    At a guess, I'd say purchase order data.
    If you don't give us a clue what you are actually trying to do we can't really help you too much.
    Do you want to call a BAPI?  Do a BDC?  Use an IDOC?  Or just generally muck up the system by doing inserts into the purchasing tables?
    No doubt if you tell us, you'll get lots and lots of suggestions.
    Gareth.

  • Program for Creating Purchase Order with reference to purchase requisition

    Hi ,
    I need to Create purchase Order with reference to  Purchase requisition,
    in my case i need to automize the Process which is happening in MD04,
    Can you please suggest me ?
    Thanks ,
    Murali

    Hi,
    Plz check this link. It will be helpful to you.
    Purchase order creation with reference to PR
    We can also create the PO Using the BAPI_PO_CREATE1 function module.
    In this function module fill up the all necessary Details.
    With details in Item Table we haveto give the Fields PREQ_NO and PREQ_ITEM for each item .
    then it will creates the PO with PREQ.
    Thanks & Regards,
    Sarita Singh Rathour
    Edited by: Sarita Rathour on Aug 3, 2009 7:01 AM

  • Update was terminated while creating purchase order from ME21N

    Hi Experts,
    We are getting this dump when try to create purchase order from ME21N;
    Our system ECC 6.0 and IS-AFS (Apparel & Footwear Solution) V600 component has installed,
    How can we prevent this error,
    Regards
    Here is the dump and sm21 log,
    Runtime Errors         LOAD_PROGRAM_NOT_FOUND
    Exception              CX_SY_PROGRAM_NOT_FOUND
    Date and Time          10.10.2008 10:22:03
    Short text
         Program "RMCMS431 " not found.
    What happened?
         There are several possibilities:
         Error in the ABAP Application Program
         The current ABAP program "SAPLMCS4" had to be terminated because it has
         come across a statement that unfortunately cannot be executed.
         or
         Error in the SAP kernel.
         The current ABAP "SAPLMCS4" program had to be terminated because the
         ABAP processor detected an internal system error.
    What can you do?
         Note down which actions and inputs caused the error.
         To process the problem further, contact you SAP system
         administrator.
        Using Transaction ST22 for ABAP Dump Analysis, you can look
        at and manage termination messages, and you can also
        keep them for a long time.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_PROGRAM_NOT_FOUND', was not
         caught in
        procedure "TMC2F_FROUT_CALL" "(FORM)", nor was it propagated by a RAISING
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        On account of a branch in the program
        (CALL FUNCTION/DIALOG, external PERFORM, SUBMIT)
        or a transaction call, another ABAP/4 program
        is to be loaded, namely "RMCMS431 ".
        However, program "RMCMS431 " does not exist in the library.
        Possible reasons:
        a) Wrong program name specified in an external PERFORM or
           SUBMIT or, when defining a new transaction, a new
           dialog module or a new function module.
        b) Transport error
    How to correct the error
        Check the last transports to the R/3 System.
        Are changes currently being made to the program "SAPLMCS4"?
        Has the correct program been entered in table TSTC for Transaction "ME21N "?
        If the error occures in a non-modified SAP program, you may be able to
        find an interim solution in an SAP Note.
        If you have access to SAP Notes, carry out a search with the following
        keywords:
        "LOAD_PROGRAM_NOT_FOUND" "CX_SY_PROGRAM_NOT_FOUND"
        "SAPLMCS4" or "LMCS4F10"
        "TMC2F_FROUT_CALL"
        If you cannot solve the problem yourself and want to send an error
        notification to SAP, include the following information:
        1. The description of the current problem (short dump)
           To save the description, choose "System->List->Save->Local File
        (Unconverted)".
        2. Corresponding system log
           Display the system log by calling transaction SM21.
           Restrict the time interval to 10 minutes before and five minutes
        after the short dump. Then choose "System->List->Save->Local File
        (Unconverted)".
        3. If the problem occurs in a problem of your own or a modified SAP
        program: The source code of the program
           In the editor, choose "Utilities->More
        Utilities->Upload/Download->Download".
        4. Details about the conditions under which the error occurred or which
        actions and input led to the error.
        The exception must either be prevented, caught within proedure
        "TMC2F_FROUT_CALL" "(FORM)", or its possible occurrence must be declared in the
        RAISING clause of the procedure.
        To prevent the exception, note the following:
    sm21 log ;
    Transaction Canceled 00 671 ( LOAD_PROGRAM_NOT_FOUND 20081010102203saptest_TET_00 EYUCE 100
    Update terminated
    > Update key: F39796DD5421F1509233001E0BD601E0
    > Update module: MCE_STATISTICS_UPD_V2
    Run-time error "LOAD_PROGRAM_NOT_FOUND" occurred

    Please follow the oss note 800335
    V2 Update terminations in Purchasing transactions after upgrading or installing AFS 5.0 release.
    Other terms
    AFS, LIS, MIGO, ME22N, OLI3, S433, S431
    Reason and Prerequisites
    AFS Purchasing infostructure S431 is no longer used. S433 is the valid infostructure for the release AFS 5.0.
    Solution
    Please do the following.
    For customers upgrading to AFS 5.0 only:
    > Rebuild Infostructure S433.
    - Goto transaction: OLI3 (Statistical Set up of Infostructures)
    - Info structure to be compile: S433
    - Specify the 'Name of run'.
    - Execute.
    > Please also follow the instructions given below.
    For both Upgrade and Non-upgrade Customers:
    > Create the report 'ZDELS431'.
    - Transaction: SE38
    - Give Program name as ZDELS431.
    - Create (F5).
    - Title : 'Program to delete S431'.
    - Type  : 1 (Executable Program).
    - Status: T (Test Program).
    > Copy the program text from the note and paste in the program.
    > Save and activate the program.
    > Execute the report for all clients in Update mode.
      (Two check-boxes will appear: P_ALL_CL, P_UPDATE.
       Please check both of them).
    This report will delete all the references to infostructure S431.

  • With reference to contract Purchase Order Analysis report.

    Hi,
    I need SAP Standard " With reference to contract Purchase Order Analysis report"
    Regards,
    Priya.

    Hi,
    there is no standard report to get the PO list wrf to contracts,
    but you can get through SE16 from the table EKPO, where you have to pass the contract numbers ( get through ME3L,ME3M or ME3C ) in the field KONNR,
    lakshmi reddy

  • How to create purchase order and sales orders

    Hi guys,
    i want to create sales order in IDES and i need to create purchase order ECC.
    depending on that i want to create the idoc for that and i want to send info through xi to the other sys.
    will u plz any of u can help me in this query.
    Thanks & Regard,
    Kalyani..

    Hi,
      TCODE for purchase order-  me22n
      TCODE for sales order- va01
    Regards,
    S.RamNarender

Maybe you are looking for

  • Barcode reader input to string control

    Hi,  I am using a barcode reader that uses keyboard emulation.  The barcode types on the computer the same way a keyboard would.  When I open notepad and use the barcode reader to read a barcode, the following meesage is typed:  S/N: 17967 Lin: 0.591

  • Using Apple TV 2 - Subtitles

    good day i want to buy the new apple tv i want to ask if theres a way to see movies and tv series that are stored on my computer as a regular files and not in the itunes and also if it support using subtitles files like srt thanks

  • Lightroom/Elements Help/Updates won't link to web

    I have Lightroom 5.6 64 bit and Elements 12 installed on two Windows 7 computers - one is my work and the other my personal  home computer.  At some point the versions on my home computer stopped linking to the internet when I select a Help function

  • Can you sync an ibooks pdf library in icloud among different computers

    Can you sync an ibooks pdf library in icloud among different computers?

  • Multichannel multisample read timestamp for CCP

    I have been using multichannel multisample 2D Dbl CAN read vi to acquire data from my CCP functions. This is almost the same as what is shown in the NI CCP toolset examples. However, now I want to read the timestamps, but when I select the multichan-