No of purchase order opened

Hi
  Suppose i am working with a application server A and i have opened a purchase order number 23
  Is there any process to know that how many puchase order has been currently opened for that particular purchase order number.
Thsnks
Mrutyunjaya Tripathy

Tripathy,
In no case two users will be able to open the same in edit mode at the same time. So, any point of time only one user will have the PO in edit mode.
I don't think you will be able to find if some one else has opened that in display mode.
Regards,
Ravi

Similar Messages

  • Purchase orders : Open and Completed,Open Only,and Completed Only

    Hi Friends,
    I have got a new requirement in Existing report I have to add few fields Like :
    Slectio screen will be :
    Purchase orders :
    Open and Completed     only
    Open Only
    Completed Only
    When I select open and Completed only, it display only those purchase orders.
    if i select Open only, it should display only open purchase orders, Like wise for Completed .
    Could you please from which table i can find out the purchase is open and completed, or open only, completed only?
    Could provide me the fileds for
    Open and Completed     only ?
    Open Only ?
    Completed Only?
    Regards,
    Xavier.P

    Hi Xavier ,
    Purchase orders :
    Open and Completed only -- All PO in EKKO Table
    Open Only -- Table EKPO for which Final Invoice Indicator(EREKZ) is not set
    Completed Only -- Table EKPO for which Final Invoice Indicator(EREKZ) is set
    Regards
    Ramesh Ch

  • Purchase Order Open quantity calculation.

    Hi All..
    I would like your help in finding out the logic behind calculating the open quantity for a given line item of a purchase order.
    Iam aware that i should go to the EKBE table to see purchase order history. Can someone tell me what are all the conditions i need to consider to calculate the Open quantity.
    Iam able to give a value E to field BEWTP (Purchase Order History Category) in EKBE and for all the recieved records iam adding the quantity for movement type 101 and removing the quantity for movement type 102 that finally gives my total GR qty. Then iam doing Original PO qty - GR qty to get the Open qty.
    Let me know if this logic is wrong or else is there any other conditions to consider.
    Appreciate your help and will reward.
    THanks.

    subtract the PO quantity EKPO-MENGE with the delivery quantity field EKET-GLMNG
    Thanks
    Seshu

  • Purchase order open quantity

    Hi,
    I am making one report for open purchase order quntity.But there is some problem
    In delivery shedule tab of  purchase order,If delivery date is in future, that purchase order quantity
    also shown by system as open quantity. So whether this open quantity is taken into account or not.
    So please guide me.
    Thanks and Regards
    Anil

    Hi,
    You can also user other transaction for open purchase order quantity.
    Enter ME2M t-code.
    Then select WE101 in selection parameter option and click on execute button.
    Then go in change layout option and take To Be Delivery quantity field in display mode.
    You can see open purchase order quantity.
    I hope it is useful for u.
    Regards,
    Mahesh Wagh

  • Changing PO document type for automatic purchase order opened by GR

    Hi to all,
    You know, there is a feature to customize automatic PO creation upon GR. The system uses "NB- Standart Purchase Order" document type. But, i need to use a different document type (like ZNB) that i have copied from standart one.
    How can I change default document type for PO in customizing. Or, am I able to do that in customizing.
    Thanks,
    Hakan.

    Goto OLME --> Define default value for document type
    here for T-code  MB01 - cahnge to your doc type
    Read that documentation for more info

  • Bapi purchase order

    Hy Gurus,
    Are there a Bapi with input the purchase order number and output the purchase order open quantity and delivery date?
    Thanks.
    Josy

    Hi
    Use this bapi BAPI_PO_CREATE1 it has those fields you want..
    thanks
    Edited by: Sharada.Dhulipala on Oct 12, 2011 4:33 PM

  • Purchase Order and Purchase Requisition

    Hi To All,
    my customer while using tcode me2m hase extracted purchase order opened since 2007. now he want to close all this order and settle them to zero. this operation should be done also for the purchase requisition.
    there is a standard way to do this? if not any idea?
    thanks
    C.

    Hello
    Just by doing
    In the PO line item level details, activate DELIVERY COMPLETED check box.
    system will not close po from GR
    U will have to check what is the gr qty did till date
    and update the po with the same qty manually
    eq
    if po qty is 50 and total gr done till date is 40
    change the PO qty to 40 and save
    this is the way u can shot close the po
    Which effects has the "delivery completed" indicator?
    The purchase order item is considered closed, even though the total quantity may not have been delivered.
    Although a further delivery is not expected, it is still possible.
    At the time of the next goods receipt, the system suggests the item as unselected.
    The purchase order item can be deleted, even if the total quantity was not delivered.
    Although the "delivery completed" indicator is not set, a purchase order item is still considered closed if the full quantity has been delivered. In this case, the "delivery completed indicator" is not required.
    The system allows to make further goods receipts. Why?
    Answer
    See note 16239 and 856279
    hope this helps
    Edited by: Umakant Bhangale on Oct 11, 2010 5:20 PM

  • Report to display purchase orders

    Hi I am Venkat
    can any one send me report to display a list of Purchase orders open for period more than one year. I need the following output fields to be dispayed are Vendor, Period, Purchasing organization, PO number, Document date, GR status, check box

    i think this code will help u.
    REPORT  Z_PURCHASEU.
    tables :  ekko,vbrk,mara,rseg,lfa1,makt,konv,bseg,vbap,j_1iexhead.
    data: begin of itab occurs 0,
         qty   like rseg-menge,           "qty
         bed   like rseg-wrbtr,           "bed(basic excise duty)
         mwskz like rseg-mwskz,           "tax code
         cess  like rseg-wrbtr,           "cess
         sum   like rseg-wrbtr,
         unit  like rseg-bstme,           "unit
         belnr like rseg-belnr,           "document number
      lst_cst  like rseg-wrbtr ,          "CST amount
        amount like rseg-wrbtr,           "amount
         aedat like ekko-aedat,           "po date
         ebeln like ekko-ebeln,           "po number
         lifnr like ekko-lifnr,           "vendor code
        matnr like mara-matnr,           "material code
        maktx like mara-maktx,           "material description
        mtart like mara-mtart,           "material type
        vbeln like vbrk-vbeln,           "bill number
        fkdat like vbrk-fkdat,           "bill date
        name1 like lfa1-name1,           "vendor name
        kzwi1 like vbap-kzwi1,           "basic value
         end of itab.
         select-options:
    vendrcod for ekko-lifnr,
    date for vbrk-fkdat,
    matrtype for mara-mtart,
    taxcode for rseg-mwskz.
    select egmenge egwrbtr egmwskz egwrbtr egwrbtr egbstme eg~belnr
    egwrbtr egwrbtr
              koaedat koebeln ko~lifnr
              into corresponding fields of table itab
              from rseg as eg inner join ekko as ko on egebeln = koebeln
    where
    ko~lifnr in vendrcod And
    eg~mwskz in taxcode.
    *select-options:
    vendrcod for ekko-lifnr,
    date for vbrk-fkdat,
    matrtype for mara-mtart,
    taxcode for rseg-mwskz.
    select abelnr amwskz amenge awrbtr  into
    *corresponding
    *fields of table itab
    *from rseg as a inner join bseg as b on
    *awrbtr = bwrbtr where
    *a~belnr in docment number and
    *a~mwskz in tax code and
    *a~menge in qty.
    loop at itab.
    write:/1 sy-vline,
           2   itab-name1    ,  18 sy-vline,
            19  itab-lifnr    ,  30 sy-vline,
            31  itab-aedat    ,  46 sy-vline,
            47  itab-ebeln    ,  60 sy-vline,
            61  itab-belnr    ,  80 sy-vline.
            uline.
            endloop.
    write  :   /1 sy-vline,
              2  'vendor name'  ,     18 sy-vline,
              19  'vendor code' ,     30 sy-vline,
              31  'po date'      ,    46 sy-vline,
              47  'po number '     ,  60 sy-vline,
              61  'document number',  80 sy-vline.
    give points if useful.

  • MM - Purchase Order Form Setup

    Hi Experts,
    I am from FICO area but unfortunately my client wants me to support on MM module (only in small areas) and I need support on below:
    Currently we are printing Purchase Order form for vendors but now there was change in purchase order form so I copied old form and created new form (used SE71 for form development).
    My current issue is I do not know where to setup to form in MM so that printing is done with new form.
    Looking for your assistance
    thanks & regards,
    prashant rane

    hi..
    Go to
    SPRO- > MM -> Puchasing- > Purchase Order ->Forms for Messages ->Assign Form and Output Program for Purchase Order
    open this and assign the programs name and form name for any particular output type which you want to use for your PO output.
    After that go to me21n. then Goto menu and messages..
    here in the output column assing your output type and ente the communication method button...assign output device there..
    It will work..
    And if you using ouw defind output type then you have to do lot of congig like defien message type and message determination schema....
    Thanks..

  • How to create multiple Purchase Order  using the same document number?

    HI Friends,
    I m in a product which extracts data from SAP and stored in Access database.
    For that,while i extracting Purchase Order from the Demo Database (SBODemo_US)for OEC Computers,the same DocNum is used for several Purchase Order using Index Line numbers.
    eg:
    DocNum for Purchase Order1 -->3000   0 (Index)
      DocNum for Purchase Order2 -->3000   1 (Index)
        But i can't create multiple Purchase Order using same DocNum manually in SAP B1,Could anybody please help me <b>to create a Purchase Order using same DocumentNumber?</b>
    Thanks in Advance
    SooriyaKala.P

    Hi,
    The problem statement is not quite clear to me.
    As far as I understand your statement, I think you want to club multiple orders into one purchase order using the index incrementally.
    For this I think once you have created the first purchase order, open the purchase order in edit mode the second time and append the new line items.
    If I am getting you wrong please explain the problem statement in more detail.
    Regards,
    Rara.

  • MRP and purchase order delivery date

    Hello
    Question about MRP
    we would like that the MRP run takes into account purchase order with a delivery date in the future
    Say the MRP run 10th of Oct we want that all purchase orders open with a delivery date in the future takes into account the quantity that needs to be ordered TODAY
    EXAMPLE
    Minimum stock 5
    Wse stock 0
    Purchase order delivery date D+1 10
    Lead time is 5 days
    So if you run MRP the systems proposes 5 to order today but they do not want  to order 5 because there is a coming purchase order D+1 of 10
    Does anyone knows how the pruchase order of 10 is taken into account in the MRP run ?

    Unfortunately, one of the weakness of SAP MRP is if a purchase order and/or production order is late, MRP will tell you to order it again instead of expediting.
    We have overcome this and other issues with our own economical planning enhancements. If you are interested you can contact me with your contact information

  • Expense Item - Standard Purchase Order Import

    Hi all,
    I am using import standard purchase order - open interface to upload po from legacy system. I can do that with an inventory item, Can anybody tell me what are the mandatory column or requirements for an EXPENSE ITEM .
    I have given destination_type_code='EXPENSE' in po_distributions_interface , and given category_id , description . Even then po is not created.
    Its urgent.
    Thanks
    AADITYA

    Hi
    Do you have a copy of your insert statement?
    regards

  • BAPI to change purchase order to put deletion flag

    Hello Guru's,
            We are about to archive data & for that we need that according to date range all open purchase order ,open purchase requsitions & open RFQ should be marked for deletion.
    Is there some BAPI to do so.Please guide.

    *DELETING FLAG *
    REPORT ZMMR_DELETEPO NO STANDARD PAGE HEADING MESSAGE-ID zisb.
    tables : zvtls_sap.
    *C-- Types Declarations
    TYPES : BEGIN OF tp_flatfile_vtls,
            ebeln(10),
            ebelp type ekpo-ebelp,
            END OF tp_flatfile_vtls.
    *=====================================================================
                      INTERNAL TABLES DECLARATION
    *=====================================================================
    DATA:  t_flatfile_vtls TYPE tp_flatfile_vtls OCCURS 0 WITH HEADER LINE.
    data : begin of t_sapdata occurs 0,
           po like zvtls_sap-posap,
           item like zvtls_sap-itemsap,
           end of t_sapdata.
    data : begin of t_flatfile_vtls1 occurs 0,
           po(10),
           item like zvtls_sap-itemsap,
           end of t_flatfile_vtls1.
    data : begin of t_update occurs 0,
           mandt like zvtls_sap-mandt,
           povtls like zvtls_sap-povtls,
           itemvtls like zvtls_sap-itemvtls,
           posap like zvtls_sap-posap,
           itemsap like zvtls_sap-itemsap,
           aedat like zvtls_sap-aedat,
           paedt like zvtls_sap-paedt,
           loekz like zvtls_sap-loekz,
           end of t_update.
    data : begin of t_poheader occurs 0,
           po like zvtls_sap-posap,
           end of t_poheader.
    data : begin of t_poitem occurs 0,
           po like zvtls_sap-posap,
           item like zvtls_sap-itemsap,
           end of t_poitem.
    DATA : BEGIN OF T_MESSAGE OCCURS 0,
           MSGTY,
           MSGID(2),
           MSGNO(3),
           MSGTX(100),
           PO like zvtls_sap-povtls,
           item like zvtls_sap-itemvtls,
           END OF T_MESSAGE.
    DATA : BEGIN OF t_bapi_poheader OCCURS 0.
            INCLUDE STRUCTURE bapimepoheader.
    DATA : END OF t_bapi_poheader.
    DATA : BEGIN OF t_bapi_poheaderx OCCURS 0.
            INCLUDE STRUCTURE bapimepoheaderx.
    DATA : END OF t_bapi_poheaderx.
    DATA : BEGIN OF t_bapi_poitem OCCURS 0.
            INCLUDE STRUCTURE bapimepoitem.
    DATA : END OF t_bapi_poitem.
    DATA : BEGIN OF t_bapi_poitemx OCCURS 0.
            INCLUDE STRUCTURE bapimepoitemx.
    DATA : END OF t_bapi_poitemx.
    DATA : BEGIN OF t_bapireturn OCCURS 0.
            INCLUDE STRUCTURE bapiret2.
    DATA : END OF t_bapireturn.
    *=====================================================================
                      V A R I A B L E S
    *=====================================================================
    DATA: w_success(6)  TYPE n,
          w_bklas like t023-bklas,
          w_curryear(4),
          w_begda like sy-datum,
          w_endda like sy-datum,
          w_begyr(4),
          w_endyr(4),
          w_currmon(2),
          w_assetclass like ankt-anlkl,
          w_price type p,
          w_recordsap type i,
          w_povtls(10),
          w_count type i.
    DATA:  w_filepath TYPE rlgrap-filename,
           w_rc TYPE sy-subrc,
           w_sscrfields_ucomm1   TYPE sscrfields-ucomm,
           w_file1 TYPE string,
           w_file2 TYPE FILENAME-FILEINTERN.
    *=====================================================================
                      C O N S T A N T S
    *=====================================================================
    CONSTANTS: c_x              TYPE  c         VALUE 'X',
               c_hyp            TYPE  c         VALUE '-',
               c_err            TYPE  bdc_mart  VALUE 'E'.
    CONSTANTS:  c_slash(1)            TYPE c VALUE '/',
                c_hash(1)             TYPE c VALUE '#',
                c_pipe                TYPE c VALUE '|',
                c_1                   TYPE i VALUE 1,
                c_zero                TYPE n VALUE '0',
                c_rg1(3)              TYPE c VALUE 'rg1',
                c_gr3(3)              TYPE c VALUE 'GR3',
                c_gr2(3)              TYPE c VALUE 'GR2',
                c_e(1)                TYPE c VALUE 'E',
                c_filepath(8)         TYPE c VALUE '/interf/',
                c_filetype(10)        TYPE c VALUE 'ASC'.
    CONSTANTS : c_bapimepoheaderx   TYPE x030l-tabname
                                   VALUE 'bapimepoheaderx',
               c_bapimepoitem      TYPE  x030l-tabname
                                   VALUE 'bapimepoitem',
               c_bapimepoaccount   TYPE  x030l-tabname
                                   VALUE 'bapimepoaccount',
               c_t_bapi_poheader(15)        TYPE c
                                            VALUE 't_bapi_poheader',
               c_t_bapi_poitem(13)          TYPE c
                                            VALUE 't_bapi_poitem',
               c_t_bapi_poitemx(14)         TYPE c
                                            VALUE 't_bapi_poitemx',
               c_t_bapi_poheaderx(16)       TYPE c
                                            VALUE 't_bapi_poheaderx'.
    CLASS cl_abap_char_utilities DEFINITION LOAD.
    CONSTANTS:con_tab  TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
    *======================================================================
                           SELECTION SCREEN
    *======================================================================
    SELECTION-SCREEN BEGIN OF BLOCK inputpath WITH FRAME TITLE text-001.
    SELECTION-SCREEN : BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
    PARAMETERS : p_fore RADIOBUTTON GROUP rg1
                        USER-COMMAND pc,
                 p_back RADIOBUTTON GROUP rg1 DEFAULT 'X'.
    SELECTION-SCREEN : END OF BLOCK blk2.
    SELECTION-SCREEN : BEGIN OF BLOCK blk1 WITH FRAME TITLE text-003.
    PARAMETERS :  p_file1 LIKE rlgrap-filename OBLIGATORY MODIF ID gr2.
    PARAMETERS :  p_afile1 LIKE rlgrap-filename OBLIGATORY MODIF ID gr3.
    SELECTION-SCREEN : END OF BLOCK blk1.
    SELECTION-SCREEN END OF BLOCK inputpath.
    *C-- Initialization Event
    INITIALIZATION.
      CLEAR w_filepath.
      CONCATENATE c_filepath sy-sysid c_slash sy-mandt c_slash INTO
      w_filepath.
      CONDENSE w_filepath NO-GAPS.
      p_file1 = text-008.
      p_afile1 = text-009.
    *======================================================================
                           SELECTION SCREEN EVENTS
    *======================================================================
    *C-- Selection Screen Output
    AT SELECTION-SCREEN OUTPUT.
      IF p_fore = c_x.
        w_sscrfields_ucomm1 = space.
      ELSE.
        w_sscrfields_ucomm1 = c_rg1.
      ENDIF.
      LOOP AT SCREEN.
    *C--Modify selection screen if presentation
    *C--or application server radio button is chosen
        IF w_sscrfields_ucomm1 = space.
          IF screen-group1 = c_gr3.
            screen-active = c_zero.
          ENDIF.
        ELSE.
          IF screen-group1 = c_gr2.
            screen-active = c_zero.
          ENDIF.
        ENDIF.
        if screen-name = 'P_AFILE1'.
          screen-input = 0.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    *C-- Selection Screen VALUE-REQUEST FOR File path
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
      IF p_fore EQ c_x.
        CALL FUNCTION 'F4_FILENAME'
          EXPORTING
            program_name  = syst-cprog
            dynpro_number = syst-dynnr
          IMPORTING
            file_name     = p_file1.
      ENDIF.
    *C-- At Start of the Selection Process
    START-OF-SELECTION.
      IF p_fore EQ c_x.
        w_file1 = p_file1.
      ELSE.
        w_file2 = p_afile1.
      ENDIF.
      IF p_fore EQ c_x. " Presentaion Server
    *C--Validations for the input files
        PERFORM validate_pre_file USING p_file1.
    *C-- Load the contents of the input file into the internal table
        PERFORM upload_file TABLES t_flatfile_vtls
                            USING w_file1
                            CHANGING w_rc.
        IF w_rc <> 0.
          MESSAGE s006 DISPLAY LIKE c_e.
        ENDIF.
      ELSE. " Application Server
    *C--Validations for the input files
        PERFORM validate_app_file USING  w_file2.
    *C-- Load the contents of the input file into the internal table
        PERFORM upload_file_app TABLES t_flatfile_vtls
                                USING w_file2
                                CHANGING w_rc.
      ENDIF.
      loop at t_flatfile_vtls.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = t_flatfile_vtls-ebeln
          IMPORTING
            output = t_flatfile_vtls1-po.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = t_flatfile_vtls-ebelp
          IMPORTING
            output = t_flatfile_vtls1-item.
        append t_flatfile_vtls1.
        clear t_flatfile_vtls1.
      endloop.
      perform get_podata.
      loop at t_poheader.
        perform move_to_bapi.
        perform call_bapi.
      endloop.
      PERFORM STORE_MESSAGES TABLES T_MESSAGE.
    *&      Form  validate_pre_file
        Routine to validate presentation server file path.
         -->fp_name  text
    FORM validate_pre_file USING fp_name TYPE rlgrap-filename.
      DATA : l_result,
             l_filename TYPE string.
      l_filename = fp_name.
      CLEAR l_result.
      CALL METHOD cl_gui_frontend_services=>file_exist
        EXPORTING
          file                 = l_filename
        RECEIVING
          result               = l_result
        EXCEPTIONS
          cntl_error           = 1
          error_no_gui         = 2
          wrong_parameter      = 3
          not_supported_by_gui = 4
          OTHERS               = 5.
      IF sy-subrc <> 0.
        MESSAGE s007 DISPLAY LIKE c_e.
        LEAVE LIST-PROCESSING.
      ELSEIF l_result IS INITIAL.
        MESSAGE s008 DISPLAY LIKE c_e.
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM.                    " validate_pre_file_hdr
    *&      Form  validate_app_file
          text - Checks if the path entered and filename is correct
    FORM validate_app_file USING  fp_file  TYPE FILENAME-FILEINTERN.
      data : l_fname(60).
      CALL FUNCTION 'FILE_GET_NAME'
        EXPORTING
          LOGICAL_FILENAME = FP_FILE
          OPERATING_SYSTEM = SY-OPSYS
        IMPORTING
          FILE_NAME        = L_FNAME
        EXCEPTIONS
          FILE_NOT_FOUND   = 1
          OTHERS           = 2.
      IF SY-SUBRC = '0'.
        OPEN DATASET  L_FNAME FOR INPUT IN TEXT MODE ENCODING DEFAULT.
        IF sy-subrc NE 0.
          MESSAGE s007 DISPLAY LIKE c_e.
        ELSE.
          CLOSE DATASET l_fname.
        ENDIF.
      ENDIF.
    ENDFORM.                    " validate_app_file
    *&      Form  upload_file
          Routine to upload data from file to tables.
         -->P_fp_flatfile
         -->P_fp_file
         <--P_fp_rc
    FORM  upload_file TABLES   fp_flatfile
                      USING    fp_file TYPE string
                      CHANGING fp_rc TYPE sy-subrc.
      IF fp_flatfile[] IS INITIAL.
        CALL FUNCTION 'GUI_UPLOAD'
          EXPORTING
            filename                = fp_file
            filetype                = c_filetype
            has_field_separator     = c_x
          TABLES
            data_tab                = fp_flatfile
          EXCEPTIONS
            file_open_error         = 1
            file_read_error         = 2
            no_batch                = 3
            gui_refuse_filetransfer = 4
            invalid_type            = 5
            no_authority            = 6
            unknown_error           = 7
            bad_data_format         = 8
            header_not_allowed      = 9
            separator_not_allowed   = 10
            header_too_long         = 11
            unknown_dp_error        = 12
            access_denied           = 13
            dp_out_of_memory        = 14
            disk_full               = 15
            dp_timeout              = 16
            OTHERS                  = 17.
        MOVE sy-subrc TO fp_rc.
      ENDIF.
    ENDFORM.  " upload_file
    *&      Form  upload_file_app
          text
         -->FP_FLATFILEtext
         -->FP_FILE    text
         -->FP_RC      text
    FORM  upload_file_app TABLES   fp_flatfile
                          USING    fp_file TYPE FILENAME-FILEINTERN
    CHANGING fp_rc TYPE sy-subrc.
      DATA: l_string TYPE tedata-data.
      DATA: wa_data_file TYPE tp_flatfile_vtls,
            l_wllength TYPE i,
            FNAME(60).
      CALL FUNCTION 'FILE_GET_NAME'
        EXPORTING
          LOGICAL_FILENAME = FP_FILE
          OPERATING_SYSTEM = SY-OPSYS
        IMPORTING
          FILE_NAME        = FNAME
        EXCEPTIONS
          FILE_NOT_FOUND   = 1
          OTHERS           = 2.
      IF SY-SUBRC = 0.
        OPEN DATASET  FNAME FOR INPUT IN TEXT MODE ENCODING DEFAULT.
        IF sy-subrc NE 0.
    *C-- commented by Bikash
         MESSAGE s107(yaero_ps) DISPLAY LIKE c_e.
          message e008.
        ELSE.
          DO.
            CLEAR: l_string.
            READ DATASET  FNAME INTO l_string LENGTH l_wllength.
            IF sy-subrc NE 0.
              EXIT.
            ELSE.
              SPLIT l_string AT con_tab INTO   wa_data_file-ebeln
                                               wa_data_file-ebelp.
              APPEND wa_data_file TO fp_flatfile.
            ENDIF.
          ENDDO.
          CLOSE DATASET  FNAME.
        ENDIF.
      ENDIF.
    ENDFORM.  " upload_file_app
    *&      Form  get_podata
          text
    form get_podata.
      select *
      into table t_update
      from zvtls_sap
      for all entries in t_flatfile_vtls1
       where itemvtls = t_flatfile_vtls1-item
      and povtls = t_flatfile_vtls1-po.
      sort t_update by posap itemsap.
      loop at t_update.
        at new posap.
          t_poheader-po = t_update-posap.
          append t_poheader.
          clear t_poheader.
        endat.
        t_poitem-po = t_update-posap.
        t_poitem-item = t_update-itemsap.
        append t_poitem.
        clear t_poitem.
        t_update-paedt = sy-datum.
        t_update-loekz = 'X'.
        modify t_update.
      endloop.
      modify zvtls_sap from table t_update.
    endform.                    "get_podata
    *&      Form  move_to_bapi
          text
    form move_to_bapi.
      t_bapi_poheader-po_number = t_poheader-po.
      CLEAR t_bapi_poheaderx.
      PERFORM fill_check_structure USING c_bapimepoheaderx
                                         c_t_bapi_poheader
                                         c_t_bapi_poheaderx
                                         c_x.
      refresh : t_bapi_poitem,t_bapi_poitemx.
      loop at t_poitem where po = t_poheader-po.
        clear t_bapi_poitem.
        t_bapi_poitem-po_item = t_poitem-item.
        t_bapi_poitem-delete_ind = 'X'.
        CLEAR t_bapi_poitemx.
        PERFORM fill_check_structure USING c_bapimepoitem
                                           c_t_bapi_poitem
                                           c_t_bapi_poitemx
                                           c_x.
        t_bapi_poitemx-po_item = t_poitem-item.
        t_bapi_poitemx-po_itemx = c_x.
        APPEND t_bapi_poitem.
        APPEND t_bapi_poitemx.
        clear t_bapi_poitem.
        clear t_bapi_poitemx.
      endloop.
    endform.                    "move_to_bapi
    *&      Form  call_bapi
          This form Routine is used to commit the data records
    FORM call_bapi .
      DATA : l_msgty      TYPE c,
             l_msgid(2)   TYPE c,
             l_msgno(3)   TYPE c,
             l_msgtx(100) TYPE c,
             l_errflag    TYPE c.
      CLEAR: t_bapireturn.
      REFRESH: t_bapireturn.
      *CALL FUNCTION 'BAPI_PO_CHANGE'*
        EXPORTING
          PURCHASEORDER = T_POHEADER-PO
          POHEADER      = T_BAPI_POHEADER
          POHEADERX     = T_BAPI_POHEADERX
        TABLES
          RETURN        = T_BAPIRETURN
          POITEM        = T_BAPI_POITEM
          POITEMX       = T_BAPI_POITEMX.
      READ TABLE t_bapireturn WITH KEY type = c_err TRANSPORTING NO FIELDS.
      IF sy-subrc NE 0.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait = c_x.
      ENDIF.
    *C-- Write messages
      WRITE: / 'PO Number', t_poheader-po.
      clear : t_update,w_povtls.
      read table t_update with key posap = t_poheader-po.
      w_povtls = t_update-povtls.
      CLEAR l_errflag.
      LOOP AT t_bapireturn.
        CLEAR: l_msgty, l_msgid, l_msgno, l_msgtx.
        l_msgty = t_bapireturn-type.
        l_msgid = t_bapireturn-id.
        l_msgno = t_bapireturn-number.
        l_msgtx = t_bapireturn-message.
        WRITE: / l_msgty, l_msgid, l_msgno, l_msgtx.
        if l_msgtx cs t_poheader-po.
          w_count = w_count + 1.
          loop at t_update.
            if sy-tabix = w_count.
              t_message-item = t_update-itemvtls.
            endif.
          endloop.
        endif.
        t_message-msgty = l_msgty.
        t_message-msgid = l_msgid.
        t_message-msgno = l_msgno.
        t_message-msgtx = l_msgtx.
        t_message-po = w_povtls.
        append t_message.
        clear t_message.
        IF l_msgty EQ c_err.
          l_errflag = c_x.
        ENDIF.    " l_msgty EQ 'E'
      ENDLOOP.
      ULINE.
      IF l_errflag NE c_x.
        w_success = w_success + 1.
      ENDIF.    " l_errflag NE C_X
    endform.                    "call_bapi
    *&      Form  fill_check_structure
          This form Routine will check whether the specified structure
          exist/active
    FORM fill_check_structure  USING    fp_tabname TYPE any
                                        fp_orgtabname TYPE any
                                        fp_chktabname TYPE any
                                        fp_check TYPE c.
      FIELD-SYMBOLS : <fs_chk>, <fs_org>.
      DATA:    l_char1(61)  TYPE c,
               l_char2(61)  TYPE c.
      DATA:    BEGIN OF tl_nametab OCCURS 60.
              INCLUDE STRUCTURE x031l.
      DATA:    END OF tl_nametab.
      REFRESH tl_nametab.
      CALL FUNCTION 'RFC_GET_NAMETAB'
        EXPORTING
          tabname          = fp_tabname
        TABLES
          nametab          = tl_nametab
        EXCEPTIONS
          table_not_active = 1
          OTHERS           = 2.
      IF sy-subrc <> 0.
        CLEAR tl_nametab.
      ENDIF.
      LOOP AT tl_nametab.
        CLEAR: l_char1, l_char2.
        CONCATENATE fp_chktabname c_hyp tl_nametab-fieldname INTO l_char1.
        ASSIGN (l_char1) TO <fs_chk>.
        CONCATENATE fp_orgtabname c_hyp tl_nametab-fieldname INTO l_char2.
        ASSIGN (l_char2) TO <fs_org>.
        IF <fs_org> IS NOT INITIAL.
          <fs_chk> = fp_check.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " fill_check_structure
    *&      Form  STORE_MESSAGES
          text
         -->FP_MESSAGEStext
    FORM STORE_MESSAGES TABLES FP_MESSAGES STRUCTURE T_MESSAGE.
      DATA: wl_output_data LIKE t_MESSAGE.
      DATA: l_catstr TYPE string.
      DATA: l_fieldvalue TYPE string.
      DATA: l_index TYPE i VALUE 1.
      DATA: L_FNAME(60).
      FIELD-SYMBOLS <fs>.
      CLEAR l_catstr.
      CALL FUNCTION 'FILE_GET_NAME'
        EXPORTING
          LOGICAL_FILENAME = '/USR/SAP/VTLS/POCHANGE/LOG'
          OPERATING_SYSTEM = SY-OPSYS
        IMPORTING
          FILE_NAME        = L_FNAME
        EXCEPTIONS
          FILE_NOT_FOUND   = 1
          OTHERS           = 2.
      IF SY-SUBRC = '0'.
        IF fp_messages[] IS NOT INITIAL.
          OPEN DATASET L_FNAME FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
          IF sy-subrc NE 0.
            LEAVE LIST-PROCESSING.
          ELSE.
            LOOP AT fp_messages INTO wl_output_data.
              DO.
               ASSIGN COMPONENT l_index OF STRUCTURE wl_output_data TO <fs>.
                IF sy-subrc <> 0.
                  EXIT.
                ENDIF.
                MOVE <fs> TO l_fieldvalue.
                IF l_catstr IS NOT INITIAL.
                  CONCATENATE l_catstr l_fieldvalue INTO l_catstr SEPARATED
                  BY con_tab.
                ELSE.
                  MOVE l_fieldvalue TO l_catstr.
                ENDIF.
                l_index = l_index + c_1.
                CLEAR l_fieldvalue.
                CLEAR <fs>.
              ENDDO.
              l_index = c_1.
              TRANSFER l_catstr TO L_FNAME .
              CLEAR wl_output_data.
              CLEAR l_catstr.
            ENDLOOP.
            CLOSE  DATASET L_FNAME.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    "STORE_MESSAGES

  • Production order created through procurement wizard but purchase order connected in SO

    SBO Localization: Korea
    SBO Version:SAP Business One 8.82 (8.82.073) PL: 10
    Production order created through procurement confirmation wizard on the base of sales order. In sales order "Procurement document" field production order number showing correct. But if click on document arrow then same number of purchase order opening where as we expect that production order should open. This is something like connection bug. This happens only if sales order approval workflow is active. In relationship map we can see production order is connected. See details in attached pic.
    I have also tested this case in Belgium localization the result is almost same. The difference is only if clicked on procurement document number arrow (from sales order document) then different number of purchase order opens.
    Is this known issue? Could someone please provide me the solution?
    Yogesh Chaudhari

    Hi,
    It is application error. Please check SAP note:
    1718843 - Blank production order or purchase request displayed if
    “Procurement Doc.” selected in “Form Settings” window
    Thanks & Regards,
    Nagarajan

  • Serialized purchase orders processable in new transaction only

    Hello All,
    I have a program which uses BAPI_PO_RELEASE to release the blocked POs.
    A job has been scheduled to execute this program.
    In the job log, I get the following
    Date       Time     Message text                                                                             Message class Message no. Message type
    09.02.2011 01:03:59 Release effected with release code Z2                                                         ME           106          S
    09.02.2011 01:03:59 Serialized purchase orders processable in new transaction only                 MEPO          130          S
    09.02.2011 01:03:59 NB-Standard PO 4501932233 changed                                                          06           023          S
    Though it mentions that the release is affected, the particular PO still remains blocked.
    Also there is a success message, "Serialized purchase orders processable in new transaction only", can anyone help understand this message?
    Regards,
    Smita

    Hi Xavier ,
    Purchase orders :
    Open and Completed only -- All PO in EKKO Table
    Open Only -- Table EKPO for which Final Invoice Indicator(EREKZ) is not set
    Completed Only -- Table EKPO for which Final Invoice Indicator(EREKZ) is set
    Regards
    Ramesh Ch

