Modify purchase order

Hi,
After a purchase order is created, I have to modify it but only one field ekpo-idnlf from table ekpo;  ekpo-idnlf must have same value like ekpo-mfrpn;
Which is the best method to solve this problem? It would be very simple with a select and update but i heard that modifying data from standard sap table with update it's not so good.

Hi,
plz refer to below code this will surely help you.
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
hope this helps you.
thanks,
dhanashri.

Similar Messages

  • Modify purchase order to include company logo

    Hi,
           How to Modify purchase order to include company logo

    Modfying is  nothing but copying the existing form to new name.
    For example MEDRUCK  is standard one .
    Copy this to new one as follows.
    1.In SE71 Utilities -> Copy from Client
    2. Mandatory fields
    Form Name:MEDRUCk
    Source Client:Depends upon ur client
    TArget form:ZMEDRUCK
    Check both the check boxes there
    3 .Click Save button
    4.New form will be created
    5.Now do ur changes.
    Niow u have to add the program and the modified form in the NACE to an output type.
    Next using the new out put type, in the transaction mee2n give a po number.
    Next in the tool bar u have Goto -> Messages
    In that screen u have to give the new out put type and medium and partner.
    Once this is done u can save and go back check the print preview.
    Follow the above steps and let me know if u face any problem,
    Regards
    Ravi

  • Cannot modify purchase order

    Hello experts,
    Do you have any idea about the following issue:
    In SAP 2007, I cannot modify any information in the purchase order (contents tab) even
    if the order is still open. And if I copy this order to a Goods Receipt PO, I  cannot also change the items' information in the goods receipt. In addition, the icons "target document" and "base document " are grayed out.
    Thank you.
    Nadia.

    Hi Nadia,
    "I cannot modify any information in the purchase order (contents tab) even if the order is still open" maybe the PO was created through approval steps? If yes, that's the reason it can't be amended
    Best Regards,
    Hendry Wijaya

  • Modify purchase order - EAN

    Hi experts,
    I have created a program which modify a purchase order using function BAPI_PO_CHANGE.
    But it modify only Vendor Material No field. Everything is OK.
    But now, i have to modify EAN field... but i didn't find this field in BAPIMEPOITEM structure.
    What should i do? Is there a way to solve this problem?
    Any idea/clue/link would be appreciated.
    Many thanks.

    Any clue?

  • Modify purchase order item before to save

    Hi all,
    I'm trying to modify EKPO-RETPO field from purchase order item before save it.
    I've done it in the user exit: EXIT_SAPMM06E_013, but I've seen it coudl be use for update customer fields.
    Anybody knows which user exit can I use to do that?
    Thanks in advance.
    Pat.

    Hello,
    You can use the BADI *MEPROCESS_PO_CUST* to suffice the requirement.
    In this structure IM_ITEM has field RETPO. Please pass value to it
    Hope this will help.
    Thanks
    Eswar

  • Mass transaction :Unable to modify purchase order

    Hello. i wish to assign a contract number and item to my line item in my PO through the transaction MASS. It is not modifying the PO. the object type is BUS2012. I have tried it in another environment and it works. Is there any customising related to it?

    hi,
    mass transaction is depends up on different scenorios .. better use LSMW or BDC to change the data .

  • Modifying an Approved Purchase Order

    Is it possible to make modifications to a purchase order once it is approved?  If so, we would want the modified purchase order to go through the approval process again.  Is all of this possible?

    For some reason, when a PO is approved, we are unable to modify it.  Any ideas what settings we should be looking at that will open the fields in the PO so that we can modify it and resubmit it for approval?
    Thank you so much for your help.

  • SRM Purchase order History Screen Modification

    Hi All,
    We have requirement to modify Purchase order's History table to modify. To be precise When User clicks on Purchase order details tab and go to Follow-on document at header tab There will be two option to view the follow-on document. One is graphical and other is Table view.
    Standard SRM history tab you will get Purchase order number, Goods Receipt number both in SRM and backend system as well as status. Can over here we add Goods Receipt Quantity and Amount as well as Invoice Amount? We are using Extended Classic Scenario.
    Please advise.
    Thank you
    Ritesh

    Hi
    Pl find the content of the notes.
    Note 1524928 - History: Order of related document is not consistent.
    Symptom
    In some cases, when you go to the shopping cart item history, the system displays follow-on documents in a wrong order.
    Other terms
    History.
    Reason and Prerequisites
    Program Error.
    Solution
    Implement the attached correction instructions or apply the relevant Support Package.
    If  the note is not released , pl raise a OSS to get this note released.
    Regards
    velu

  • Purchase order modification

    Hi,
    We are using this functionaly:
    We change purchase requistiion quantity with BAPI BAPI_REQUISITION_CHANGE.
    If modification is correct we are doing a BAPI_TRANSACTION_COMMIT with WAIT and also we modify purchase order quantity with BAPI BAPI_PO_CHANGE.
    If purchase order modification is correct we are doing a BAPI_TRANSACTION_COMMIT with WAIT.
    Sometimes occurs that if a change is done with BAPI_REQUISITION_CHANGE correctly and we are doing the correspondant changes to purchase order BAPI_PO_CHANGE, this bapi give error ME 006 (User alredy processing requisition).
    How it is possible if we have done a commit and wait?
    How can we solve this problem?
    Best regards¡¡¡

    HI,
    Try using FM : ENQUE_SLEEP for wait process.
    Actually sometimes, due to some database constraints, process takes time to save document.
    SO better to give 5 seconds delay for that.
    CALL FUNCTION 'ENQUE_SLEEP'
         EXPORTING
              SECONDS        = '5'
         EXCEPTIONS
              SYSTEM_FAILURE = 1
              OTHERS         = 2.
    Regds,
    Anil

  • Modification of Purchase order

    hi guru's,
    I need to modify the purchase order.My requirement is that whenever the delivery date of any item is changed the purchase order heading should be changed to modified purchase order.Is there any field to check two delivery dates.

    Hi,
    History data will get update in CDPOS and CDDIR , u can verify the changed data in it.
    About changed delivery date , new delivery date will get update in table EKET , can refer the table using EBELN and EBELP.
    can Reward,  if useful info.

  • Need to modify Standard Purchase Order Stylesheet (PO_STANDARD_XSLFO.xsl)

    Hi
    We need to modify Standard Purchase Order Stylesheet (po_standard_xslfo.xsl) . Current stylesheet generating PO like the following.
    <FOR-EACH>
    ITEM_NUM
    ITEM_DESCRIPTION
    <FOR-EACH>
    SHIP_TO_ADDRESS_LINE1 NEED_BY_DATE QUANTITY
    </FOR-EACH>
    </FOR-EACH>
    Based on this, we are getting the output like this:
    Item Num 1
    Itme Description 1
    Ship To: Needed: Quntity
    1234. A1 Avenue JUL 200
    SomeCity, CA 90706
    1234. A1 Avenue AUG 200
    SomeCity, CA 90706
    4567 B1 Avenue JUL 100
    City2 , CA
    Itme Description 2
    Ship To: Needed: Quntity
    5689. c1 Avenue JUL 200
    SomeCity, CA 90706
    Our requirement is like this:
    Item Num 1
    Itme Description 1
    Ship To: 1234. A1 Avenue, SomeCity, CA 90706
    Month: JUL AUG SEP
    Quantity: 200 200 100
    Ship To: VVV4567 B1 Avenue , SomeCity, CA 90706
    Month: JUL AUG SEP
    Quantity: 100 200 100
    So we need to add ship_to group (ITEM/SHIP_TO) .
    How can we use group by item, ship_to..
    <fo:block> <xsl:value-of select="ITEM_NUM"/> </fo:block>
    <fo:block> <xsl:value-of select="ITEM_DESCRIPTION"/> </fo:block>
    <xsl:for-each select="/PO_DATA/LINES/LINES_ROW/LINE_LOCATIONS/LINE_LOCATIONS_ROW">
    <fo:block> <xsl:value-of select="SHIP_TO_ADDRESS_LINE1"/> </fo:block>
    <fo:block> <xsl:value-of select="substring(NEED_BY_DATE,4,3)"/> </fo:block>
    <fo:block> <xsl:value-of select="QUANTITY"/> </fo:block>
    </xsl:for-each>
    </xsl:for-each>
    In the above code I need split the data by ITEM_NUM/ SHIP_TO_ADDRESS_LINE1.
    I am new to xsl-fo. I tried different ways,but ship_to_address_line1 is generating wiith each quanty and need_by_date.
    Please guide me.
    Thank you
    Raju
    Edited by: subbaraju on May 7, 2009 2:36 PM

    Hi Chandra
    Thank you very much for your suggestion.
    I tried that way, I created some sample xml file, I created sample rtf file and I generated xsl-fo file. I copied the part of code into my PO_STANDARD_PO.XSL. I am getting some error.
    I noticed PO_STANDARD_PO.XSL is xsl version 1.0 and the generated sample data is with xsl version 2.0.
    The generated code is using “for-each_group”, “sum()”, “current-group()” etc. Is these functions will work in xslt 1? Or do we need to code different way?
    We are in Oracle APPS 12.0.4.
    Thank you
    Raju
    Edited by: subbaraju on May 26, 2009 11:56 AM

  • Modifying line item price in Purchase Order

    Hi guys,
    Need your help regarding pricing modification in purchase order.  I know the below explanation is quite long enough, but still if you can look into it and put some thoughts:
    The price picked for a line item from PIR, needs to be modified depending on total price.
    Say for example, in a PO there are two line items
    Mat1     10PC 10 usd/1pc
    Mat2     10PC 20 usd/1pc
    so total price for PO goes as 300 usd.
    Now, if PO price exceeds 250 usd a different price needs to be picked from a custom table for line items. Say it should now become 8 usd/1PC and 18 usd/1PC for Mat1 and Mat2 respectively.
    So, after entering PO items if the user presses the 'check' button, new price should be picked, as per the above example the new lines should be shown as
    Mat1     10PC 8 USD/1PC
    Mat2     10PC 18 USD/1PC
    so total price for PO goes as 260 USD.
    Hope I've made you clear about the requirement.
    Now, what we are able to do so far is:
    We have used the 'check' method BADI 'me_process_po_cust'. And we are calculating the total price and changing the item conditions.
    But it's not reflecting on the me21n screen even after execution of the 'check' method successfully.
    It still shows the line items as
    Mat1     10PC 10 USD/1PC
    Mat2     10PC 20 USD/1PC
    But, now if we make any changes in the line items (say we add the requisitioner name) and hit ENTER the changed prices are reflected. And the items become
    Mat1     10PC 8 USD/1PC
    Mat2     10PC 18U SD/1PC
    This is a thing we are stuck into.
    Please express if you have any idea how to come out of this issue.
    Thanks in advance.
    Anupam

    Hi Anupam,
    Flow Logic of the screen.
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_0100.
      LOOP AT ITAB WITH CONTROL TABC.
      ENDLOOP.
    PROCESS AFTER INPUT.
      LOOP AT ITAB.
        MODULE READ_TABLE_CONTROL.
      ENDLOOP.
    Write the read_table_control module like below
    MODULE read_table_control INPUT.
       MODIFY itab INDEX tabc-current_line.
       "The above will update the entered data on table control
    ENDMODULE.
    Kindly check if this table control gets updated in PAI or not.... if not... try to find an exit where  this can be done on PAI.....
    Regards,
    Deeba

  • Can I modify the column "Net Price" of purchase order to display 3 decimals

    Dear expert,
         Can I modify the column "Net Price" of purchase order to display 3 decimals?
         Looking forward to your reply.
         Many thanks.
    Best Regards,
    Merry

    Hi,
    You can easily change ur decimal place in OY04 by seeting number of decimal place to ur currency.
    But be careful as it cause a huge effect to ur finance documents, read system message carefully before applying.
    Regards
    ManUfacTuReR

  • Modify and add new field in standard Purchase Order script

    Hi All,
           I have some problem with Modify and add some new fields in Standard Purchase Order script. From ME22n transaction code it display PO detail. In <b>item detail</b> with <b>condition</b> tab all data will display in Currently PO script output.
           But I want to display ME22n->Item Detail->Invoice->Taxes Data. how to display this data in standard PO script. All data are fetch from <b>Structure</b> like ( KOMV,KOMVD..etc) then How it can be Display?
    Waiting for Replay.
    Himanshu Patel.

    Work with an Abaper.Tell your requirement [ addition of a field] and ask him to include this field by using the functionality " Field Exit".

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

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

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

Maybe you are looking for

  • Problem with batch management indicator

    Hi Gurus, I have an issue with batch management. There is one material which was not batch managed. The requirement was to make it batch managed. There were no open purchase orders and the only thing pending was the stock in the present and previous

  • How do I copy text from an uploaded pdf file?

    I have a document and want to copy the text of one page into a new document.  How do I proceed to do that?  I am using the Adobe cloud product. Thanks in advance.

  • (my name's) MacBook Pro (2) at login... what is the (2)?

    A few days ago my MacBook Pro froze and I had to force it to shut down. The next time (and all subsequent times) I've turned on my computer to login, as the username is shows (My name's) MacBook Pro (2). The (2) is new... what does it mean? Is there

  • Need basic information about XI

    Hello XI gurus, I try to learn basic about XI. Where can I find documents, articles, real time examples about XI. I have few beginner level questions. Please answer.. 1. What is XI? Is it a server? 2. What is the use of XI? 3. What is the real time b

  • An error occurred when connecting to the accounting system ID3DEV310

    Hi Friends, We are Implementing collaboration project 4.5 and want to link with project system in ECC 6.0. Both these are in the different servers. I have done the configuration on both the servers and also maintain the RFC (ID3DEV310) in Object Link