MAIL THRU PROGRAM

hi sapiens,
              I have written a code to send mail to external system.the program is excuting and message is showing sent.when i see it in sap office workprocess .it is telling that "send process still running"
tell me what all the necessary configurations i have to do..i have sent mail from sap system from scot.
but only if i send thru program it is not sending..

Hi,
you need to send the mail through the SCOT transaction code or else you need to submit a program rsconn01 for auotomate mail sending
See the below code
Send the email.
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = document_data
TABLES
object_content = t_content
receivers = t_receivers
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 <> 0.
MESSAGE e208(00) WITH 'Error in sending email :-(('.
ELSE.
MESSAGE s208(00) WITH 'Email sent )'.
ENDIF.
<b>SUBMIT rsconn01 WITH mode = 'INT' AND RETURN.</b>
Regards
Sudheer

Similar Messages

  • How to send a mail thru Oracle

    Hello Every one ,
    Can u plz tell me the way to send a mail thru oracle...................

    Follow the below steps..........
    INTRODUCTION:
    This bulletin explains how to programmatically send a fax/email message from a
    Forms/Reports application via Microsoft Exchange without any kind of user
    interaction. It shows the general usage of the 'Mail' package as well as a fully
    coded Forms sample application.
    The concept of OLE (Object Linking and Embedding) automation is used to control
    the OLE server application (Microsoft Exchange) using the client application.
    The client in this case may be a Developer/2000 Forms or Reports application. It
    uses the objects and methods exposed by the OLE Messaging Library which are
    much more robust than the MSMAPI OCX controls and allow access to many more MAPI
    properties.
    Oracle provides support for OLE automation in its applications by means of the
    OLE2 built-in package. This package contains object types and built-ins for
    creating and manipulating the OLE objects. Some of these built-ins for e.g.
    OLE2.create_obj, OLE2.invoke, OLE2.set_property have been extensively used in
    the code.
    GENERAL USAGE:
    The Mail package contains three procedures:
    1. Procedure Mail_pkg.logon( profile IN varchar2 default NULL);
    Use this procedure to logon to the MS Exchange mail client. The procedure
    takes a character argument which specifies the Exchange Profile to use for
    logon. Passing a NULL argument to the logon procedure brings up a dialog box
    which asks you to choose a profile from a list of valid profiles or create a new
    one if it doesn't exist.
    2. Procedure Mail_pkg.send(
    --------- Recipient IN varchar2,
    Subject IN varchar2 default NULL,
    Text IN varchar2 default NULL,
    Attachment IN varchar2 default NULL
    This is the procedure that actually sends the message and attachments, if
    any, to the recipient. The recipient may be specified directly as a valid email
    address or as an alias defined in the address book. If the message is intended
    for a fax recipient then a valid alias must be used that is defined as a fax
    address in the address book.
    3. Procedure Mail_pkg.logoff;
    This procedure closes the Exchange session and deallocates the resources used
    by the OLE automation objects.
    SAMPLE FORMS APPLICATION:
    1. Create the Mail Package using the following two Program Units:
    (a) Mail Package Spec
    (b) Mail Package Body
    Mail Package Spec:
    PACKAGE Mail_pkg IS
    session OLE2.OBJ_TYPE; /* OLE object handle */
    args OLE2.LIST_TYPE; /* handle to OLE argument list */
    procedure logon( Profile IN varchar2 default NULL );
    procedure logoff;
    procedure send( Recp IN varchar2,
    Subject IN varchar2,
    Text IN varchar2,
    Attch IN varchar2
    END;
    Mail Package Body:
    PACKAGE BODY Mail_pkg IS
    session_outbox OLE2.OBJ_TYPE;
    session_outbox_messages OLE2.OBJ_TYPE;
    message1 OLE2.OBJ_TYPE;
    msg_recp OLE2.OBJ_TYPE;
    recipient OLE2.OBJ_TYPE;
    msg_attch OLE2.OBJ_TYPE;
    attachment OLE2.OBJ_TYPE;
    procedure logon( Profile IN varchar2 default NULL )is
    Begin
    session := ole2.create_obj('mapi.session');
    /* create the session object */
    args := ole2.create_arglist;
    ole2.add_arg(args,Profile);/* Specify a valid profile name */
    ole2.invoke(session,'Logon',args);
    /* to avoid the logon dialog box */
    ole2.destroy_arglist(args);
    End;
    procedure logoff is
    Begin
    ole2.invoke(session,'Logoff');
    /* Logoff the session and deallocate the */
    /* resources for all the OLE objects */
    ole2.release_obj(session);
    ole2.release_obj(session_outbox);
    ole2.release_obj(session_outbox_messages);
    ole2.release_obj(message1);
    ole2.release_obj(msg_recp);
    ole2.release_obj(recipient);
    ole2.release_obj(msg_attch);
    ole2.release_obj(attachment);
    End;
    procedure send( Recp IN varchar2,
    Subject IN varchar2,
    Text IN varchar2,
    Attch IN varchar2
    )is
    Begin
    /* Add a new object message1 to the outbox */
    session_outbox := ole2.get_obj_property(session,'outbox');
    session_outbox_messages := ole2.get_obj_property(session_outbox,'messages');
    message1 := ole2.invoke_obj(session_outbox_messages,'Add');
    ole2.set_property(message1,'subject',Subject);
    ole2.set_property(message1,'text',Text);
    /* Add a recipient object to the message1.Recipients collection */
    msg_recp := ole2.get_obj_property(message1,'Recipients');
    recipient := ole2.invoke_obj(msg_recp,'add') ;
    ole2.set_property(recipient,'name',Recp);
    ole2.set_property(recipient,'type',1);
    ole2.invoke(recipient,'resolve');
    /* Add an attachment object to the message1.Attachments collection */
    msg_attch := ole2.get_obj_property(message1,'Attachments');
    attachment := ole2.invoke_obj(msg_attch,'add') ;
    ole2.set_property(attachment,'name',Attch);
    ole2.set_property(attachment,'position',0);
    ole2.set_property(attachment,'type',1); /* 1 => MAPI File Data */
    ole2.set_property(attachment,'source',Attch);
    /* Read the attachment from the file */
    args := ole2.create_arglist;
    ole2.add_arg(args,Attch);
    ole2.invoke(attachment,'ReadFromFile',args);
    ole2.destroy_arglist(args);
    args := ole2.create_arglist;
    ole2.add_arg(args,1); /* 1 => save copy */
    ole2.add_arg(args,0); /* 0 => no dialog */
    /* Send the message without any dialog box, saving a copy in the Outbox */
    ole2.invoke(message1,'Send',args);
    ole2.destroy_arglist(args);
    message('Message successfully sent');
    End;
    END;
    2. Create a block called MAPIOLE with the following canvas layout:
    |-------------------------------------------------------------|
    | |
    | Exchange Profile: |====================| |
    | |
    | To: |============================| |
    | |
    | Subject: |============================| |
    | |
    | Message: |============================| |
    | | | |
    | | | |
    | | | |
    | | | |
    | | | |
    | |============================| |
    | |-----| |
    | Attachment: |============================| |SEND | |
    | |-----| |
    |-------------------------------------------------------------|
    The layout contains 5 text-itmes:
    - Profile
    - To
    - Subject
    - Message (multiline functional property set to true)
    - Attach
    and a 'Send' button with the following WHEN-BUTTON-PRESSED trigger:
    mail_pkg.logon(:profile);
    mail_pkg.send(:to,:subject,:message,:attch);
    mail_pkg.logoff;

  • Mail Thru SAP

    I have written a program to send mail thru SAP, whcih was working fine till date. Suddenly it started giving problem.
    Body of the message is now going as an attachment  which was working fine previously.
    I am using following function.
      concatenate  'Please find attached Vendor Age Report for BA - '
                   gt_vendor_mail-gsber ' .'
             into  p_it_message.
      append p_it_message.
      p_it_message        = 'Message Body text, line 2...'.
      append p_it_message.
    call function 'SO_DOCUMENT_SEND_API1'
           exporting
                document_data              = wa_w_doc_data
                put_in_outbox              = 'X'
                sender_address             = lv_sender_address
                sender_address_type        = lv_sender_address_type
                commit_work                = 'X'
           importing
                sent_to_all                = lv_w_sent_all
           tables
                packing_list               = lt_packing_list
                contents_bin               = lt_attachment
                contents_txt               = p_it_message
                receivers                  = lt_receivers
           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.
    Please help.
    Regards,
    Sachin Raut

    Hi,
    Check your settings in TCODE SCOT
    Double click on SMTP note . For "Internet" click on set, under "Output format for SAP documents" RAW Text musts be set as "TXT"
    [Email attachment poblem|Re: email attachment poblem]
    Regards

  • Does SAP can send a mail thru smtp server ?

    Hello everybody ,
            Does sap 4.7 can write a abap program to send a mail thru another smtp server (ex:lotus notes) ?
            because of i hav' t any basis authorzation .
    Thanks in advanced,
    Best Regards,

    Hi,
    As far as i know , it is not possible to send a mail through external server (lotus notes).
    If u dont have the authorizations then just check it with ur BASIS guy.. he can provide u with the same..
    Cheers,
    Simha.

  • Conflict between program Mac mail and program Microsoft Outlook e-mail???

    Denmark, Kolding, 30th of September 2010
    A conflict between program Mac mail and program Microsoft Outlook e-mail?
    For several months tried to discuss and resolve with several Apple specialists/support, but without much luck.
    Therefore I have discussed these issues with 2 different and independent Mac users to find out in testing other Mac users will have the same problems as outlined in the below mentioned situations.
    I will therefore outline the coverage issues, as mentioned, including occurs on my iMac 21.5 " with serial number: <Edited by Host> and 2 friends with their Macbooks of new dates as follows:
    1. Sending from my Mac plain mail as "plain text "(during formatting):
    Plain text mail as "Plain Text "(during formatting) Verdana font size 10, sent and received on Windows PC with the correct letter size - but with the font changed to Century Gothic!!!
    2. Sending from my Mac plain mail "formatted text" (during formatting):
    Eg. with my signature/signature-colored types and Verdana as font and size 10, possibly with underlining and italics in the text dispatched - the mail received as text with New Times Roman size 12 and signing /signature color Verdana now in size 13.5!!!!
    3. Sending plain mail "as normal text "(during formatting)
    In the mail text underlined and made bold - the program asks whether to convert to RTF format (to keep underlining, bold, etc.) and Verdana as font and size 10, YES - this mail is received on the Windows PC as text with New Times Roman with the desired underlining and bold text and size 12!!!!
    4. Plain text mail as "formatted Text"
    Eg. with signature / signature-colored types and Verdana as font and size 10, possibly with underlining and italics in the text sent - received as text with New Times Roman and signing / signature as colored Verdana now in size 13.5!!!
    5. Sending mail with file attached:
    After producing a normal text document modified to PDF and directly from the Adobe Reader sent this PDF file in e-mail formatted as normal text with font Verdana 10 point, with signature. This is received on the Windows PC with a PDF file OK, but the font of the mail text is changed to Century Gothic and missing signature. Signature is available as an attachment on the Windows Outlook e-mail program as a ATT00113.text file. This can be opened and there is the missing signature!
    6. Sending e-mail with photos directly from iPhoto
    iPhoto opens and click on the desired photos eg. 5 pcs. (Exactly as mentioned in the demo video!) and click on the e-mail icon at iPhoto and the program opens and e-mail that is opened with the attached photos and rich text is being used in the mail. Signature disappears and must be clicked on the mail by the sender.
    The mail is received with the attached pictures OK - text changed to Times Roman with the desired bold - though no signature and 5 pcs. Att0028.html files attached. These can be opened and contains the file number each picture!
    The above problems can be partly avoided by the following:
    1. Only send mails as plain text
    Without any underlining, attachments, etc.. When the Windows PC Outlook receiver opens the mail where only the text fond is changed!!
    2. Sending mail with attached file
    Start opening the mail program and use formatted plain text first and then attach (with the staple) file, and the Window receiver will get the file, but text and signature changed to Times New Roman size 13!!
    3. Sending mail with photos from iPhoto
    Start by opening mail program text in Verdana 10 and click the Photo Browser and find (look for - takes its time!) the pictures you want to send and pull/drag them into the mail and send, - images, text and signature are in the mail on Windows PC - but with the font changed to Century Gothic!!!
    If sent as formatted text with various underlining, italics, etc. together with the photos will be received OK - but the writing is now New Times Roman size 12 signatures Verdana now in size 13!!!
    I must say – I am disappointed with the Mac mail program – it actually means that sending a perfect mail with underlining, colours, a.s.o. also photos directly from iPhoto – will received at a Windows computer in a totally mess.
    Looking forward to some good news from either Mac supporter or some clever Mac users who can help me to adjust my Mac to avoid these problems IF POSSIBLE!!!!.
    Apple/Mac is too good a product to make these problems!!
    Best regards
    Peter Larsen
    <Edited by Host>

    Welcome to Apple Discussions!
    The PC sets the font on its side, the Mac does on its side for plain text. There is no "font size" in plain text coding. Rich Text gives you a bit more control, but only if both e-mail clients support it. HTML gives you a bit more control, but only if both e-mail clients support it. Use the asterisk, parenthesis, underscore, or any keyboard symbol that is part of the original ASCII. Otherwise, the chance is nobody else will be able to read it who does not have your e-mail client in the same version.
    Sadly there are no e-mail standards except MIME for attachment, and even that isn't universally supported. E-mail is not the ideal medium for anything except plain text that is ASCII. To learn more about ASCII, see:
    http://en.wikipedia.org/wiki/ASCII
    If you want to post a website that is universally understood, see the hints here:
    http://www.anybrowser.org/

  • ICloud won't download whole msg to Windows Live Mail 2011 program if pdf attached

    I just posted a message about this but think I posted it in the wrong section, so, am posting again here. Has anyone had this problem? The email arrives in Windows Live Mail 2011 program with the pdf attached but what the sender typed to me in the email is missing.
    This email was generated originally by a mac user who sent it to another mac user with a pdf attached. The second mac user sent it to me  after typing a couple of words asking me to do something with the pdf. I never saw what he typed in - it was hidden. If I clicked Forwardd, then the draft of the forward showed some of his message to me but it was in weird format (lines broken in half, letters missing).  If I clicked Reply, I could not type into the reply.
    I checked iCloud mail. The message was there in the iCloud incoming mail folder, intact, everything visible. So the problem occurs when the IMAP server goes to send the mail on to my computer's email program.  Junk filters are turned off both on the IMAP server and in my email program so that is not part of the problem.
    One thing that occurred to me is that Windows Live Mail 2011 is receiving the email with pdf attached as though the text in the email were a photo or image.
    Has anyone encountered this? Can anyone guess what is wrong? Does anyone know how to fix it?
    I am using an HP Pavilion Laptop with Windows 7 home premium 64 bit.
    Kelliann

    Does the ext directory have the php_oci8.dll? In the original steps the PHP dir is renamed. In the given php.in the extension_dir looks like it has been updated correctly. Since PHP distributes php_oci8.dll by default I reckon there would be a very good chance that the problem was somewhere else. Since this is an old thread I don't think we'll get much value from speculation.
    -- cj

  • How do I put a recent photo on my Apple Mail email program?

    I am using OS 10.3.9
    This question is for Apple MAIL email program and the emails that I send from my Desktop, not from the .Mac site.
    Several years ago I did what was necessary to have my photo put automatically on each outgoing email that I send. (I realize that not everyone can see that photo; that is not the problem.)
    PROBLEM: I now have more recent photos and would like to take off the old photo and replace it with a more recent photo but I forgot the procedure for doing this and can find it nowhere!
    Please, can someone write down the steps that I must go through to take off the old photo and replace it with a new photo?
    Lorna

    Dear Mulder — I went to the Help and found the following instructions:
    "If someone using a .Mac mail account sets up his or her account to share pictures, when you view a message from that person in Mail you'll see the shared picture. The picture is not sent in the message itself; instead, when you view the message, Mail looks for the picture on the .Mac server. You can only view shared pictures from a .Mac account using Mail and webmail.mac.com."
    However: Although I belong to .Mac and do have a .Mac email address, I rarely use webmail.mac.com. Any mail that goes there (almost nothing at all) gets forwarded to my Desktop email account. I use the Apple Mail program on my Desktop, not at the website. Would the the picture be visible then? If I send an email to myself I do see the photo... but am I the only one seeing it?
    -Lorna

  • I am unable to send the mail thru my GMAIL account.

    i am unable to send the mail thru my GMAIL account
    below error msg is diplyed
    This message could not be sent. It will remain in your Outbox until it can be sent.  This message could not be sent because your account does not have a prefer

    Hey there meera singh,
    I would suggest that you attempt the troubleshooting steps found in the following article to help you address this issue:
    OS X Mail: Troubleshooting sending and receiving email messages
    http://support.apple.com/kb/TS3276
    Thanks for being a part of the Apple Support Communities!
    Cheers,
    Braden

  • After updating to mountain lion, my Safari e-mail thru AT

    After updating to mountain lion, my Safari e-mail thru AT&T, doesn't show the select all button at the top of the e-mail list, it is there in Chrome and Firefox. Is this a problem with AT&T's site or are others experiencing this same problem. Also my contacts list has change it's look and you can't select multiple contacts.

    Hmmmm,
    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    0   com.apple.phonenumbers   
    0x00007fff8e0300cb 0x7fff8e02e000 + 8395
    1   com.apple.phonenumbers   
    0x00007fff8e02f50b 0x7fff8e02e000 + 5387
    2   com.apple.phonenumbers   
    0x00007fff8e02f87d PNIsValidPhoneNumberForCountry + 112
    Any ideas on your end on this phone number for Country???

  • What's the problem of this mail sending program

    Hi,
    I have Written following code. I have wriiten & run this code in Eclipse. Mail.jar & Activation.jar both jar file i kept in the webcontent/web-inf/lib
    directory. & I also added this jar file using builpath->add External Library. But when run this code then it throws the following exception. What's the problem of code? IS there anybody can help me? Please help me.
    My code is : UserMail.jsp
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
    <title>Mail Sending Program</title>
    <%@ page import="javax.mail.internet.*"%>
    <%@ page import="javax.mail.*"%>
    <%@ page import="java.util.*"%>
    </head>
    <body>
    <%
    String to = "[email protected]";
    String from = "[email protected]";
    String host = "192.168.1.1";
    String txt = "I am from jsp of java";
    String subject = "For testing";
         Properties props = System.getProperties();
         props.put("mail.smtp.host", host);
         Session session1 = Session.getDefaultInstance(props, null);
         MimeMessage msg = new MimeMessage(session1);
         try{
              InternetAddress to1 = new InternetAddress(to);
        msg.setFrom(new InternetAddress(from));
       msg.addRecipient(Message.RecipientType.TO,to1);
       msg.setSubject(subject);
      msg.setText(txt);
          msg.setSentDate(new Date());
        Transport.send(msg);
         catch(Exception e){
              e.printStackTrace();
    %>
    </body>
    </html>Exception is:
    javax.mail.MessagingException: Could not connect to SMTP host: 192.168.1.1, port: 25;
      nested exception is:
         java.net.SocketException: Software caused connection abort: connect
         at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1282)
         at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
         at javax.mail.Service.connect(Service.java:275)
         at javax.mail.Service.connect(Service.java:156)
         at javax.mail.Service.connect(Service.java:105)
         at javax.mail.Transport.send0(Transport.java:168)
         at javax.mail.Transport.send(Transport.java:98)
         at org.apache.jsp.UserMail_jsp._jspService(UserMail_jsp.java:73)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.net.SocketException: Software caused connection abort: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.SocksSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232)
         at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
         at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1250)
         ... 27 moreWith regards
    Bina

    javax.mail.MessagingException: Could not connect to SMTP host: 192.168.1.1Is this host Ip correct. If Ip is correct then this host should be a mail exchange server. Hope u did not use Ip address of ur machine ;-)
    By the way hope u recd the test mail during my testing....lol
    Regards
    Rohit

  • Can't send any mailcan't send mail thru

    Using 10.4.11
    called my isp, that didn't help. with my isp account i got this message"5.1.0 Authentication required"
    can't send mail thru any of my domains eithers

    Who is your ISP, and who are your email providers? What are the specific settings for the Incoming and Outgoing mail servers, including account type (POP or IMAP), port numbers, authentication method, and whether or not SSL is enabled for either? More details.
    Mulder

  • I am not getting my iCloud or other mail thru...I had an update last week and it quit also.  I simply turned mail off and on and it solved the problem.  Now simply nothing is coming thru....I think I've tried everything....can anyone give me suggestions

    I am not getting my iCloud or other mail thru...I had an update last week and it quit also.  I simply turned mail off and on and it solved the problem.  Now simply nothing is coming thru....I think I've tried everything....can anyone give me suggestions

    I am not getting my iCloud or other mail thru...I had an update last week and it quit also.  I simply turned mail off and on and it solved the problem.  Now simply nothing is coming thru....I think I've tried everything....can anyone give me suggestions

  • Keep getting a mail pop up "enter password for account "SBC." ATT says I need to update my Mac mail server program. Anyone know how I can do this?

    I keep getting an annoying pop up for mail "Enter password for account "SBC."  I enter my password but it still pops up. But I can still get my mail when I click on "Get mail."  I called ATT and they said they are aware of the problem with Mac users and that I have to update my Mac Mail server program. Anyone know how I can do this? They want to charge me.

    RE: "Mail, Contacts and Calendars preferences can't connect to the Yahoo account "bellsouth.net".
    I recently changed my ATT U-Verse password…and Mail quit working… it wouldn't send or receive, Safari worked fine.  I tried to send an email and a warning message popped up, "Mail, Contacts and Calendars preferences can't connect to the Yahoo account "bellsouth.net". In smaller type the next sentence read, "Enter the password for user [email protected]". The Password box was highlighted in blue so I just typed in my new password and my email message was immediately sent…but… I still couldn't receive messages AND the above "can't connect" warning message kept popping up on the screen at random.
    Here's the Fix that worked for me. (The problem is that the new password was changed/updated on the keychains "smpt.att.yahoo.com" name-but- the name "pop.att.yahoo.com" didn't update to my new password).
    Go to your Utility windows and select Keychain Access. Under Category select Passwords. Now check your password for your current (newest dated) name, "smpt.att.yahoo.com". Now check the password under, "pop.att.yahoo.com". Mine wasn't the same as my newest password found in my
    "smpt.att.yahoo.com" window so I deleted my old password in the "pop.att.yahoo.com" window and typed in my new password, then selected "Save Changes". MY MAIL NOW WORKED…and no more warning messages cropped up. Problem was fixed.

  • How can i refresh the mail, to see the latest email received from my hotmail account. If i close Mail, the program, and re-open, then I can see the latest mail received. Is there a key combo-short-cut to do this.

    how can i refresh the mail, to see the latest email received from my hotmail account. If i close Mail, the program, and re-open, then I can see the latest mail received. Is there a key combo-short-cut to do this.

    isaackito wrote:
    how can i refresh the mail, to see the latest email received from my hotmail account. If i close Mail, the program, and re-open, then I can see the latest mail received. Is there a key combo-short-cut to do this.
    Mailbox menu>Get New Mail:

  • Update the data into the ZTABLE fields thru program logic ..?

    hi all,
    i have ZTABLE1,ZTABLE2,ZTABLE3, and this tables like ALV grids using object methods.
    in the same table fields now i wanted to update the data into the ZTABLE fields thru program logic .
    could anyone please help me ....
    please provide if anyone of have any program logic that would be helpfull to me.
    thanks in advance...
    srinivas....

    Hi Srinivas,
      The following statements are used to upload the data into custom tables.
    1. Modify
    2. Update
    3. Insert
    if you are using OO ALV, you should enable the 'SAVE' button in the main toolbar. if the user press the save button, then you should upload the data to the custom table.
    please find the example code, in this example 'PERFORM F_SAVE_DATA'(here i gave the message only, you write your own logic here) is used to save the data in custom table.
    Report Program: ZB_ALVOOPS_TEST
    Line:-----
    REPORT  ZB_ALVOOPS_TEST MESSAGE-ID ZCR_MESSAGES.
    Top Include - Global Data Declaration                        *
    INCLUDE ZB_ALVOOPS_TEST_TOP.
    SEL Include - Selection Screen                               *
    INCLUDE ZB_ALVOOPS_TEST_SEL.
    AT SELECTION SCREEN                                          *
    Initialization Event                                         *
    INITIALIZATION.
    Initialize Screen Number.
      PERFORM F_INITIALIZE.
    Initialize Field Catalog for ALV Grid.
      PERFORM F_INITIALIZE_GRID.
    END-OF-SELECTION.
    Call Display Screen                                          *
      CALL SCREEN 9000.
    Event Handler - Class Definition and Implementation          *
      INCLUDE ZB_ALVOOPS_TEST_CL01.
    PBO Event - Module Implementation                            *
      INCLUDE ZB_ALVOOPS_TEST_PBO.
    PAI Event - Module Implementation                            *
      INCLUDE ZB_ALVOOPS_TEST_PAI.
    Subroutine Include                                           *
      INCLUDE ZB_ALVOOPS_TEST_F01.
    Include: ZB_ALVOOPS_TEST_TOP
    Line:-------
    Type Declaration For Internal Tables                         *
    Collection Data
    TYPES: BEGIN OF TY_MARA                                                    ,
             MATNR         TYPE  MATNR                                         ,  "  Material
             VPSTA         TYPE  VPSTA                                         ,  "  Maintenance status of complete material
             MTART         TYPE  MTART                                         ,  "  Material Type
             MBRSH         TYPE  MBRSH                                         ,  "  Industry Sector
             MATKL         TYPE  MATKL                                         ,  "  Material Group
             BISMT         TYPE  BISMT                                         ,  "  Old material number
             MEINS         TYPE  MEINS                                         ,  "  Base Unit of Measure
             BSTME         TYPE  BSTME                                         ,  "  Order unit
             BRGEW         TYPE  BRGEW                                         ,  "  Gross weight
             MAKTX         TYPE  MAKTX                                         ,  "  Material Description
             ROWCOLOR      TYPE  CHAR4                                         ,  "  Row Color
           END OF TY_MARA                                                      .
    Flag                                                         *
    DATA: FG_REFRESH  TYPE  XFLD                                               ,  "  Used to Refresh ALV
          FG_SAVE     TYPE  XFLD                                               .  "  Data Saved Or Not.
    Internal Table Declaration                                   *
    DATA: IT_MARA              TYPE  STANDARD TABLE OF TY_MARA                 ,  "  Internal table for Material
          WA_MARA              TYPE  TY_MARA                                   .  "  Workarea for Material
    Variable Declaration For General Constants                   *
    CONSTANTS: C_SCREEN_SELECT      TYPE  SYDYNNR         VALUE '9001'         ,  "  Selection Screen Number
               C_SCREEN_SELECT_NIL  TYPE  SYDYNNR         VALUE '9002'         ,  "  Empty Screen Number
               C_STATUS9000         TYPE  CHAR10          VALUE 'STATUS9000'   ,  "  PF-Status
               C_TITLEBAR           TYPE  CHAR4           VALUE '9000'         ,  "  Title Bar
               C_ISSUE_CONTAINER    TYPE  SCRFNAME        VALUE 'WORKCONTAINER',  "  Container Name (Screen Painter)
               C_BUTTON_TYPE        TYPE  CHAR1           VALUE '3'            ,  "  Button Type
               C_EXECUTE            TYPE  CHAR4           VALUE 'SELE'         ,  "  Functions 'SELE'    -> Execute
               C_BACK               TYPE  CHAR4           VALUE 'BACK'         ,  "  Functions 'BACK'    -> Back to main screen
               C_ENTER              TYPE  CHAR5           VALUE 'ENTER'        ,  "  Functions 'ENTER'   -> No Action
               C_SEL01              TYPE  CHAR5           VALUE 'SEL01'        ,  "  Functions 'SEL01'   -> Toggle Function
               C_SAVE               TYPE  CHAR4           VALUE 'SAVE'         ,  "  Functions 'SAVE'    -> Save Function
               C_REFRESH            TYPE  CHAR7           VALUE 'REFRESH'      ,  "  Functions 'REFRESH' -> Clear and Fres All objects
               C_ADD_MI             TYPE  CHAR6           VALUE 'ADD_MI'       ,  "  Functions 'ADD_MI'  -> Add New Media Issue
               C_TRUE               TYPE  CHAR1           VALUE 'X'            ,  "  Set X value
               C_REQUIRED           TYPE  CHAR1           VALUE '1'            ,  "  Un-Confirmed Qty field obligatory or not.
               C_INPUT              TYPE  CHAR1           VALUE '0'            ,  "  Reason field should not be input.
               C_ALV_SAVE           TYPE  CHAR1           VALUE 'A'            ,  "  ALV
               C_ERROR              TYPE  CHAR1           VALUE 'E'            ,  "  Error Type
               C_SIGN               TYPE  CHAR1           VALUE 'I'            ,  "  Sign
               C_OPTION             TYPE  CHAR2           VALUE 'EQ'           ,  "  Option.
               C_COMMIT_WAIT        TYPE  CHAR1           VALUE '5'            ,  "  Waiting to update in DB
               C_TABNAME            TYPE  CHAR1           VALUE '1'            ,  "  Parameter (ALV)
               C_CANCEL             TYPE  CHAR1           VALUE 'N'            ,  "  Cancel
               C_YES                TYPE  CHAR1           VALUE 'J'            .  "  Yes.
    Variable Declaration For Container and ALV Grid              *
    DATA: OBJ_CUST_CONTAINER  TYPE  REF TO  CL_GUI_CUSTOM_CONTAINER            ,  "  Container Class
          OBJ_CUST_GRID       TYPE  REF TO  CL_GUI_ALV_GRID                    .  "  ALV  Grid Class
    Field Catalog Declaration For Container and ALV Grid         *
    DATA: IT_FIELDCAT  TYPE  LVC_T_FCAT                                        ,  "  Field Catalog
          IT_EXCLUDE   TYPE  UI_FUNCTIONS                                      ,  "  Standard Function Exclude from ALV
          WA_FIELDCAT  TYPE  LVC_S_FCAT                                        ,  "  For Field Catalog
          WA_LAYOUT    TYPE  LVC_S_LAYO                                        .  "  ALV Layout
    Global Variable Declaration                                  *
    DATA: OK_CODE                  TYPE  SY-UCOMM                              ,  "  OK CODE ( Screen Attribute Don't Change the var.name)
          G_SAVE_CODE              TYPE  SY-UCOMM                              ,  "  OK CODE
          G_ANSWER                 TYPE  CHAR1                                 ,  "  OK or Cancel.
          G_SELECTION_DYNNR        TYPE  SYDYNNR                               ,  "  Screen Number
          G_ERROR_TEXT             TYPE  CHAR128                               ,  "  Error Text
          G_SELECTION_TOGGLE_TEXT  TYPE  CHAR50                                ,  "  Toggle Text, Value: Hide Selection, Show Selection
          G_MATNR                  TYPE  MATNR                                 ,  "  Material
          G_SMATNR                 TYPE  MATNR                                 ,  "  Material
          G_SMTART                 TYPE  MTART                                 .  "  Material Type
    Include: ZB_ALVOOPS_TEST_SEL
    Line:-------
    Selection Screen
    SELECTION-SCREEN BEGIN OF SCREEN 9001 AS SUBSCREEN                           .
    SELECTION-SCREEN BEGIN OF BLOCK SELECTION WITH FRAME TITLE TEXT-001          .
    SELECT-OPTIONS: S_MATNR  FOR G_SMATNR                                        ,  "  Material
                    S_MTART  FOR G_SMTART                                        .  "  Material Type
    SELECTION-SCREEN   END OF BLOCK SELECTION                                    .
    SELECTION-SCREEN   END OF SCREEN 9001                                        .
    Empty Selection
    SELECTION-SCREEN BEGIN OF SCREEN 9002 AS SUBSCREEN                           .
    SELECTION-SCREEN BEGIN OF BLOCK SELECTION_NIL WITH FRAME TITLE TEXT-002      .
    Nil
    SELECTION-SCREEN   END OF BLOCK SELECTION_NIL                                .
    SELECTION-SCREEN   END OF SCREEN 9002                                        .
    Include: ZB_ALVOOPS_TEST_CL01
    Line:-------
    CLASS lcl_event_handler DEFINITION                                  *
    Event Handler Class Definition                                      *
    CLASS LCL_EVENT_HANDLER DEFINITION.
      PUBLIC SECTION.
        METHODS:
        HANDLER_TOOLBAR      FOR EVENT TOOLBAR OF CL_GUI_ALV_GRID
                                 IMPORTING  E_OBJECT E_INTERACTIVE     ,
        HANDLER_USER_COMMAND FOR EVENT USER_COMMAND OF CL_GUI_ALV_GRID
                                 IMPORTING E_UCOMM                     .
    ENDCLASS.                    "lcl_event_handler DEFINITION
    CLASS lcl_event_handler IMPLEMENTATION                              *
    Event Class Implementation.                                         *
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
    Toolbar -----Create 'Add Issue' button
      METHOD HANDLER_TOOLBAR.
        DATA:  L_WA_TOOLBAR  TYPE  STB_BUTTON.                                          "  Toolbar
        CLEAR: L_WA_TOOLBAR.
    Button Type
        L_WA_TOOLBAR-BUTN_TYPE  =  C_BUTTON_TYPE   .            "  3.
        APPEND L_WA_TOOLBAR TO E_OBJECT->MT_TOOLBAR.
    Add Issue Button.
        CLEAR: L_WA_TOOLBAR.
        L_WA_TOOLBAR-FUNCTION   =  'ADD_MI'   .                                         "  'ADD_MI'   .
        L_WA_TOOLBAR-ICON       =  'ICON_CREATE'.
        L_WA_TOOLBAR-QUICKINFO  =  'CREATE'   .                                         "  'Add Issue'.
        L_WA_TOOLBAR-TEXT       =  'CREATE'   .                                         "  'Add Issue'.
        L_WA_TOOLBAR-DISABLED   =  ''.
        APPEND L_WA_TOOLBAR TO E_OBJECT->MT_TOOLBAR.
        CLEAR: L_WA_TOOLBAR.
      ENDMETHOD.                    "handler_toolbar
    User Actions Events-- Handle 'Add Issue' Button Click.
      METHOD HANDLER_USER_COMMAND.
        CASE E_UCOMM.
    Add Issue Button.
          WHEN C_ADD_MI.
            IF NOT G_MATNR IS INITIAL.
              FG_REFRESH  =  C_TRUE.
              PERFORM F_ADD_MEDIAISSUE.
            ENDIF.
        ENDCASE.
    Refresh Control
        CALL METHOD CL_GUI_CFW=>FLUSH
          EXCEPTIONS
            CNTL_SYSTEM_ERROR = 1
            CNTL_ERROR        = 2
            OTHERS            = 3.
    Handle Exceptions
        IF SY-SUBRC <> 0.
          CASE SY-SUBRC.
            WHEN 1.
              G_ERROR_TEXT = TEXT-026.                                        "  'Control System Error'.
            WHEN 2.
              G_ERROR_TEXT = TEXT-027.                                        "  'Control CL_GUI_CFW Has Raised Error'.
          ENDCASE.
            MESSAGE G_ERROR_TEXT TYPE 'E'.
        ENDIF.
    Refresh Alv Grid.
        PERFORM F_REFRESH_GRID.
      ENDMETHOD.                    "handler_user_command
    ENDCLASS.                    "lcl_event_handler IMPLEMENTATION
    Object Ref. Event Class.
    DATA: OBJ_EVENT_HANDLER TYPE REF TO LCL_EVENT_HANDLER.
    Include: ZB_ALVOOPS_TEST_PBO
    Line:----
    Module  STATUS_9000  OUTPUT                                        *
    Set PF-Status                                                      *
    MODULE STATUS_9000 OUTPUT.
    PF Status
      SET PF-STATUS C_STATUS9000  .
      SET TITLEBAR  C_TITLEBAR    .
    ENDMODULE.                 " STATUS_9000  OUTPUT
    Module  Create_Alvgrid  OUTPUT                                     *
    Create Or Refresh ALV Grid                                         *
    MODULE CREATE_ALVGRID OUTPUT.
      PERFORM F_PROCESS_ALV .
      PERFORM F_REFRESH_GRID.
    ENDMODULE.                 " create_alvgrid  OUTPUT
    Include: ZB_ALVOOPS_TEST_PAI
    Line:----
    Module  exit_command  INPUT                                        *
    Exit Command ( Cancel and Exit )                                   *
    MODULE EXIT_COMMAND INPUT.
      LEAVE PROGRAM.
    ENDMODULE.                 " exit_command  INPUT
    Module  user_command_9000  INPUT                                   *
    User Command - Process toolbar Events                              *
    MODULE USER_COMMAND_9000 INPUT.
    Take an Action based on user Input
      G_SAVE_CODE = OK_CODE.
      CLEAR OK_CODE.
      CASE G_SAVE_CODE.
    Back
        WHEN C_BACK .
    Raise the Confirmation Message When User not saved the data.
          IF FG_SAVE = C_YES.
            PERFORM F_EXITCHECK CHANGING G_ANSWER .
            IF G_ANSWER = C_YES.
              PERFORM F_SAVE_DATA.
            ELSE.
              CLEAR G_SAVE_CODE.
            ENDIF.
            CLEAR: FG_SAVE.
          ENDIF.
          LEAVE PROGRAM.
    Enter
        WHEN C_ENTER.
    Execute ( F8 )
        WHEN C_EXECUTE .
          IF IT_MARA IS INITIAL.
            PERFORM F_SELECTMATERIAL.
          ENDIF.
    Toggle Button
        WHEN C_SEL01.
          PERFORM F_TOGGLE_SELECTION_SCREEN.                                  " USING ok_code.
    SAVE  ( CTRL+S )
        WHEN C_SAVE.
          IF NOT G_MATNR IS INITIAL.
            PERFORM F_SAVE_DATA.
            CLEAR: G_MATNR.
          ENDIF.
    New Entry ( CTRL+F1 )
        WHEN C_REFRESH.
          PERFORM F_REFRESH_DATA.
      ENDCASE.
    ENDMODULE.                 " user_command_9000  INPUT
    Include: ZB_ALVOOPS_TEST_F01
    Line:----
    Form  f_toggle_selection_screen                                    *
    Toggle Function - Hide Selection / Show Selection                  *
    FORM F_TOGGLE_SELECTION_SCREEN.
    Toggle Function
      IF G_SELECTION_DYNNR = C_SCREEN_SELECT.
        G_SELECTION_DYNNR = C_SCREEN_SELECT_NIL.
        G_SELECTION_TOGGLE_TEXT = TEXT-902.
      ELSE.
        G_SELECTION_DYNNR = C_SCREEN_SELECT.
        G_SELECTION_TOGGLE_TEXT = TEXT-901.
      ENDIF.
    ENDFORM.                    " f_toggle_selection_screen
    Form  f_initialize
    Initialize Screen Number and Text
    FORM F_INITIALIZE .
    Initialize Screen Number
      G_SELECTION_DYNNR      = C_SCREEN_SELECT.
      G_SELECTION_TOGGLE_TEXT = TEXT-901.
    ENDFORM.                    "f_initialize
    Form  f_selectmaterial                                           *
    FORM F_SELECTMATERIAL .
    Select the data from Mara Table
      SELECT A~MATNR
             A~VPSTA
             A~MTART
             A~MBRSH
             A~MATKL
             A~BISMT
             A~MEINS
             A~BSTME
             A~BRGEW
             B~MAKTX
        INTO TABLE IT_MARA
        FROM MARA AS A INNER JOIN MAKT AS B ON AMATNR = BMATNR
       WHERE A~MATNR IN S_MATNR
         AND A~MTART IN S_MTART
         AND B~SPRAS = 'EN'.
      IF SY-SUBRC = 0.
        FG_REFRESH  =  C_TRUE.
        FG_SAVE     =  C_YES .
        G_MATNR     =  C_TRUE.
        LOOP AT IT_MARA INTO WA_MARA WHERE BRGEW >= 200.
          WA_MARA-ROWCOLOR  =  'C310'.
          MODIFY IT_MARA FROM WA_MARA.
        ENDLOOP.
      ELSE.
        MESSAGE 'No data Found' TYPE 'E'.
      ENDIF.
    ENDFORM.                    " f_selectmaterial
    Form  f_initialize_grid                                            *
    Initialize Field Catalog.                                          *
    FORM F_INITIALIZE_GRID .
      field catalog
      PERFORM F_ATTRFCAT USING :
                       'MATNR'  '1' '0'   TEXT-005       '15' '0' 'X' ' ' ' ',
                       'VPSTA'  '1' '1'   TEXT-006       '15' '0' 'X' ' ' ' ',
                       'MTART'  '1' '2'   TEXT-007       '15' '0' ' ' ' ' ' ',
                       'MBRSH'  '1' '3'   TEXT-008       '15' '0' ' ' ' ' ' ',
                       'MATKL'  '1' '4'   TEXT-009       '15' '0' ' ' 'X' ' ',
                       'BISMT'  '1' '5'   TEXT-010       '15' '0' ' ' ' ' ' ',
                       'MEINS'  '1' '6'   TEXT-011       '15' '0' ' ' ' ' ' ',
                       'BSTME'  '1' '7'   TEXT-012       '15' '0' ' ' ' ' ' ',
                       'MAKTX'  '1' '8'   TEXT-013       '15' '0' ' ' ' ' 'C711',
                       'BRGEW'  '1' '9'   TEXT-014       '15' '0' ' ' ' ' ' '.
    Set Editable Fields in ALV.
      PERFORM F_SETEDIT_FIELDS CHANGING IT_FIELDCAT.
    ENDFORM.                    "f_initialize_grid
    Form  f_setedit_fields                                             *
    Set Editable Fields in ALV                                         *
    C_IT_FIELDCAT  <--  Field Catalog                                  *
    FORM F_SETEDIT_FIELDS  CHANGING C_IT_FIELDCAT TYPE LVC_T_FCAT.
    Local Variable Declaration.
      DATA: LS_FIELDCAT LIKE LINE OF C_IT_FIELDCAT.                           "  Field Catalog
    Create Editable Fields.
      LOOP AT C_IT_FIELDCAT INTO LS_FIELDCAT.
        CASE LS_FIELDCAT-FIELDNAME.
          WHEN 'BRGEW'.
            LS_FIELDCAT-EDIT = C_TRUE.
          WHEN 'MAKTX'.
            LS_FIELDCAT-EDIT = C_TRUE.
        ENDCASE.
        MODIFY C_IT_FIELDCAT FROM LS_FIELDCAT.
      ENDLOOP.
    ENDFORM.                    " f_setedit_fields
    Form  f_attrfcat                                                   *
    Update Field Catalog Internal Table                                *
    U_FIELDNAME     -->  Field Name                                    *
    U_ROW_POS       -->  Row Position                                  *
    U_COL_POS       -->  Column Position                               *
    U_SELTEXT_L     -->  Display Column Heading                        *
    U_OUTPUTLEN     -->  Heading Output Length                         *
    U_DECIMALS_OUT  -->  Number of decimal places in output            *
    U_KEY           -->  Key in ALV Display                            *
    U_FIX           -->  Existence of fixed values                     *
    FORM F_ATTRFCAT USING
                        U_FIELDNAME    TYPE  SLIS_FIELDNAME
                        U_ROW_POS      TYPE  SYCUROW
                        U_COL_POS      TYPE  SYCUCOL
                        U_SELTEXT_L    TYPE  SCRTEXT_L
                        U_OUTPUTLEN    TYPE  OUTPUTLEN
                        U_DECIMALS_OUT TYPE  CHAR1
                        U_KEY          TYPE  CHAR1
                        U_FIX          TYPE  VALEXI
                        U_COL_COLOR    TYPE  LVC_EMPHSZ.
    Update field catalog.
      WA_FIELDCAT-FIELDNAME    = U_FIELDNAME.
      WA_FIELDCAT-ROW_POS      = U_ROW_POS.
      WA_FIELDCAT-COL_POS      = U_COL_POS.
      WA_FIELDCAT-COLTEXT      = U_SELTEXT_L.
      WA_FIELDCAT-SELTEXT      = U_SELTEXT_L.
      WA_FIELDCAT-OUTPUTLEN    = U_OUTPUTLEN.
      WA_FIELDCAT-DECIMALS_O   = U_DECIMALS_OUT.
      WA_FIELDCAT-KEY          = U_KEY.
      WA_FIELDCAT-VALEXI       = U_FIX.
      WA_FIELDCAT-EMPHASIZE    = U_COL_COLOR.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    "ATTR_FCAT
    Form  f_refresh_data                                               *
    Clear All the objects used in the program ( Data Related )         *
    FORM F_REFRESH_DATA .
    Clear All the Objects Used in Our Program.
      CLEAR: S_MATNR      ,
             S_MTART      ,
             IT_MARA      ,
             OK_CODE      ,
             FG_REFRESH   ,
             FG_SAVE      ,
             G_SAVE_CODE  ,
             G_MATNR      .
      FREE:  S_MATNR      ,
             S_MTART      ,
             IT_MARA      ,
             OK_CODE      ,
             FG_REFRESH   ,
             FG_SAVE      ,
             G_SAVE_CODE  ,
             G_MATNR      .
    Refresh Alv.
      FG_REFRESH  =  C_TRUE.
    ENDFORM.                    " f_refresh_data
    Form  f_process_alv                                                *
    1. Create Custom Container                                         *
    2. Create ALV Grid                                                 *
    3. Exclude Standard Functions                                      *
    4. Display the ALV                                                 *
    5. Register the Events.                                            *
    FORM F_PROCESS_ALV .
    Display ALV
    Custom Container
      IF OBJ_CUST_CONTAINER IS INITIAL.
        CREATE OBJECT OBJ_CUST_CONTAINER
          EXPORTING
            CONTAINER_NAME = C_ISSUE_CONTAINER.
    ALV Grid
        IF OBJ_CUST_GRID IS INITIAL.
          CREATE OBJECT OBJ_CUST_GRID
            EXPORTING
              I_PARENT = OBJ_CUST_CONTAINER.
        ENDIF.
    Exclude Standard Functions
        PERFORM F_EXCLUDETOOLBAR USING OBJ_CUST_GRID
                              CHANGING IT_EXCLUDE.
    Layout.
        WA_LAYOUT-CWIDTH_OPT  =  C_TRUE.
        WA_LAYOUT-INFO_FNAME  =  'ROWCOLOR'.
    ALV Grid Display
        CALL METHOD OBJ_CUST_GRID->SET_TABLE_FOR_FIRST_DISPLAY
          EXPORTING
           IS_LAYOUT            = WA_LAYOUT
            IT_TOOLBAR_EXCLUDING = IT_EXCLUDE
            I_SAVE               = C_ALV_SAVE
          CHANGING
            IT_FIELDCATALOG      = IT_FIELDCAT[]
            IT_OUTTAB            = IT_MARA.
      ENDIF.
    Register Editable ALV Events
      CALL METHOD OBJ_CUST_GRID->REGISTER_EDIT_EVENT
        EXPORTING
          I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED
        EXCEPTIONS
          ERROR      = 1
          OTHERS     = 2.
    *Create Object for Custom Event Handler Class if the ref. object is
    *initial.
      IF OBJ_EVENT_HANDLER IS INITIAL.
        CREATE OBJECT OBJ_EVENT_HANDLER.
      ENDIF.
    Register Events
      SET HANDLER: OBJ_EVENT_HANDLER->HANDLER_TOOLBAR       FOR
      OBJ_CUST_GRID,
                   OBJ_EVENT_HANDLER->HANDLER_USER_COMMAND  FOR
                   OBJ_CUST_GRID.
    Set Toolbar
      CALL METHOD OBJ_CUST_GRID->SET_TOOLBAR_INTERACTIVE.
    ENDFORM.                    " f_process_alv
    Form  f_excludetoolbar                                             *
    Exclude Standard Functions from ALV                                *
    U_OBJ_CUST_GRID  -->  Instant for CL_GUI_ALV_GRID                  *
    C_IT_EXCLUDE     <--  Internal table for Exclude                   *
    FORM F_EXCLUDETOOLBAR  USING  U_OBJ_CUST_GRID  TYPE REF TO CL_GUI_ALV_GRID
                        CHANGING  C_IT_EXCLUDE     TYPE UI_FUNCTIONS.
    Exclude Standard Functions
      CLEAR: C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_CHECK              TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_REFRESH            TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_COPY           TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_COPY_ROW       TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_CUT            TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_DELETE_ROW     TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_APPEND_ROW     TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_INSERT_ROW     TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_MOVE_ROW       TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_PASTE          TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_PASTE_NEW_ROW  TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_UNDO           TO  C_IT_EXCLUDE.
    ENDFORM.                    " f_excludetoolbar
    Form  f_create_returnrequest                                       *
    Create Return Request based on the Work container ( ALV Grid Data) *
    FORM F_CREATE_RETURNREQUEST.
    Message to save
    ENDFORM.                    " f_create_returnrequest
    Form  f_add_mediaissue                                             *
    Create New Media Issue if the user click 'ADD ISSUE' Button.       *
    1. Get the Input From User                                         *
    2. Get Total Delivery and Return Quantity                          *
    3. Append to Final internal table                                  *
    FORM F_ADD_MEDIAISSUE .
    Local Variable Declaration.
      MESSAGE 'Add Button Clicked' TYPE 'I'.
    ENDFORM.                    " f_add_mediaissue
    Form  f_refresh_grid                                               *
    Refresh ALV Grid                                                   *
    FORM F_REFRESH_GRID .
    Refresh ALV Grid.
      IF FG_REFRESH IS NOT INITIAL.
        CALL METHOD OBJ_CUST_GRID->REFRESH_TABLE_DISPLAY.
        CLEAR: FG_REFRESH.
      ENDIF.
    ENDFORM.                    " f_refresh_grid
    Form  f_getcollectissue                                            *
    FORM F_GETCOLLECTISSUE .
    Collection Plan Data
    ENDFORM.                    " f_getcollectissue
    Form  f_perpare_final                                              *
    FORM F_PERPARE_FINAL .
    Perpare Final Internal table
    ENDFORM.                    " f_perpare_final
    Form  f_validate_data                                              *
    FORM F_VALIDATE_DATA.
    Message if any data validation.
    ENDFORM.                    " f_validate_data
    Form  f_modify_final                                               *
    Update Actual Delivery Qty and Return Qty in Final Internal table  *
    Form  f_save_data                                                  *
    Save the Data When User Click 'Save' Button                        *
    FORM F_SAVE_DATA .
    Message
      MESSAGE 'Save Button Clicked' TYPE 'I'.
    ENDFORM.                    "f_save_data
    Form  f_exitcheck                                                  *
    When User Exit from the Transaction then Raise Confirmation message*
    C_ANSWER  <--  OK or Cancel.                                       *
    FORM F_EXITCHECK  CHANGING C_ANSWER TYPE CHAR1.
    Security Check.
      C_ANSWER  =  C_CANCEL.
      CALL FUNCTION 'POPUP_TO_CONFIRM_DATA_LOSS'
        EXPORTING
          TITEL  = TEXT-039
        IMPORTING
          ANSWER = C_ANSWER.
    ENDFORM.                    "f_exitcheck
    Screen Numer : 9000
    Line:------
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_9000.
      CALL SUBSCREEN: SELECTIONSCREEN INCLUDING SY-CPROG G_SELECTION_DYNNR.
      MODULE CREATE_ALVGRID.
    PROCESS AFTER INPUT.
      MODULE EXIT_COMMAND AT EXIT-COMMAND.
      CALL SUBSCREEN: SELECTIONSCREEN.
      MODULE USER_COMMAND_9000.
    pls reward if it is useful

Maybe you are looking for

  • Macbook Pro to HDTV via HDMI no audio with video

    So I plugged in my MBP to my tv via HDMI this weekend and for some reason I was getting no audio when trying to watch a video online. I tried multiple websites to see if that was the issue, but nothing seemed to work. I was using Chrome but didn't tr

  • Outbound Call in Cisco Finesse

    Anybody please help what all configuration to be done in Finesse to do the outbound calls. I am using Cisco UCCX 10.0, in which i have both the option for Cisco CAD and Finesse. When i run a outbound campaign its coming as an incoming call in Finesse

  • How to create a DBA role in weblogic 11g

    Hi, How can I create a role that will have permissions to create, delete, test and configure Data sources and won't be able to do/touch anything else? Thanks, Vitaly

  • No audio with AVCHD.mts in Element 7

    I cannot get audio when importing AVCHD.MTS files into Elements 7. I am running on Windows 7.  From Forum it seems the best fix for this is upgrade to Elements 9.  Can someone gurantee this is the way to go?

  • Mask ink trouble

    when using the mask ink, im wondering how to keep the mask stationary as the sprite moves.. the way i am using it as soon as the sprite with the bitmat mask applyed to it moves the mask moves with it. i need the mask to remain in the same place so th