User level mail filters in MySQL db

Is it possible adding some words to be filtered into MySQL database and let mail server filter mails ?

I too have used the same code but its giving the following error:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Wrapper cannot find servlet class Validation or a class it depends on
     org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
     org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
     org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
     org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
     org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
     java.lang.Thread.run(Unknown Source)
root cause
java.lang.ClassNotFoundException: Validation
     org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
     org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
     org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
     org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
     org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
     org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
     org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
     java.lang.Thread.run(Unknown Source)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.
Apache Tomcat/6.0.18
Please some one help??

Similar Messages

  • Viewing user's mail filters

    Sun Java(tm) System Messaging Server 6.1 HotFix 0.05 (built Oct 21 2004)
    libimta.so 6.1 HotFix 0.05 (built 14:50:54, Oct 21 2004)
    We've been getting more frequent calls about user's not being able to see their personal filters they've set up via Messenger Express - getting error like: "Invalid Format" or "Application Error java.lang.NullPointerException". Then the user cannot edit their filters. If I try to view them via the Directory server (ldapsearch)- it's very difficult to try and see the entire filter, and then try to delete the bad one.
    Has anyone else run across this type of issue and what is the best way (aside from removing all the user's filters) to fix it? Users with many many filters usually complain that they have to go back and re-enter them all.
    Thanks.

    Well, now I have very funny problem.
    Yesterday I've modified the filters through LDAP console (as I can't edit it from within UWC anymore). Before, all unfiltered mails went to the folder which was specified in the last rule. I've added another rule at the very end. Then, I've removed the recently added rule and since then, all of my emails go into inbox and no filters seem to succed.
    I've tested two of the filters with imsimta as you've specified, they're syntactically ok and seem to return correct results on the screen.
    Could you please advice how to debug such situation? What could be the cause?
    I'd expect that if I use imsimta -rewrite debug ... I could see what filter actually matched. But this information is not displayed.
    Many thanks,
    IVan

  • Junk mail filtering only working on internal mail (and only some of them)

    Good morning
    I'm trying to get Junk Mail filtering working properly on my server (currently running 10.5.6). All mail that comes from externally doesn't seem to pass through the spam filter at all. It gets scanned for viruses (in the email header i get "X-Virus-Scanned: amavisd-new at example.co.uk" but no sign of any spam filtering.
    I have previously configured the filtering using the instructions here http://www.netmojo.ca/blog/2009/04/13/spam-proofing-leopard-server/ but i had been searching through the support here and had started following the instructions in the OS X mail manual, creating a junkmail user and forwarding email to it. Whilst doing this i noticed that some emails had started to be tagged as junk using the settings i had set in server admin. These have something like the following in the email header:
    X-Virus-Scanned: amavisd-new at example.co.uk
    X-Spam-Flag: YES
    X-Spam-Score: 3.479
    X-Spam-Level: *
    X-Spam-Status: Yes, score=3.479 tagged_above=2 required=2
    tests=[ALL_TRUSTED=-1.44, AWL=0.286, HTML_MESSAGE=0.001,
    RAZOR2CF_RANGE_51100=0.5, RAZOR2CF_RANGE_E8_51100=1.5,
    RAZOR2_CHECK=0.5, URIBLOBSURBL=2.132]
    However those emails not tagged as spam do not have any such lines. I would have expected to see X-Spam-Flag: NO and the spam score and such. Are these lines hidden if a mail does not trigger the threshold?
    I've had this aparently learning for about a week now and even with the setting set on 1 it's still yet to catch a single piece of junk mail entering into the server.
    I do have emails to quite a few different domains directed to this server so i added the lines suggested here http://discussions.apple.com/thread.jspa?messageID=7034527&#7034527 to /etc/amavisd.conf but to no avail.
    Any suggestions? Any parts of any log files that may be of use? I've been looking at the junk mail log in debug mode in SA and also in terminal but there's so many lines per mail it's difficult to see what's going on. I can't see anything different from one mail to the next...
    Thanks

    I would have expected to see X-Spam-Flag: NO and the spam score and such. Are these lines hidden if a mail does not trigger the threshold.
    You need to edit /etc/amavisd.conf and set:
    $satag_leveldeflt = -999;
    This will make sure all mails get the headers inserted.
    Also make sure that "@bypassspam_checksmaps = (1); " is commented out.
    That said, the Bayesian filter will need to be fed at least 200 HAM and 200 SPAM messages before it kicks in.
    Each time you modify settings in amavisd.conf, you need to restart amavisd by issuing:
    sudo /bin/launchctl unload /System/Library/LaunchDaemons/org.amavis.amavisd.plist
    sudo /bin/launchctl load /System/Library/LaunchDaemons/org.amavis.amavisd.plist
    HTH,
    Alex
    P.S. When you make changes in Postfix' configuration files, simply issue "sudo postfix reload" to make the m stick. No need to stop Postfix (BTW: That article you linked to is full of inaccuracies).

  • Information Regarding Essbase Security Except Filter Level and User Level

    I have an requirement to implement data level security in Essbase. For ex: A user can only see those data which are from Asia region or an user will be able to see those data which are from America.
    Asia and America are defined in my location dimension.
    can any one explain about it without using user Level Security and Filter level security.
    Please tell me how to do it?
    Thanks in advance.

    Sandeep's reference the DBAG and the section on filters is the right direction. The filter is created in EAS.
    Let's use an example.
    You create a METAREAD filter (that is, it filters both data and dimensionality) that gives a user limited access to the Location dimension (I think I have that right), e.g., the British Isles, the UK and Ireland. You can also create a READ filter but it only limits data and, in my opinion at least, causes confusion because users can see metadata (the whole world) but only see data for the British Isles.
    NB -- filters can be assigned to individual usernames or to groups that users are members of. For a POC, I'd keep it simple and just assign it to a username, but it's your choice.
    Assign the filter to the user in Shared Services.
    Try connecting to the database in Excel through the Classic Add-In or SmartView to test what the user sees -- it should be: Total Location, British Isles, the UK, and Ireland. You will see Total Location (top of the dimension) because that's how Essbase navigates down -- it has to have the dimension name to find the limited children. You won't see any data there. But you will see data at the Location members that the METAREAD filter allows.
    That's it -- it's been around since the year dot, and is the way access is restricted. You shouldn't need to reinvent the wheel to get this to work in OBIEE. Essbase should do the work.
    Regards,
    Cameron Lackpour

  • Mail filters and Spam

    Hi,
    I am using the following version with SpamAssassin (SA):
    Sun Java(tm) System Messaging Server 6.2-3.04 (built Jul 15 2005)
    I configured SA so that it inserts a specific string into the subject line saying "SPAM detected". I want to use Mail Filter through the web mail interface such that anybody should be able to dump the messages with "SPAM detected" in the subject line into Trash. However, this does not work as I expected. And all messages with "SPAM detected" in the subject line still end up in Inbox. On the other hand, if I send an email with those specific words in the subject line from outside to my email account on that server, it goes into Trash as per Mail Filter.
    So, my understanding is that Mail filters get executed before SA call-out. First of all, is that assumption correct?
    Secondly, how can I archive such a configuration in which a user can specify its own filters using web mail interface and they get executed after SA check?
    Thirdyly, one of my users wanted to be able to define some sort of whitelists based on actual email address or domain names. She did not want her incoming emails coming from a white listed account or domain to go through SA check. And is there any way of specifying such a white list by herself easily? Or what do you suggest?
    Thanks,
    Rami

    Thanks, mhunter, most helpful.
    The article, for those interested, is about 2/3 the way down this page:
    http://www.timesonline.co.uk/article/0,,2097-2382411.html
    and is entitled "Website that deals with dodgy emails".
    The Bank Safe Online website is at
    http://www.banksafeonline.org.uk
    but, even though obviously UK orientated, it has some good generic advice which would be valid in other countries.
    The email address to which UK victims can forward bank scam/phishing eMails (after they have been identified as spam of course is [email protected]

  • Junk Mail only works after I disable and reenable Junk Mail Filtering

    Since installing Tiger, junk mail filtering does not work automatically. It neither marks incoming messages as junk nor moves them to the Junk folder.
    I am able to get it to work by selecting Preferences > Junk Mail and then unchecking "Enable junk mail filtering" and then checking it. Mail then asks to "Move Junk Messages" and when I respond "Yes" it marks the appropriate messages as Junk and moves them to the Junk folder.
    Unfortunately, it only works for the messages already received. New mail that is "junk" is not marked as such and appears in my inbox and I have to repeat the manual process to get it removed.
    Any suggestions for a more permanent solution?
    17 iMac   Mac OS X (10.4)  

    Will it also forget the "learned" junk mail? (That took years to learn.)
    No.
    The MessageRules.plist file stores all Mail.app rules including the default Junk Mail rules.
    All Junk Mail "learned" settings are stored in the LSMMap2 file also located at the first level within the Mail folder.
    Since the LSMMap2 file can become corrupt as with any other file, this file should be included with a regular backup of the Mail folder and the Mail.app preference file at Home > Library Preferences > com.apple.mail.plist.
    All Mail.app account information is stored in the Mail.app preference file.
    If you experience any problems with the Junk Mail filter, your options are using the Junk Mail reset feature which resets all "learned" settings or replace the existing LSMMap2 file with a copy of a working backup copy with the Mail.app quit before doing so.
    If the Mail.app preference file becomes corrupt (which I've never experienced but others have), when targeting the preference file requires re-entering all email account information. If you have a working backup copy of the com.apple.mail.plist file, you can replace the existing with the Mail.app quit before doing so without having to re-enter all email account information again.
    You need to replace an existing backup copy of the Mail.app preference file only after making any changes to account information or when adding or deleting an account in Mail.
    You may already have a backup strategy but if not, it is very important since it isn't a matter of if but when your hard drive has a partial or complete failure. I learned my lesson the hard way about 5 years ago. Without warning, I experienced a complete hard drive failure. I didn't maintain a backup at the time and none of the existing data was recoverable.

  • Junk Mail Filtering wont launch - displays Unknown

    As of yesterday junk mail filtering will not launch when the mail service is running. On the Overview window it displays:
    Mail Service : Running
    Outgoing SMTP : Running
    etc
    Junk Mail Filtering : Unknown
    This is Leopard Server 10.5.7 running on an Xserve G5 with 2.5GB.
    The other strange thing is that when viewing the logs, all the logs are visible and displayed except for the Junk Mail/Virus Scanning, which displays Not Available at the top of the window and 'The selected log file does not exist' across the middle of the window.
    I have tried in the Maintenance section to Reconstruct all the mailbox accounts and also Repair under the Database tab to no avail. Have also confirmed that the /var/virusmails/ directory is empty.
    Would appreciate any help on this, but am a novice so would be very grateful for quite specific instructions.
    Thanks a lot,
    Stephen

    David, Thanks a lot for your help, but unfortunately this didn't seem to do anything. Here is the results of what you suggested:
    xserve1:~ admin$ sudo chown -R amavisd:amavisd /var/amavis
    xserve1:~ admin$ ls -l /var/amavis
    total 16
    -rw-r----- 1 _amavisd _amavisd 0 5 Aug 14:11 amavisd.lock
    srwxr-x--- 1 _amavisd _amavisd 0 5 Aug 13:51 amavisd.sock
    -rwxr-xr-x 1 _amavisd _amavisd 484 19 Jan 2009 amavisd_cleanup
    drwxr-xr-x 9 _amavisd _amavisd 306 5 Aug 13:51 db
    drwxr-xr-x 126 _amavisd _amavisd 4284 5 Aug 14:11 tmp
    -rw-r--r-- 1 _amavisd _amavisd 3 27 Sep 2007 whitelist_sender
    xserve1:~ admin$ amavisd
    WARN: running under user '501' (UID=501), the config file specifies $daemonuser='amavisd' (UID=83)
    Failed to open log file /var/log/amavis.log: Permission denied at /usr/bin/amavisd line 1590.
    xserve1:~ admin$
    Thanks,
    Stephen

  • Junk Mail Filtering - is it me or is it just rubbish?

    Apologies if this has been posted elsewhere, but didn't have the patience to wade through all the threads. Hopefully someone can help...
    Frankly, I think the filtering on Mail (using 3.5 with OSX 10.5.6) is hopeless. Simply put, I've tried configuring it every which way in Preferences but the same issues persist. The main one being that when I configure to "exclude" those in my address book and/or previous recipients list from junk mail filtering ...people in my address book (SPECIFICALLY ME) still end up in the junk mail folder.
    I have 2 accounts: Mail.com (POP3) and Gmail (IMAP) and I use an iPhone for mobile access. And I have a work email. All three are in my address card in Address Book.
    Yet whenever I send myself (or anyone else) an email -- either from work or from my iPhone or even from within Mail -- it still ends up in the junk mail folder.
    I think the problem is that Mail's filtering doesn't look at email addresses. It must look at how the name is set up??? i.e., LAST FIRST or FIRST LAST, etc. and when any of these don't match up it puts it into junk mail folder????
    It just seems rubbish to me. Outlook had much more sophisticated filtering options\rule set up.
    Anyone got any ideas on how to solve this? Thanks.

    Mulder wrote:
    If you have multiple email addresses in your card in Address Book, which messages are going to Junk, and what email address was used?
    All three emails go to junk. My work to either personal address. Gmail to Mail and Mail to Gmail emails all go to junk
    Have you tried setting up the Junk filter so that:
    If any of the following conditions are met:
    *Sender is not in my Address Book*
    *Sender is not in my Previous Recipients*
    Message is Junk Mail
    Perform the following actions:
    *Move message to mailbox: (Junk mailbox On My Mac)*
    Yep. Tried that. Still didn't work. Even tried ticking "not junk" on each of the several tests I've sent myself -- and then re-sent more tests, which still ended up in junk????
    As I said, I've tried virtually every possible configuration of boxes ticked and unticked and nothing...
    My latest setting (using your advanced rules above) were:
    Enable Junk Mail - ticked
    When Junk Mail arrives - 'perform custom actions'
    Msgs Exempt - In address book and previous recipients both ticked. Use my full name unticked
    Trust ISP headers - unticked
    Filter before applying rules - have tried this both ticked and unticked... same result
    Thanks,
    The Smoking Man
    PS - Should add that when others send me email to the Gmail or Mail accounts they properly go to inbox, not junk. It's just when I send myself something (anything, really)...

  • Problem with UWC and Mail Filters

    Hello,
    We recently upgraded from ims5.2 to JES 2005Q4. With have patch -23 installed for UWC and patch -53 installed for the messaging server. Everything is going pretty well except we are having a problem with the mail filters in UWC. It seems that after a short time ( couple hours) the page stops displaying correctly. That is the buttons for example say new button instead of just new. When you click on the new button, you get a application 9 error. We have the java heap set to 1.5 gb and the webserver between .5 and 3% of the CPU. Response is great for all other pages.
    Does anybody have any ideas? I have had a case open with Tech support since Last Monday, but still waiting for an answer, so any help would be appreciated.
    Thanks,
    Gary

    Hi Jay,
    Here is the error I get in the webservers error log file when I click on the new button. I have removed the ipaddress:
    [10/Oct/2006:15:16:15] failure (11492): for host xxx.xxx.xxx.xxx trying to POST /base/MailPreferencesSieve, service-j2ee reports: WEB2798: [] ServletContext.log(): Application Error
    java.lang.ArrayIndexOutOfBoundsException: 9
    at com.sun.uwc.NewFViewBean.setTimeFilterDates(Unknown Source)
    at com.sun.uwc.NewFViewBean.beginComponentDisplay(Unknown Source)
    at com.iplanet.jato.view.ContainerViewBase.beginDisplay(ContainerViewBase.java:748)
    at com.iplanet.jato.view.RequestHandlingViewBase.beginDisplay(RequestHandlingViewBase.java:383)
    at com.iplanet.jato.taglib.UseViewBeanTag.doStartTag(UseViewBeanTag.java:149)
    at jsps.uwc._common._NewF_jsp._jspService(_NewF_jsp.java:372)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
    at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:687)
    at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:459)
    at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:375)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:772)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:471)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:382)
    at com.iplanet.jato.view.ViewBeanBase.forward(ViewBeanBase.java:340)
    at com.iplanet.jato.view.ViewBeanBase.forwardTo(ViewBeanBase.java:261)
    at com.sun.uwc.MailPreferencesSieveViewBean._newEditHandler(Unknown Source)
    at com.sun.uwc.MailPreferencesSieveViewBean.handleNewButtonRequest(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.iplanet.jato.view.command.DefaultRequestHandlingCommand.execute(DefaultRequestHandlingCommand.java:183)
    at com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:308)
    at com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:802)
    at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:740)
    at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandler(ViewBeanBase.java:571)
    at com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase.java:957)
    at com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:615)
    at com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:473)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:807)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at com.sun.uwc.common.auth.SetCharacterEncodingFilter.doFilter(Unknown Source)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at com.sun.uwc.common.auth.GZIPFilter.doFilter(Unknown Source)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:280)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    at com.iplanet.ias.web

  • ALV output converted into PDF format and send that PDF to user through mail

    Hi Experts,
    I have report earlier its output was in alv grid.
    Now i want that ALV output converted into PDF format.And that PDF output send to user through mail.
    Can u please tell how to do?
    My code is here(output is displaying in ALV grid).
    INCLUDE <icon>.
    TYPE-POOLS: slis, kkblo.
    TABLES : zmsd_freight_hdr, zmsd_freight_det, zmsd_blinfo, zmsd_diheader.
    TABLES : lfa1.
    DATA : t_hdr   LIKE   zmsd_freight_hdr   OCCURS 0 WITH HEADER LINE,
           T_DET   LIKE   ZMSD_FREIGHT_DET   OCCURS 0 WITH HEADER LINE,
           t_bl    LIKE   zmsd_blinfo        OCCURS 0 WITH HEADER LINE,
           t_di    LIKE   zmsd_diheader      OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF t_det OCCURS 0.
            INCLUDE STRUCTURE zmsd_freight_det.
    DATA    type(30).
    DATA: END OF t_det.
    DATA: v_target2(30),
          v_zsammg LIKE t_det-zsammg,
          v_gsttotal LIKE t_det-zamount.
    DATA : BEGIN OF t_data OCCURS 0,
             zsammg       LIKE  zmsd_freight_hdr-zsammg,
             zdidbl       LIKE  zmsd_freight_hdr-zdidbl,
             zvkorg       LIKE  zmsd_freight_hdr-zvkorg,
             zinvno       LIKE  zmsd_freight_hdr-zinvno,
             zttlamt      LIKE  zmsd_freight_hdr-zttlamt,
             zstatus      LIKE  zmsd_freight_hdr-zstatus,
             ztype        LIKE  zmsd_freight_hdr-ztype,
             zconfirm     LIKE  zmsd_freight_hdr-zconfirm,
             zconfirmdate LIKE  zmsd_freight_hdr-zconfirmdate,
             erdat        LIKE  zmsd_freight_hdr-erdat,
             ernam        LIKE  zmsd_freight_hdr-ernam,
             erzet        LIKE  zmsd_freight_hdr-erzet,
             aedat(10),
             aenam        LIKE  zmsd_freight_hdr-aenam,
             aezet        LIKE  zmsd_freight_hdr-aezet,
             zline        LIKE  zmsd_freight_det-zline,
             zfptype      LIKE  zmsd_freight_det-zfptype,
             zchrcode     LIKE  zmsd_freight_det-zchrcode,
             zcurcode     LIKE  zmsd_freight_det-zcurcode,
             zqty         LIKE  zmsd_freight_det-zqty,
             zuom         LIKE  zmsd_freight_det-zuom,
             zrate        LIKE  zmsd_freight_det-zrate,
             zamount      LIKE  zmsd_freight_det-zamount,
             zexrate      LIKE  zmsd_freight_det-zexrate,
           zccode       LIKE  zmsd_blinfo-zccode,      "MADK991565
             zccode       like  ZMSD_FREIGHT_HDR-zfcode, "MADK991565
             zbldate(10),
             zbl          LIKE  zmsd_blinfo-zbl,
             type(3),
             waerk        LIKE  zmsd_freight_det-zcurcode,
             zamountl     LIKE  zmsd_freight_det-zamount,
           END OF t_data.
    DATA : w_layout      TYPE   slis_layout_alv,
           w_catalog     TYPE   slis_fieldcat_alv,
           t_catalog     TYPE   slis_t_fieldcat_alv,
           w_sort        TYPE   slis_sortinfo_alv,
           t_sort        TYPE   slis_t_sortinfo_alv.
    DATA   V_ZINVNO    like   T_HDR-ZINVNO.                   "MADK991565
    DATA : v_count  TYPE  i.
    SELECTION-SCREEN BEGIN OF BLOCK a0 WITH FRAME TITLE text-001.
    PARAMETERS     :  p_zvkorg LIKE zmsd_freight_hdr-zvkorg  OBLIGATORY .
    SELECT-OPTIONS :  s_zdidbl FOR  zmsd_freight_hdr-zdidbl             ,
                      s_zccode FOR  lfa1-lifnr                          ,
                      s_status FOR  zmsd_freight_hdr-zstatus            ,
                      s_ztype  FOR  zmsd_freight_hdr-ztype              ,
                      s_erdat  FOR  zmsd_freight_hdr-erdat              ,
                      s_ernam  FOR  zmsd_freight_hdr-ernam              ,
                      s_zconfd FOR  zmsd_freight_hdr-zconfirmdate       .
    PARAMETERS     :  p_zconf  AS   CHECKBOX                            .
    SELECTION-SCREEN END OF BLOCK a0.
    SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-002.
    PARAMETERS     :  p_hdr    RADIOBUTTON GROUP rad DEFAULT 'X'        ,
                      p_det    RADIOBUTTON GROUP rad                    .
    SELECTION-SCREEN END OF BLOCK a1.
    INITIALIZATION.
    AT SELECTION-SCREEN.
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM process.
      PERFORM display.
    END-OF-SELECTION.
      PERFORM fm_get_num_pages.
    AT USER-COMMAND.
    AT LINE-SELECTION.
    TOP-OF-PAGE.
      PERFORM fm_top_of_page USING '7010' sy-title space.
    FORM get_data.
      SELECT   *
        FROM   zmsd_freight_hdr
        INTO   TABLE t_hdr
       WHERE   zvkorg        EQ  p_zvkorg
         AND   zdidbl        IN  s_zdidbl
         AND   zstatus       IN  s_status
         AND   ztype         IN  s_ztype
         AND   erdat         IN  s_erdat
         AND   ernam         IN  s_ernam
         AND   zconfirmdate  IN  s_zconfd
         AND   ZFCODE        IN  S_ZCCODE.                      "MADK991565
      IF p_zconf = 'X'.
        DELETE t_hdr WHERE zconfirm NE 'C'.
      ENDIF.
      CHECK NOT t_hdr[] IS INITIAL.
      SELECT   *
        FROM   zmsd_blinfo
        INTO   TABLE t_bl
         FOR   ALL ENTRIES IN t_hdr
       WHERE   zsammg = t_hdr-zsammg.
      SORT t_bl BY zsammg.
      SELECT   *
        FROM   zmsd_diheader
        INTO   TABLE t_di
         FOR   ALL ENTRIES IN t_hdr
       WHERE   zsammg = t_hdr-zsammg.
      SORT t_di BY zsammg.
    IF P_DET = 'X'. "MADK933361
      SELECT   *
        FROM   zmsd_freight_det
        INTO   TABLE t_det
         FOR   ALL ENTRIES IN t_hdr
       WHERE   zsammg  =  t_hdr-zsammg
       AND ZINVNO =  T_HDR-ZINVNO .                           "MADK991565
    SORT t_det BY zsammg zline.                            "MADK991565
       SORT T_DET BY ZSAMMG ZINVNO ZLINE.                     "MADK991565
    ENDIF. "MADK933361
    ENDFORM.
    FORM process.
      REFRESH t_data.
      CLEAR v_gsttotal.                                         "MADK933361
      LOOP AT t_hdr.
    Start of MADK933361
        CLEAR: v_target2.
        v_zsammg = t_hdr-zsammg.
        V_ZINVNO = T_HDR-ZINVNO.                                "MADK991565
       AT NEW zsammg.                                         "MADK991565
         AT NEW ZINVNO.                                         "MADK991565
          PERFORM get_gst_value.
        ENDAT.
    End of MADK933361
        PERFORM move_header.
        CHECK t_data-zccode IN s_zccode.
        IF p_det = 'X'.
    CSF Project Changes Starts   DEV34    MADK985782
        LOOP AT T_DET WHERE ZSAMMG = T_HDR-ZSAMMG..
          LOOP AT t_det WHERE zsammg = t_hdr-zsammg AND
                              zinvno = t_hdr-zinvno.
    CSF Project Changes Ends     DEV34    MADK985782
            PERFORM move_header.
            CHECK t_data-zccode IN s_zccode.
            MOVE-CORRESPONDING t_det TO t_data.
            t_data-zamountl = t_data-zamount * t_data-zexrate.
            APPEND t_data.
            CLEAR t_data.
          ENDLOOP.
        ELSE.
          APPEND t_data.
          CLEAR t_data.
        ENDIF.
        AT END OF zsammg.
          CLEAR v_gsttotal.
        ENDAT.
    *Start of changes for  IS090901289-PIA MADK991565
        AT END OF ZINVNO.
          CLEAR V_GSTTOTAL.
        ENDAT.
    *End of changes for  IS090901289-PIA MADK991565
      ENDLOOP.
    ENDFORM.
    FORM move_header.
      MOVE-CORRESPONDING t_hdr TO t_data.
      t_data-zttlamt = t_data-zttlamt + v_gsttotal.             "MADK933361
      t_data-waerk = 'SGD'.
      IF NOT t_hdr-aedat IS INITIAL.
        WRITE: t_hdr-aedat TO t_data-aedat.
      ELSE.
        CLEAR : t_data-aedat.
      ENDIF.
      READ TABLE t_bl WITH KEY zsammg = t_hdr-zsammg BINARY SEARCH.
      IF sy-subrc EQ 0.
      t_data-zccode  = t_bl-zccode.   "MADK991565
        T_DATA-ZCCODE = T_HDR-ZFCODE.   "MADK991565     
        IF NOT t_bl-zbldate IS INITIAL.
          WRITE: t_bl-zbldate TO t_data-zbldate.
        ENDIF.
        t_data-zbl     = t_bl-zbl.
        t_data-type    = 'DBL'.
      ELSE.
        READ TABLE t_di WITH KEY zsammg = t_hdr-zsammg BINARY SEARCH.
        IF sy-subrc EQ 0.
        t_data-zccode  = t_di-zdiforcode.     "MADK991565
          T_DATA-ZCCODE = T_HDR-ZFCODE.         "MADK991565
          t_data-type    = 'DI'.
        ENDIF.
      ENDIF.
    ENDFORM.
    FORM display.
      IF t_data[] IS INITIAL.
        MESSAGE s398(00) WITH 'No Data Selected'.
        EXIT.
      ENDIF.
      DATA : l_repid LIKE sy-repid.
      l_repid = sy-repid.
      REFRESH t_catalog.
      CLEAR   t_catalog.
      w_layout-cell_merge = 'X'.
      PERFORM map_fields.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = l_repid
                i_callback_user_command = 'ALV_USER_COMMAND'
                is_layout               = w_layout
                it_fieldcat             = t_catalog[]
                i_grid_title            = sy-title
                i_save                  = 'A'
                it_sort                 = t_sort[]
           TABLES
                t_outtab                = t_data
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
      IF sy-subrc <> 0.
      ENDIF.
    ENDFORM.
    FORM map_fields.
    Sort Order
      CLEAR v_count.
      PERFORM sf USING 'ZDIDBL'   'X'  'X'.
    Fields to be displayed
      CLEAR v_count.
      IF p_hdr = 'X'.
        PERFORM af USING :
       DESCRIPTION       FIELD        LEN   RTABLE             RFIELD
        'DI/DBL         ' 'ZDIDBL'     '14' '                ' '        ',
        'Type           ' 'TYPE'       '04' '                ' '        ',
        'Forwarder Code ' 'ZCCODE'     '14' '                ' '        ',
        'BL Number      ' 'ZBL'        '14' '                ' '        ',
        'BL Date        ' 'ZBLDATE'    '10' '                ' '        ',
        'Invoice Number ' 'ZINVNO'     '15' '                ' '        ',
        'Extraction     ' 'ZSTATUS'    '05' 'ZMSD_FREIGHT_HDR' 'ZSTATUS ',
        'Freight Type   ' 'ZTYPE'      '05' 'ZMSD_FREIGHT_HDR' 'ZTYPE   ',
        'Confirmation   ' 'ZCONFIRM'   '05' 'ZMSD_FREIGHT_HDR' 'ZCONFIRM',
        'Confirm Date   ' 'ZCONFIRMDATE' '10' 'ZMSD_FREIGHT_HDR'
    'ZCONFIRMDATE',
        'Total Amount   ' 'ZTTLAMT'    '18' '                ' '        ',
        'Created On     ' 'ERDAT'      '10' '                ' '        ',
        'Created By     ' 'ERNAM'      '10' '                ' '        ',
        'Changed On     ' 'AEDAT'      '10' '                ' '        ',
        'Changed By     ' 'AENAM'      '10' '                ' '        '.
      ELSE.
        PERFORM af USING :
       DESCRIPTION         FIELD     LEN   RTABLE             RFIELD
        'DI/DBL           ' 'ZDIDBL'   '14' '                ' '        ',
        'Type             ' 'TYPE'     '04' '                ' '        ',
        'Forwarder Code   ' 'ZCCODE'   '14' '                ' '        ',
        'BL Number        ' 'ZBL'      '14' '                ' '        ',
        'BL Date          ' 'ZBLDATE'  '10' '                ' '        ',
        'Invoice Number   ' 'ZINVNO'   '15' '                ' '        ',
        'Extraction       ' 'ZSTATUS'  '05' 'ZMSD_FREIGHT_HDR' 'ZSTATUS ',
        'Freight Type     ' 'ZTYPE'    '05' 'ZMSD_FREIGHT_HDR' 'ZTYPE   ',
        'Confirmation     ' 'ZCONFIRM' '05' 'ZMSD_FREIGHT_HDR' 'ZCONFIRM',
        'Confirm Date     ' 'ZCONFIRMDATE' '10' 'ZMSD_FREIGHT_HDR'
    'ZCONFIRMDATE',
        'Total Amount     ' 'ZTTLAMT'  '18' '                ' '        ',
        'Freight Payment  ' 'ZFPTYPE'  '14' '                ' '        ',
        'Charge Code      ' 'ZCHRCODE' '10' '                ' '        ',
        'Currency         ' 'ZCURCODE' '08' '                ' '        ',
        'Quantity         ' 'ZQTY'     '13' '                ' '        ',
        'UoM              ' 'ZUOM'     '04' '                ' '        ',
        'Rate             ' 'ZRATE'    '15' '                ' '        ',
        'Amt(Foreign Curr)' 'ZAMOUNT'  '16' '                ' '        ',
        'Exchange Rate    ' 'ZEXRATE'  '13' '                ' '        ',
        'Amt(Local Curr)  ' 'ZAMOUNTL' '16' '                ' '        ',
        'Created On       ' 'ERDAT'    '10' '                ' '        ',
        'Created By       ' 'ERNAM'    '10' '                ' '        ',
        'Changed On       ' 'AEDAT'    '10' '                ' '        ',
        'Changed By       ' 'AENAM'    '10' '                ' '        '.
      ENDIF.
    ENDFORM.
    FORM af USING text
                  field
                  len
                  table
                  reffield.
      v_count = v_count + 1.
      w_catalog-col_pos       = v_count.
      w_catalog-fieldname     = field.
      w_catalog-ref_tabname   = table.
      w_catalog-ref_fieldname = reffield.
      w_catalog-seltext_s     = text.
      w_catalog-seltext_m     = text.
      w_catalog-seltext_l     = text.
      w_catalog-outputlen     = len.
      IF field = 'ZTTLAMT' OR field = 'ZAMOUNTL'.
        w_catalog-no_zero     = 'X'.
        w_catalog-cfieldname  = 'WAERK'.
        w_catalog-datatype    = 'CURR'.
      ENDIF.
    IF FIELD = 'ZRATE' OR FIELD = 'ZAMOUNT'.
      IF field = 'ZAMOUNT'.
        w_catalog-no_zero     = 'X'.
        w_catalog-cfieldname  = 'ZCURCODE'.
        w_catalog-datatype    = 'CURR'.
      ENDIF.
      IF field = 'ZQTY' OR field = 'ZRATE'.
        w_catalog-no_zero     = 'X'.
        w_catalog-datatype  =  'DEC'.
      ENDIF.
      APPEND w_catalog TO t_catalog.
      CLEAR  w_catalog.
    ENDFORM.
    FORM sf    USING   fieldname  sortup  group.
      v_count = v_count + 1.
      CLEAR w_sort.
      w_sort-fieldname = fieldname.
      w_sort-spos      = v_count.
      w_sort-up        = sortup.
      w_sort-group     = group.
      APPEND w_sort TO t_sort.
    ENDFORM.
    FORM alv_user_command USING  in_ucomm    LIKE sy-ucomm
                                 in_selfield TYPE slis_selfield.
      DATA: lfs_data LIKE t_data.
      IF in_ucomm = '&IC1'.
        READ TABLE t_data INDEX in_selfield-tabindex INTO lfs_data.
        CHECK NOT lfs_data-zdidbl IS INITIAL.
        IF lfs_data-type = 'DBL'.
          DATA: l_zdbl LIKE zmsd_diheader-zdinum.
          l_zdbl = in_selfield-value.
          EXPORT l_zdbl TO MEMORY ID 'VBL'.
          CALL TRANSACTION 'ZMSD_BL01'.
        ENDIF.
        IF lfs_data-type = 'DI'.
          DATA: v_dinum LIKE zmsd_diheader-zdinum.
          v_dinum = in_selfield-value.
          EXPORT v_dinum TO MEMORY ID 'VDI'.
          CALL TRANSACTION 'ZMSD_DI01'.
        ENDIF.
      ENDIF.
    ENDFORM.
    FORM get_gst_value.
      LOOP AT t_det WHERE zsammg = v_zsammg
         AND ZINVNO = V_ZINVNO.                              "MADK991565
        CHECK t_data-zccode IN s_zccode.
        t_det-zamount  = t_det-zamount * t_det-zexrate.
        SELECT SINGLE  y0mmtarget2
                INTO   v_target2
                FROM   y0mmipstranslate
                WHERE  y0mmdatatype = '70' AND
                       y0mmsource = t_det-zchrcode.
        SELECT SINGLE y0mmtarget1
               INTO   t_det-type
               FROM   y0mmipstranslate
               WHERE  y0mmdatatype = '76' AND
                      y0mmsource = v_target2.
        IF t_det-type NE '3Z'.
          v_gsttotal    = v_gsttotal +
                               ( t_det-zamount * 5 / 100 ).
        ENDIF.
      ENDLOOP.
    Regards,
    Raj.

    Hello,
    Following is the procedure to convert alv output to spool and then it to PDF Format.
    After we display the ALV, we can check whether it is running in the background using system field u2018sy-batchu2018. Then,we call an function module named u2018GET_JOB_RUNTIME_INFOu2019 to get the current job information. Then go to spool request table tbtcp to get the spool id.
    Get current job details
      CALL FUNCTION u2018GET_JOB_RUNTIME_INFOu2019
           IMPORTING
                eventid                 = gd_eventid
                eventparm               = gd_eventparm
                external_program_active = gd_external_program_active
                jobcount                = gd_jobcount
                jobname                 = gd_jobname
                stepcount               = gd_stepcount
           EXCEPTIONS
                no_runtime_info         = 1
                OTHERS                  = 2.
    SELECT * FROM  tbtcp
                     INTO TABLE it_tbtcp
                     WHERE      jobname     = gd_jobname
                               AND jobcount = gd_jobcount
                               AND stepcount = gd_stepcount
                               AND listident <> u20180000000000u2032
                               ORDER BY   jobname
                                                   jobcount
                                                   stepcount.
      READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
    Finally, we can call function module u2018CONVERT_ABAPSPOOLJOB_2_PDFu2018 to convert spool reqeust(which is stored in OTF format) to PDF format. Then we can call either function module u2018SO_DOCUMENT_SEND_API1u2032 or SAP BCS (Business Communication Service) to send the pdf as an email attachment.
    CALL FUNCTION u2018CONVERT_ABAPSPOOLJOB_2_PDFu2019
           EXPORTING
                src_spoolid              = gd_spool_nr
                no_dialog                = c_no
                dst_device               = c_device
           IMPORTING
                pdf_bytecount = gd_bytecount
           TABLES
                pdf = it_pdf_output
           EXCEPTIONS
                err_no_abap_spooljob     = 1
                err_no_spooljob          = 2
                err_no_permission        = 3
                err_conv_not_possible    = 4
                err_bad_destdevice       = 5
                user_cancelled           = 6
                err_spoolerror           = 7
                err_temseerror           = 8
                err_btcjob_open_failed   = 9
                err_btcjob_submit_failed = 10
                err_btcjob_close_failed  = 11
                OTHERS                   = 12.
    Regards,
    Sayali
    Edited by: Sayali Paradkar on Apr 20, 2010 12:51 PM

  • Make all the forms at a user level or responsibility level to be read only

    Hi,
    Please suggest me to make all the forms at a user level or responsibility level to be read only. So that when a particular user logs in, he gets all the form in read only mode or at a particular responsibility all the forms are read only so that we can attach this responsibility to the user for the same purpose.
    Any ideas will be highly appreciated.

    check this blog,
    http://www.oracleappshub.com/11i/oracleapps-responsibility-vs-sap-functions/
    Re: How to change OM responsibility as read-only in oracle applications 11i
    read only responsibility-user

  • How to create a profile value at user level programatically

    Dear all,
    I want to create a profile value at user level programatically, I refer to the developer guide and try to use fnd_profile.put() to create a new value.
    But I find out the value is just created in session level, not be inserted into base table.
    So is there anyone know how to realize this function in PL/SQL?
    Any idea is appreciated.
    Best Regards,
    Kenny

    Check Note: 364503.1 - How to Set a System Profile Value Without Logging in to the Applications
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=364503.1

  • Error while performing Risk Analysis at user level for a cross system user

    Dear All,
    I am getting the below error, while performing the risk analysis at user level for a cross system (Oracle) user.
    The error is as follows:
    "ResourceException in method ConnectionFactoryImpl.getConnection(): com.sap.engine.services.connector.exceptions.BaseResourceException: Cannot get connection for 120 seconds. Possible reasons: 1) Connections are cached within SystemThread(can be any server service or any code invoked within SystemThread in the SAP J2EE Engine), 2) The pool size of adapter "SAPJ2EDB" is not enough according to the current load of the system or 3) The specified time to wait for connection is not enough according to the pool size and current load of the system. In case 1) the solution is to check for cached connections using the Connector Service list-conns command, in case 2) to increase the size of the pool and in case 3) to increase the time to wait for connection property. In case of application thread, there is an automatic mechanism which detects unclosed connections and unfinished transactions.RC:1
    Can anyone please help.
    Regards,
    Gurugobinda

    Hi..
    Check the note # SAP Note 1121978
    SAP Note 1121978 - Recommended settings to improve peformance risk analysis.
    Check for the following...
    CONFIGTOOL>SERVER>MANAGERS>THREADMANAGER
    ChangeThreadCountStep =50
    InitialThreadCount= 100
    MaxThreadCount =200
    MinThreadCount =50
    Regards
    Gangadhar

  • LaserJet P1505n printing slow just for user-level accounts in Win7

    I have several workstations running Win7 Pro 64-bit that have been installed as replacements for XP machines.  All of them print to one of several P1505n printers, and are using the latest drivers from HP.  Under XP there were no problems printing to these printers, but the Win7 machines have significant delays when trying to print.  The Windows test page prints instantaneously, but printing from any other application has a delay of up to a full minute before the job begins to print.  Once the job prints, it prints without issue.
    One thing that I have noticed during my testing seems to point to permissions.  If I am logged in using my admin-level account, everything prints as it should, with no delays at all.  Once I log in with a user-level account, however, the delays begin.  I found the driver files at C:\Windows\System32\spool\drivers\x64\3, but giving "everyone" full control over those files does not help.
    Is there anything else that I should be looking at?
    Thanks in advance!
    Donny

    In the end, I was able to resolve the problem by installing the Vista x64 drivers.  No playing with permissions necessary.

  • Windows Server 2012 Group Policy Block USB Storage devices @ User Level Not getting applied on a Domain Client machine with Windows Server 2008 R2. Why?

    Hello,
    I have a Windows Server 2012 R2.
    I have configured the Group Policy on it to block the usage of USB - Storage Devices @ user level on the client machines. It works properly for my Windows 7 client machines but it's not working on one of the machine having Windows Server 2008 R2 installed
    on it (this machine is also a domain client in the same domain).
    I will really be thankful if anyone can suggest some solution to this issue.
    Please feel free to write back in-case I have missed anything obvious to be shared.
    Thanks!
    -Vinay Pugalia
    If a post answers your question, please click "Mark As Answer" on that post or
    "Vote as Helpful".
    Web : Inkey Solutions
    Blog : My Blog
    Email : Vinay Pugalia

    Hi,
    Any update?
    Just checking in to see if the suggestions were helpful. Please let us know if you would like further assistance.
    Best Regards,
    Andy Qi
    TechNet
    Subscriber Support
    If you are TechNet
    Subscription user and have any feedback on our support quality, please send your feedbackhere.
    Andy Qi
    TechNet Community Support

Maybe you are looking for

  • I need to use an hp 6215 printer with my mac book pro.  the driver installation disk doesn't work.  where can i get a driver that will work?  i use OS X

    i need to use an hp 6215 printer with my mac book pro.  the driver installation disk doesn't work.  where can i get a driver that will work?

  • How to add a popup list in the requisitioner field in PR

    Have to add a popup list containing the list of employee vendors in the requisitioner field of Purchase Requisitioner. As client is in need of adding the employee vendor list so that it will be easier for them to locate the correct employee for whom

  • Context object

    Hello,              What is context object ? where this will be used?                                                                           shyam

  • HELP DESPERATE CMSS 3d / EAX

    HELP> DESPERATE CMSS 3d / EAX? ok the other day i had done somethign to my settings in control panel and when i went ingame (counter-strike .6) it felt like i was actually there i Could hear Everything Everyware and i could pinpoint everything. It ki

  • Playing Albums in Track Order

    Using iPod Classic I'm able to make an album play in track order if I select it from the album list but it seems album tracks always display and play in alphabetical order if selected via a search. Is it possible to make individual albums always disp