PCD Attribute not saved for Role Folder

Hello,
I try to change a PCD-Attribute programmaticaly.
If I do it on an iView  (e.g. MyIview) - it works fine.
If i try on a Folder in a role (e.g. MyFolder) - it does not work !
I tryed two different approches - same behavour...
Apporach 1
String pcdLocation = "portal_content/MyRole/MyFolder";
//String pcdLocation = "portal_content/MyRole/MyIView";
IUser principalObj = this.getServiceUser("pcd_service");
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
env.put(Context.SECURITY_PRINCIPAL, principalObj);
env.put("com.sap.portal.jndi.requested_aspect", "com.sap.portal.pcd.gl.PersistencyAspect");
env.put("java.naming.factory.object", "__IPcdContext__");
InitialContext initialContext = new InitialContext(env);
IPcdContext pcmObj = (IPcdContext) initialContext.lookupLink(pcdLocation);
IPcdObjectFactory pcdObjectFactory =
((IPcdGlService) PortalRuntime.getRuntimeResources().getService(IPcdGlService.KEY))
  .getPcdObjectFactory();
IPcdAttribute newPcdAttr = pcdObjectFactory.createPcdAttribute(PcdAttributeValueType.BOOLEAN,
"com.sap.portal.navigation.Invisible");
newPcdAttr.set(0, new Boolean(true));
ModificationItem[] mods = new ModificationItem[] {
new ModificationItem(DirContext.REPLACE_ATTRIBUTE, (Attribute) newPcdAttr)};
pcmObj.modifyAttributes("", mods);
Apporach 2
String pcdLocation = "portal_content/MyRole/MyFolder";
//String pcdLocation = "portal_content/MyRole/MyIView";
IUser principalObj = this.getServiceUser("pcd_service");
Hashtable env = new Hashtable();
env.put(Context.SECURITY_PRINCIPAL, principalObj);
env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
env.put("com.sap.portal.jndi.requested_aspect", PcmConstants.ASPECT_ADMINISTRATION);
InitialContext initialContext = new InitialContext(env);
IAdminBase result = (IAdminBase) initialContext.lookup(pcdLocation);
IAttributeSet myIview = (IAttributeSet) result.getImplementation(IAdminBase.ATTRIBUTE_SET);
myIview.putAttribute(IAttriView.ATTRIBUTE_NAVINVISIBLE, "true");
myIview.save();
Any idea how to get NAVINVISIBLE - Attribute saved on a role-folder ?
tnx Johannes

