Setting dynamic recipient for a publication is failing

I have a publication which has the dynamic recipient set up as a crystal report template. I am trying to change this dynamic recipient template using the below code. However, it does not work-
string newPublicationQuery = @"SELECT * FROM CI_INFOOBJECTS WHERE SI_KIND = '"
    + InfoStore.CeKind.PUBLICATION + "' AND SI_NAME = '" + newPublicationTitle + "' AND SI_INSTANCE = 0";
newPublicnInfoObjects = infoStore.Query(newPublicationQuery);
if (newPublicnInfoObjects != null && newPublicnInfoObjects.Count > 0)
    newPublication = (Publication)newPublicnInfoObjects[1];
    // Get the collection of publication event handlers and add a handler to retrieve dynamic recipients.
    handlers = newPublication.PublicationEventHandlers;
    handler = handlers.GetPublicationEventHandler(2583);
    handlerInfo = handler.Add();
    // Configure the event handler to use a dynamic recipient data provider.
    handlerInfo.PluginClassName = "com.businessobjects.publisher.dynamicrecipients.crystalreports.CRDataProvider";
    // Set the new report template as the dynamic recipient template for the publication
    handlerInfo.DynamicDataDocumentID = newDynRecRepId;
    newPublication.Save();
    infoStore.Commit(newPublicnInfoObjects);
The code works without any errors. However the dynamic recipient template is still the same old one.
Can anyone please help? Thanks in advance.

Thanks for the prompt response Dan.
I checked the Publication Extension link and didn't see any extensions there. I assumed the event handler is present because the Add() was giving an error (like you say above). And yes, it was because it already had property "SI_ON_READ_RECIPIENTS" in the object.
I have now done the following changes to the code to see if it helps-
// Get the collection of publication event handlers and add a handler to retrieve dynamic recipients.
handlers = newPublication.PublicationEventHandlers;
handlers.RemovePublicationEventHandler(2583);
handler = handlers.AddPublicationEventHandler(2583);
handlerInfo = handler.Add();
// Configure the event handler to use a dynamic recipient data provider.
handlerInfo.PluginClassName = "com.businessobjects.publisher.dynamicrecipients.crystalreports.CRDataProvider";
handlerInfo.DynamicDataDocumentID = newDynRecRepId;
Above I remove the eventhandler and add it again. However, even this does not work. The publication still has the old dynamic recipient template. Not sure what I am missing here.

