Update Sales EH before Deleting Delivery EH from application system

I have placed an enhancement implementation into IF_EX_LE_SHP_DELIVERY_PROC~SAVE_AND_PUBLISH_DOCUMENT I plan on creating an event for an unexpected event called "DeliveryDelete" which will update the Sales Order EH.
Should I be using the function module /SAPTRX/PROCESS_EVENTS since we are using ASYNC QRFC's??
Or is there a better way of sending this event?

If the standard SAP EM AI is not called for the deletion event then you should call the BAPI  /SAPTRX/BAPI_EH_ADDEVENTMSG_02 as per normal to create the event. Just call it in background task after setting the queue name:
call function 'TRFC_SET_QUEUE_NAME'
          exporting
            qname              = iv_rfc_queue_name
          exceptions
            invalid_queue_name = 1
            others             = 2.
Then call the BAPI and the commit work:
call function '/SAPTRX/BAPI_EH_ADDEVENTMSG' "#EC EXISTS
            in background task
            destination is_trxsrv-rfcdest
            exporting
              simulate                   = space
            BLOCKONERRORIN             =
              synchronous                = 'X'
            BUFFER_MODE                =
              eh_generation_mode         = 'N'
            tables
              trackingheader             = lt_bapi_evm_header
              tracklocation              = lt_bapi_evm_locationid
              trackaddress               = lt_bapi_evm_address
              tracklocationdescr         = lt_bapi_evm_locdescr
              tracklocadditionalid       = lt_bapi_evm_locaddid
              trackpartnerid             = lt_bapi_evm_partnerid
              trackpartneraddid          = lt_bapi_evm_partneraddid
              trackestimdeadline         = lt_bapi_evm_estimdeadl
              trackconfirmstatus         = lt_bapi_evm_confstat
              tracknextevent             = lt_bapi_evm_nextevent
              tracknextevdeadlines       = lt_bapi_evm_nextevdeadl
              trackreferences            = lt_bapi_evm_reference
              trackmeasuresults          = lt_bapi_evm_measresult
              trackstatusattrib          = lt_bapi_evm_statusattr
              trackparameters            = lt_bapi_evm_parameters
              trackfileheader            = lt_bapi_evm_fileheader
              trackfileref               = lt_bapi_evm_fileref
              trackfilebin               = lt_bapi_evm_filebin
              trackfilechar              = lt_bapi_evm_filechar
              tracktextheader            = lt_bapi_evm_textheader
              tracktextlines             = lt_bapi_evm_textlines
              extensionin                = it_extensionin
              extensionout               = it_extensionout
              return                     = ct_bapireturn.
      if not iv_rfc_queue_name is initial.
        call function 'TRFC_SET_QUEUE_NAME'
          exporting
            qname              = iv_rfc_queue_name
          exceptions
            invalid_queue_name = 1
            others             = 2.
      endif.
    Commit posting
      call function 'BAPI_TRANSACTION_COMMIT' in background task
        destination is_trxsrv-rfcdest.
Edited by: Kevin Wilson on Apr 14, 2010 2:18 PM

