Getting the original values in table maintenance and the new one and send t

Hello experts,
In table maintenance, I need to capture the original values in that selected column/field and
also the new one and send it to email. For example, I have a field in my z table named zaddress and whenever
the user changes the contents of that selected row I need to get/fecth the original value and the new and send it to email.
So the email will be something like this:
Dear Admin,
Changes were made to ztable. Here are the changes:
Customer : Customer 1
Order no : 1
Original Address : example address A
New Address : example address B
NOTE: Do not reply to this email.
Again, thank you guys and have a nice day!

Hi Vijay,
<b>1</b>.
If u r using Modulepool programming to change the field contents ,u just capture field value into one  variable .This is possible in <b>PBO</b>.before displaying .once u change the field value and press something ,now capture changed value in another variable .This is possible in <b>PAI</b>.After pressing something to modify Database.
I think u can get one idea after reading this .
<b>2</b>.
For sending mail it is not a problem.
You can check the following code.
*-------Mail related tables ,structures and variables
DATA:
   w_subject       LIKE sodocchgi1,
   i_pack_list     LIKE sopcklsti1 OCCURS  1  WITH HEADER LINE,
   i_objhead       LIKE solisti1   OCCURS  1  WITH HEADER LINE,
   i_contents_text LIKE solisti1   OCCURS 10  WITH HEADER LINE,
   i_cont_bin      LIKE solisti1   OCCURS 10  WITH HEADER LINE,
   i_objhex        LIKE solix      OCCURS 10  WITH HEADER LINE,
   i_receiver      LIKE somlreci1  OCCURS  1  WITH HEADER LINE,
   i_listobject    LIKE abaplist   OCCURS  1  WITH HEADER LINE,
   pdf             LIKE tline      OCCURS 100 WITH HEADER LINE,
   content_out     LIKE solisti1   OCCURS 0 WITH HEADER LINE.
DATA:
   tab_lines       TYPE i,
   doc_size        TYPE i,
   att_type        LIKE soodk-objtp,
   obj_desc        LIKE w_subject-obj_descr,
   sent_to_all     LIKE sonv-flag,
   client          LIKE tst01-dclient,
   name            LIKE tst01-dname,
   objtype         LIKE rststype-type,
   type            LIKE rststype-type,
   is_otf          TYPE c ,
   no_of_bytes     TYPE i,
   pdf_spoolid     LIKE tsp01-rqident,
   jobname         LIKE tbtcjob-jobname,
   jobcount        LIKE tbtcjob-jobcount,
   pn_begda        LIKE sy-datum,
   val(1)          TYPE c,
   pripar          TYPE pri_params,
   arcpar          TYPE arc_params,
   lay             TYPE pri_params-paart,
   lines           TYPE pri_params-linct,
   cols            TYPE pri_params-linsz,
   spool_name      TYPE pri_params-plist.
  CLEAR :w_subject,
         sent_to_all,
         i_pack_list[],
         i_objhead[],
         i_cont_bin[],
         i_contents_text[],
         i_receiver[].
  i_cont_bin = '  |  '.
  APPEND i_cont_bin.
Subject of the mail.
  obj_desc  = 'Outstanding Appraisals' .
  w_subject-obj_name  = 'MAIL_ALI'.
  w_subject-obj_descr = obj_desc.
Body of the mail
  DATA :head_desc LIKE i_contents_text,
        body_desc LIKE i_contents_text.
  i_contents_text = space.
  APPEND i_contents_text.
  CLEAR  i_contents_text.
  CONCATENATE
  'Please refer to the attached list of appraisal(s) that require your'
  'attention. Please log in to the eHR System and use the eAppraisal'
  'function to work on it.'
  INTO body_desc
  SEPARATED BY space.
  i_contents_text = body_desc.
  APPEND i_contents_text.
  CLEAR  i_contents_text.
  CLEAR body_desc.
  i_contents_text = 'Thank You.'.
  APPEND i_contents_text.
  CLEAR  i_contents_text.
  i_contents_text = space.
  APPEND i_contents_text.
  CLEAR  i_contents_text.
  CONCATENATE '(Note: This is system generated message, please'
              'do not reply'
              'to this Email.)'
           INTO i_contents_text
           SEPARATED BY space.
  APPEND i_contents_text.
  CLEAR  i_contents_text.
Write Packing List (Body)
  DESCRIBE TABLE i_contents_text LINES tab_lines.
  READ     TABLE i_contents_text INDEX tab_lines.
  w_subject-doc_size = ( tab_lines - 1 ) * 255 + STRLEN(
  i_contents_text ).
  CLEAR i_pack_list-transf_bin.
  i_pack_list-head_start = 1.
  i_pack_list-head_num   = 0.
  i_pack_list-body_start = 1.
  i_pack_list-body_num   = tab_lines.
  i_pack_list-doc_type   = 'RAW'.
  APPEND i_pack_list.
  CLEAR  i_pack_list.