Hi Johannes,
I guess you found a working alternative until now, but if not, you should try the other [modifyAttributes |http://help.sap.com/javadocs/NW04S/current/pc/com/sapportals/portal/pcd/gl/IPcdContext.html#modifyAttributes(java.lang.String,%20int,%20javax.naming.directory.Attributes] method on IPcdContext. Your code could look like this:
IPcdUtils factory = PcdAccess.getPcdUtils();
IPcdAttributes attributes = factory.createPcdAttributes();
IPcdAttribute navInvisibleAttribute =
     factory.createPcdAttribute(
          PcdAttributeValueType.BOOLEAN,
          IAttrPcmNavigation.ATTRIBUTE_NAVINVISIBLE);
navInvisibleAttribute.add(Boolean.TRUE);
pcdContext.modifyAttributes(
     StringUtils.EMPTY,
     IPcdContext.REPLACE_ATTRIBUTE,
     modifiedAttributes);
This works in my application, so I never tried working with ModificationItem again. Maybe the implementation is somehow insufficient, but I didn't investigate it further (time pressure kills us all). However, please notice that REPLACE_ATTRIBUTE will replace or create the attribute as specified in the DirContext. Hope that helps.
Best regards,
Fabian

Similar Messages

  • Mail attachments not saving to the folder I choose

    My mail attachments are not saving to the folder I choose.  When I select a file to save in the mail drop-down box, I am given options to save to a folder of my choice.  However, when I select save the document is actually saved deep in some Mail Downloads area, not in my chosen folder.  Has anyone had a similar problem and found a solution?

    What kind of files are you trying to attach?
    Is it all recipients having this problem or specific one(s)?
    Could you possibly post a screenshot of the sent message from your side and a screenshot of what the recipient sees?
    What happens if you send one of these messages to yourself?
    If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem.
    "All knowledge is worth having."

  • Using Windows: Send to -- Mail recipient, msg is sent OK, but not saved in Sent folder, with err msg about it. Sending from within Thunderbird: msg saved OK.

    When using Windows 8.1 context menu: Send to --> Mail recipient, message is sent OK, but not saved in Sent folder, with error massage: There was an error saving the message to Sent. Retry? (selecting Retry doesn't help).
    Similar issue happens when I open a ".eml" file and Reply of Forward it.
    When composing a new message from within Thunderbird, all is OK, including saving in the Sent folder.
    Already tried:
    Compacting the Sent folder.
    Compacting all folders of the account.
    Uninstall Thunderbird and install the latest version (31.6.0).

    When using Windows 8.1 context menu: Send to --> Mail recipient, message is sent OK, but not saved in Sent folder, with error massage: There was an error saving the message to Sent. Retry? (selecting Retry doesn't help).
    Similar issue happens when I open a ".eml" file and Reply of Forward it.
    When composing a new message from within Thunderbird, all is OK, including saving in the Sent folder.
    Already tried:
    Compacting the Sent folder.
    Compacting all folders of the account.
    Uninstall Thunderbird and install the latest version (31.6.0).

  • Settings NOT saved for the iPod, because- not found

    I've a lot of regular changes to make when updating my music library on my iPod. But when I'm in the middle of doing so - that is using TAB "Music" (which "Sync Music" enabled) - and checking all relevant playlists, an error appears:
    "The settings were not saved for the iPod “<my iPod name>” because it could not be found."
    I don't know what to do because the only related articles all dates back to… 2007! That's 5 years ago!!!
    Of course I tried all the solutions of 2007, and when I do other errors occur like:
    "iPod sync failed" OR… my iPod simple disappears from the list (and even DEVICES doesn't shows up anymore in the left pane).
    THANKS for helping me.

    Can you post a link to the article you are referring to?
    I assume you have tried using a nother USB sync cable to help rule out the possibility of a faulty one?  What about plugging the iPod into a different USB port on your Mac?
    It might help to remove any other USB devices you have connected to the Mac. Then reboot the Mac as well as your iPod by pressing and holding both the Select/Center and Menu buttons together long enough for the Apple logo to appear. Then try to resync.
    Could you provide the full text from the error messages you are referring to?
    Make sure you are running the latest version of iTunes (10.6.3).
    B-rock

  • Item translations are not saved for copied page

    Hello,
    item translations are not saved for copied page. Is it expected?

    Hello,
    >> item translations are not saved for copied page. Is it expected?
    I’m not sure what you mean by not saved, but if you expect to copy a current translated page into a new page, and inherent the translation in the new page, the answer is NO, it’s not saved.
    Adding a new page to your application, even by copying an existing page, is a major change in your primary language application, which create multiple new independent elements in your application (after the page has been copied, there isn’t any link between it and the original page). You need to re-seed the primary application, export a new XLIFF file, and translate the new <trans-unit> that were added to it.
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Forthcoming book about APEX: Oracle Application Express 3.2 – The Essentials and More

  • Sent E-mails Not Saved In Sent Folder

    A while back I posted a topic about randomly sent e-mails not being saved in the Apple Mail Sent folder. At the time I thought it had something to do with AOL. BTW, I am using Apple Mail to access AOL's e-mail servers.
    I am also using Apple Mail to access the e-mail servers for a web account I have with Your-Site.com. The same thing happened. I was sending an e-mail with a 6MB attachment. The Apple Mail status bar was holding steady at the half way mark. But it was not moving for about 2-3 minutes. Eventually the status bar disappeared. I checked my Sent folder and the e-mail I sent was not listed. No error messages. I did happen to bbc myself to another e-mail account that I have and it did make it there. But I have no idea if the e-mail was received by the company who I addressed it to.
    I sent a follow-up e-mail to ask if they have received it but have not heard anything back.
    Should I assume they got it since the bbc was successful?
    Also, is it possible for randomly sent e-mails not to be saved in the Apple Mail Sent folder? And if so, why is that?

    I have the same problem, and I think my mail is an older version 1.3.11 (I don't know why it's not updated though!!) Anyway... it's very frustrating, but I know that even it's not copied in the sent forder, the recipient receive the message. But We don't have any proof until the recipient reply or tell us that he had it. I could say that 97% of my message are copied in the sent folder and the other 3% is lost I don't know where... Why ? I don't understand... I there a probleme with the server .mac or the Mail app. ???
    Thank you

  • Workbook not saving in ROLE

    Hello,
    I have one workbook in direct BI production. What happened user having "create authorization"' and after creating he has saved in Favorites.
    Now he wants that particular workbook to be saved in existing role so that i will be available for others.
    when he is doing that he is getting message like this     "you are not assigned to role"..
    Can u please suggest solution for this..
    Amit Shetye
    9766392606

    hi,
    it could be again an authorization issue,just chk whether the auth is available to assign
    Ramesh

  • Downloads not saving to Downloads folder

    Downloads are not saving to the designated "Downloads" folder in My Documents.
    Instead, they are saving to C:\Documents and Settings\{username}\Local Settings\Temp.
    Tools/Options setting is pointed at Downloads, but the files just aren't saving there.

    It is possible that your anti-virus software is corrupting the downloaded files or otherwise interfering with downloading files.<br />
    Try to disable the real-time (live) scanning of files in your anti-virus software temporarily to see if that makes downloading work.
    See "Disable virus scanning in Firefox preferences - Windows"
    *http://kb.mozillazine.org/Unable_to_save_or_download_files

  • Issue regarding 0MATERIAL_ATTR  - Attribute not Updated for Some Materials

    Hi All,
    As per requirement, I had enhanced 0MATERIAL_ATTR DS with one customer field MRP Controller.
    After enhancing 0MATERIAL_ATTR, I had made necessary changes in related objects like 0MATERIAL Info Object & related transformation for this new attribute.
    After making changes, when I had done Repair full request for 0MATERIAL_ATTR, newly added attribute had not updated for all material, other attributes were updated correctly but MRP controller had not updated for some records.
    I am confused with why attribute(MRP controller) updated in some Materials & for some materials its not updated.
    I had checked in PSA, data for this added attribute is come in PSA but not updated in data target (0material).
    I had also activated master data by running Attribute change run but still problem persist.
    Please help.
    Regards,
    Divyesh Khambhati

    Hi Venkatesh,
    I had write code in CMOD for MRP controller.
    As data is coming fine till PSA but its not updated in Data Target (0MATERIAL) .
    if I take one example..
    For exp Material XYZ has two entries in PSA table, one is updated during delta load & recent one which come though Repair Full request.
    Now newly adder attribute MRP controller available in recent request of Repair Full but that is blank in case of prior delta update.
    I am confused because MRP controller attribute is updated for some Material but for some material its remain blank.
    please help.
    regards,
    Divyesh Khambhati

  • Attributes not listed for Adm

    The issue is where the values for attributes (ex. Cost Centers) are not listed for the Administrator.  The Attribute section is located in 2 sections:  Manage Employee Data and Edit Attributes.
    We added a note 910076 a couple of days back in DEV, which removed the ‘Add New Line’ button. 
    Any suggestions and fix are welcome.
    Points will be rewarded amfully.
    Cheers,
    Lokesh.

    Hi Lokesh,
    Check the Adm attributes in the org structure and make sure correct backend system is in the attributes.
    Thank you

  • MIGO - GR - Others -- Serial Number Not saved for Movement Type : 561

    Hello,
    I am trying to post good receipt-other ( for movement type 561) using MIGO transaction. I have specified all required data.
    Also depending on the item qty., I entered serial number in serial number tab.
    Its creating document successfully. However if I try to display same document using MIGO, serial number is missing.
    I tried to debug the code and I realized its not saving serial number itself.
    For other movement type its creating document with correct serial number.
    If I repeat same process using same data using transaction MB11 its posting successfully and I can see serial number using MIGO transaction as well.
    One more thing which I've noticed is when I post document using MIGO, Account assignment details are missing. However with MB11 I can see account assignment data too.
    Would be really appreciated if someone can help me on this.  I dont know If I'm missing any configuration part here.
    Thanks & Rgds,
    Nilesh

    Any help Experts?
    Nilesh

  • Sent faxes are not saved in "Faxes" folder

    Does anyone know where the "sent" faxes are stored? They are not in the "Faxes" folder under "users". In fax prefs, the "Save" box is checked but dimmed. Does this save only received faxes? How can I save "sent" faxes so I can see cover sheet messages?

    Does anyone know where the "sent" faxes are stored?
    Nowhere.
    They are not in the "Faxes" folder under "users".
    Correct.
    In fax prefs, the "Save" box is checked but dimmed.
    That's because you must have at least one of the three options checked. The Print & Fax preference panel won't let you uncheck all of them. As soon as you check another option, you'll be able to uncheck any of them -- but not all.
    Does this save only received faxes?
    Yep.
    How can I save "sent" faxes
    so I can see cover sheet messages?
    After choosing File > Print > Fax PDF... and filling in all the fields, click the Preview button located at the bottom left. In Preview choose File > Save As... and there you go...
    iMac G5 17" (iSight)   Mac OS X (10.4.4)  

  • Icloud sent messages on device not saved in sent folder

    My icloud email is set up as an IMAP account on my Android phone and Windows computer (using EmClient).  Sent messages are not being saved to the sent folder.  I tried a message online in icloud and on my ipdad mini and there was no problem there with saving my sent message in the sent folder.  How can I fix this?

    This is a long shot, but Apple is going to start requiring you to set up app-specific passwords in order to allow third-party apps to access data from your iCloud account.  This is outlined in this document: Using app-specific passwords.  This isn't supposed to be implemented until October, but maybe changes are already taking place behind the scenes in the way third-party apps sync with iCloud that is causing them to "misbehave".
    Ask EmClient support if they are hearing from there customers that they can no longer sync with iCloud, and if is, if it is because of this new policy.   If so, you may need to just put up with it until Oct. 1st. when you can generate a password for these apps.

  • Persistent user customisation not saved for column resize

    Using 11.1.1.1.0 I've configured persistent user customisations via MDS (as per [http://biemond.blogspot.com/2009/07/customize-and-personalize-your-jsf.html]) but I'm having a problem with column customisation. In adf-config.xml I've selected displayIndex, visible and width as persistent attributes on the column tag.
    My customisations are saved from one session to the next (works great!), however changes to the width of a column only seem to be persisted if a further, more significant layout change is made to the table afterwards.
    For instance, if I do the following:
    - Login
    - Resize a column
    - Close the browser
    Then the column width is reverted the next time I log in.
    If, however I do the following:
    - Login
    - Resize a column
    - Re-order a column
    - Close the browser
    Then the column width is saved (along with the new column order) the next time I log in.
    So, it appears that column width persistence is working, but column width changes on their own do not cause a persist operation; an additional layout change is required to get ADF to save the width details.
    Has anyone observed similar behaviour? Can anyone suggest a workaround/fix?

    Hi,
    sounds like a bug that you should file if you can exclude that your configuration is wrong. I checked for known bugs but did not find one that fits to the problem you report
    Frank

  • Prperty editor not coming for roles in dev server

    Hi all,
    Actually in my development server ,when iam clicking on any of the roles the property editor on the right panel is not coming ,whereas for iviews this problem is not there ,please help me with this isssue and guide me with the necessary  steps which need to be done.

    HI Prem,
    THnks for ur help but its like i  have checked the "Activate Accessibility Feature" its unchecked and moreover whenever I try opening portal objects it gives portal runtime error.
    An exception occurred while processing a request for :
    iView : pcd:portal_content/com.sap.pct/admin.templates/iviews/editors/com.sap.portal.pcmEditor
    Component Name : com.sap.portal.appdesigner.framework.defaultPcmEditor
    getDeltalinkState() returns as value IPcmDeltaLinkState.DlState.PLAIN_CONTEXT or IPcmDeltaLinkState.DlState.ADDED_CONTEXT.
    Exception id: 03:09_07/03/08_0018_2747750
    See the details for the exception ID in the log file.
    after that i checked in the log files:
    Caused by: java.lang.IllegalStateException: getDeltalinkState() returns as value IPcmDeltaLinkState.DlState.PLAIN_CONTEXT or IPcmDeltaLinkState.DlState.ADDED_CONTEXT
    Thanks& Regards
    Pooja
    Edited by: Pooja Gehani on Mar 7, 2008 1:03 PM

Maybe you are looking for

  • Backing up and Restoring Data to computer

    Hi guys, I would like to re-install my PC that I used to sync my iPhone things into it. I can backup all my songs from the PC to any external device. But what to do next? Backup of the "Backup" folder in the PC and then restore it to the exact locati

  • Document Library Upload 'Choose Folder' programming Issues

    Hello, I have a document library with folders and subfolders and all folders have unique security inheritance applied. Administrator is able to upload to any folder using below dialog. I want everyone who does not have permission to the folders and s

  • Apprearance takes an age to appear - why?

    For some reason when I open the Appearance Control Panel, nothing much seems to happen until near enough 30 seconds later (yes I timed it!?) - for some reason it seems only to be the Themes tab that causes the delay. All the other tabs open fine but

  • FCP window layout.

    Forum, Can not select standard window layout,all other choices are available. I have trashed the preferences. The only change made was to select Prores high quality to see if the video quality was better than Prores std. Using Log and Transfer from S

  • Master with mandatory details

    I have an record in a table with a status flag, and when the status changes from 1 to any other value I want to check if detail records exist in 3 other tables. Where should I put this code? I don't know where to start. My first guess would be doDML