Can we create cancellation/return delivery with BAPI_CONFEC_CREATE

hi experts,
i want to use the above BAPI to create cancellations and return deliveries in SRM 7. i am not able to figure out the exact data that needs to be passed to the BAPI to create cancellation/return delivery. i have used class approach to do the same and able to create them, but i am specifically interested in FM/BAPI
does anybody used this BAPI to create cancellations?
thanks

hi,
i could not make this BAPI work for cancellations but found another way of doing confirmations and cancellations using std FMs
here is the code for confirmation
CALL FUNCTION 'BBP_PD_PO_GETDETAIL'
   EXPORTING
     I_OBJECT_ID                      = is_conf_header-po_number
     I_WITH_ITEMDATA                  = 'X'
   IMPORTING
     E_HEADER                         = ls_header
     ET_ATTACH                        = lt_attach
   TABLES
     E_ITEM                           = lt_item
     E_ACCOUNT                        = lt_account
     E_PARTNER                        = lt_partner
     E_LONGTEXT                       = lt_longtext
     E_ORGDATA                        = lt_orgdata
     E_TAX                            = lt_tax
     move-corresponding ls_header to ls_new_header.
ls_new_header-process_type = 'CONF'.
ls_new_header-subtype = 'CF'.
ls_new_header-src_object_type = 'BUS2201'.
ls_new_header-src_guid = ls_header-guid.
clear ls_new_header-object_id.
loop at lt_item into ls_item.
  read table it_conf_items into ls_conf_items with key po_item_number = ls_item-number_int.
if sy-subrc ne 0.
  continue.
  endif.
  move-corresponding ls_item to ls_new_item.
  ls_new_item-src_object_type = 'BUS2201001'.
  ls_new_item-src_guid = ls_item-guid.
  ls_new_item-final_entry = ls_conf_items-final_entry.
  ls_new_item-quantity = ls_conf_items-quantity.
  append ls_new_item to lt_new_item.
  endloop.
loop at lt_partner into ls_partner.
   move-corresponding ls_partner to ls_new_partner.
   append ls_new_partner to lt_new_partner.
   endloop.
   loop at lt_orgdata into ls_orgdata.
     move-corresponding ls_orgdata to ls_new_orgdata.
     append ls_new_orgdata to lt_new_orgdata.
     endloop.
loop at lt_account into ls_account.
   move-corresponding ls_account to ls_new_account.
   append ls_new_account to lt_new_account.
   endloop.
lv_src_guid = ls_header-guid.       .
CALL FUNCTION 'BBP_PD_CONF_CREATE'
EXPORTING
  I_SAVE                           =  'X'
   I_HEADER                         = ls_new_header
   I_SRC_GUID                       = lv_src_guid
   IT_ATTACH                        = lt_new_attach
IMPORTING
   E_HEADER                         = ls_e_header
   ET_ATTACH                        = lt_e_attach
  TABLES
  I_ITEM                           = lt_new_item
   I_PARTNER                        = lt_new_partner
   I_ORGDATA                        = lt_new_orgdata
   E_ITEM                           = lt_e_item
   E_ACCOUNT                        = lt_e_account
   E_PARTNER                        = lt_e_partner
   E_ORGDATA                        =  lt_e_orgdata
    e_messages                       = lt_new_message
et_msg[] = lt_new_message[].
ls_conf_documents-doc_number = ls_e_header-object_id.
append ls_conf_documents to et_conf_documents.
CALL FUNCTION 'BBP_PD_CONF_SAVE'
EXPORTING
    IV_USERTYPE               = 'X'
   IV_HEADER_GUID            = ls_e_header-guid
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT
code for cancellation
get all the confirmations created for the PO
    CALL FUNCTION 'BBP_PD_CONF_GETLIST'
      EXPORTING
        i_for_po_id = is_conf_header-po_number
      TABLES
        e_pdlist    = lt_pdlist
        e_messages  = lt_msgs.
delete GRS which are cancelled
    LOOP AT lt_pdlist INTO ls_pdlist WHERE subtype EQ 'CA'.
      DELETE lt_pdlist WHERE guid = ls_pdlist-src_guid.
    ENDLOOP.
