BAPI_PO_Release

Hi Gurus,
Iam Using    BAPI_PO_Release   for releasing purchase order.I need to give PO Release Code. How to find it.
Purchase Order Statu-9
and BSTYP -  F
For This Purchase  Order How to find out the Release COde.
thaks in advance.
rgds,
kirru.ch

hi,
check this structure in bapi BAPI_PO_RELEASE.
BAPIMMPARA.

Similar Messages

  • PO Changeability / Release Strategy / BAPI_PO_RELEASE Issue

    Hello everyone,
    I've run into an interesting problem:
    We have defined several PO release strategies.  Most of these work in the traditional manner, requiring manual approval by a given user.  One release strategy, "99," gets picked up by a batch job and released automatically using BAPI_PO_RELEASE. Either way, the release indicator for all released PO's is set to "R." This all works as intended.
    We have maintained Changeability settings for each release indicator in customizing. "R" is set to "4 - Changeable, new release in case of new strat. or val. change," with a percent value change tolerance of 10%.
    If we make a change to a manually released PO that exceeds the threshold set in customizing, the release procedure starts over as intended.
    If we make a change exceeding the threshold to a PO that was released automatically by BAPI_PO_RELEASE, the release procedure does not start over, and the PO remains unblocked.
    What would cause this discrepancy?  The two records look virtually identical in EKKO, particularly in respect to the fields relevant to release.
    Thank you ahead of time for your help.
    -Jarrod

    Configuration issue/user error.

  • BUS2012 releaser RELEASE - BAPI_PO_RELEASE, saving releaser

    Hi all,
    I know, this kind of topic was already processed a couple of times, however I did not find a suitable solution for our problem.
    Customer wants to be able to save (and report later) releasers of the PO. There is a new processed being implemented, which uses the (slightly modified) BUS2012 object and it's RELEASE method to release the step of the PO in the workflow. Now this calls BAPI BAPI_PO_RELEASE, but it's interface does not incorporate the RELEASER.
    We can't use change documents for this purpose, as, from workflow-orientated releases there will only be WF-BATCH users releasing everything. We would be able to find the place, where CDHEAD and CDPOS are filled, but however this could be not only one place and the added value would be very low, as customer wants a transparent reporting on who and when did which release. For this purpose we enhanced the EKKO table with 16 fields (combinations of uname + date), which will serve the purpose of saving releaser / date of release for every step.
    We can get the actual agent of the workflow, but I do not know how to pass him / her to the BAPI. Of course we can redefine the RELEASE method (and we also will have to), but whatever I put to a e.g. Z_BAPI_PO_RELEASE, will need to be accessed somewhere deeper (maybe in FM ME_REL_SET, maybe in  ME_PURCHASE_DOCUMENT_DATA_SAVE)...
    I believe this was already solved by somebody and we do have something like a best-practise to work with it. Can anybody guide me? Of course, the whole process should be ready to accept releases also from ME29N, should also be implemented for the cancellation of the release and for rejection. But this first step would be a good kick for me.
    Thanks in advance.

    I can give you one option:
    define a new 'release' method, still calling the BAPI_PO_RELEASE but define it as dialog not background
    place the task calling the new method directly after the decision task , transfer the WI_actual_agent of the decision task as the executing agent of the new task. 
    This way the BAPI_PO_RELEASE will be executed with the RELEASER user and not WF-BACTH.
    however, this solution has a few limitations:
    this will work only in SAP GUI
    the user will need to have authorizations to release the PO.
    But, I have created many reports simply reading the workflow logs, this is not more complected then the change documents logs. you can use function modules:
    SAP_WAPI_READ_CONTAINER
    SAP_WAPI_DECISION_READ
    SAP_WAPI_WORKITEMS_TO_OBJECT
    And the logs themselves can be much clearer to the user then the change documents release status has changed from XXX to XXXX logs.

  • Problem with BAPI_PO_RELEASE in workflow

    Hi Experts,
    I have a backgrouond task for PO releases. in the method of the task , iam calling a BAPI, 'BAPI_PO_RELEASE' .when iam executing the workflow through SWUS the BAPI returnig parameters like new release code etc successfully but release strategy is not getting updated in the PO.please let me know what can be the problem?
    Thanks & Regards,
    Sarath

    maybe a commit/user issue.
    Check if the containers going to the WF-task are complete and correct.
    You could try the following, if the user for this background task is wf-batch, you can set an endless loop in the method, temporary change WF-BATCH to dialog user, start the workflow and debug it with SM50.
    Now you can see if it will be executed exactly as when you do it on the foreground.
    Kind regards, Rob Dielemans

  • BAPI_PO_RELEASE  not releasing PO's

    Dear All,
                 In my program am calling BAPI_PO_RELEASE to realse  PO's which are infact created by BAPI_PO_CREATE from the same program. Here I am really puzzled by the fact that all PO's are not released as expected. Strangest Part is when I debug the program it seems that, the BAPI to release the PO's, are behaving as it should !!!
                I am not calling BAPI_TRANSACTION_COMMIT after the RELEASE Bapi, is it necessary because when I tested the BAPI in SE37 it felt to me that BAPI_TRANSACTION_COMMIT was not required..
    Regards,
    Antony

    Hi Antony,
    after BAPI_PO_CREATE it is necessary to use BAPI_TRANSACTION_COMMIT .
    becuase all the tables will not update immediatly.
    so try to use ..
      DATA: LV_WAIT(1) type c value 'X'.
          CALL FUNCTION 'BAPI_PO_CREATE'
          READ TABLE x_return WITH KEY TYPE = 'E'.
          IF sy-subrc NE 0.
              "raise eror PO not created
          Else.
            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                 EXPORTING
                      wait   = lv_wait
                 IMPORTING
                      RETURN = wa_return.
        ENDIF.
    then use other bapis to read or release.
    Prabhudas

  • User WF-BATCH and BAPI_PO_RELEASE does not work without printer assigned

    Hello Gurus,
    The function BAPI_PO_RELEASE is used in our PO approval workflow, but this one does not work till the user WF_BATCH has no printer defined in USR01-SPLD. This is a strange behavior because the output message assigned to the PO has a message transmission medium equals to 5 (External send) => not print.
    Does someone have already met the same issue?
    How this could be solved without assigning a default printer to user WF_BATCH?
    Kind regards
    Chris

    Hello Tison,
    we're using also the WF-BATCH user having no default printer assigned and it works fine with the final release.
    However, there's usually the output message NEU with a prerequesite maintained that the PO has to be finally released. So this way there can be an additional output message found upon releasing. But we have a printer assigned using the condition records and we're not using the type that you've specified.
    So I'd guess that, indeed, the problem lies within the message. You could copy the WF-BATCH user to a dialog user and release the purchase order in dialog and see what happends.
    With the very best wishes,
       Florin

  • Hw to use BAPI_PO_RESET_RELEASE, BAPI_PO_RELEASE

    Hello Experts,
                         I am using BAPI_PO_RESET_RELEASE, and BAPI_PO_RELEASE to unrelease and release PO in a program but some times its working fine and some times the PO get unrelesed but again its status is not being changed to relesed after some changes made in PO( as per my reuirement). Please assist me , if i have to consider any thing while using these function mudules

    I am getting an error message 'Release of document already effected' in return table and PO is not get released, CAn i know why it happens so?

  • What is the table field for PO releaser in R/3 (4.7 Enterprise)?

    Hi Gurus out there:
    Do you know if there is a table field for PO releaser in R/3 (4.7 Enterprise)?
    We use for e.g. the transaction ME29N to release a PO and I haven't been able to find a DB table where the PO releaser is stored.
    In DB table EKKO I can find the fields FRGGR (Release group), FRGSX (Release strategy), FRGKE (Release Indicator), FRGZU (Release status) and FRGRL (Release Not Yet Completely Effected) but no information of the user who released the PO.
    Many thanks in advance.
    /hw

    Hi
    <b>Have you tried reading the details of the PO Releaser using the BAPIs ?</b>
    BAPI_PO_GETRELINFO
    BAPI_PO_GETITEMSREL
    BAPI_PO_GETITEMSREL            List Purchase Orders for Release (Approval): New as of 4.0A     
    BAPI_PO_GETRELINFO             Display Detailed Release (Approval) Information on Purchase Order
    BAPI_PO_RELEASE                Release Purchase Orders            
    BAPI_PO_RESET_RELEASE          Cancel Release of Purchase Orders  
    <u>Related link -></u>
    Re: How to fetch data from back end for PO?
    Hope this will help.
    Do let me know.
    Regards
    - Atul

  • ME28 user exit - sy-ucomm not available

    Hi experts,
    I have a requirement to check sy-ucomm in the user exit EXIT_SAPLEBND_002 which is triggered by transaction ME28 - convert a planned order to purchase requisition. Immediately after pressing the release button for the purchase document the SY-UCOMM value is '%_GC 102 2'.
    When the program control reaches the user-exit, SY-UCOMM is already cleared. Analysing the flow shows it is cleared by the method,
    CL_GUI_CFW=>DISPATCH. This is totally the ALV way of handling things. The ALV control passes on to call the function module BAPI_PO_RELEASE which inturn calls the user exit.
    The question is?? How to get the SY_UCOMM in the user exit. Has any one has ever experienced this before. Your answers are much appreciated.

    Ok Guys
    Sorry for my ignorance.But i think that i don't udesrtand correctly .sorry.
    1-you go to ME28 and do your process (click)
    2-this process pass by exit .
    3-I dont understand the ALV  in this case.
    Can you send images of screens with process ?
    I think maybe you could use assign but i need know more about it.
    thanks and sorry again.

  • HOW TO BLOCK THE PURCHASE ORDER AND MARK FOR DELETION ?

    Hi ,
                        During the Creation of the Purchase order in the SAP System... After creation of the Purchase order should be blocked and a work item is created for the approver. If the Approver approves the Order then the Order is Unblocked and a mail send to the initiators inbox and the Order is Released. Similarly if the Approver Rejects the Purchase Order then its set for Mark for Deletion.
    I did Po creation and release part. But i am facing problem during the Blocking & Unblocking the Purchase order. If he rejects i need to set for "Mark For Deletion". plz help me to solve this...

    Hi,
    You can use bapi 'BAPI_PO_CHANGE' to change the status of PO and for release use bapi BAPI_PO_RELEASE.
    Hope this will help you.
    Smit

  • Purchase order rejection via BAPI

    Hi,
    i need to use BAPIs for purchase order release because it is interfaced with Notes.
    I'm looking for a BAPI or Function module in order to reject PO as it is possible in ME29N transaction in ECC 6.0 . I found BAPI_PO_RELEASE (to release) and BAPI_PO_RESET_RELEASE (to cancel release) but not BAPI for rejection.
    Is there anybody experiencing such a problem ?
    Pierre-Edouard Hamon

    No, thanks for your answer, but this BAPI only allows cancellation of a release code that has already been posted but doesn't allow rejection of a release code that has not yet been managed. (in ME29N, push button Refuse in PO header tab)
    PE Hamon

  • Tutorial SyBase Unwired with SAP RFC

    Hello everyone.
    Does anybody have a tutorial or books how create project with SAP RFC?
    I need to create a project approval Purchase Order (BAPI_PO_GETITEMSREL and BAPI_PO_RELEASE);
    Thank's.

    Hi Leandro,
    You can refer to the following video: http://www.youtube.com/watch?v=1ZcTJYsPzYQ
    It creates a MBO based on a the standard BAPI: "BAPI_FLIGHT_GETLIST" and then a Mobile Workflow Form.
    Althought version is 2.1 I've runned same test in version 2.0 and it worked fine.
    Hope it helps
    Cheers
    Pablo.

  • Anyone know a simple way to reject a PO in background?

    G'Day folks,
    Does anyone have a shortcut, secret function module or equivalent to BAPI_PO_RELEASE to reject a Purchase Order on 4.7? There's BAPI_PO_RESETRELEASE, but alas no reject.
    I admit I'm being a little bit lazy here but
    a) an hour searching/debugging has been fruitless
    b) this seems normal enough that someone's come across this before, and
    c) it's hometime and I'm hoping someone has a simple answer
    Any input appreciated,
    Mike
    (Crossposted to WUG and SDN)

    Take a look at this:
    method reject_po.
      data: lc_po       type ref to cl_po_header_handle_mm,
            ls_document type mepo_document.
    *  prepare creation of PO instance
      ls_document-doc_type    = 'F'.
      ls_document-process     = mmpur_po_process.
      ls_document-trtyp       = 'V'.
      ls_document-doc_key(10) = po_number.
      ls_document-initiator-initiator = mmpur_initiator_rel.
    *  object creation and initialization
      create object lc_po.
      lc_po->for_bapi = mmpur_yes.
      call method lc_po->po_initialize( im_document = ls_document ).
      call method lc_po->set_po_number( im_po_number = po_number ).
      call method lc_po->set_state( cl_po_header_handle_mm=>c_available ).
    *  read purchase order from database
      call method lc_po->po_read
        exporting
          im_tcode     = 'ME29N'
          im_trtyp     = ls_document-trtyp
          im_aktyp     = ls_document-trtyp
          im_po_number = po_number
          im_document  = ls_document.
      if lc_po->if_releasable_mm~is_rejection_allowed( ) = mmpur_yes.
        call method lc_po->if_releasable_mm~reject
          exporting
            im_reset = space
          exceptions
            failed   = 1
            others   = 2.
      endif.
      call method lc_po->po_post
        exceptions
          failure = 1
          others  = 2.
    endmethod.

  • BAPI to Reject purchase order

    Hi All
    Kindly let us know if there is any  BAPI to Reject purchase order  (ME29N)
    Thanks

    Hi,
    Try this,
    BAPI_PO_RELEASE
    see the below link for more help.
    Re: BAPI to reject PO (like ME29N functionality to reject PO)
    Regards,
    Vijay

  • Status of PO no.? **URGENT**

    HI All,
    Can anyone tell me, how do get the status of PO number in R/3. Do we have any FM for that?
    Its very urgent .
    Regards,
    MD.

    hi you can use the following function modules in R/3 to get the data regarding Purchase order in R/3.
    But you have to call this from SRM as remote function with the rfc_destination.
    BAPI_PO_CHANGE                 Change purchase order                             
    BAPI_PO_CREATE1                Create Purchase Order                             
    BAPI_PO_GETDETAIL1             Detail Information for a Purchase Order                                                                               
    MELE                                                                             
    BAPI_PO_DELETE_HISTORY                                                           
    BAPI_PO_UPDATE_HISTORY                                                                               
    MEWF                           BAPIs for Release of Requisition/PO               
    BAPI_PO_RELEASE                Release Purchase Orders                           
    BAPI_PO_RESET_RELEASE          Cancel Release of Purchase Orders                                                                               
    MEWP                           BAPIs Purchase order                              
    BAPI_PO_CREATE                 Create Purchase Order                             
    BAPI_PO_GETDETAIL              Display Purchase Order Details                    
    BAPI_PO_GETITEMS               List Purchase Order Items

Maybe you are looking for