PO mod right after a purchase order is authorized...where?

I have a customer that is implementing procurement, but not financials. Thus, in PO, it can't do funds checking and such.
I need to write an exit mod which will send information to a 3rd party application via a web service right after a requisition/purchase order is authorized within the Oracle’s procurement system, but BEFORE it is approved.
Where in the PO code should this be written? Suggestions?

Hi  Ashok,
  The only way possible in this case is to goto SPRO-> Material Management->Purchasing->Bussiness Add-Ins for Purchasing->Badi:Customer Badi to enjoy Purchase Requisition Bapis.
In that bapi use the Function module after propor coding BAPI_PO_CREATE1. I think this will help you..
Cheers ,
Sany

Similar Messages

  • ABAP-Workflow : which way to send email after creating Purchase Order ?

    Hi expert,
    I'm a new workflow so I have not  understood about workflow . Please help me ...
    Today, I have recieved a request from client as below:
       +    SAP system auto send a email to USER B after  creating Purchase Orders by User A.
       *++.  USer B open email and click on the link in his/her email and open new transaction to Release this Purchase Order.*
    Could you please help me how to do that?
    Thank you so much all.

    Hi ,
    Thank you so much for your quick response.
    I found in SAP system  2 workflows:
                WS20000075 : Release of purchase order
                WS11000013 : Complete Purchase Order
    Open  transaction "SWDD" I have added the step  "Send Email" --> Active and Excute  --> enter PO number --> system auto send email to USER B.
    But I want the system auto semd email after clicking SAVE in  transaction"ME21N" , No need enter PO number in SWDD .
    How to integrate between ME21N and Workflow? Could you please helpme step by step or sample to do that.?
    Thank you so much .

  • Workflow for PO-Event Linkage get unchecked after making Purchase Order

    Hi,
    I have a client reqiirement for setting Workflow for Purchase Order.
    I have done all the settings for PO Workflow. I am getting the mail for the first time but from the second PO onwards I am not getting the mail.
    When I checked the settings, the Event linkage in SWETYPV gets unchecked for BUS2012 Object Type automatically after making the first PO.
    Again when I activate that, I am able to get mail for the first PO only. From the second onwards, no mail is triggered.
    Could anyone suggest?
    Thanks,
    S.Raghavan
    Hi,
    I now have changed the "Behavior Upon Error Feedback" to "Mark Linkage as having Errors" in SWETYPV
    After this change if I make a PO, the link doesn't get break but "Receiver Status" shows "Errors".
    I could also see the overview of errors in Transaction code  SWEQADM. It shows 3event with Errors and 1 linkage with errors.
    I do not know in which event error is there and in which linkage error is there?
    Can anyone help to see the events and linkage where error persists?
    Edited by: S.Raghavan on Aug 30, 2011 6:22 PM
    Hi all,
    Any suggestion for the issue posted?

    In SWDD select WS 20000075 in the first task assign agents(users, ie create u r own users),
    without user IDs(as u r step 2).if u design "organization plan" then userID's r assigned (like manager,supervisor, clerk etc.,)
    try it

  • What are the Exists are available after saving purchase order

    Actually My requirement is, When I am clicking on Save button of purchase order, it should send a mail to some person. I know the procedure sending mail through ABAP. But, I don't know where exactly I have to incorporate that code. Please help finding a function exit or user exit in this situation. It's urget please help me out.

    Hi,
    Check out the exits :
    MM06E004
    MM06E008
    MMFAB001 to implement ur workflow logic.
    or try this out (iam not sure)
    Cretae a OUTPUT type such that set a medium as Email in MESSAGES tab of Purcahse Order Cretaion.
    whenever PO is cretaed , it will trigger output type and will checak the Medium (i.e email)  .
    This is just a hint ..try this atlast if no other way
    Regards,
    Naveen

  • Change message status after release purchase order

    Hi,
    I'm a newbie in MM...
    When a purchase order is created, the message status is not processed (yellow light) until the purchase order is released. Then the message is printed and the status changes to green light.
    As far as I see, I can't find in the spro where is this customizing set or if there is a user-exit or badi for changing the message status depending on the release indicator.
    Thanks in advance!
    Jen

    Hi Jen,
    Complete the condition record, for example, like this:
    - Transaction: MN04
    - Output Type: NEU
    - Choose third option: Purchasing Output Determination Document Type
    - Document Type: NB
    - Function: VN (Vendor)
    - Medium: 1 (Print output)
    - Date/Time: 4 (Send immediately (when saving the application))
    Select the line and press button "Communication". Complete the output device and mark the option "Print immediately"
    So, when the PO is created the system generates the message with yellow status. Then, when the PO is released, the message status will be green
    Regards,
    Fernando

  • Pulling all Purchase Order documents that where changed in last hour.

    What is the best method for pulling all purchase order documents that have changed in the last hour? We want to create this program and schedule it as a job that runs every hour.
    In the backend our server stores all documents in GMT Time while our users have several time zones. What function or module should we call to get the current time.
    Should we be using: sy-uzeit - 3600.
    Or will this not produce the required results.
    Regards

    Try prog :<b>RM07MIGO_PO_HISTORY</b>
    Hope this’ll give you idea!!
    <b>Pl... award the points.</b>
    Good luck
    Thanks
    Saquib Khan
    "Some are wise and some are otherwise"
    PS.
    <b>Put yourself on the SDN world map (http://sdn.idizaai.be/sdn_world/sdn_world.html) and earn 25 points.
    Spread the wor(l)d!</b>

  • Going to sleep mode right after boot; won't wake

    Hi there,
    I boot this nearly brand new macbook pro and the second you see a mouse appear in the top left corner of the screen the laptop switches to sleep mode and never wakes. I am forced to hold power button to turn off and back on. I tried to boot from cd but it seems to not respond to key presses. I will try an external keyboard for that but the bigger issue it the boot/sleep.
    Any help would be wonderful.
    Thanks,
    John Wally

    Nearly brand new? If you have access to an Apple Store, take it in for evaluation. It could have a hardware problem, and the way it is, there's not really much you can do in the way of troubleshooting other than try a SMC reset:
    http://support.apple.com/kb/HT1411?viewlocale=en_US
    Good luck!

  • Purchase Order SRM 7.0

    Hi,
         We are using SRM 7.0 as backend ECC EH4. I want to create Purchase Order (EC) in SRM which will replicate on ECC but I donu2019t want to use PI so thatu2019s why I mentioned system type ERP_2.0 instead of ERP_4.0 in Define System Landscape.
         I am getting following error message .
    u201C No customizing entry for XXX in table BBP_BACKEND_DEST u201D  .
              Internal Number range in SRM and External Number Range in ECC for Purchase Order is same. Document type EC defined in ECC and Transaction type in SRM is same.       
             When I create a Purchase Order through Portal  I am getting following error message u201C No customizing entry for XXX in table BBP_BACKEND_DEST u201D  after selecting purchase order type EC whereas I have defined entries in BBP_BACKEND_DEST table .
                 In many threads I read that if system type defined in System Landscape as ERP_2.0 or ERP_3.0 then PI is not mandatory and Contract or Purchase Order created through Idoc / BAPI. Please suggest me.
    Regards,
    Abhijeet

    Hi,
    The Error is clear that backend destination is not defined.
    Please delete the backend destination and create a fresh one .Some the entry will not be saved in the Table
    Regards
    G.Ganesh Kumar

  • BOM change after Purchase order creation

    Dear all
    My client requirement is an error message should appear when the end users are trying to change the BOM after the purchase order creation for the BOM items and the system should allow the BOM change only after the PO cancellation.
    Please throw some light
    regards
    Kumar

    Dear Kumar,
    Do you mean to say user's should not be allowed to change hte BOM items in a purchase order?or should not be allowed to change a
    BOM,if there are some purchase orders for the same material?
    If your requirement is to restrict the BOM change of a material using T code CS02,after purchase order creation,I dont think its
    possible.
    Please explain your problem little more in detail.
    Regards
    Mangalraj.S

  • 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.

  • Purchase order and vendor declaration work list problem

    Now, I'm testing GTS 8.0 for FTA related things.
    In the proceeding the test, I stuck in a problem.
    After making purchase order with order type NB, the system should make the worklist for the long-vendor declaration.
    But it dosen't make the worklist after creating of PO.
    But it make the worklist after Goods Receipts.
    I made related configurations with it.
    1. Activate Transfer of Purchasing Documents ( MM0A ).
    2. Configure Control Setting for Document Transfer.
    In the second transaction, I selected the Application Level MM0A and make document type FNB(Standard PO).
    And I checked all the check boxes including Generate Worklist of Vendor-Based Long-Term Vendor Declarations.
    I did the same configurations with MM0C.
    I searched in every direction, but I fail to get the reason.
    Thank you for the reading.
    Best Regards,
    Jong Hwan.

    I have checked I have already assigned the Partner Scheme to the PO type.
    And, In the first transaction you wrote above(/SAPSLL/PREF_AGR_R3), I got a message.
    Please check the following items:.
    check activity 03 of legal regulation  , "Preference tariff processing"
    Simulation Run - No Database Changes
    And in the second transaction, No data was found for the selection creteria.
    Thank you.
    Best Regards,
    Jong Hwan.
    Edited by: JONG HWAN PARK on Mar 18, 2011 8:33 AM

  • Purchase order and MIP selection

    Hi All,
    I have a requirement, please expalain whether it is possible or not in SAP?
    The Material is updated with the quality view and also have the MIP with diff.MICs.
    Say the effective date is 15.10.2010.So if the purchase order has been generated
    on or after 15.01.2011, it will take the current MIP at the time of GRN
    Now if any changes has been made in the MIcs, it will create the new version, as in the
    Plant settings the history requirement has been maintained.It will updated in resp. MIP
    in QS27. Now the MIP is with the new versions of MICs, say an ex. this was updated on 01.02.2011
    If any Purchase order has been generated, and made the GRN against it, the inspection
    lot will have the new versions of MICs, as it is a std behavior of SAP.
    Now the requirement is such that, if purchase order is created between 15.10.2010 to
    31.01.2011, then system has to create the inspection lot with the old MICs(e.g. version 01)
    And if the purchase order has been generated on or after the 01.02.2011, it should
    pick up the revised veersion of MICs(e.g. version 2)
    If you have came across such requirment then please share your views
    Many Thanks,
    Hrishi

    Hi Sujit,
    Yeah! the settings was also maintained at the client level, but the major issue is that
    system has to remember whether it is old or revised MIP when the purchase order
    is created, means system has to recognize the MIP while doing the GRN against the
    purchase order.
    As i said before, say an exaample if the Purchase order created on 15.01.2011 at that
    time old MIP is there and some changes made in the MICs and it replaced in the MIP on
    17.01.2011 And after that purchase order created.
    Now at the time of GRN say an example on 16.02.2011, purchase order created on 15.01.2011
    has to pick up the old MIC and the purchase order created in 17.01.2011 has to pick up
    the revised MIP.
    How it can be psossible in SAP?
    Hope i clear the things
    Please note that the MIP pick up during the GRN should be automatic
    Hrishi
    Edited by: Hrishi on Feb 16, 2011 12:40 PM

  • Sales order ATP vs Purchase order inventory commitment

    Hello,
    Have issue and hope someone can advise.  The basic problem is sales order is receiving confirmed ATP against inventory, even though that inventory is consumed by a purchase order.
    Here's the flow:
    1.  Plant A (receiving):  places purchase order (doc type NB) & commits all of whatu2019s in stock at plant B
    2.  Plant B (supplying):  standard sales order is created after above purchase order for identical material, date, quantity
    Check rule (t/c OVZ9) for sales order is ticked for u201CInc. purchase ordersu201D
    Not sure if this has bearing, but these plants are under different company code so thisu2019d be intercompany.
    Expectation is the sales order in this scenario would receive delivery commit per lead time on the material (since it was created after the PO), but instead it is happening against stock already given to the purchase order.  Any suggestions on what is needed to fix so the sales order does not get ATP from stock already committed to a purchase order?  Thanks

    Hi,
    In T.code OVZ9, for your availability checking rule and Availability check combination, you need to select value X or A, in the field Incl. release order requirements.
    Regards,

  • Third Party and Individual Purchase Order

    <b>Can anybody please send me the steps to configure the Return Process for both Third Party and Indvidual Purchase Orders.</b>

    dear sunil
    THIRD PARTY SCENARIO
    in third-party order processing, your company does not deliver the items requested by a customer. Instead, you pass the order along to a third-party vendor who then ships the goods directly to the customer and bills you. A sales order may consist partly or wholly of third-party items. Occasionally, you may need to let a vendor deliver items you would normally deliver yourself.
    Process Flow
    the processing of third-party orders is controlled via material types. Material types define whether a material is produced only internally can be ordered only from third-party vendors, or whether both are possible. For example, a material that is defined as a trading good can only be ordered from a third-party vendor. However, if you manufacture your own finished products, you may also want, from time to time, to be able to order the same type of product from other vendors.
    Processing Third-Party Orders in Sales
    Third-party items can be created automatically by the system, depending on how your system is set. However, you can also change a standard item to a third-party item during sales processing manually.
    Automatic third-party order processing:-
    if a material is always delivered from one or more third-party vendors, you can specify in the material master that the material is a third-party item. During subsequent sales order processing, the system automatically determines the appropriate item category for a third-party item: TAS. To specify a material as a third-party item, enter BANS in the Item category group field in the Sales 2 screen of the material master record.
    Manual third-party order processing
    In the case of a material that you normally deliver yourself but occasionally need to order from a third-party vendor, you can overwrite the item category during sales order processing. For a material that you normally deliver yourself, you specify the item category group NORM in the material master.
    If, as an exception, you use a third-party material, change the entry TAN to TAS in the ItCa field when processing the sales document. The item is then processed as third-party item.
    If address data for the ship-to party is changed in the sales order in third-party business transactions, the changed data will automatically be passed on to purchase requisition and also to the purchase order ,if one already exists. In the purchase order, you can display the address data for the ship-to party in the attributes for the item.
    You can only change the address data for the ship-to party in the sales order for third-party business transactions, and not in the purchase order.
    Processing Third-Party Orders in Purchasing
    when you save a sales order that contains one or more third-party items, the system automatically creates a purchase requisition in Purchasing. Each third-party item in a sales order automatically generates a corresponding purchase requisition item. During creation of the requisition, the system automatically determines a vendor for each requisition item. If a sales order item has more than one schedule line, the system creates a purchase requisition item for each schedule line.
    Purchase orders are created from purchase requisitions in the usual way. For more information about creating purchase orders, see the Purchasing documentation. During creation of the purchase order, the system automatically copies the delivery address of your customer from the corresponding sales order. In a sales order, you can enter purchase order texts for each third-party item. When you create the corresponding purchase order, the texts are automatically copied into the purchase order. The number of the purchase order appears in the document flow information of the sales order.
    All changes made in the purchase order are automatically made in the sales order as well. For example, if the vendor confirms quantities and delivery dates different from those you request and enters them in the purchase order, the revised data is automatically copied into the sales order
    you process third-party items by creating a normal sales order. In overview for the order, you can then overwrite the default item category (TAN in the standard system) with the special item category for third-party items: TAS
    Billing Third-Party Orders
    If relevance for billing indicator for the item category has been set to B (relevant for order-related billing on the basis of the order quantity) in Customizing, the system includes the order in the billing due list immediately. If, however, the indicator has been set to F (relevant to order-related billing on the basis of the invoice quantity), the system does not include the order in the billing due list until an invoice from the vendor has been received and processed by the purchasing department. In the standard system, item category TAS (third-party order processing) has been given billing-relevance indicator F.
    In the first case, the third-party order is considered to be completely billed only when the invoiced quantity equals the order quantity of the sales order item. In the second case, each time a vendor invoice is received, a customer invoice is created for the quantity in the vendor invoice and the order is considered to be fully invoiced until the next vendor invoice is received.
    If you have activated billing-relevance indicator F for item categories in Customizing, billing can refer to the goods receipt quantity instead of the incoming invoice quantity.
    You can control whether the invoice receipt quantity or the quantity of goods received is relevant for billing in Customizing for copying control for billing at item level.
    FOR YOUR PROCESS Individual Purchase Orders WELL GIVE THE RIGHT SOLUTION
    Individual purchase orders are used when your customer orders goods from you that are not in stock and must be ordered from one or more external vendors.
    Process Flow
    During sales order entry, the system automatically creates a purchase requisition item. The purchasing department creates a purchase order based on the requisition and the vendor ships the goods directly to you (unlike third party order processing, where the vendor ships directly to your customer). You then ship the goods to your customer. While the goods are part of your inventory, you manage them as part of the sales order stock. Sales order stock consists of stock that is assigned to specific sales orders and cannot be used for other purposes.
    Process Flow for 3rd Party Sales
    Customize the third party sales in summary:
    Prerequisites for 3rd party sales,
    Purchasing org,
    purchasing group,
    assign the Purchase org to company code
    assign Purchase org to plant,
    should not maintain the stock in material, it should be trading goods,
    1. Create Vendor XK01
    2. Create Material – Material Type as "Trading Goods". Item category group as "BANS".
    3. Assign Item Category TAS to Order type that you are going to use.
    4. A sale order is created and when saved a PR is generated at the background
    5. With reference to SO a PO is created (ME21N). The company raises PO to the vendor.
    6. Vendor delivers the goods and raises bill to company. MM receives the invoice MIRO
    7. Goods receipt MIGO
    8. Goods issue
    9. The item cat TAS or Schedule line cat CS is not relevant for delivery which is evident from the config and, therefore, there is no delivery process attached in the whole process of Third party sales.
    10. Billing *--
    SD - 3rd party sales order Create Sales Order
    VA01
    Order Type
    Sales org, distr chnl, div
    Enter
    Sold to
    PO #
    Material
    Quantity
    Enter
    Save
    SD - 3rd party sales order View the PR that is created with a third party sales order
    VA01
    Order Number
    Goto Item Overview
    Item ->Schedule Item
    SD - 3rd party sales order View the PR that is created
    ME52N
    Key in the PR number
    Save
    SD - 3rd party sales order Assign the PR to the vendor and create PO
    ME57
    Key in the PR number
    Toggle the "Assigned Purchase Requisition"
    Execute
    Check the box next to the material
    Assign Automatically button
    Click on "Assignments" button
    Click on "Process assignment"
    The "Process Assignment Create PO" box , enter
    Drag the PR and drop in the shopping basket
    Save
    SD - 3rd party sales order Receive Goods
    MIGO_GR
    PO Number
    DN Number
    Batch tab , click on classification
    Serial Numbers tab
    Date of Production
    Flag Item OK
    Check, just in case
    Post
    Save
    SD - 3rd party sales order Create Invoice
    MIRO
    Invoice Date
    Look for the PO , state the vendor and the Material
    Check the box
    Click on "Copy"
    Purchase Order Number (bottom half of the screen)
    Amount
    State the baseline date
    Simulate & Post
    Invoice Number
    *Invoice blocked due to date variance
    SD - 3rd party sales order Create a delivery order
    VL01N
    In the order screen , go to the menu Sales Document , select "Deliver"
    Go to "picking" tab
    State the qty and save
    SD - 3rd party sales order Create a billing document
    VF01
    Ensure that the delivery document is correct in the
    Enter
    Go to edit -> Log
    Save
    rewards pls
    siva

  • Purchase Order Customer Fields

    Hi Experts,
    I have enhanced purchase order screen at header level with customer data tab.This tab contains text fields where user can enter details regarding import purchase orders.
    I have also activated release strategy on Purchase Orders.Now the requirement is that I want to make these fields editable even if Purchase Order is released.  SAP does not allow to save values in these fields if Purchase Order is released i can do so by first un-releasing PO and then entering values.I want to know if it is possible to enter values(in these fields only) without cancelling Release.
    Regards,
    Sohaib

    Enhancing the purchase order with the customer data tab, fields can definately be edited even after the purchase order is released.
    Are these fields mapped to release strategy?
    Please check your setting under spro>Materials management> purchasing > release procedure> release indicator in it.Probably it is is set to 1
    Regards
    Sangeeta

Maybe you are looking for

  • Windows 7 and clntrust

    We run clntrust from a login script on a Nw 65sp8 environment. The Xp machines run the script without a problem and they get the key in the system tray. With windows 7 it's a different story. For the most part the app does not run and in essence they

  • SMB not accessing LDAP

    After a recent reboot of our Xserve 4.11, the few Windows machines are no longer able to access the Volumes. The logs are saying the user is using the wrong password. After some testing, I determined the Windows services are not accessing the LDAP se

  • Updating a register and print only the updated portion

    Hi, I have a scenario where I need to update a register. The register is a pdf form (Acro Form) and I am updating it via a swing application that I have developed. When I first create the register, the user will print it and file it for his records.

  • .PDF, printing, color

    Hi. Working in IND CS2. Have XP. IND is the only CS program that I have. I made a press quality .pdf. Settings look fine, pictures are in cmyk & 300 dpi. The color settings are set at North America Prepress 2 like always. Printing from IND is great.

  • I just got a iphone 5 and it wont automatically connect to my home wifi?

    i just got a iphone 5 and it wont automatically connect to my home wifi?