Similar Messages

  • Set dynamic variant for time

    Hi,
    I have selection options for field as defined as TIME . I need to set dynamic variant for this field as
    TIME should be "from"='current time-30 minutes' and "to"='24:59:59'.
    This report going to run in 00 hours and 30 hours (48 times ie 24 X 2)
    PS : Pl. remember this is for a SAP standard report
    Any Info?

    Naimesh Patel wrote:
    > I digged more deeper and found one FM RS_VARI_V_INIT_TIME which fill the options like Current Time, Current Time +/- ???, From Start of Day to Now etc. and Surprisinly all 3 options are hardcoded in it..!!
    As you suggested due to hardcoded values here , we could not able to do much on this.
    So i came in round away solution. Whenever program A called ( program with TIME selection input) i have called another custom program C . (This custom program will using the following function module RS_VARIANT_CONTENTS, and RS_VARIANT_CHANGE , So get the DEFAULT variant content of program A and change the variant content with LOW as current time - 30 and HIGH with 24:59:59)  as preceding job.
    In PI 7.01 system program A always called in JOB mode
    Thanks for info.

  • How Can i SEt Dynamic Variant For WEEK on SELECTION Screen.pls help me..

    <b>Hi ALL..
    Pls Help Me for this Problem..i am very confused how can i do that...plese tell me proper process..
    i  want set Dynamice Varient for WEEK on Selection screen..
    I have ALrady SET Dynamice Varient for DATE on Selection Screen.ther isd option is D...but in case of WEEK there is a no option...
    Plese help me..
    thaks in advance..
    pls help me..</b>

    Hello,
    Define your select-option in TVARV (assume Z_THISWEEK). And use a program like:
    DATA:
      zlv_week TYPE KWEEK.
    call function 'DATE_GET_WEEK'       
       exporting date = syst-datum
       importing week = zlv_week.
    SELECT SINGLE *
          FROM tvarvc
         WHERE name = 'Z_THISWEEK'
           AND type = 'S'
           AND numb = '0000'.
    tvarvc-low = zlv_week.
    IF syst-subrc <> 0.
        tvarvc-name     = 'Z_THISWEEK'.
        tvarvc-type     = 'S'.
        tvarvc-opti     = 'EQ'.
        tvarvc-sign     = 'I'.
        tvarvc-numb     = '0000'.
        insert tvarvc.
    ELSE.
      update tvarc.
    ENDIF.
    Regards,
    John.

  • Setting dynamic widths for textfields in as3?

    I have 3 textfields. they're in a sprite container. 1. date 2. pipe_mc movieclip 3. title field. I need to set it so that the textfield/mc/textfield;s x property changes dynamically when a shorter or longer date gets added into the field, via XML.
    Here is the code:
    addChild(dateline);
    dateline.addChild(date_txt);
    dateline.addChild(title_txt);
    dateline.addChild(pipe_mc);
    date_txt.x = 3;
    var spacer:Number = 10;
    if (date_txt.textWidth >= 90) {
    pipe_mc.x = date_txt.x + date_txt.width + 18;
    title_txt.x = pipe_mc.x + pipe_mc.width + spacer;
    else if (date_txt.textWidth <= 90) {
    pipe_mc.x = date_txt.x + date_txt.width - 18;
    title_txt.x = pipe_mc.x + pipe_mc.width + spacer;
    pipe_mc.visible = true;
    Any help or suggestions are welcome
    Thanks

    Do you have the textfield set up to be autoSized?  Is there a reason for having three textfields separate rather than combining the text into one textfield with sufficient spacing between the entries?

  • How to set Dynamic variant  for a program

    Hello experts,
    I want to set variants dynamically on a selection screen. Please help me.
    Thanks,
    Ashwani.

    Hi Ashwani,
    The variant can be set using:
    SUBMIT program name [USING SELECTION-SET <var>]
    USING SELECTION-SET <var>
         This option tells the system to start the called program with the variant <var>.
    For further details you can refer the link below:
    http://help.sap.com/saphelp_nw04/Helpdata/EN/9f/dba51a35c111d1829f0000e829fbfe/frameset.htm
    Also refer,
    http://sapbrainsonline.com/sap-training/SAP-tutorial-pdf-material_425.html
    Regards,
    Soundarya.
    Edited by: K.Soundarya Singh on Mar 16, 2010 7:16 AM

  • How to set dynamic value for field Month when running background job ?

    Dear guys,
    I have a Z* report in our company, in the selection screen there is a period field (Month and Year) and this report running in background job periodically. My Question is how i can set for Month field become dynamic follow month value of date when this report executed ?
    Example :
    When Z* report running in background on 16.04.2008, Month Value will be 04 and when running on 16.05.2008, Month Value will be 05.
    Please advice.
    Regards
    Gunawan

    Dear guys,
    I have a Z* report in our company, in the selection screen there is a period field (Month and Year) and this report running in background job periodically. My Question is how i can set for Month field become dynamic follow month value of date when this report executed ?
    Example :
    When Z* report running in background on 16.04.2008, Month Value will be 04 and when running on 16.05.2008, Month Value will be 05.
    Please advice.
    Regards
    Gunawan

  • Setting dynamic language for WD ABAP application iView

    Hi,
    I have created an iView for a WD ABAP application which runs with two languages, EN and FR.
    When I run this application with app parameter sap-language=EN or FR, it works fine in corresponding language.
    How do I set this in its portal iView so that it picks up browser language?
    Thanks and regards,
    Amey

    HI Amey,
    The language is determined in the order below.
           1.      sap-language URL parameter
           2.      Default language in the setting for the system logon
           3.      Web browser languages (Accept-Language)
           4.      Default language of the SAP system
    Refer to
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/7b/fb57412df8091de10000000a155106/frameset.htm
    Just clear the logon language parameter for the user in SU01 and it should pick the browser language.
    If you change the browser language, you will have to logout and login again to the portal for the changes to take effect.
    Thanks
    Prashant

  • Setting Expiration period for Maintenance Plan Backups fails to work in sql server 2008

    I have created a Maintenance Plan to do a nightly full backup and set the backup
    set to expire after 4 days in sql server 2008 R2.
    Weeks later, old backups are sitting on the hard drive.Please do the needful.

    I have created a Maintenance Plan to do a nightly full backup and set the backup
    set to expire after 4 days in sql server 2008 R2.
    Weeks later, old backups are sitting on the hard drive.Please do the needful.
     Can any one please explain what is the use of BACKUP Expiration ??? 
     I created a backup with expiration date but still am using the same backup file to restore databases?? Then what is the use of Expiration date?

  • Error editing task sequence: Failed to load dynamic properties for class "SMS_TaskSequence_ApplyWindowsSettingsAction" From XML into WMI

    I've started getting an intermittent error editing my Windows 7 OSD task sequence.  Sometimes I can open the TS to edit, but when I try to apply changes I get the error.  Other times I get the error when trying to open the TS.  If I try again
    right away, I still get the error, but if I wait a few minutes and try again sometimes it will open the TS. 
    The error reads:
    ConfigMgr Error Object:instance of SMS_Extended Status{Description = "Failed to load dynamic properties for class \"SMS_TaskSequence_ApplyWindowsSettingsAction\" from XML into WMI";Error Code = 2147943746;File = "e:\\qfe\\nts\\sms\\siteserver\\sdk_provider\\smsprov\\ssptspackage.cpp";Line = 3454;Operation = "ExecMethod";ParameterInfo = "SMS_TaskSequencePackage";ProviderName = "WinMgmt";StatusCode = 2147749889;}
    Coinciding with this error, I show the following entries in the TaskSequenceProvider.log file: 
    [PID: 7608] Invoking method SMS_TaskSequence.LoadFromXml
    TaskSequenceProvider
    Failed to protect memory buffer, hr=0x80070542
    TaskSequenceProvider
    Failed to load dynamic properties for class "SMS_TaskSequence_ApplyWindowsSettingsAction" from XML into WMI 0x80070542 (2147943746)
    TaskSequenceProvider
    Failed to load node Apply Windows Settings from XML into WMI 0x80070542 (2147943746)
    TaskSequenceProvider
    Failed to load children steps for node "PostInstall" from XML 0x80070542 (2147943746)
    TaskSequenceProvider
    Failed to load children steps for node "Execute Task Sequence" from XML 0x80070542 (2147943746)
    TaskSequenceProvider
    Failed to load children steps for node "" from XML 0x80070542 (2147943746)
    TaskSequenceProvider
    Failed to load XML for the task sequence into WMI 0x80070542 (2147943746)
    TaskSequenceProvider
    [PID: 7608] Done with method SMS_TaskSequence.LoadFromXml
    TaskSequenceProvider
    Setting status complete:  status code = 0x80070542; Failed to load dynamic properties for class "SMS_TaskSequence_ApplyWindowsSettingsAction" from XML into WMI
    TaskSequenceProvider
    I exported the task sequence and checked in "object.xml" for the "ApplyWindowsSettingsAction", to see if there was something odd in the xml, but I don't find anything that jumps out as being wrong.  Here's the section of XML for
    that step.  I've removed identifying info, and replaced it with a generic term in bold.
    <step type="SMS_TaskSequence_ApplyWindowsSettingsAction" name="Apply Windows Settings" description="" runIn="WinPE" successCodeList="0" runFromNet="false"><action>osdwinsettings.exe /config</action><defaultVarList><variable name="OSDLocalAdminPassword" property="AdminPassword"></variable><variable name="OSDComputerName" property="ComputerName">%_SMSTSMachineName%</variable><variable name="OSDProductKey" property="ProductKey"></variable><variable name="OSDRandomAdminPassword" property="RandomAdminPassword">false</variable><variable name="OSDRegisteredOrgName" property="RegisteredOrgName">COMPANY NAME</variable><variable name="OSDRegisteredUserName" property="RegisteredUserName">COMPANY NAME</variable><variable name="OSDServerLicenseConnectionLimit" property="ServerLicenseConnectionLimit">5</variable><variable name="OSDTimeZone" property="TimeZone">Central Standard Time</variable></defaultVarList></step><step type="SMS_TaskSequence_ApplyNetworkSettingsAction" name="Apply Network Settings" description="" runIn="WinPEandFullOS" successCodeList="0" runFromNet="false"><action>osdnetsettings.exe configure</action><defaultVarList><variable name="OSDDomainName" property="DomainName">DOMAIN.COM</variable><variable name="OSDJoinPassword" property="DomainPassword"></variable><variable name="OSDJoinAccount" property="DomainUsername">DOMAIN ACCOUNT</variable><variable name="OSDEnableTCPIPFiltering" property="EnableTCPIPFiltering" hidden="true">false</variable><variable name="OSDNetworkJoinType" property="NetworkJoinType">0</variable><variable name="OSDAdapterCount" property="NumAdapters" hidden="true">0</variable></defaultVarList></step>
    Is there any other log I should check for a clue on this issue?  What could be causing this error?

    Thanks for sharing that!  I tend to save contacting MS support until after I've exhausted other options.  I'm always afraid that I'll spend the $500 to open a case and then it turns out to be something simple that I would have found if I had just
    kept working on it myself a little longer.
    It looks like that link is for an update released in February as KB3023562.  I downloaded and installed it. I'll try opening/editing/saving the task sequence a few times today to see if the issue is resolved.  
    After I had already installed it, I thought to look up that update in configmgr.  The update is listed as superseded by 2 other updates.  The newest of those is KB3046049, which just installed last night with the other March patches, so it's possible
    that I didn't need to install KB3023562 after all.  

  • Passing Range Parameter for BO Publication for Dynamic Recepient list

    Hello,
    We have a Crystal report on top of BEx and we are passing input values for the parameters using another Crystal Report.
    We are trying to pass a date range from Dynamic Recipient List to date prompt under personalization.
    The format in which we are trying to pass is "05/06/2010 : 09/22/2010" and we are getting the below error in log file:
    Document for recipients {} failed: Internal error.
            Document for recipients {} failed: Cannot Map Multiple Profile Values to a Single Parameter Field: {[ZOC_DATE]} in Report: ABC_VendorFiscal.
            Document for recipients {} failed: Internal error. (FBE60502)
    How do we the pass values to date range?
    Regards,
    Vishal

    I came accross the same problem with BIP 4.0 and CR2011 on BW MDX.
    By searching on the SAP notes I have found this one which is apparently only a workaround:
    1544713
    Kind regards,
    Sylvain

  • Setting recipient for system emails

    When someone subscribes to our newsletter with a bad email address, i receive a system message (from [email protected]) reporting that the system email to the subscriber failed.
    I would like to change the recipient of these emails to another one of our system users and cant discover where to set the recipient details.
    Can anyone help?

    Hi,
    It's either the double opt-in email (under system emails) or the auto-responder email (for the campaign list or the webform, depending on what you use). That's the email that the system tries to send "from" your email address to the person that subscribes - this email bounces and you get the system message.
    Hope this helps - if you still have problems, I'd recommend opening a new case and attaching one of the emails you get so that support can sort this out for you.
    Thanks and regards,
    Florin

  • How to set up Dynamic Variants for job which is based on Pay Period

    Hi,
    We need to set up dynamic variant for payroll interface.  This interface is based on Pay periods and that is why we need to use different variant for each month.  Letus know how to set up dynamic variant which will take care of Pay Periods

    Hi,  Thnx for reply.
    We are not changing the control records, current period will be some old period in system. 
    payroll is not processed in SAP,

  • How to dynamically set connection string for report in C# code?

    Hi,
    I have installed CRVS2010. I have created new Crystal Report WPF Application and new report. I would like to set connection string for report in code dynamically.
    Is this possible?
    Thanks
    Ivana

    Lots of posts in this forum on how to set database connections. WPF should not be a consideration as it's just a viewer. The report engine is still the same. Search these forums. Use the search box at the top right corner of this page. Look at samples here:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
    Note that none of the samples above are using WPF, but like I said, the WPF is just a different viewer and will not impact how the report engine logs on to a database. (I think of it as a gray car vs. a red car. Same engine, just the color is different)
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • How to Change Value set Dynamically for a Parameter in Apps?

    Hi All,
    I have a requirement where i need to change the value set dynamically for a given Parameter. This goes as, I have a Concurrent Program with 4 parameters. First Parameter is mandatory Business group.Second Parameter is Warehouse. Based up on the First parameter the second parameters LoV's are displayed, the third and fourth parameters value sets are dependent up on the Second parameter value. Parameter 2,3,4 Value sets are Table type. So i Used .$FLEX$.Value_setname to retrive the LOV's
    The Requirment now is that if the User doesn't enter the Parameter 2 than the Third Parameter field must be Open and he must be able to enter the Free text. In my case it is an Order Number. If the User enters the paramter 2 value than LOV's for ORder number pertaining to that Warehouse must get displayed. I've figured that this can be possible only if i change the Valuesets Dyanamically. I'm not sure if that is possible or not.
    I have tried :
    Using a Dummy Parameter with a new valueset(Transactable Independent) and giving Y and N based up on Warehouse parameter input.
    SELECT (DECODE ( :$FLEX$.WAREHOUSE_NAMES,NULL,'Y','N')) from dual;
    The default type was SQL.
    Then in the 3rd Parameter i have used Case function to differentiate Y or N. The third parameter being ORder number, is a table type and derived from Oe_order_headers_all.
    In the Query section i tried using dummy parameter value set to retreive the values. I was terribly Unsuccessful in doing so.
    Does the above Case exists or is Doable? Please, Help me out if somone had worked on Similar thing or have any idea of standard report/program using it in Oracle.
    Thanks alot for the Help!

    You will probably have better luck on the eBusinesSuite forum. This is more of a setup issue when defining your LOV and program parameters than it is a SQL or PL/SQL issue.
    http://forums.oracle.com/forums/category.jspa?categoryID=3
    Good luck - this is an aggravating issue to work with and I wish I did have the answer for you!

  • Dynamic Configuration - Set Directory Path for File Receiver Adapter

    Hi Experts,
    I have a question regarding the dynamic configuration for the file adapter. Is it possible to set a directory path without a message mapping for the file receiver adapter? the problem is that I want to import a pdf document. this pdf document I want to store in a dynamic directory (depending on the filename). so I have to read the filename out of the dynamic configuration and generate (depending on the filename) a directory for this file. Is that possible without a message mapping? I cannot make a message mapping because the file has the pdf format and should not get changed.
    best regards
    Christopher Kühn

    Hi Gaurav,
    I use the ASMA (respectively the filename) for the sender adapter. After the pdf was imported into XI this filename is in the ASMA.
    But what then??? How can I get this filename with the help of the variable substitution? and if I have this filename I have to change this filename a bit to generate the name / path of the directory.
    Please explain it to me detailled
    Thanks and regards
    christopher

Maybe you are looking for