How to add set attribute method in webdynpro abap using code wizard.

Hi developer,
I am new to webdynpro abap , i have developed a small component from sap technical abap but i am not able to add the set attribute method using read context node /attribute in wizard code ,pleae guide me in solution.
thanks,
ravi.

Hi,
could you copy / past your code ?
if you need help on webdynpro and your beginner, try to watch the video on internet of WebBProfessor. It's really good videos !
regards
Fred

Similar Messages

  • How to add/set attribute "collectiveParentRDN" in DSEE6.3.1 installation.

    Hi,
    I'm new to DSEE and I have a question ,
    I have a code which
    1. First it binds to LDAP server through a proxy user.
    2. Authenticates a user
    3. Gathers all the roles that a user is a member of.
    It uses ,”collectiveParentRDN ” as a DN attribute.
    For e,g,in following line from the code:
    userDN = attrs.get("collectiveParentRDN").get().toString();
    But I’m getting userDN as null as there is no attribute called collectiveParentRDN in the LDAP schema I’m using.
    However when I use “entryDN” instead, it works.
    But I need to use “collectiveParentRDN” . and I'm not able to configure this attribute in the
    When I try to add this attribute I get a constraint /schema violation error.
    Can anyone please tell me how to add /set this attribute to DSEE6.3.1 LDAP server.?
    Here is the complete code snippet:
    import java.util.ArrayList;
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.NamingEnumeration;
    import javax.naming.directory.Attributes;
    import javax.naming.directory.DirContext;
    import javax.naming.directory.InitialDirContext;
    import javax.naming.directory.SearchControls;
    import javax.naming.directory.SearchResult;
    public class LDAPPrototype {
         public static final String LDAP_URL = "ldap://localhost:389";
         public static final String LDAP_LDAPSERVER_SEARCHBASE = "o=MyLDAP";
         public static final String SECURITY_AUTHENTICATION_METHOD = "simple";
         public static final String INITIAL_CONTEXT_FACTORY = "com.sun.jndi.ldap.LdapCtxFactory";
         public static final String LDAP_USER_GROUP_ATTR = "nsRole";
         private static final String LDAP_USER_LOGIN = "dsingh1";
         private static final String LDAP_USER_PASSWORD = "password";
         // NOTE: Three new params for authenticating proxy.
         public static final String LDAP_PROXY_PROXYDN = "uid=will,ou=Blue,ou=People,o=MyLDAP";
         public static final String LDAP_PROXY_UID = "will";
         public static final String LDAP_PROXY_PASSWORD = "password";
         // NOTE: TWO new params to get users correct DN after search
         public static final String LDAP_USER_DN_ATTR = "collectiveParentRDN";
         public static final String LDAP_USER_CN_ATTR = "cn";
         public static void ldapAuthentication() {
              Hashtable env = new Hashtable();
              Hashtable cloneEnv = new Hashtable();
              DirContext ctx = null;
              String userDN = null;
              String userCN = null;
              String searchBase = null;
              try {
                   env.put(Context.SECURITY_AUTHENTICATION,
                             SECURITY_AUTHENTICATION_METHOD);
                   env.put(Context.INITIAL_CONTEXT_FACTORY, INITIAL_CONTEXT_FACTORY);
                   env.put(Context.PROVIDER_URL, LDAP_URL);
                   cloneEnv = new Hashtable(env);
                   env.put(Context.SECURITY_PRINCIPAL, LDAP_PROXY_PROXYDN);
                   env.put(Context.SECURITY_CREDENTIALS, LDAP_PROXY_PASSWORD);
                   ctx = new InitialDirContext(env);
                   System.out.println("Initial bind succesful");
                   SearchControls searchCtls = new SearchControls();
                   String[] returnedAtts = { LDAP_USER_DN_ATTR, LDAP_USER_CN_ATTR };
                   searchCtls.setReturningAttributes(returnedAtts);
                   searchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE);
                   String searchFilter = "(uid=" + LDAP_USER_LOGIN + ")";
                   searchBase = LDAP_LDAPSERVER_SEARCHBASE;
                   System.out.println("Checking for user !!!");
                   NamingEnumeration answer = ctx.search(searchBase, searchFilter,
                             searchCtls);
                   System.out.println("User search successful !!!");
                   Attributes attrs = null;
                   while (answer.hasMore()) {
                        System.out.println("Searching for user attrributes!!!");
                        // Print all the user attributes
                        SearchResult sr = (SearchResult) answer.next();
                        attrs = sr.getAttributes();
                        System.out.println("Num of attributes = " + attrs.size());
                        // NamingEnumeration attrKeys = attrs.getIDs();
                        // while (attrKeys.hasMore()) {
                        // String at = attrKeys.next().toString();
                        // System.out.println("Key = " + at + ", value = " +
                        // attrs.get(at).get());
                        if (attrs.get(LDAP_USER_DN_ATTR) != null) {
                             System.out.println("User DN found for user: "
                                       + LDAP_USER_LOGIN);
                             userDN = attrs.get("collectiveParentRDN").get().toString();
                             System.out.println("User DN = " + userDN);
                        if (attrs.get(LDAP_USER_CN_ATTR) != null) {
                             System.out.println("User CN found for user: "
                                       + LDAP_USER_LOGIN);
                             userCN = attrs.get(LDAP_USER_CN_ATTR).get().toString();
                             System.out.println("User CN = " + userCN);
                        if ((userDN != null) && (userCN != null)) {
                             break;
                   userDN = LDAP_USER_CN_ATTR + "=" + userCN + "," + userDN;
                   System.out.println("Modified user DN = " + userDN);
                   cloneEnv.put(Context.SECURITY_PRINCIPAL, userDN);
                   cloneEnv.put(Context.SECURITY_CREDENTIALS, LDAP_USER_PASSWORD);
                   System.out.println("Authenticating user : " + userDN);
                   ctx = new InitialDirContext(cloneEnv);
                   System.out.println("Authenticated user : " + userDN);
                   System.out.println("Get user groups !!!");
                   String[] returnedGroups = { LDAP_USER_GROUP_ATTR };
                   searchCtls.setReturningAttributes(returnedGroups);
                   NamingEnumeration groups = ctx.search(searchBase, searchFilter,
                             searchCtls);
                   ArrayList<String> groupList = new ArrayList<String>();
                   while (groups.hasMore()) {
                        // Print all the user attributes
                        SearchResult sr = (SearchResult) groups.next();
                        attrs = sr.getAttributes();
                        if (attrs.get(LDAP_USER_GROUP_ATTR) != null) {
                             System.out.println("Num of groups found = " + attrs.size());
                             String groupName = attrs.get(LDAP_USER_GROUP_ATTR).get()
                                       .toString();
                             groupList.add(groupName);
                             System.out.println("Group found = " + groupName);
              } catch (Exception e) {
                   System.out.println(e);
                   e.printStackTrace();
         public static void main(String[] args) {
              ldapAuthentication();
    }Thanks in Advance.
    Rahul

    You are right, that attribute is not in the schema.
    I think perhaps that could be the reason I'm getting an schema violation error when I'm trying to add it.
    Can you please tell me how do I add any new attribute to the schema ?
    Thanks in advance
    Rahul.

  • How to add offline help to Acrobat X deployment using Customization Wizard

    We've run into the issue of users being unable to access Online Help described in http://kb2.adobe.com/cps/888/cpsid_88831.html. We use a proxy server for user web authenticationa and filtering so we can't avoid this.
    I'd like to know if there's a way to add the offline help to our customized deployment Transform using the Customization Wizard. Has anyone installed the Adobe Community Help Client this way?

    The instructions in the admin guide are better: http://www.adobe.com/go/acrobatitinfo.
    You can use the Wiz to deploy the PDF Help version. You'll have to run the JS locally to hook up the menu.
    Ben

  • How to Add custom Attribute in XML

    How to add Custom attribute recusrivly. With sequence order.
    //Before xml:-
    var myxml:XML=
    <root>
    <leval0 >
    <leval1 >
    <leval2></leval2>
    <leval2></leval2>
    </leval1>
    <leval1 >
    <leval2></leval2>
    <leval2></leval2>
    </leval1>
    </leval0>
    </root>
    ////After xml:
    var myxml:XML=
    <root>
    <leval0 levalid="0" >
    <leval1 levalid="0_0" >
    <leval2 levalid="0_0_0"></leval2>
    <leval2 levalid="0_0_1"></leval2>
    </leval1>
    <leval1 levalid="0_1" >
    <leval2 levalid="0_1_0"></leval2>
    <leval2 levalid="0_1_1"></leval2>
    </leval1>
    </leval0>
    </root>

    //call this method
                trace(addAttribute(myxml));
    //method
                private function addAttribute(node:XML, depth:String = ""):XML
                    if (node.hasComplexContent())
                        var count:int = 0;
                        var prefix:String = 0 < depth.length ? depth + "_" : "";
                        var currentAtt:String;
                        for each (var nodeItem:XML in node.children())
                            currentAtt = prefix + count;
                            nodeItem.@levalid = currentAtt;
                            addAttribute(nodeItem,currentAtt);
                            count++;
                    return node;

  • How can I set up an older airport express using the newest airport utilities?

    How can I set up an older airport express using the newest airport utilities? Seems like there isn't an option to set this up.  Normally you could add/set up this in the airport setup assistant- but that doesn't exsist any longer.
    Thanks for any suggestions 

    How can I set up an older airport express using the newest airport utilities?
    Unfortunately you can't, since Apple dropped support of the older AirPorts with AirPort Utility 6.x.
    Using some workarounds....not supported by Apple.....you might be able to download and install an older version of AirPort Utility that would allow you to administer the older AirPort.
    See this thread for more details and instructions:
    https://discussions.apple.com/message/21397085#21397085

  • How to add interface to customlize MXML Component when use Flex Builder 3?

    How to add interface to customlize MXML Component when use
    Flex Builder 3?

    David,
    I don't believe you can add the interface via the creation
    dialog in FlexBuilder 3. You can always manually add the
    "implements" property to your MXML Component root tag. Something
    like this: <mx:VBox implements="com.mycorp.IMyInterface">
    If you want autogeneration of the interface, then create an
    ActionScript class with that interface and then copy the generated
    functions and setter/getters into the script block of your MXML
    component.

  • How to validate an attribute in a table/EO using a DB Table

    I have an attribute LocationId in DuplicateLocationEO(LocationId,LocationName)
    And I need a validation on this so that user can enter a LocationId that exists in LOCATION_ID of HR.LOCATIONS table
    How to validate an attribute in a table/EO using a DB Table?

    Issue: Insert a value into an attribute if it is valid, Like it is available in another table.
    Scenario: Insert a Location into a DuplicateLocationEO based on LocationEO.
    Solution: Create a Entity Validator on LocationId of DuplicateLocationEO that is list based on query of LocationEO’s LocationId.
    Note: if the validation is created at attribute level, then it leads to NPE or Undesirable results.
    Procedure Steps:
    Step#01: Open desired Entity Object “DuplicateLocationEO”, Go to “Overview” tab & “Business Rules” finger tab.
    Step#02: Select “Entity Validators” & Click “+”
    Step#03: Set the following Rule Definition Tab:
    •     Select Rule Type as “List”
    •     Attribute “LocationId”
    •     Operator “In”
    •     List Type “Query Result”
    •     Enter SQL Statement “Select LOCATION_ID FROM LOCATIONS”
    Step#04: Now go to “Failure Handling” tab & Select radio button for “Error”.
    Step#05: Click the Magnifier link to create a message.
    Step#06: In the “Select Text Resource” popup. Provide the following
    •     Display Value: “Invalid LocationId: {LocationId}. Please enter a valid Location”
    •     Key: INVALID_LOC
    •     Description: message when user enters an invalid location.
    Step#07: Click “Save and Select” Button
    Step#08: Click “OK” Button
    Reference:
    DuplicateLocationEO DDL Script:
    CREATE TABLE "HR"."TEST_LOC"
    (     "LOCATION_ID" NUMBER NOT NULL ENABLE,
         "LOCATION_NAME" VARCHAR2(50 BYTE) NOT NULL ENABLE,
         CONSTRAINT "TEST_LOC_PK" PRIMARY KEY ("LOCATION_ID")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS" ENABLE
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS" ;
    To Populate Rows:
    Insert into TEST_LOC select Location_id, city from LOCATIONS

  • How can I set up a wi-fi network, using one time capsule and two airport express

    how can I set up a wi-fi network, using one time capsule and two airport express ?
    The time capsule is near the Mac. ok
    The first Airport is on the corridor, ok, works well and the App on the iPad signals so, ok
    But when I plug the next Airport on another room nearby nothing happens, and signals disconected ....
    is the signal so weak that is not able to go to ono room to the other ?

    Well, even if you have the first express set up to extend the network, the second express can only extend from the TimeCapsule.
    Maybe you got walls of sheetrook in the way, or kitchen/bathroom tiles, etc, dampening the signal rapidly.

  • I just bought a new MacBook Air. In my old one, I could go from screen to screen by using three fingers to swipe over the key pad. This one just sits there. It is Yosemite. How do I set up preferences so I can use three fingers to move from screen to

    I just bought a new MacBook Air. In my old one, I could go from screen to screen by using three fingers to swipe over the key pad. This one just sits there. It is Yosemite. How do I set up preferences so I can use three fingers to move from screen to screen?

    Those choices are controlled via System Preferences, Trackpad.

  • How can I set BOE XI R2 InfoView to use MM/DD/YYYY date format?

    How can I set BOE XI R2 InfoView to use MM/DD/YYYY date format instead of the default yyyy-mm-dd that comes up?
    Thank you.
    Paul

    I'm sorry to be dense.  Are you using BOE XI R2?  I don't see a "preferred viewing local" under preferences.  I see "My Interface Locale is..." under the General tab, which I have set to United States.  I don't see anywhere where I can enter in the dates and numbers.
    I also checked in the CMC under Business Object Enterprise applications, and did not see anything there either.
    Can you be specific?
    Thanks again.
    Paul

  • How do I set up an Apple Account for use in UK from Australia

    How do I set up an Apple Account for use in UK from Australia ?

    You need a UK bank and a UK billing address.

  • Calling custom Infotype method from Webdynpro Abap

    Hi Experts,
    I am working on an application where i need to call a method of a custom defined infotype.
    I have done this -->
    1. Create a custom infotype 9111
    2. SAP creates a class of that infotype ZCL_HRPA_INFOTYPE_9111
    3. Inside this method there are few inherited method which provide me functionality of insert , update , delete
    i want to call methods IF_HRPA_INFTY_BL~MODIFY,
    IF_HRPA_INFTY_BL~INSERT
    However when i call these method from webdynpro abap this method does not work.
    where as when i try to insert an entry using PA30 transaction it works.
    Does anyone know why does this happen and what is the solution?
    Regards,
    Ashish Shah

    Hi Ashish,
    You need to create method inside your assistance class, the class your webdynpro component talks to.
    Within the methods of Assistance class you will have to create instance of ZCL_HRPA_INFOTYPE_9111 and call its  method IF_HRPA_INFTY_BL~INSERT  passing the data.
    Cheers
    Prashant

  • How to add additional disks on vmware OEL4 and use it for Oracle 10gR2?

    I created a virtual machine on vmware workstation 6 and installed OEL4.
    during first install I created 20 GB disk but now I want to add more disks.
    from vmware documentation I tried to add more 8 gb disk to the virtual host.
    under devices I see two lines;
    Hard Disk (SCSI 0:0) 20.0 GB
    Hard Disk (SCSI 0:2) 8.0 GB
    but I must be missing some step since I can not see 20 + 8 gb at df;
    [root@antuhost ~]# df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/sda1              13G  9.7G  2.3G  82% /
    none                  506M     0  506M   0% /dev/shm
    /dev/sda2             4.9G  851M  3.8G  19% /homeThank you.

    Oh the check the answer from Re: How to add additional disks on vmware OEL4 and use it for Oracle 10gR2?

  • How can I set up a guest WiFi network using Time Capsule and Airport Express extension?

    How can I set up a guest WiFi network using Time Capsule and Airport Express extension?

    Sorry, but it is not possible to "extend" the Guest Network using either wireless or an Ethernet connection.

  • How to add an attribute to a notification message ?

    Hi,
    I want help in adding an attribute to a PO Approval notification message.
    The attribute is from the PO Header screen , it is the Ship-To field (See screenshot) : http://i48.tinypic.com/2wh35v5.jpg
    Kindly help me and tell me how i can add this attribute to Approve PO with PDf message (See screenshot) : http://i46.tinypic.com/nchvzs.jpg
    Best Regards,
    Yousef

    Yousef,
    - You add an attribute at item level, let's call it SHIP_TO, type varchar
    - You add another attribute at the message level, let's call it SHIP_TO too and set its value to item attribute SHIP_TO
    - Now you doble-click on the message and edit its body and add the reference to this new attribute:
    Ship to: &SHIP_TO
    - Save the workflow process and upload to the database.
    - Now you need to set this attribute's value using WF_ENGINE.SetItemAttrText() just like the other existing attributes for this workflow.
    Regards

Maybe you are looking for