User-defined field assignment  in Contact object

Good Day
Experts:
I guess this might apply to all SAP Business Objects.  Specifically, I am working with the oContact object.  A User-defined field has been added to the OCLG table.  I need to populate the field with the current logged on User.  I see that I can do the following with the intellisense but I am not sure where to go from here.
vContact.UserFields.Fields.Item
I tried but I get a message "Expression is a value and therefor cannot be the target of an assigment:
vContact.UserFields.Fields.Item("U_Creator") = (GetUserCodeSess(g_B1Connection.Company.UserName))
It feels like I should be able to set the User-defined variable through the object but I don't think I am doing it correctly.
Any helpful hints?
Thanks,
Ed

Hi Robert,
I think the only supported way is to give full rights to the users and block changing field in the Item Master Data form through your addon.
A non supported way is to use a query to update the item master fields
Regards
Ad

Similar Messages

  • Update User Defined Field using DBDataSource

    Hi All,
    I'm trying to update the user defined field using the DBDataSource object.  However an error occurred - "Item is not a User-Defined Field".
    The code used is as follows:
    Dim oDS as SAPbouiCOM.DBDataSource
    Dim oForm as SAPbouiCOM.Form
    Set oForm = SBO_Application.Forms.GetForm("139", 1)
    Set oDS = oForm.DataSources.DBDataSources.Item("ORDR")
    oDS.SetValue("U_Field1",oDS.Offset,"abc")
    Please help.

    If you haven´t put the field directly in the standard form the user defined fields are in a different form. This form has the same type but with "-" before it.
    So so should use this code to get the user defined fields form:
    Set oForm = SBO_Application.Forms.GetForm("-139", 1)
    Maybe this can be the cause

  • Assign category of user defined field to different user

    hi to all on forum,
    please help me to find the solution of this query
    i had created several UDF  and set them in different category as setting is there for user defined field. now i am getting different different user defined field in different category ,
    now i want to set this different category of user defined field to different user .can we do it in SAP B1
    like category---- general , cat1, cat2,
    user --- Ram , Vipul
    i want to assign cat 1 to ram and and cat 2 to Vipul   so that with the document ram will see only UDF of cat1 and Vipul will see UDF of Cat 2.
    hope for  response
    with best regards
    vikas

    Vikas,
    You can do it for each user by assigning a category
    to each of user defined field by setting visible tick mark.
    Tools>User Defined Fields>Settings
    Jeyakanthan

  • Assigning  of g/l account  for  user defined  field

    IN  the  sales invoice   i am creating the user difined field
    for manual  tax( i.e manual tax the customer how much tax  amount  he will give that much amount he will feed  in that field  )in  the row level  and i want to assign   the g/l account for that  user defined  field 
    please explian what is the  procedure
    Edited by: Philip Eller on May 23, 2008 10:11 AM

    Hi,
    Do you want the G/L account input automatically or manually ? if manually try to use this query FMS:
    SELECT T0.[AcctCode], T0.[AcctName] FROM OACT T0
    In the UDF, just press shift+F2 and select the account code you want to input.
    Rgds,

  • User defined fields in Resource object; Resource object form

    Hi,
    Can anyone tell me what is the purpose of having user defined fields for resource object and resource object form and how can we use those fields while requesting for target resource.
    Regards,
    Alabhya Goel

    Thanks for your reply!!!!!!!!!!
    I know about resource object form i am just asking what is the use of user define field in resource object form. How can we use it. Like when we create any user defined field in under User form those fields display on create user form but when we create any user defined field in resource object from those are not displayed in form.
    If anyone has used or worked on user defined fields in Resource Object or resource object form; please give me an overview over the same.
    Regards
    Alabhya Goel

  • Validating User Defined Fields on the OIM User Object

    Hello everyone,
    I'm currently using the OIM 11g, and am curious how to provide data validation for user defined fields.
    We currently have two user-defined fields for day of birth and month of birth, which have been set to required, but I would like to take this a step further and actually validate that the data being entered is numerical (two characters max), and if it's not, a red box appears around the field notifying the admin that the entry needs to fit the expected criteria.
    One example already in OIM is that of the email field. It appears to be using a regex to identify that data entered is of a certain format.
    Can anyone here point me in the direction of some proper documentation so that I may learn how to incorporate this into my environment? Thanks!

    Hi Kate,
    The only way to do it, is with Form Settings. Do not give them authorisations on Form Settings. You can then untick the "Active" tick box on certain fields and tick it on others. This can then be done, when you log on as the user him/herself.
    Regards
    Carin

  • User defined fields via DI-API

    I want to read user defined fields using the DI-API.
    The following code works but lists only UDFs defined for articles:
    SAPbobsCOM.Items item =
    (SAPbobsCOM.Items) GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems);     
    int count = item.UserFields.Fields.Count;
    MessageBox.Show("count == "+anzahl.ToString(), "OK");
    for(int i=0; i<count; i++){
      MessageBox.Show("index == "+i.ToString(), "OK");
      MessageBox.Show("name == "+item.UserFields.Fields.Item(i).Name, "OK");
    If I try to list all UDFs defined in the system using the oUserFields object I get an exception when I assign the business object:
    try{
      SAPbobsCOM.UserFields ufd = (SAPbobsCOM.UserFields)
      GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields); // exception
      int count = ufd.Fields.Count;
    catch(System.Exception ex){
      MessageBox.Show("ex.ToString(), "OK");
    The exception says something like
    InvalidCastException: COM object of type 'System.__ComObject' can not casted into
    interface type SAPbobsCOM.UserFields
    Thank you for help,
    Frank Romeni

    Hi Vítor,
    thank you for the hint to UserFieldsMD - now the access works.
    You wanted to know what I am trying to do - let me explain the background even it is a bit complicated:
    I have to access a certain UDF defined for articles.
    To access this UDF I can't use a fixed index like e.g. '5' in
    item.UserFields.Fields.Item(5).Value
    because this index is 5 only on my local machine - it could be a different index on the target machine.
    I solved this in writing some sql-code to access table CUFD and to find the index of this UDF in CUFD.FieldID.
    But sometimes there is a problem when there are UDFs deleted from the database. It is possible that there are 'holes' between the FieldId of UDFs of one object, e.g.
    Initial entries in CUFD (Table, FieldId, Name  => code to access field):
    OITM 0 'myUDF1'   ==> item.UserFields.Fields.Item(0).Value
    OITM 1 'myUDF2'   ==> item.UserFields.Fields.Item(1).Value
    OITM 2 'myUDF3'   ==> item.UserFields.Fields.Item(2).Value
    After deletion of 'myUDF2':
    OITM 0 'myUDF1'
    OITM 2 'myUDF3'
    Now the access to 'myUDF2' with item.UserFields.Fields.Item(2).Value fails!
    You have to use index '1' in .Item(index) to access 'myUDF2' because this UDF is now the second UDF in the item object (zero based).
    After I realized this I didn't use the sql-code to get FieldID any longer and searched with a loop all existing indices and compared them with the name of my special UDF, e.g. (this code works as expected):
    public int getUDFIndex(string udfName){
      index = -1;
      for(int i=0; i<item.UserFields.Fields.Count; i++{
        if(item.UserFields.Fields.Item(i).Name == udfName){
          index = i;
          break;
      return index;
    Now I tried to make this method more general to find UDFs in any object - not only in item objects.
    This is the background I wanted to access SAPbobsCOM.UserFields for.
    The problem is that UserFieldsMD has no method like Item(index) as I used it in my example.
    Do you have an idea to solve the problem with the 'holes' between FieldId in the UFD-table CUFD?
    Frank Romeni

  • Badi: for user defined fields in Budget Entry Document

    HI,
    I am implmenting BADI for user defined field in budget entry document definatin name 'FMBW_CUSTOMER' . I have created two fields in include 'CI_FMBH' and also created a sub screen and assign this subscreen to badi. I have called get data and put data methods in PBO and PAI. like this.
    <b>
    PBO
    create object grid1.
      CALL METHOD grid1->if_ex_fmbw_customer~get_data_from_screen
      importing doc_header = doc_header.</b>
    <b>PAI
      CALL METHOD grid1->if_ex_fmbw_customer~put_data_to_screen
        EXPORTING
          doc_header = doc_header
          processing_mode = 'CRE'.</b>
    But the system is not saving these fields in database.
    What could be the problem .

    Hi, did you have any advance on this issue?

  • Confirmation of User defined fields on CO11N

    Dear All,
    Can anybody tell me how to confirm user defined field during operation confirmation of an order. I have created a user field key and assigned in the operation detail screen in routing. Is it required to include a freely defined screen for CO11N in customizing or any other setting is there.
    Thanks in advance for your valuable inputs.
    Regards,
    Uday Parchure

    <b>Define Customer-Specific Detail Areas for Single Screen Entry</b>The following enhancement is available for production orders:
    CONFPP07 define detail areas for single screen entry
    With this enhancement you can define your own detail areas (screens), which can be issued for single screen entry of time ticket confirmations.
    Enhancement CONFPP07 contains the following enhancement components:
    Function module exits
    EXIT_SAPLCORU_S_100 Transfer data from SAPLCORU_S to customer-defined screen
    EXIT_SAPLCORU_S_101 Return data from customer-defined screen to SAPLCORU_S
    Display documentation
    Screen areas
    Screen areas that you can define yourself are available.
    Activities
    1. Create the enhancement
    To do so, create a new project, or use an existing project.
    2. Activate the project.
    Your enehancement only takes effect after you have activated it.
    Further Notes
    Enhancememnts, as opposed to modifications, are fundamentally independent of releases since they are not made in the SAP original, but in a name space that is reserved for customers.
    you have to create a customer defined screen and attach as in the link. Add the Freely definable detail screen in OPK0.  Confirm the user defined fields.
    Regards
    MSR
    Message was edited by:
            Soundararajan Murugesan
    Message was edited by:
            Soundararajan Murugesan

  • Issue while deleting user defined field in oim 11.1.1.3

    All,
    Made a mistake while creating user defined field called "Profile for" (loing to OIM -> advanced -> configuration -> User configuration). We are trying to delete it. It appears to get deleted from user attributes screen. But when we run LDAP User Create and Update Reconciliation Task we get the following error below:
    oracle.iam.ldapsync.exception.ProcessLDAPReconDataException: oracle.iam.ldapsync.exception.ReconEventCreationException: Thor.API.Exceptions.tcAPIException: Profile for - LDAPUser object does not exists for resource object
    Is any thing else need to be deleted adn cleaned up?
    thanks in advance,
    Prasad.

    How do i check what resource object the recon task is running against. here is what i found so far.
    I cannot find LDAPUser resource object when i query Resource Management -> Resource Objects in design console. Same thing with Manage Resource and search (here i only find Xellerate User, Xellerate Organiztion, USERS_GTC, and Installation) in OIM advanced administration menu.
    The LDAP User Create and Update Reconciliation job itself has the following parameters (batch size, last change number, OIM employee type, OIM User organization name, OIM user type)
    I also decompiled LDAPUserChangesReconTask and it is looking for LDAPUser metadata from MDS directly.
    Prasad.

  • User defined field in SD and its link to Value field in COPA (??)

    Dear All,
    We have created one "Z" field i.e. user defined field and its in VBRP Table. This is a quantity field. to update the values in this field we have used an exit in sales and distribution module. Now, by defining this exit values are correctly populated in VPRP table on line item basis.
    Requirement here is we need to get this field in COPA, for same i have carried out the quantity field assignment to value field (KE4M).
    Even after this configuration profitability segment is not updated.
    Regards,
    Sayujya
    Edited by: sayu on Mar 15, 2010 10:13 AM

    In the past I did something similar and had to use function module EXIT_SAPLKEAB_001 in enhancement COPA0002 to populate the field.  To use this exit you'll first need to add a user exit id to your valuation strategy (transaction KE4U).  The help on the function module is pretty good, but if you run into a problem let me know.
    thanks,

  • User defined field values doesnot show up in summary tab

    Hi,
    I have created my own stylesheet to display some of my user defined field values (associated with organization address book entry type) in the summary tab of the addressbook entry. But Groupwise 8.0 client FAILS to display any of the user defined field values in the summary tab FOR ONLY ORGANIZATION ADDRESSBOOK ENTRY types. NOTE: These organization addressbook entries are created using the C++ Groupwise object API. But the Advanced tab of these organization addressbook entry shows those user defined fields with values in it.
    Also Groupwise 8.0 Client is able to display the user defined field values in the summary tab for the PERSON ADDRESSBOOK ENTRY types, that are created using the Groupwise Object API. Also when I create a Organization addressbook entry using the Groupwise Client (NEW ORGANIZATION) and fill in the user defined field values using the Advanced tab or that addressbook entry, the summary tab displays those user defined field values.
    So there could be some problem in setting the user defined field value for the Organization address book entry using the Object API or it could be Groupwise 8.0 Client issue in displaying the user defined field values ONLY FOR ORGANIZATION ADDRESS BOOK ENTRY, WHICH ARE CREATED USING THE OBJECT API. I also tried to see the underlying XML data in the summary tab and that XML data is missing the USERDEFINEDFIELDS and CATEGORIES tag for the organization address book entry.
    I would like to know, if there is any need for special handling only for Organization addressbook entry in Groupwise 8.0 API. Any thoughts or help is really appreciated.

    Hi,
    Does anyone have an idea?? Think I have the same issue. Except, when I log in the client (ver. 802) then all the info is displayed. But when the user logs in on the same client and the same pc, he sees the xml info except the office address.
    Any help is greatly appreciated!
    Grtz,
    Joost Brenters

  • User Table Key set up in User defined field management

    Dear  Expert,
    what is use of User Table Key set up in User defined field management in SAP B1.
    Thanks.
    Sridharan.R
    Edited by: Sridharan.R on Oct 4, 2011 8:26 AM

    Hi,
    Once a UDF is created and a value is entered in it, the same cannot be retrieved in any of the layouts and reports unless a Key is generated for that UDF. By assigning a Key to that UDF, the same UDF can be used in Crystal Reports or any other Reporting tool to extract its values from SAP. These reporting tools searches the Uniqueness of the UDF Values with this Keys only.
    For eg.: When you develop a report and select a table from which you need the fields to be shown in the layout. In that, the only fields whose keys are generated are only available to use in the report.
    Hope its clear to you.
    Regards,
    Papil

  • Creating a user-defined field in VL06

    Dear all ,
    Please guide me how to add few user defined fields in the output list of standard VL06 transaction code - (Delivery Monitor Report - WS_DELIVERY_MONITOR) - I have to add in the option of 'List Outbound deliveries' -
    Pls revert.
    Thanks in Advance.
    P.G.R

    Hai
    Follow the bellow steps for creating User Defined Field Exit
    Step by step procedure for creating Field Exits
    There are eight steps to creating a field exit:
    Step 1: Determine Data Element
    Step 2: Go To Field Exit Transaction
    Step 3: Create Field Exit
    Step 4: Create Function Module
    Step 5: Code Function Module
    Step 6: Activate Function Module
    Step 7: Assign Program/Screen
    Step 8: Activate Field Exit
    Step 1: Determine Data Element
    - Before you can begin adding the functionality for a field exit, you must know the corresponding data element.
    - An easy way to determine the data element associated to a particular screen field is to:
    Go the appropriate screen.
    Position the cursor in the appropriate field.
    Press ‘F1’ for field-level help.
    Click on the ‘Technical info’ pushbutton (or press ‘F9’) on the help dialog box.
    On this Technical Information dialog box, the data element will be specified if the field is 'painted' from the ABAP/4 Dictionary.
    Step 2: Go To Field Exit Transaction
    - The transaction to create field exits is CMOD.
    - You can use the menu path Tools -> ABAP/4 Workbench -> Utilities -> Enhancements -> Project management.
    - From the initial screen of transaction CMOD, choose the Text enhancements -> Field exits menu path.
    - After choosing this menu path, you will be taken to the field exits screen. From here, you can create a field exit.
    NOTE : Even though you use transaction CMOD to maintain field exits, you do not need to create a project to activate field exits.
    Step 3: Create Field Exit
    - From the field exit screen of transaction CMOD, choose the Field exit -> Create menu path.
    - After choosing this menu path, a dialog box will prompt you for the appropriate data element .
    - Enter the data element name and click the ‘Continue’ pushbutton.
    - Now, you will be able to create the function module associated to the data element’s field exit.
    Step 4: Create Function Module
    - You will automatically be taken to the Function Library (SE37) after entering a data element name and clicking the ‘Continue’ pushbutton.
    - In the ‘Function module’ field, a function module name will be defaulted by the system based on the data element specified. This name will have the following convention:
    FIELD_EXIT_<data element>
    - You can add an identifier (an underscore followed by a single character ).
    - The first function module for a data element’s field exit must be created without an identifier.
    - To create the function module, click on the ‘Create’ pushbutton, choose menu path Function module -> Create, or press ‘F5’.
    - After choosing to create the function module, you will get the warning: "Function module name is reserved for SAP". This message is just a warning so a developer does not accidentally create a function module in the field exit name range. By pressing ‘Enter’, you will be able to go ahead and create the function module.
    - Before coding the function module, you will have to specify the function modules attributes -- function group, application, and short text.
    Step 5: Code Function Module
    - From the function module’s attributes screen, click on the ‘Source code’ pushbutton or choose the Goto -> Function module menu path to the code of the function module.
    - Here you will add your desired functionality for the field exit.
    - Remember that field exit’s function module will have two parameters -- one importing parameter called "INPUT" and one exporting parameter called "OUTPUT". These parameters will be set up automatically by the system.
    - You must remember to assign a value to the OUTPUT field. Even if the value does not change, it must be moved from the INPUT field to the OUTPUT field.
    Step 6: Activate Function Module
    - After coding the function module, you must remember to activate it.
    - Use the Function module -> Activate menu path to activate the function module.
    - At this point, you can return to the field exit transaction.
    - You should be able to 'green arrow' back to this transaction.
    - When you return to the field exit transaction, you will see an entry for the newly created field exit.
    - At this point, the field exit is global. That is, it applies to all screens that use a particular data element. On any screen that uses the data element, the corresponding field exit function module will be triggered, once it is active.
    - Also, the field exit will not be triggered yet because it is inactive.
    Step 7: Assign Program/Screen
    - This step is only needed if you want to make a field exit local.
    - To make a field exit local, select the field exit and click on the ‘Assign prog./screen’ pushbutton.
    - In the dialog box , indicate the appropriate program name and screen number.
    This information indicates that the field exit is local to the specified screen in the specified program.
    - In the dialog box, you determine which function module gets executed for the field exit by specifying the identifier in the ‘Fld. Exit’ field.
    - If this field is left blank, the function module triggered will be 'FIELD_EXIT_<data element>'.
    - If a single-character identifier is entered into the field, the function module triggered will be 'FIELD_EXIT_<data element>_<identifier>'.
    Step 8: Activate Field Exit
    - The field exit must be active for it to be triggered by the system.
    - Activate the field exit by choosing the Field exit -> Activate menu path.
    - After assigning the field exit to a change request, its status will change to ‘Active’ and it will be triggered automatically on the appropriate screen(s).
    NOTE : In order to activate the field exit the profile parameter abap/fieldexit = YES must be set on all application servers
    Regards
    Sreeni

  • Modifying/Updating User Defined Field in a Scheduled Task

    I've written a notification task to send an e-mail to a manager who has a contract employee with a contract that is about to expire.
    Once we isolate a user who has a contract about to expire, we send a notification to the manager. The date that the notification is sent out should be stored in the USR table in a user-defined field, "USR_UDF_LASTSENT."
    Updating this USR_UDF_LASTSENT field is where I'm having difficulty.
    I've tried using the UserManager in a couple of ways. Suppose I've isolated a single user using SearchCriteria and the UserManager and have a single User object called "currentUser." I want to store a Date object in the user defined field "USR_UDF_LASTSENT". Date today = new Date();
    I've tried: currentUser.setAttribute("USR_UDF_LASTSENT", today); //This will run without error, but when I check the DB there is no change to the attribute.
    With a defined instance of UserManager userManager, I've tried: userManager.modify("USR_UDF_LASTSENT", today, currentUser); //This errored out with this error - oracle.iam.identity.exception.NoSuchUserException: IAM-3054135:No user found for the criteria USR_UDF_LASTSENT-9/24/13 2:58 PM.:USR_UDF_LASTSENT:9/24/13 2:58 PM. It looks like it's doing a search rather than a modification.
    I've also tried using the entity manager in the following way:
    Date today = new Date();
    HashMap<String, Object> mapAttrs = new HashMap<String, Object>(); 
    mapAttrs.put("USR_UDF_LASTSENT", today); 
    EntityManager entMgr = Platform.getService(EntityManager.class); 
    entMgr.modifyEntity("User", currentUser.getEntityId(), mapAttrs);
    But it returns with this error: Failed: oracle.iam.platform.entitymgr.UnknownAttributeException: User : [USR_UDF_LASTSENT]
    Is my entityType, "User" inappropriate in this case? What should be used here?
    How can I Set or Update this user defined field from a scheduled task?

    Thanks guys. I did go to Identity System Administration console and chose 'Export' from under "System Managment" which I believe Kevin may have been hinting at. I got an xml export of the AttributeDefinitions for our user defined fields. In this file, there was a header for the attribute I was looking for:
    <AttributeDefinition repo-type="API" name="LastSent" subtype="User Metadata">
       <multiValued>
       <backendName>usr_udf_lastsent</backendName>
    I put the string "LastSent" in place of USR_UDF_LASTSENT in the EntityManager version of my attempt at this task. I believe this is what Kevin and delhi were getting at.
    This didn't work:
    Date today = new Date();
    HashMap<String, Object> mapAttrs = new HashMap<String, Object>(); 
    mapAttrs.put("USR_UDF_LASTSENT", today); 
    EntityManager entMgr = Platform.getService(EntityManager.class); 
    entMgr.modifyEntity("User", currentUser.getEntityId(), mapAttrs);
    But this did:
    Date today = new Date();
    HashMap<String, Object> mapAttrs = new HashMap<String, Object>(); 
    mapAttrs.put("LastSent", today); 
    EntityManager entMgr = Platform.getService(EntityManager.class); 
    entMgr.modifyEntity("User", currentUser.getEntityId(), mapAttrs);
    I wonder if currentUser.setAttribute("LastSent", today); would work... Hmm.

Maybe you are looking for

  • ITunes 10.3.1 freezes when I try to delete files I have ripped from my own CDs.

    I am in the process of updating a number of CDs that I ripped at 128kbps with rips at 256kbps.  When I delete the 128kbps files most of the time iTunes 10.3.1 freezes with the spinning beach ball.  The files are in the trash but I have to force quit

  • IPhone 4 HDMI output for photo slideshow. Aspect ratio squished?

    Bought the Apple Digital AV Adapter and tested it today. Hooked it up via an HDMI cable to a little HD TV. Videos (YouTube or in Photo Gallery) display as they should, in widescreen just as they do on the screen. However, when I start the photo slide

  • Standard business content not extarcting all data

    Hello, I am currently rolling out QN data.  The standard business content for 2lis_05Q0task includes FECOD FEGRP & OTEIL (from table QMFE) fields however the data is not being pulled. All the other data is coming in ok.  Is there something I need to

  • Is there a way to end a method that has no return type?

    Without using an exception, as they are costly I am told, and without using may if then statements, is it possible to end a method if some criteria isn't met. example. public void doThis(){   // the method relies on the state of some   // other thing

  • Develop presets

    Can anyone share their develop presets for a Canon 5D mk II in LR 4?