delete the cancelllation documents. we don't need them anymore
    DELETE lt_pdlist WHERE subtype EQ 'CA'.
    loop at lt_pdlist into ls_pdlist.
      CALL FUNCTION 'BBP_PD_CONF_GETDETAIL'
       EXPORTING
          I_GUID                           =  ls_pdlist-guid
          I_WITH_ITEMDATA                  = 'X'
      IMPORTING
         E_HEADER                         =  ls_conf_hdr
       TABLES
         E_ITEM                           =  lt_con_items
         E_PARTNER                        =  lt_con_partner
move-corresponding ls_conf_hdr to ls_new_header.
ls_new_header-process_type = 'CONF'.
ls_new_header-subtype = 'CA'.
ls_new_header-src_object_type = 'BUS2203'.
ls_new_header-src_guid = ls_conf_hdr-guid.
clear ls_new_header-object_id.
loop at lt_con_items into ls_con_items.
  move-corresponding ls_con_items to ls_new_item.
  ls_new_item-src_object_type = 'BUS2203001'.
  ls_new_item-src_guid = ls_con_items-guid.
  append ls_new_item to lt_new_item.
  endloop.
loop at lt_con_partner into ls_con_partner.
   move-corresponding ls_con_partner to ls_new_partner.
   append ls_new_partner to lt_new_partner.
   endloop.
      lv_src_guid = ls_conf_hdr-guid.
after that call BBP_PD_CONF_CREATE as we did for the confirmation followed by BBP_PD_CONF_SAVE and commit work.
Edited by: SRM7CON on Mar 7, 2012 12:04 PM
Edited by: SRM7CON on Mar 7, 2012 12:25 PM

