Calling a BSP from a website

Hi
We have two standard BSP applications on one R/3 system. The R/3 system has been configured for SSO using single sign on using SAP log on Tickets.
My question is:
When I call one BSP application from a website, through a link on the website it displays the BSP page whereas when the other BSP application is called from the same website, through a link, it gives an error, "Single Sign On not Activated". What could be the reason for the other BSP page not being displayed?
Thanks,
Jayesh

Please check the system alias you are using in the second BSP call. If you use the same system alias, It should work just fine. If it is different system alias, please check and make sure you have the user mapping set correctly.
Also make sure to import the certificate.
Thanks,
Nagesh O.

Similar Messages

  • Calling another BSP from a BSP using bsp:call having a Problem.

    Hi All,
    I have a BSP (page1.bsp), within Page1.bsp I am calling another BSP (Page2.bsp)
    But I need to Call Page2.bsp from Page1.bsp 'N' number of times depending upon an internal table, code is mentioned below ( Problem is mentioned after the code ) :
    LOOP AT mr_plan_comparison->mt_selected_plans ASSIGNING <fs_selected_plan>.
         CLEAR lr_plan.
         lr_plan = zcl_zpr_s_model_pool=>load_new_plan( iv_plan_id = <fs_selected_plan>-plan_id ).
         lr_plan->mr_phases = lr_plan->get_phases( ).
         lt_phases_of_a_plan = mr_plan_comparison->mt_selected_phases.
         DELETE lt_phases_of_a_plan WHERE plan_id <> <fs_selected_plan>-plan_id.
         lr_plan->mr_phases->mt_phases = lt_phases_of_a_plan.
         lv_comp_id_str = zcl_zxa_str=>conc( iv_1 = sy-tabix
                                             iv_2 = 'xyz' ).
         CONDENSE lv_comp_id_str NO-GAPS.
      %>
      <tr>
      <td>
    <htmlb:textView text="<b><%= zcl_zrm_s_data_manager=>get_name_from_id( iv_table_name = 'ZPR_PROGRAM'
                                                                         iv_field_name = 'PRG_ID'
                                                                         iv_field_value_id = <fs_selected_plan>-prg_id  ).%></b>" />
         <bsp:call   url     = "<%= zcl_zrm_co=>sc_bsp_rpphachart %>"
                     comp_id = "<%= lv_comp_id_str %>" >
    <%-- same subcontroller n times: use different component IDs --%>
        <bsp:parameter name  = "mr_plan"                  value = "<%= lr_plan %>" />
        <bsp:parameter name  = "mr_plan->MR_PHASES"       value = "<%= lr_plan->mr_phases %>" />
        <bsp:parameter name  = "mv_show_current_version"  value = "<%= abap_true %>" />
        <bsp:parameter name  = "mv_show_version_nr"       value = "<%= SPACE %>" />
    </bsp:call>
    I am able to display the Page1.bsp with no problem having Page2.bsp as well on it,
    But I have a radio button or a dropdown on Page2.bsp and when the event triggers it goes to the DO_HANDLE_EVENT of Page2.bsp whcih is correct but after DO_HANDLE_EVENT it does not go to DO_REQUEST of Page2.bsp and rather goes to Page1.bsp at the LOOP, by this what ever selection I did I am loosing those values.
    What changes should I make so that after Do_HANDLE_EVENT of Page2.bsp it should call it's Do_Request?
    I guess it might be related to the reference or something?
    Regards,
    Abhinav

    Hi Abhinav,
    the flow of nested controllers is as follows:
    contr1->do_request (here dispatch_input triggers data and event handling)
      -->contr1->do_handle_data
      -->contr2_1->do_handle_data
      -->contr2_2->do_handle_data
      -->contr2_3->do_handle_data
    ..... for all controllers in the hierarchy
      -->contrXXX->do_handle_event (the controller instance where the event was triggered)
    contr1->do_request continued
    call view for contr1
      -->contr2_1->do_request
      -->contr2_2->do_request
      -->contr2_3->do_request
    .... for all subcontrollers called by your logic
    the dispatch_input in the subcontroller does not have any effect as within the method it is checked whether the controller is a root controller or not.
    In case you call the subcontroller with the same component ID's than you called them before, the same instances are reused. So if you reuse the instances and set an attribute within the instance that handled the event you should be able to "remember" the values.
    Another option is to write the event back either to the application class or to the parent controller (is available via attribute m_parent) and hand it back over to the controller during the calling loop.
    Hope that helps.
    Best Regards
    Michael

  • How to call a BSP from another BSP?

    Hi All,
    I've created a BSP for hiring new employees.  I have a situation whereby when the user presses a button a pop window will be displayed listing all the positions in the company.  The user selects the correct position, which then populates an input box on the originating page and the pop up window closes.
    This pop up window is a page in another bsp which goes off and gets the positions and stores the selection in a cookie.
    Now my problem is how do i call this 'get postions' bsp from my originating bsp?
    I've tried using the <%@ include file="/sap/bc/bsp/sap/z_hr_org_model"%> but i get the error only page fragments can be included.
    So how do i call one bsp from another??
    Any help would be much appreciated,
    Kind Regards,
    Liz.

    Look at the below [link|http://****************/Tutorials/BSP/F4Help/Tutorial.htm]
    The only difference in your case is, you need to call the popup from different BSP Application.
    To do that, just add the full path when you call the document.open..
    For example,
    document.open("/sap/bc/bsp/sap/z_hr_org_model/main.do", ............)
    Raja

  • Calling a BSP from a BW web report RRI

    Hi,
    I am calling a BSP from a BW Web Report to Report Interface and during the call all users have to authenticate themselves.   It is not an option to turn authentication off for audit purposes but is there any way of performing automatic authentication?
    Both the web report and BSP are on the same BW instance.
    Any help would be greatly appreciated.
    Regards
    Paul.

    Just activate SSO2 for your application servers. Some time ago there was a good <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/ com.sapportals.km.docs/documents/a1-8-4/SSO%20Overview.pdf">article</a> on this here on SDN. Keep in mind that browser must accept cookies.

  • Calling a BSP from different domain

    Hi.
    I have a problem calling a bsp application. I am using bsp app. system for a logon screen(this is what’s causing the problem.) SAP is in the domain company<b>as</b>.com and the calling application is in the domain company.com.
    The logon screen is displayed but when users try to logon the logon screen just gets displayed again. I have found out this is because of the different domains and the cookie mysapsso2.
    When calling the same url from my machine everything works fine. Also if I try to bypass the system and logon directly to the bsp application (default.do) it works. The reason I’m using the system app. is to enable the users to change their passwords according to the rules in R/3.
    Does this make sense and does anyone have some ideas how to fix my problem?
    Regards
    Jon

    There is a pretty simple answer here - it just doesn't work.  This has to do with how the browser stores and sends cookies.  Cookies are only allowed to be passed within the same domain. This a protection that keeps a bad website from reading the content of cookies from other websites (potentially gaining sensitive information).
    There isn't too much that SAP can do about this since this is a mechanism enforced directly by the browser.

  • Call Standard BSP from another Standard BSP

    Hi all,
    I would call a standard BSP (my case ACTIVITY BSP) from another standard BSP (OPPORTUNITY BSP) when change a predefined fields.
    I try to implement the following source code into the method IF_CRM_BSP_MODEL_ACCESS_IL~READ of the extended class, but nothing happens:
        DATA: url TYPE string.
        DATA navigation TYPE REF TO cl_bsp_navigation.
        DATA runtime TYPE REF TO cl_bsp_runtime.
        CALL METHOD cl_bsp_runtime=>get_runtime_instance
          RECEIVING
            runtime = runtime.
        CALL METHOD runtime->create_url
          EXPORTING
            application_name = 'CRMD_BUS2000126'
          RECEIVING
            url              = url.
        CREATE OBJECT navigation
          EXPORTING
            runtime = runtime.
        CALL METHOD navigation->goto_page
          EXPORTING
            url     = url.
    The previous code is correct to call another BSP?
    And where can I implement the code?
    Thank you very much.
    Giulio

    Hi,
      I am sending the code for the layout where you can write code to call a page or controller of a bsp from page.
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <htmlb:content design="design2003">
      <htmlb:page title = "first page ">
        <htmlb:form>
          <htmlb:textView     text          = "Material Details"
                              design        = "EMPHASIZED" />
          <br>
          <br>
          <htmlb:textView     text="Material"  design="STANDARD" ></htmlb:textView>
          <htmlb:dropdownListBox  id="Matnr"  table="<%= it_mara1%>"  nameOfKeyColumn="Matnr"
          nameOfValueColumn="Matnr"></htmlb:dropdownListBox>
          <br>
          <br>
          <htmlb:button       text          = "Press Me"
                              onClick       = "myClickHandler" />
           <br>
           <br>
           <htmlb:link id="link" text="Click Here"  reference="http://iga03019b.in.intelligroup.com:8000/sap/bc/bsp/sap/z_azaz_bsp_app6/display.htm">
           </htmlb:link>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    You write code for what to be displayed in the controller or oninputprocessing of a page of a called bsp.
    Regards,
    Azaz Ali.

  • Calling a BSP from ABAP with parameters

    Hi All,
    I am running a regular abap report in R/3 release 4.6C. This program calls a BSP using the FM Call_browser. Question: How can I pass parameters for my BSP program ?
    Thanks
    Marcelo

    You need to pass name value pair to the URL
    for example page.htm?variablename1=variablevalue1&variablename2=variablevalue2
    Please not that these variables should have been set as page attributes with auto option checked.
    Regards
    Raja

  • Calling a procedure from HTML website

    Hello
    I have created a procedure which up dates my database.
    e.g.
    http://mydomain.com/apex/ATC01.LOG_PAGE_HTLM?page_no=1&supplier_key=92185&application_no=88
    It records hits etc on website.
    I have tested it from a browser it works fine. Now I wish to call it each time a page in a website is loaded.
    The solution I have tired is
    <body onload="getURL('http://mydomain.com/apex/ATC01.LOG_PAGE_HTLM?page_no=1&supplier_key=92185&application_no=88')">
    I may have syntax error or go about this the wrong way
    Any help all ways welcome
    Regards, Pete

    Dear All
    Looks like AJAX is the solution
    I looked and try to get it working with my URL without sucesss
    Can anyone see waht I am doing wrong?
    In this example I used "onclick" what is best way to calling the AJAX as wish to perform it each time a web page is open?
    Thanks, Pete
    <html>
    <head>
    <script type="text/javascript">
    function loadXMLDoc()
    var xmlhttp;
    if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
    else
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    xmlhttp.onreadystatechange=function()
    if (xmlhttp.readyState==4 && xmlhttp.status==200)
    document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
    xmlhttp.open("GET","http://www.b2b66.com/apex/ATC01.LOG_PAGE_HTLM?page_no=1&supplier_key=92185&application_no=88",true);
    xmlhttp.send();
    </script>
    </head>
    <body>
    Edited by: Pete88 on Sep 23, 2011 9:40 AM
    Edited by: Pete88 on Sep 25, 2011 8:17 PM

  • CALL BSP from ABAP report

    I want to execute a BSP from ABAP report. The BSP is the standar CRM CASE MANAGEMENT BSP.
    I have a CRM CASE list in ABAP report and when I make double-click on one case i want to call BSP to show this case. I don't want to execute the GUI transaction CRMD_CASE. I need to execute the BSP.

    Hello Ivan,
    To call the BSP from the ABAP report following thread will be helpful for you.
    Call BSP from SE38 Program ?
    Regards
    Aashish Garg
    Message was edited by:
            aashish garg

  • Calling BSP from report and return control back ?

    Hi All,
          My requirement is as follows :-
    1. I am calling a BSP from report using CL_GUI_HTML_VIEWER->show_url. The BSP page is displayed successfully.
    2. Then, I perform some operations and want to return some data back to the main program (from where it was called - Report) and continue execution from there
    How do I accomplish the second requirement (Control doesnt come back once I close the BSP) ?
    Regards,
    Ashish

    how to generate events from html code in the html control back to your ABAP check out this demo program
    SAPHTML_EVENTS_DEMO
    say for example, in your case you are showing the BSP in GUI HTML control and on clicking a link you want to pass some data from your link to ABAP program and the ABAP should receive the value and process it and may be comeback to same BSP or go some to some other screen/transaction.
    steps to follow:
    after creating the html control
    register event for call back and call the BSP url.
    create object hviewer
                 exporting
                   parent = mycont.
        myevent-eventid = hviewer->m_id_sapevent.
        myevent-appl_event = 'x'.
        append myevent to myevent_tab.
        call method hviewer->set_registered_events
          exporting
            events = myevent_tab.
        create object evt_receiver.
        set handler evt_receiver->on_sapevent
                    for hviewer.
        hviewer->enable_sapsso(
          exporting
            enabled    = 'X'
          exceptions
            cntl_error = 1
            others     = 2
        if sy-subrc <> 0.
        endif.
        call method hviewer->show_url
          exporting
            url = wf_url.
    in your BSP the link should look like below
    A HREF=SAPEVENT:TAGS?value to be passed to your ABAP> link text </a
    when you click this link in bsp then you can then capture the value "TAGS" to know which link was clicked and the value passed after the ?
    link is just one option, you can also send whole form data.
    this type of link and form will only work when your BSP is invoked within HTML contro. if its invoked from standalone browser these wont work. so you amy want to dynamically show/hide "sapevent" links based on where it runs.
    Hope this is clear. if not do getback.
    Regards
    Raja
    Edited by: Durairaj Athavan Raja on Sep 9, 2008 1:04 PM

  • How can I fix 2121 sandbox security error, local swf MP3 player test calls MP3's from website?

    1st Issue.  I am a new user and am fighting #2121, #2044 & #2048 Flash security errors in getting an MP3 player to work as I test the fla file in Flash CS4 on my local computer.  The fla in Flash and swf in Dreamweaver calls mp3 files from our host server on the internet.
    After reading various sparce posts and Adobe articles on this issue, I have added a crossdomain.xml file at our websites root (see file below) and added the code, flash.system.Security.allowDomain in line 1 of the action script of the flash fla to allow our site access (-see script below).  These efforts have helped get the player to work better on our test site.
    But, I am still getting the 2121 error within Flash CS4 as I debug the player or play the swf in live view within Dreamweaver.  Playing the fla or swf will lock-up the Flash 10 player and crash the program. I am having the mp3 player access the mp3 files from our web site as I test the fla.
    Here is the debug message I am getting:
    Attemping to launch and connect to Player using URL C:\Web Site Files\Plank Productions afc\Plank Productions 2010\site\MP3_List_Player_AS3.swf [SWF] C:\Web Site Files\Plank Productions afc\Plank Productions 2010\site\MP3_List_Player_AS3.swf - 209827 bytes after decompression SecurityError: Error #2121: Security sandbox violation: Sound.id3: file:///C/Web%20Site%20Files/Plank%20Productions%20afc/Plank%20Productions%202010/site/MP3%5FList %5FPlayer%5FAS3.swf cannot access . This may be worked around by calling Security.allowDomain.
    at flash.media::Sound/get id3()
    at com.afcomponents.mp3player::MP3Player/get id3()
    at com.afcomponents.mp3player::MP3Player/handleBuffe ring()
    Here is the crossdomain xml code:
    <?xml version="1.0" encoding="utf-8"?>
    <?xml version="1.0"?><!DOCTYPE cross-domain-policySYSTEM "http://www.macromedia.com/xml/dtds/cross-domain- policy.dtd">
    <cross-domain-policy>
    <allow-access-from domain="www.plankproductions.com" secure="false"/>
    <allow-access-from domain="plankproductions.com" secure="false"/>
    </cross-domain-policy>
    Here is the AS3 in line 1 of the Fla file that I added:
    flash.system.Security.allowDomain("www.plankproductions.com", "plankproductions.com");
    2nd Issue.  The online playback of the mp3 player will play about 4-7 mp3’s then lock-up in Internet Explorer 8 on a pc.  I think that is related to flash security, not sure, I do not know how to debug the mp3 player on the web site.
    http://plankproductions.com/pptemplate_afc_mp3.shtml
    Questions.
    -How can I resolve the error 2121?
    -What as3 code do I need to target the local c drive to have security clearance and work properly, is this the problem?
    -Why is the mp3 player locking up on the web page?
    Thank you in advance for any help.
    Operating System: Windows XP Professional, CS4 Web Premium

    Do you have the standard or debug player installed?  Such errors should not occur with the standard player.
    See http://helpx.adobe.com/flash-player/kb/find-version-flash-player.html#main_Find_Flash_Play er_version_type_and_capabilities__Flash_developers_only_

  • How can i call a zreport from my bsp page.

    Hi friends,
    How can i call a zreport from my bsp page.
    Moosa

    Hi Friend,
    These are the codings  to be wirtten in BSP for transferring values to the REPORT
    DATA:wf_date TYPE ztable-ID.
          data:seltab type standard table of rsparams,
           wa_seltab like line of seltab,
         event TYPE REF TO if_htmlb_data.
    DATA:p_value TYPE REF TO CL_HTMLB_INPUTFIELD.
    event = cl_htmlb_manager=>get_event( runtime->server->request ).
    p_requ ?= CL_HTMLB_MANAGER=>GET_DATA(
                                            request  = runtime->server->request
                                            name     = 'inputField'
                                            id       = 'i1'
    if p_requ is not initial.
      wf_date = p_requ->value.
    endif.
    clear wa_seltab.
    if wf_date is not initial.
      wa_seltab-selname = 'P_REQU'.
      wa_seltab-kind = 'P'.
      wa_seltab-option = 'EQ'.
      wa_seltab-low = wf_date.
      append wa_seltab to seltab.
    endif.
    submit *ZSAMPLEAP1* with selection-table seltab AND RETURN  .(ZSAMPLEAP1 refers to the report name and AND RETURN for coming back to the BSP page after the completion of its operation in Report )
    IMPORT int_name TO int_name FROM MEMORY ID '*zid*'.(For importing the obtained value from Report)
    In Report
    REPORT  ZSAMPLEAP1.
    SELECT-OPTIONS: p_requ FOR ztable-id  NO INTERVALS.
    SELECT SINGLE name from ztable into int_name WHERE id = p_requ-low.
    WRITE:int_name.
        EXPORT int_name TO MEMORY  ID 'zsharmila'.
    With Regards,
    SHARMILA BRINDHA.M

  • Calling BSP from Workflow

    Hi,
      Can we call an BSP page from within workflow step and can it show in Universal worklist of the Enterprise Portal?
      If it possible then from which version of Web application server and enterprise portal it is supported?
    Thank you
    arun

    I am imaginating that you what to put the web page as an attachment in a work item.
    Well, first try to put the URL of your app into the workitem description. If this solution is doesnt like you you can develop an ABAP application that shows your BSP and then just put this application in a transaction.
    Note: check this blog
    /people/thomas.jung3/blog/2004/08/26/updated-calling-a-bsp-application-from-a-sapgui-transaction
    Then create a METHOD (in your business object) that executes this transaction, and use this method in your step.
    Best regards
    Ariel

  • Calling BSP from EBP

    Hi ,
    Has anybody called BSP page from EBP/ITS application ?
    How can I call BSP from ITS ?
    Thanks & Regards,
    Sachin S M

    Hi Sachin,
    the easiest way is to call the BSP as a "catalog"
    Just publish your BSP, then you may find under tab properties the copmplete URL for your BSP Application.
    Then just define a catalog in spro
    "Enterprise Buyer->Master Data->Define Catalogs"
    where you define a "catalog" with the URL under catalog application call structure.
    Result:
    You should find an entry under your tab caltalogs with  the description from your entry made in the customizing.
    Regards
    Andreas

  • Calling a BSP page with flow logic from LAYOUT

    Hello all.  I am developing a BSP transaction to update HR data on SAP.  I initially developed this with one 'page with flow logic' and several 'page fragment's.  It has been suggested that I break this out into several pages with flow logic because the code in  the 'OnInputProcessing' Event Handler was getting quite complicated.  I was using the BSP directive to execute my 'page fragments'.  This was very simple to do.  What do I replace the BSP directive to call a page fragment with in order to call a page with flow logic.  I have included the code below.  I have converted the 'body.htm' 'page fragment' to a 'page with flow logic' and I am not sure of the correct way to call the page.  I do not have access to the navigation->goto_page( 'body.htm' ) at this point.  I am new to BSP and appreciate any help offered.
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <%@extension name="phtmlb" prefix="phtmlb" %>
    <%@extension name="xhtmlb" prefix="xhtmlb" %>
    <htmlb:content id     = "content"
                   design = "design2002+design2003" >
      <htmlb:document disableBackspaceNavigation="TRUE" >
        <htmlb:documentHead title="ESS: Employee Self Service" >
        </htmlb:documentHead>
        <htmlb:documentBody>
          <htmlb:form id="OOEform" >
            <%-- Positioning --%>
            <htmlb:gridLayout columnSize = "2"
                              rowSize    = "2"
                              width      = "100 %" >
              <%-- Row 1 - Header --%>
              <htmlb:gridLayoutCell columnIndex       = "1"
                                    rowIndex          = "1"
                                    colSpan           = "2"
                                    width             = "100 %"
                                    verticalAlignment = "MIDDLE" >
                <DIV style="border-bottom-style:solid;border-color:#A5B1BF;border-width:20px">
                <%@include file="header.htm" %>
                </DIV>
              </htmlb:gridLayoutCell>
              <%-- Row 2; Column 1 (Body Area) --%>
              <htmlb:gridLayoutCell columnIndex       = "1"
                                    rowIndex          = "2"
                                    width             = "80%"
                                    verticalAlignment = "MIDDLE" >
                <%@include file="body.htm" %>
              </htmlb:gridLayoutCell>
              <%-- Row 2; Column 2 (Right Area) --%>
              <htmlb:gridLayoutCell columnIndex         = "2"
                                    rowIndex            = "2"
                                    width               = "20%"
                                    verticalAlignment   = "TOP"
                                    horizontalAlignment = "LEFT" >
                <%@include file="right.htm" %>
              </htmlb:gridLayoutCell>
            </htmlb:gridLayout>
          </htmlb:form>
        </htmlb:documentBody>
      </htmlb:document>
    </htmlb:content>

    Hi,
    uhmmm, as it was previously suggested, you should perhaps think about MVC for your development. Working with classes and methods gives you more room for a better looking code. But at this point I´m not sure where your real problem is. You mentioned first that you created one page with logic and several page fragments and then you are worried because the code in the OnInputProcessing event is getting out of control
    First, you cannot insert a page in a page. You can only insert fragments in a page with <%@include file="header.htm" %>.
    Second, if you don´t have idea of MVC or you don´t want to switch to MVC, then create a modules program (SE38) where you´ll enter your code as subroutines and you call these subroutines from OnInputProcessing as follows:
    perform subrout1 in program XXXXXX tables YYYYY using AAAAA.
    In your programm XXXXX you declare the code as:
    form subrout1 in program XXXXXX tables YYYYY using AAAAA.
    This can be a substitute to classes and methods.

Maybe you are looking for

  • What to look for in an external monitor

    I am in the process of changing my editing system to handle hd. I am using a 24" imac 2.4 Intel Core 2 Duo. With my sd set up I used a Sony dv/dvcam deck and a JVC professional 13" Monitor. I am purchasing the new JVC gy-hm100u camcorder when it is r

  • Iphone 5 doesn't turn on

    Hi everyone I was gifted an iPhone 5 for Christmas, however I received it from USA. I reside in the UK. The phone was working fine and all of a sudden does not turn on. I have tried everything. Even connecting to the computer it doesn't get detected.

  • Urgent:Error in sending out OTP at OAAM

    Hi OAAM/SOA Experts, I have configured OAAM to send out one time password through SMS-C using the doc http://docs.oracle.com/cd/E21764_01/doc.1111/e14568/otp.htm in this implementation OAAM calls the UMS Server Web service send out the one time passw

  • Welfare Cases what exactly does priority mean?

    We have been awaiting a fix on a welfare case since last Saturday, first reported on Friday 20th but still no commitment from BT as to when the service will be restored. All we get is excuses from the BT call centre along with promises of call backs

  • Why are complex Smart Mailbox rules not available?

    I wonder if this is a technical limitation in OSX Mail, or simply that Apple can't find a good way to present the UI. Here are some rules I can create in OSX Mail for filtering or for smart mailboxes: ALL rule: Find mails which are **in the last 31 d