Maybe you are looking for

  • Gen 2 I pod touch is not recognized by windows 8 computer

    Ever since the Apple I tunes upgrade my Gen 2 I pod wont sync with my windows 8 computer. The computer recognizes the device but I tunes does not recognize the device.

  • CO-PA posting

    Hi, I have an exisgting interface for posting Incoming Invoice data against PO. I get the data from Legacy through XI interface. This interface uses BAPI_INCOMINGINVOICE_CREATE function call. But, now my requirement is, i will get some more extra fie

  • Mapped Drive to a OS X Shared Folder won't play purchased videos in iTunes

    I have a MacBook Pro sharing out a folder where all my purchased movies are stored. I've got a Vista box to which I've added the full library. All the music has shown up, but none of the movies or TV shows. They won't play from the shared directory.

  • Images look blurry in small, medium and large view in ADE

    Hi, I am working on creating an ePub compatible on ADE, iPad, Kobo and Mobi. I have fixed the issue of image overlapping in ADE view by keeping the width as 100%, but the image looks very blurry on ADE. Does anybody advise? Thanks, Sathish

  • How do I get rid of norton safe search

    I have inadvertedly accepted an update with ASK CONNECTED. i GOT RID OF aSK BUT IT REMAINS IN A nORTON TOOLBAR TAHT i CAN'T GET RID OF.