Create receiver list
   i_receiver-receiver = g_email_next_man.
  i_receiver-rec_type = 'U'.
  APPEND i_receiver.
  CLEAR  i_receiver.
  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
      document_data              = w_subject
      put_in_outbox              = 'X'
      commit_work                = 'X'
    IMPORTING
      sent_to_all                = sent_to_all
    TABLES
      packing_list               = i_pack_list
      object_header              = i_objhead
      contents_bin               = i_cont_bin
      contents_txt               = i_contents_text
      receivers                  = i_receiver
    EXCEPTIONS
      too_many_receivers         = 1
      document_not_sent          = 2
      document_type_not_exist    = 3
      operation_no_authorization = 4
      parameter_error            = 5
      x_error                    = 6
      enqueue_error              = 7
      OTHERS                     = 8.
  IF sy-subrc NE 0.
  ENDIF.
I think it helps u something.
<b>Thanks,
Venkat.O</b>

Similar Messages

  • Hi i haven't updated my iDVD seen 2005 and to get the new one i need 7.0.4 first and i downloaded it from the apple website and when i go into the updating process its says "An eligible iDVD application was not found in the location /Applications." why"

    Hi i haven't updated my iDVD seen 2005 and to get the new one i need 7.0.4 first and i downloaded it from the apple website and when i go into the updating process its says "An eligible iDVD application was not found in the location /Applications." why

    Because you need to buy iLife 08 or newer on DVD first. If you're using iDVD 05, you probably have a PowerPC Mac and can't use iLife 11.
    (69573)

  • The on/off button on my 6th gen iPod nano recently got spoilt and I sent it back to the shop for a repair/exchange a week ago. Now I have just found out about the new 7th gen iPod nano and I am wondering, can I get the new one as a replacement?

    The on/off button on my 6th gen iPod nano recently got spoilt and I sent it back to the shop for a repair/exchange a week ago. Now I have just found out about the new 7th gen iPod nano and I am wondering, can I get the new one as a replacement?

    No.  You can turn your 6G Nano in to be recycled at your local Apple Store for a 10% discount towards the purchase of a new one. Otherwise, your only other option would be to sell the iPod on Craigslist or eBay and use the proceeds from the sale towards the purchase of the new 7G nano.
    B-rock

  • Now i can give my wife my old iphone and i will get the new one

    both of us will be very happy...thanks apple...win win...peace
    rastafari
    and no i do not feel apple screwed me over by making improvements on their product...EVERYONE knew this was coming and made the decision because they needed it the way it worked as a 2g phone...and for all we know the 3g may have a flaw and the old phones will be hot commodities...

    Ummm--you're taking the new phone (from what I can gather from your post) and giving your wife the old phone. HOW IS SHE GETTING A PHONE THAT COSTS "a couple hundred less"?????
    YOU ARE GETTING A CHEAPER PHONE...she's just getting your "cast-off".
    It's nice that you're giving your wife your "old" phone...but it's not special and you shouldn't feel especially proud. If you didn't have a wife...what would you do with this phone when you get the new one?

  • Guys so there is a new itouch so i can surrender my old broken glass itouch to get the new one right??

    guys so there is a new itouch right?? can i surrender/trade my old broken glass itouch to get the new itouch that been out the market right? it will be discounted in half if i trade it in the apple store?.is right??

    Of course not.  Why would you think this?
    Apple will give you a 10% discount on a new ipod if you bring in an old cone for recycling.

  • I got a brand new iPod Touch but I'd like to know if I could exchange or return it so I can get the new one. It has no scratches and hasn't been dropped.

    I want to know if this is possible. I'd obviously pay what's left for the newer version, but I don't even know if this is possible. Again, my iPod has zero scratches, hasn't been dropped, brand new. I had a case on it the whole time. Please reply! Thank you.

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable       
    - Try on another computer                            
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar                                     

  • How can i get a damaged IMac just delivered replaced for free? How long will it take to get the new one?

    I just unwrapped my new iMac just being delivered by UPS and after removing all the wrapping I noticed deep scratches on the aluminium front and a big dent on the metal frame surrounding the screen. Obvioulsy it fell in the Apple assembly process or a heavy thing fell on it. I am so crossed as it took already 7 days to arrive and I now need to spend time trying to get it replaced one way or another, I believe this will take weeks before I get a replacement iMac and I am not sure in which state this new one will arrive. Very frustrating experience. I am hesitating to cancel the whole thing.

    IF you bought it from apple, you can bring it back to apple for a full refund or exchange. You can also call apple support to request for a mail-in box so you can return the item. if on the other hand it is an apple authorize reseller, kindly contact them for exchange/refund. They will give you an option on whether they will give you a label to help you send back the item to them or take it to the store.

  • If you replace an ipad 2, will you get the new one?

    Just wondering

    Perhaps so.  My Dad experienced the same with his iMac.  That being said, I suspect both are very unusual circumstances and I've never heard that done with any iOS device.  I have heard much of the opposite... people always get the exact replacement.  In any case, the user should not expect a 'free upgrade' as it's only very remotely possible.

  • Can I cancel an annual (not prepaid) subscription to get the new one for Black Friday?

    I am currently subscribed to the Student edition of Adobe CC, and would like to cancel it in order to get the Black Friday price. I'm assuming I'll have to contact customer service from here on out?
    Sara

    Hi Sara
    Please contact support for advice:  Contact Customer Care
    Thanks
    Bev

  • I requested you send my user name to my email three times, you have not sent it. It's for Firefox Sync, I have the new one, please send me my user name.

    I want to sync my phone with my lap top. I can't remember my user name, I've requested my user name several times, I've received nothing from firefox. I'm getting frustrated with your service. I set up a Firefox Sync account a while ago. Please help.

    Sync no longer uses a username, it is just your e-mail. Please use [[How to update to the new Firefox Sync]] to upgrade to the new version of Sync

  • I bought a macbook pro a month ago and didnt know there was a better/newer model (macbook pro retina) - can I upgrade/take back my macbook and get the new one?

    When they told me about it I just thought it had a better display and decided it didn't bother me if the resolution was better, not knowing that it was thinner, has a HDMI connection, etc.
    I bought my macbook pro 13 inch exactly a month ago tomorrow. If I go back and tell them this will I be able to upgrade my laptop? I paid more than $1300 or something for this one, I'd be willing to pay up to the price of the retina model, do you think I'd be able to do this?

    mende1 wrote:
    peter_watt wrote:
    If your non retina MBP has a dvd slot and a large capacity conventional hard drive, you might find the retina model would have been less convenient with lower capacity SSD and no DVD.
    On the other hand, the MacBook Pro with Retina display has got a much faster drive and you can get an external DVD drive (not everybody needs a DVD drive)
    Absolutely, like I say personal Choice.  I believe from remarks in here that the SSD boots up on Mavericks in something like 10 seconds whereas mine takes even longer to boot than in Mountain Lion. But then we are advised to use sleep over boot as much as possible.  My problem is I have 300GB of stuff and getting bigger, and when I bought mine the biggest SSD was 250 I think. For me the choice of replaceable RAM vs soldered-in RAM was a clincher.

  • Cannot access my new emails after 2/16/15 in my inbox--why not and how can I get the new ones I know I have?

    Somehow the internet and my phone crashed. Called Vonage who reset everything so both phone and internet work, but I have lost emails after 2/16/15.

    http://kb.mozillazine.org/New_messages_do_not_appear

  • When is there a new macbook pro range to be launched? Im waiting to get the new one for my birthday.

    ??

    Apple has not announced a new Mac Pro so no one on here knows what Apple's plans might be.  The CEO hinted at a new Mac Pro in a presentation but nothing definitive has been said so far.

  • Can i get the new iPod Touch with out the camera?

    I was just wondering if i could get the iPod Touch 5th Gen with out the camera... i work in Puget Sound Naval Shipyard in Bremerton, WA and we are not allowed to have cameras in the work area, i have an ipod touch but i think it is only 2nd gen, if i could get the new one with out the camera that would be awesome

    falkirks wrote:
    No you can't and the 3rd gen has no camera and can run iOS 6
    I don't believe that's correct. The 3rd gen Touch cannot run iOS 6.
    See iOS 6 is compatible with at the bottom of this page; http://www.apple.com/ios/whats-new/. The 3rd gen Touch is not listed.

  • I am typing this with my old MacBook Air, and I have now seen the new one. What are some of the differences?

    I am wondering if I should get the new one, and if it I can switch books.

    Hi Nicola
    Managed to get a quick reply on this.
    Apparently it has something to do with SING, whatever that is.  These SING Removal instructions helped, well solution number 2 did and now InDesign opens.
    Best wishes
    Andrew

