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

Similar Messages

  • 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??

  • How can I get Disco Viewer to remember the user's final filtered worksheet?

    Hi every one:
    How can I get Disco Viewer to remember the user's final filtered worksheet?
    Each time the users login they have to make several operations (drillings, pivots, etc) to get their reports customized as they want. I wonder if is there a chance I could configure Disco Viewer in order to remember the last worksheet layout, and set it as the initial worksheet the next time the user login?
    Thanks in Advance
    Jorge

    Once your users have customised the report to their requirements, they can add the URL of final data diaplay screen to their favourites menu in the browser.
    Next time they want to run the same report, they can access the URL saved into favourites, they'll just need to enter their password to run the report when prompted.
    I know that this works with Oracle Applications user id's, and that the URL "remembers" User Name, Oracle Apps Responsibility, Workbook Name, and Paramteters Used, Table Layout Customisations, and Page Item selections... so in theory it should record Drill information too.

  • How can I get Disco Viewer to remember the user´s final filtered worksheet?

    Hi every one:
    How can I get Disco Viewer to remember the user's final filtered worksheet?
    Each time the users login they have to make several operations (drillings, pivots, etc) to get their reports customized as they want. I wonder if is there a chance I could configure Disco Viewer in order to remember the last worksheet layout, and set it as the initial worksheet the next time the user login?
    Thanks in Advance
    Jorge

    Once your users have customised the report to their requirements, they can add the URL of final data diaplay screen to their favourites menu in the browser.
    Next time they want to run the same report, they can access the URL saved into favourites, they'll just need to enter their password to run the report when prompted.
    I know that this works with Oracle Applications user id's, and that the URL "remembers" User Name, Oracle Apps Responsibility, Workbook Name, and Paramteters Used, Table Layout Customisations, and Page Item selections... so in theory it should record Drill information too.

  • 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

  • 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

  • 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).

  • How to view the dispatched mails in J2EE server???

    Hi All,
    I want to view how many mails have  been sent from the J2EE server. May I know how we can see this in NetWeaver AS JAVA? As we can view in ABAP stack using SOST tcode, this will show the list of user who have been sent mails from SAP system for a particular criterion. However, I dont find any such option in J2EE server. I see a challenge here to confirm to the buusiness that how many mails have been sent from J2EE server.
    Please help me finding out a way to this.
    Regards,
    Fisal

    Hi Mr!
    If you want to generate the e-file feature 40ACK, do it in our Customization client box (Golden box) & save the request & move to Quality & production.
    Still if you need to workout only in Production, than with the help of Basis people you can get the Production change mode for 5 to 10 min time & can generate it. But mostly Basis people wont give us change mode for Production box ... with ur request they can do..try it.
    Did u collected 4 quarter TAN no's for 2008 Quarter...if not collect it & generate it at a time.
    All the best:-)
    Kind Regards,
    Saisree.S

  • 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]

  • Can not view my icloud mail messages on my phone

    I am not able to look at my mail within the icloud mail.  Any suggestions

    Not sure what you mean by "within iCloud mail" but if you can't view your iCloud mail inside the Mail app on your phone, go to Settings>iCloud, turn Mail off, then after a few seconds turn Mail back on again.

  • 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)...

  • 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

  • View Window in Mail is Gone

    I'm sure I futzed with a setting or something----the viewer in my Mail App is gone.
    I can still view my email by double-clicking on it, then it opens in a new window. But how do I return it to viewing my email integrated with my list of emails. make sense?
    thank you.
    --Kevin

    Command-Option-N
    Opens a new Inbox for my email but does not fix the issue. When I select a specific email it is not viewable in that new window. The only way I can view the email is to double-click (then it opens a new window with that email only)
    perplexing.

  • Unable to view user login in OS X Lion 10.7.3 startup

    unable to view user login in OS X Lion 10.7.3 startup.  I had made some changes in icloud settings & by mistake must have checked some option related to username & password. Also when i turn my macbook pro on, i can see the grey background with apple logo, however it does not show my image & login password space. thus i'm unable login to my system. please help

    hey ..was able to solve the problem,,had selected "name & password" in "display login window" option of "user & group" of system preference. That's why was unable to view my login username.
    How i resolved it - after turning my macbook pro on, i pressed "shift" key...that way it opened in safe mode...& then went to system prefernce & again selected the previous option of "list of users" in display login window option. nyways thanx for helping out

  • How to add user e-mail to a custom report?

    Hello,
    I am not a sql DBA, but trying to find out exact line that I should add to the query for any custom report, to show user e-mail address field as well.
    For example, I use this query for all machines running unwanted software (found this query on google) :
    Select 
    SD.Name0, 
    sys1.User_Name0,
    SF.FileName 
    From v_r_system sys1
    join v_gs_softwarefile sf on sf.resourceid=sys1.resourceid
    left join v_R_User usr on usr.User_Name0=sys1.User_Name0
    left Join v_R_System SD on SD.ResourceId = SF.ResourceId
    Where SF.FileName Like '%Azureus%'
    Or SF.FileName Like '%ABC%'
    Or SF.FileName Like '%BitComet%'
    Order By SD.Name0, SF.FileName, sys1.User_Name0
    I do have user discovery enabled with mail attribute, and can see e-mail address getting collected for all the users.
    Thanks in Advance

    In case it's SQL/SSRS, which I assumed based on the initial query, then your query should look like this:
    Select
    SD.Name0,
    sys1.User_Name0,
    usr.Mail0,
    SF.FileName
    From v_r_system sys1
    join v_gs_softwarefile sf on sf.resourceid=sys1.resourceid
    left join v_R_User usr on usr.User_Name0=sys1.User_Name0
    left Join v_R_System SD on SD.ResourceId = SF.ResourceId
    Where SF.FileName Like '%Azureus%'
    Or SF.FileName Like '%ABC%'
    Or SF.FileName Like '%BitComet%'
    Order By SD.Name0, SF.FileName, sys1.User_Name0
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

Maybe you are looking for

  • Best method for rolling period/year

    I have a requirement to retrieve the year/period for 13 periods. Each year has 12 periods. Based on a starting year/period, I need to calculate the subsequent 13 periods following. Basically, it means adding 1 to period but when period passes 12, [su

  • Problem junk app in phone

    how to know which app on phone can be disable??

  • Attempting to connect daughter's laptop with a Neatgear wireless card

    I am trying to connect my daughter's laptop to my network. I have downloaded Network Magic, etc.  Is there an easy step-by step tutorial or checklist I can access to connect her to my router? Network Magic is telling me that I have other network conn

  • Password protection in Dreamweaver?

    Is a person able to password-protect his website with the tools available in Dreamweaver? I'd like to have a field on my index page where a person must input a password to proceed. Even better would be to have the entire website password-protected -

  • How can I set up hotmail,yahoo,gmail in imail?

    I have not been able to set up hotmail, yahoo, or gmail on my imail. I have tried lots of incoming and outgoing addresses. Can someone help?