Similar Messages

  • Return Delivery with Excise

    HI Friends
    Need one valuable suggestion How to create return delivery with payment of excise duty in SAP.
    Regards
    V.

    Follow the below mentioned procedure;
    1. ME21N - Create a Returns PO (Activate "Returns" indicator for PO line item)
    2. MIGO - Goods Receipt > Purchase Order (Returns PO) (Here system will hit Mvmt type "161" and you can also select Un-restricted/blocked stock from where you want to return the stock)
    3. J1IS u2013 Excise Invoice Other Movements
    Here click on u201Ccreateu201D button to create an outgoing excise invoice and reverse the CENVAT Amount.
    Here put all details as below and Press u201CEnteru201D.
    Ref.doc.type - MATD, Doc Number - Material document No of 161 mvmt, Doc Year, Series Group, Excise Group and Vendor
    Here check BED, ECS and SECess values to be reversed and click on u201CSaveu201D button to post the excise invoice.
    4. J1IV - Post and Print Outgoing Excise Invoice.
    5. MIRO - Credit memo w.r.t. Returns PO.
    Nilesh

  • Unable to create Vendor return delivery from blocked stock

    Hello,
    Would like to know how to enable delivery picking from blocked stock.
    Some back ground : I am using Delivery type RL (Vendor returns). Required config is done in IMG.
    In our process we move defective material to blocked stock. Next create a Return PO to pick material from blocked stock.
    Next use VL10b to create delivery document against this PO.  We are able to create delivery & PGI from blocked stock.
    All above steps are executing seamlessly without any issue In our QA system.
    However in PROduction system delivery document does not find any qty in blocked stock inspite of being in the blocked stock.
    Please let me know where I could find the setting to enable delivery shipping/ PGI from blocked stock.
    Look forward to some good responses.
    Thanks,
    Ram

    Prerequisites
    When you enter a return delivery, you should reference the purchase order or the material document, so that the system can:
    Suggest data to simplify data input (for example, the storage location)
    Check that the returned quantity does not exceed the delivered quantity
    Reduce the quantity delivered to date
    Reverse other updates that occurred (for example, for a goods receipt into consumption) when the goods receipt was entered
    Before you enter a return delivery with reference to a purchase order, you have to determine whether the goods were posted to stock or to consumption, or whether they were posted into goods receipt blocked stock. If you posted the goods to a particular stock type at goods receipt (for example, quality inspection stock), you have to return them from the same stock type.
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/a5/63351643a211d189410000e829fbbd/frameset.htm

  • Return Delivery with a Credit  Memo Request.

    Hello Gurus. I have been working on this issue for quite some time. I will explain the process that was provided by our installers. It doesn't seem to be adding up. Here is the situation, Product that was sent incorrectly was returned. According to our procedures, we create a returns delivery thru VA01, with RE (returns) as the Order Type. We then create it with REFERENCE to the Invoice Number. We remove the items not being returned, enter the Billing Block and Order Reason. Then Save. It gives us a returns delivery number of 6000000, We then return the product back to our stock through MB1B. We clear it and put it back as normal. We then Create a Credit Memo Request through VA01, order type is CR (Credit Memo Request) Create with Reference, we again select the invoice number, delete the items not being returned, enter billing reason, then save. It gives us a number of 60000001. At this point, we enter VF01 and create a billing document. It says the order has billing blocks. We go back in and remove the blocks. We hit save. It now seems to ok, except that, under document flow, under the first delivery 6000000, it shows still being processed (the goods returns shows complete, but the line above shows being processed), and the document flow for 60000001 shows the invoice and the Accounting document as Not Cleared. My question is, should there be 2 seperate orders? A returns delivery and credit memo Request should be under the one delivery number 6000000 according to our procedures? Those were the steps given. Something seems out of place. Are my steps out of order?  Are the procedures wrong?  If anybody has any insight, I would much appreciate it.

    I would start fresh with a new sales order.  When you create with reference both the return delivery and credit memo are created with reference to the return sales order.  Here is an example document flow to clarify:
    Document                                      Date               Qty/value   UoM/Cur   Overall proc. status
                                                                                    Return 60000077 / 10                          08/25/05               10.000  EA      Completed                                 
    . Returns Delivery 500000016 / 10             08/25/05               10.000  EA      Completed                                 
    .. GD returns QI 4900030060 / 1               08/25/05               10.000  EA      complete                                  
    .. Credit for Returns1 10000017 / 10          08/25/05               10.000  EA      Completed                                 
    ... Accounting document 10000017              08/25/05               10.000  EA      Cleared

  • Create an outbound delivery with reference to a purchase order

    Hi folks, would you tell me if I can create an outbound delivery with reference to a purchase order?
    I tried to use the transaction VL10B but after I run there is no data is selected. Should I set up anything else for that?
    Thanks in advanced.

    Hi,
    Yes, you can create outbound delivery with reference to a PO.
    In transaction VL10B, if you are not sure about the shipping point leave it blank. ALso, you can check the shipping point from the shipping data and enter it here.
    Leave the field Condition rule to create delivery blank so that it will consider PO with delivery date falling within one year.
    In the Purchase order tab, enter the PO number.
    Execute.  It should fetch you the PO list due for delivery.
    Before doing the above, make sure PO is not subjected to release strategy. Check the quantity in the PO due for delivery.
    Thanks and Regards,
    Maheshwari

  • Is it possible to create an inbound delivery with MB31

    Hi,
    I would like to know if it's possible to create an inbound delivery with transaction MB31. It's a requirement of the client that all goods that come into the warehouse (HU managed) get in with an inbound delivery.
    So, for the scenario of production (non HUM storage Location) to warehouse (HUM storage location) a transfer posting will be done with MB31, A inbound delivery must be created.
    I hope this is possible.
    Regards,
    Alexander

    Hi,
    You can use an STO to transport stock from production to your warehouse and you can use VL31N with reference to your STO to create an inbound delivery document.
    Thanks
    Silas

  • Could we create an inbound delivery with reference to purchase requisition?

    Dear all,
    Could we create an inbound delivery with reference to purchase requisition?
    If yes, how could we customize the system?
    Kind regards,
    Adi

    No, I don't think so. You have to convert it into a PO and then you can create the delivery.

  • How to default current date in MIGO while creating a return delivery

    HI,
    While creating the return delivery using 122 mov type, system is defaulting the document date of the original doc which is being referred as the document date of the return delivery document.
    How we can make the system to populate current date as document date automatically, even though we are referring a material doc to create the return delivery. Pl suggest.
    Regards,
    Robin

    HI,
    My question is,
    How we can make the system to populate current date as document date automatically, even though we are referring a material doc to create the return delivery. Pl suggest.
    Regards,
    Robin

  • To create a return order with sales order as reference in CRM.

    Hi guys,
    How do i create a return order with sales order as reference in CRM. Is CRMD_BUS2000115 the transaction for this?? and if yes how do i pass sales order as reference??

    Hi,
    While archiving the documents, the backup of the documents (Archive FIles) would have been taken. Using the archive file, you can reload the required documents and do your transaction.
    It is better to check with your technical team to do the same.
    Regards
    Vijay

  • Can i create an apple account with an app store card, or do i Need an itunes card?

    Can i create an apple account with an app store card, or do i Need an itunes card?

    You need an iTunes card.
    You can setup an account without a credit card if that helps.
    http://support.apple.com/kb/ht2534
    I found this in the iTunes help menu.
    Redeem an iTunes allowance, gift certificate, or Gift Card
    If you received an iTunes Store allowance, gift certificate, iTunes Gift Card, or promotional code, you can use it to buy songs, videos, or audiobooks from the iTunes Store.
    You need to set up an Apple ID for use with the iTunes Store before you can redeem anything in the iTunes Store. You don’t need to enter credit card information to redeem only the amount of a gift certificate or card.
    Before redeeming anything, make sure you are signed into the iTunes Store (choose Store > Sign In, or select Sign In from the navigation bar at the top of the iTunes Store window):
    I don't see any mention of App Store cards.

  • I have 2 iPhones and one iPad. Can i create individual icloud accounts with one itunes account?

    I have 2 iPhones and 1 iPad. Can I create individual icloud accounts with one iTunes account?

    I have 3 emails and 3 devices. I just want to be able to share the purchased music/apps but keep pictures/contacts etc separate. Is this possible??

  • How can I create multiple sales orders with reference to one contract?

    Hello Gurus,
    Can you please how can I create multiple sales orders with reference to one contract?
    thanks!
    Rakesh

    hi
    Lets consider example
    In your contract for line item 1 you have entered qty 100
    You careated sales order with 70 quantity, and now you want to creat another sales order for 30
    For this first you need to check what is your item category in contract (VA42)
    Goto VOV7
    SPRO - IMG  - Sales and distribution - Sales - Sales document item - Define item categories - Go to change mode
    Make the completion rule = B Item is completed after full quantity has been referenced

  • HT204088 I can't create an apple ID for not using credit card. How can i create an apple ID with no credit cards ? Thank you.

    I read the supporting article. But those pictures were old. Also the format had changed. I can't create an Apple ID with no credit cards? I got no credit cards. I am just a secondary student and how can I have a credit card?

    Follow the instructions on this page exactly : http://support.apple.com/kb/HT2534 i.e. select a free app and click on 'create Apple ID' when 'buying' it (it worked for me yesterday).

  • How can i create a new user with only read rights ?

    How can i create a new user with only read rights ?

    You are asking about a Database User I hope.
    You can look into the Oracle 8i Documentation and find various privillages listed.
    In particular, you may find:
    Chapter 27 Privileges, Roles, and Security Policies
    an intresting chapter.
    You may want to do this with the various tools included with 8i - including the
    Oracle DBA Studio - expand the Security node and you can create USERS and ROLES.
    Or use SQL*Plus. To create a
    user / password named John / Smith, you would login to SQL*Plus as System/manager (or other) and type in:
    Create user John identified by Smith;
    Grant CONNECT to John;
    Grant SELECT ANY TABLE to John;
    commit;
    There is much more you can do
    depending on your needs.
    Please read the documentation.
    -John
    null

  • Oracle Forms - How can I create a Data Block with query

    Dear friends I have a question, I couldn't do this..
    I have a sql query, I want to show the datas of the query.. How can I do this. ?
    Data Block Wizard wants a table, view or stored procedure, but I have a query, how can I create a data block with my query.. I m waiting your helps..? Please...
    Semih

    Hi,
    You have two options
    1. create a view and base the block on the view
    2. create a block with a query Data Source Type of 'FROM clause query'
    Hope this helps
    Neil

Maybe you are looking for