Maybe you are looking for

  • An error occurred while trying to access the Apple Wireless Device

    Hello All; I just bought an Airport Extreme Base Station today and am all ready having problems. I am running a PC. I connected a Motorola DSL model to the Airport's QAN port and then I connected the computer to one of the Ethernet ports. When I firs

  • Posting date in trip form (TRVFO)

    Hi, I would like to add a date-field in trip-form variant FOXX I.e a date for when the trip is posted. I try to use the field BLDAT, but it does not show correct on the print of the form. Accounting date can be used as an alternative, this is fieldna

  • I CAN'T RECEIVE THE SERVICE BOOK

    hello there,, i have tried more than service provider and always i have the same problem which is i can't receive the service book from each service provider. does anyone faced this problem b4 ?? and what i can do ?? please help me to solve this prob

  • Can I prevent applications to re-open windows at launching

    When I quit an application (safari, photoshop...) with opened windows, when I relauch the application, all the old windows reopen, I'd rather to have a "fresh start" with no old window, how can I do ? Thanks

  • HT203171 macbook pro trackpad troubles - any other tips?

    recently my trackpad started acting up: two-finger scrolling and two- and three-finger tapping are not being detected properly. i recorded some of this in a video: http://youtu.be/L-fWYcrmTQg though it cannot be seen in this demo, general use of the