Similar Messages

  • How to delete a file from application server?

    Hi gurus,
    i want delete a file from application server . can any one tell me the BAPI/Fm .
    thanks in advance

    See the replies of the thread;
    How to delete  File from the Application Server,ABAP
    But i can smell something fishy in both  The specified item was not found. and The specified item was not found. style of posting questions. Also both of you have similar questions in your profile....
    Hmmm, Mods have to take care of the Rest...
    Regards
    Karthik D

  • How to delete file manually from application data base

    Hi All,
    Could anyone tell me how to delete file manually from application database.
    Thanks In advance
    Regards
    SAN
    Edited by: Sanjay  Nair on Sep 2, 2008 10:51 AM

    Closed

  • HT204152 I am unable to update my App  store Updations. the reason being billing problem asking to update payment method.many times i updated my credit card details but refusing from the system .how can i update my app store updations like  Face book etc.

    I am unable to update my App  store Updations. the reason being billing problem asking to update payment method.Many a  times i updated my credit card details but refusing from the system .how can i update my app store updations like  Face book etc....Using ! phone 6plus  .IOS8.3

    What do you mean by 'refusing from the system', if you are getting an error message then what does it say ?
    For a credit card to have a chance of being accepted it needs to be registered to the same name and address (including format and spacing etc) that you have on your iTunes account, and have been issued by a bank in the country where you and your iTunes account are. If it is and if you are getting a 'declined' message then you could check with the card issuer to see if it's them that are declining it, and if not then try contacting iTunes Support (these are user-to-user forums) and see if they know why it's being declined : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption
    If when trying to download you are getting a message about a 'problem with a previous purchase' then that implies that iTunes wasn't able to collect the money for your last purchase. If that is the case then you won't be able to download anything else (including app updates) until you've paid off what you owe : Pay an unpaid balance in the iTunes Store - Apple Support
    If you aren't getting the 'problem with a previous purchase' message then try logging into your account (not when trying to download something) and see if you get the 'none' option so that you can remove the card's details and be able to download updates to your apps : Change or remove your payment information from your iTunes Store account (Apple ID) - Apple Support

  • How to create a SSIS package to delete word documents from local system

    Hi All,
    How to create a small SSIS package to delete word documents from local system. Word documents might be one or two weeks ago.
    Thanks in advance for your help.

        Dim filename As System.IO.FileSystemInfo
            filename = My.Computer.FileSystem.GetFileInfo("c:\temp.doc")
            If (Now.DayOfYear - filename.CreationTime.DayOfYear) > 3 Then
                'filename.Delete()
            End If
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Deleted dtp's from quality system

    hi experts,
    i have deleted dtp's from quality system can i get them back. i want to restore my dtps back in to my system please any body can help me
    thanks and regards
    vijay

    Hi,
    It is advisable to create DTP's in development and transport across all systems.Normally if you make process chain in development and transport to QA or Prod you need to have same DTP's.Try to always synchronise metadata across all systems.You can find overwrite option in T-code STMS_IMPORT in target system.In your case you dont need to check that option. Try to collect all DTP's in new request again and transport.
    Regards
    Chandu

  • Deactivate delta update before deleting the request from ODS

    Hi all,
    Happy New Year wishes to all.
    I have a scenario, where I am feeding the data to ODS from flat file and from ODS to Cube. Here ODS is a Data mart. Flat file to ODS full update and ODS to Cube First Initialization and Delta.
          I deleted the latest request from ODS, at the I got the message dialog box and it is saying that
    “Request 98888 already retrieved by data target BWVCLNT”
    “Delta update in data target BWVCLNT must be deactivate before deleting the request
    “Do you want to deactivate the delta update in data target BWVCLNT?
    So I pressed Execute changes, then after I loaded the data in to ODS and when I am trying to load the data into Cube, once I pressed execute button it is displaying the message dialog box like
    “Delta request is incorrect REQXXXXXXX in the monitor”
    “A repeat needs to be requested”
    “Data target still include delta request REQXXXXX”
    “If the repeat is now loaded, then after the load”
    “There could be duplicate data in the data targets”
    “Request the repeat?”
    After execute changes it is showing only “zero” Records only.
    What is that mean and why zero records it is displaying instead of delta records.
    Anybody faces this type of problem please let me know. This is somewhat urgent to me
    Thanks and Regards
    Satish Chowdary

    <i>Hi Satish,
    First Switch off the ODS ( automatic Update of Datatarget ) , though not really necessary. delete the Req from the Infocube, then delete from the ODS . Now delete the Init Req from the Infopackage for datamart infopackage.then Do an Init without datatransfer into Infocube. Later load data into ODS and then go for delta update to Infocube.
    I hope this helps.
    Thanks,
    Krish
    Dont Forget to assign Points.</i>
    Dude, you just repeated my answer I gave a few hours ago. Are you hungry for points?

  • About reversal of Outbound delivery generated from Project system due to sale return

    Hi SAP Expert ,
    We have made delivery from project system using t.code CNS0 and billing document is generated with reference of sales order. Now Goods is return by customer due to some technical reason, We created return sales order with reference of billing document  and Credit memo with reference of Return sales order.
    What is T.code for making return delivery or reversal of  Delivery /PGI generated from Project system in sap r/3 ?
    Pls. suggest to me.
    regards
    VKM

    Hello,
    it depends whether in the billing document the material codes identifies the goods delivered and to be returned or not.
    If it's so, you can create a Return Sales Order with reference to the billing document, create the return delivery, and then the credit memo.
    If it's non so, you can create a Return Sales Order with reference to the billing document (but without copying the material items, and entering manually material code and quantity to be returned), then create the return delivery. Then you can create a Credit memo request with reference to the Billing Document or with reference to the Return Sales Order.
    To create the return delivery, you can run VL01N with reference to the Return Sales Order (just like for outboud deliveries), or from VA02, following the menu path "Sales document --> Deliver".
    Best regards,
    Andrea

  • Unable to delete country groupings from GTS system

    Hello GTS - Gurus,
    I want to delete the Country Grouping from GTS system
    But when I try to do so, I am getting the below error
    There are /SAPSLL/CCGR valid entries for object XXXX and attribute "X"
    There are /SAPSLL/LEGCON valid entries for attribute X in object XXXX
    Here XXXX = the same country group I am trying to delete
    From the above log, I am able to understand that it is not letting me delete because there exists a value for that country group in both the above tables.
    But, where can I find these values? Because, I need to delete the same, so as to delete the corresponding groups.
    Any help in this regards would be very helpful!
    Regards,
    VK

    Dear Vineet,
    Country Group is a Prerequisite to the Legal Regulation to avail/use the any GTS Sub module service. As I know that we need to assign this country group to the corresponding Legal Regulation where you define it at Define Legal Regulation in General Settings.
    I didnt get your business requirement clearly but make sure that before assessing/removing the the Assignments of country groups to the Legal Regulations in your relevant configuration steps.
    Thanks!
    Srikanth

  • Satellite M45-S265 - How do I delete WiFi File from the system?

    This M45-S265 Machine has Intel Pro/Wireless BG Network Connection.
    The installed Driver is Intel dated 12\19\2007 Version 9.0.4.39
    So I want to "completely" uninstall this driver from the system.
    Going thru the device manager and simply asking it to uninstall doesn't completely uninstall.
    Because as soon as it refreshes it will reinstall the same file from a cache some where in the system.
    So how do I go about completely uninstalling such a driver from the machine?
    Can anyone answer this for me? Many thanks.

    Hi
    In device manager you can check were the WLan driver file was installed and how its called.
    Choose WLan card -> Properties -> Driver tab -> Driver Details
    There you will see the path and how the driver files are called.
    Then go to this folder and delete it.
    Bye

  • Is it possible to Delete BP's from production system

    Hi All,
    Is it possible to delete old BP numbers from production system?
    if yes please let me know the procedure and impact on the system.
    if no please let me know ,how to prevent user from entering old BP number into order.
    Thanks in advance for your help.
    Regards,
    Shaik

    Hi Shaik,
    You can delete the BP using transaction BUPA_DEL.
    Just enter the number of the BP you want to delete and then execute.
    Make sure that all the checkboxes on the selecton screen are clear.
    In case the BP has dependencies and deletion is not alowed, you will get an error message informing you of the same.
    Best Regards,
    Rishu.

  • Email to be sent on delivery acknwledgement  from target  system

    Hi all,
    We are running on SRM 5.0 (Standalone scenario).We are sending the local PO to the vendor system thorugh XI(SRM>XI>Vendor system).
    My reqt is when the PO is sent to the vendor system,a response/message is sent to XI that the PO has been delivered to the Vendor(target) system.At this event(When the message of delivery is recieved in XI),I need to send an email to the Shopping cart requester/creator in SRM stating that "PO has been sent to the vendor".
    Can anyone please suggest how this can be done?Is there any std provision in XI for sending an email at the time of successful delivery of the doc/data to the target system?
    I am not clear as to what will be the  link between XI and SRM system?Can we write a routine in XI to read the XMLmessage  to get the  PO no and thereafter the SC details??If so,how (As we  will be having only the XML message  in XI which will contain the PO no)??
    Any inputs/help will be appreciated and rewarded!
    BR,
    SRM Tech.

    Hi Suhail,
    Thanks for  the  prompt response.
    Actually I am new to XI so dont have much idea abt  how the  messaging happens in XI.I  jst  know that whenever the doc is sent  fromXI  to the  target system,the XI  recieves  a  response  for  successful delivery to the  target  system!So I wanted  to  know  if  i have to code  in  XI  (to incorporate the  logic  for sending the mail at runtime  to  the  SC  creator  in SRM) ,how doI  dothat???Using  ABAP as the language  or any other  languages  like HTML ,javascript  etc for XI??Also  how  do I connect  fromXI  to  SRM to fetch  the reqd  data  from SRM  system??
    BR,
    SRM tech.

  • How to send delivery document from external system to ECC

    i have a business requirement to send a delivery and billing documents from external system ( MS access )  to ECC
    could any one light me how to do this ???
    Thank you in advance

    Hi Ahmed,
    Talk to your middleware team, They will upload the data through RFC.
    Basiclly RFC(Remote function call) works like it will call the function module and then upload the data.
    For more information, check the link given below.
    http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5b6a85b11d6b28500508b5d5211/content.htm
    Hope this helps,
    Regards,
    MT

  • Move file to application server  or delete a file from application server

    Hi all
    I have one application in which if succeful uploading  of BMP file  from application server is not  done , File has to move to another folder like 'ERROR' Folder
    but i am unable to do that.
    here is the code:
    CONDENSE g_t_ws_move.
    CALL 'SYSTEM' ID 'COMMAND' FIELD g_t_ws_move
      ID 'TAB'     FIELD g_t_ws_command_line[].
    where
    <b>G_T_WS_MOVE= 'MOVE /Y /sapin/XVZ/journeyplan/0000000.BMP /tmp/0000000.BMP'
    means  i have to move 000000.bmp file from XVZ to tmp directory ,</b>

    Hello Neetu
    Alternatively you could use a combination of the following function modules:
    - EPS_FTP_PUT
    - EPS_DELETE_FILE
    Regards
      Uwe

  • TS4605 I backed up my Icloud before deleting the information from my PC. When I deleted my contacts from my PC it wiped out my Contacts in Icloud.  I tried restoring from my Icloud backup, but the file is corrupted. Is there a way to restore my contacts

    How can I restore my Icloud contacts  if they all disappeared  from the CLOUD and the backup I made is corrupted?
    Is there a previous version online?

    If you deleted them and they are not in the trash can, and you did not back them up before you deleted them they are gone.

Maybe you are looking for