SDK: adding new value in custom fields

Hello,
I wanted to add new value in custom field of the resource table... I used this code (taken from SDK example) :
//Create and fill request for CustomData Service
SaveCustomDataRequest request = new SaveCustomDataRequest();
List<CustomValue> customData = new ArrayList<CustomValue>();
CustomValue attribute = new CustomValue();
//Field name
attribute.setName("NOTIFICATION_NUMBER");
//value received from ERP
attribute.setValue(notification);
customData.add(attribute);
request.setCustomData(customData);
//table name
request.setObjectAlias("RESRCE");
request.setRef(handle);
customDataService.saveCustomData(request);
But get a validation error, complaining about no ModifiedDateTime providen... How can I initialize this date or avoid the validation ?
I also tried using the ResourceDOService, using the setCustomData method, but same error...
Thanks

I'm using ME 5.2.2.2, sdk 5.0.1.8, for the moment locally on my laptop for development.
There is no stack trace, I can just see the error when debugging :
com.sap.me.frame.domain.RequiredValueValidationException: class com.sap.me.domain.model.CustomFieldDOmodifiedDateTime
The resource exist, I do a read request before to check if the custom field has value or not. Anyway, it's a collaboration plug-in, executed when we change the resource status, so I got the resource handle as input ;o)
I can confirm there are some resource with custom value in other fields with date = null. It occurs when I'm saving the data in the GUI (so entering data's manually in custom field, do a save => fields are not initialized)
Regards

Similar Messages

  • Maintaining operating concern after adding new value field

    Hello,
    I added a new value field to our live operating concern,maintained the data structure throguh KEA0(Maintain operating concern).The changes are transported from Development to Quality,Changes were reflected in Q system.After testing in Q system transports were pushed to production system.The new value field is added to the operating concern. When i check the log for KEA0 in production system it displayed one message like:
    Field VV088 was added to the reference structure
    Message no. KE782.You probably either  changed the operating concern or SAP-EIS aspect, and added the field VV099 to the definition.
    The added a CO-PA value field:
    In this case, the field is added to the definition or the summarization levels. This invalidates all existing levels. Consequently, you need to activate them again and fill them with data.
    In production system maintaining operating concenr or KEAO is only in display mode.Is it needed to regenerate the operating concern once again in production, how to do it. Is the message talking about the KEDV summarization levels.?
    thanks
    rahul

    Hi,
    No no ....KEDV is nothing to do here....that is creation of summarization in CO-PA.
    Since you added new value field you necessarily have to Regenerate the operating concern...
    Use Tcode KEA0...go to Environment tab...there the status of Cross client part  and client specific part both will be in RED....now just click on the Cross client (candle button)...now the system would regenerate the operating concern...once it is over do the same for the client specific...
    Beware when you do regenerate the operating concern no body can enter any transaction in that server since it is cross client table ...hence better do it after business hours.
    Hope this helps!
    Running KEDU with rebuild is relevant only when you already have created summarization and called up the same in the CO-PA report "options" tab. If you did not created the summarization you are nothing to do with KEDU.
    Next: The new value field has to be transported to PRD and hence even in PRD we have to do the regeneration manually.
    Regards,
    Velumani
    Message was edited by: Velumani Arunachalam
    Message was edited by: Velumani Arunachalam

  • Impact of adding new value fields in ongoing operating concern.

    Hi All,
    Want to know the steps of adding new value fields in the existing operating concern in COPA?
    What is the overall impact of addition of New Value fields in the running Operating Concern?
    How do we test the addition of new value fields?
    Is the addition of New Value fields to the running Operating Concern advisable?
    Your support and advice is highly anticipated and appreciated.
    Thanks & Regards
    9819528669

    HI,
    please search in SCN forum before you post:
    Re: Adding a ValueField to an existing Operating Concern?
    Best regards, Christian

  • Show value in "customer" field of FAGLB03

    Hi Experts,
    we have a requirement to Show value in "customer" field of FAGLB03 for all sales related transactions.
    Your support is appreciated.
    Thanks

    solution has been implemented using badi FAGL_ITEMS_CH_DATA

  • How to set a new value for formula field in crystal reports xi?

    <p>How to set a new value for formula field in crystal reports xi?</p><p>//formula</p><p>{@description}</p><p> </p><p>exemplo in VB6</p><p>crxSubreport.FormulaFields.Item(1).Text =  "&#39;Subreport Formula&#39;"  or</p><p>crxSubreport.FormulaFields.Item("description").Text =  "&#39;Subreport Formula&#39;"</p><p>How to in JRC?</p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p>

    Hi,
    This functionality is known to be very important and is a key part of the next major release of the JRC planned for the first half of 2008.
    Regards,
    <p>Blair Wheadon</p>
    <p>Product Manager, Crystal Reports</p>

  • Adding a new value to messagechoice field.

    I have a field called messagechoice type .
    I have 4 drop down list values in messagechoice type , my requirement is ,
    I have to delete existing one and need to add a new value in drop down list.
    how to achieve this . please do the needful help.
    thanks,

    I have a field called messagechoice type .
    I have 4 drop down list values in messagechoice type , my requirement is ,
    I have to delete existing one and need to add a new value in drop down list.
    how to achieve this . please do the needful help.
    thanks,

  • Adding new value fields to an existing and productive operating concern

    Hi,
    I would like to have 5 new value fields active in 4 out of 6 operating concerns that I am working with.
    Is it correct that I could do this one of the following ways:
    1. Use a value field that exists already in an operating concern and rename it?
    In this case is it necessary to regenerate the operating concern?
    Do I transport the change ?
    2. Create an entirely new value field, and assign it to the operating concern?
    Is it necessary to regenerate the operating concerns in question?
    Do I transport the change?
    3. Select a value field that is currently in the system but is not assigned to any operating concern eg some kind of SAP delivered value field?  How do I assign it to the op  con? Do I need to re gen the op con?
    Which way is the best or is there a 4th option?
    Thanks for your help in adviance
    Regards
    Aisling

    Hi,
    This note is a catalogue of notes of consulting notes where SAP tell you steps, reports to use and son . If you read them (these notes and related notes) you have the steps, guides, reports that you must use. Better advice. Try a solution with all steps in mind and check it in a quality enviroment. As you know there a lot of things in CO-PA concern (you have your own tables, with your own fields, your reports as KE2Rxxxx, and so on), your secondary indexes, etc.. , the best is try the solution in your Quality Enviroment (a quasi-clone of your production enviroment) and check the results (create SO, invoices, after modifications to check possible problems,...).
    Regards,
    Eduardo
    pd: I forgot. If the size of tables (CE4xxxx, CE1XXXX, ...check them with DB02) are so big, get the opinion of a Basis Consultant. Surely in the before note there notes about this issue.
    Edited by: Eduardo Hinojosa on Apr 23, 2010 2:41 PM

  • How to get value in custom field(Part OF BOL) in search result view.

    Hi All,
    I am new to CRM WEBUI and i am facing issue in populating value in one field of search result view.
    Current requirement is .
    On product f4 , we get search help and search result view.
    one custom field need to be added in search result view ( for eg any description field).
    This description field is already  available in one of z relation  maintained in PRODUCT root object.
    Solution tried so Far:
    1. We enhance one Standard Product structure and add that description field .
    2. Add new  field( description) in result view context node as attribute by using bol attribute.
    3. Customize search result view and display that description field in result.
    By doing above three steps, field is available in  search result view.
    but issue is we are not able to get values.
    1st Approach: write code in getter and setter method . Pass the relation name and get the property of description  field
    in setter method, set the property.
    Issue : we were not able to sort the values on this description field. so scrap this 1st approach
    2nd Approach: In Event EH_Onsearch Help, we try to use collection wrapper to get current value of description
    by using relation name .
    We use component controller to set the value of description since  searchresult view-conext node->result node is bound to one comp controller node.
    but this solution also does not work..
    Please advice us  what approach we should use to get value in description field  and sorting should also work.
    Thanks in Advance.

    Hi Girish,
    1. We enhance one Standard Product structure and add that description field .
    2. Add new  field( description) in result view context node as attribute by using bol attribute.
    3. Customize search result view and display that description field in result.
    By doing above three steps, field is available in  search result view.
    but issue is we are not able to get values.
    1st Approach: write code in getter and setter method . Pass the relation name and get the property of description  field  and by using this approach we are able to get value but sorting was not working so we disable the sorting as it was not required by business.
    if u need sorting on that field.
    then u should go for value node approach and write code for getting value in get set method
    and for sorting also , need to write code.
    This is my understanding on this .
    Please reward if this solution is helpful

  • Negative values for Custom field in SAP coding block !

    Hi All,
    Hope all of you are doing fine.
    I need your valuable suggestion/possible workaround for the following requirement.
    u2022 The project requires me to add a custom new field to SAP coding block, which can take negative numeric values.
    u2022 The standard u201Caddition of custom fieldu201D configuration allows me to have the data type of the newly added custom field as either NUMC or CHAR. NUMC data type does not allow negative values. Standard configuration does not allow me to choose other data types (for custom field addition) like QUAN which can allow negative values (by checking the Sign at domain level in data type).
    u2022 Moreover, once I have added the custom field, itu2019s not possible to change the data type of the newly added field (say from NUMC to QUAN).
    I wanted to know if anyone of you have any project experience/knowledge about possible workaround, where we can add a custom field in SAP coding block, which can accept negative numeric values (through standard configuration or otherwise).

    No experience on that, but I strongly advise you to not trying to do something else than what was designed by SAP. So, you can create a character type field, with for example a field exit (though this technology is obsolete, it's very useful in that case) to validate its content (and reformat it if needed).
    Note that from a functional perspective, I think an amount is strange in the coding block, so maybe ask the functional people to know why they need it...

  • Creating a new project with custom fields using web services

    I've been trying unsuccessfully for the last week or so to successfully create a new project from web services and I believe the main problem that I've been running into is that one of the required fields is a custom field. I've tried creating the Project
    in a couple of different ways and haven't had any success up to this point, so any help would be appreciated. I've tried creating it with both a REST call to /_api/ProjectServer/Projects and a SOAP call to /_vti_bin/PSI/Project.asmx. Below are the best shots
    I've made at the two different calls with the errors I received. If anyone has any leads on the best way to do this the help would be appreciated!
    REST POST /_api/ProjectServer/Projects
    'odata.type' : 'PS.PublishedProject',
    'Name' : 'OData Name',
    'Custom_9d77d62aa92e4d40adc8446c90eb7456' : "O&M"
    Response
    error: {
    code: "11713, Microsoft.ProjectServer.PJClientCallableException"
    message: {
    lang: "en-US"
    value: "PJClientCallableException: CustomFieldRequiredValueNotProvided CustomFieldRequiredValueNotProvided mdpropuid = 9d77d62a-a92e-4d40-adc8-446c90eb7456"
    SOAP POST /_vti_bin/PSI/Project.asmx
    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:proj="http://schemas.microsoft.com/office/project/server/webservices/Project/" xmlns:projds="http://schemas.microsoft.com/office/project/server/webservices/ProjectDataSet/">
    <soapenv:Header />
    <soapenv:Body>
    <proj:QueueCreateProject>
    <proj:dataset>
    <ProjectDataSet xmlns="http://schemas.microsoft.com/office/project/server/webservices/ProjectDataSet/">
    <Project>
    <PROJ_UID>e1c2d38b-1529-4128-b707-42a94045e55b</PROJ_UID>
    <PROJ_NAME>Proj Dept Test 2</PROJ_NAME>
    <PROJ_TYPE>0</PROJ_TYPE>
    </Project>
    <ProjectCustomFields>
    <CUSTOM_FIELD_UID>4802a711-62a0-4f84-8e08-c7d22daadb5b</CUSTOM_FIELD_UID>
    <PROJ_UID>e1c2d38b-1529-4128-b707-42a94045e55b</PROJ_UID>
    <MD_PROP_UID>9d77d62a-a92e-4d40-adc8-446c90eb7456</MD_PROP_UID>
    <FIELD_TYPE_ENUM>21</FIELD_TYPE_ENUM>
    <CODE_VALUE>a47930d6-b89d-4f3a-b4e3-522015fe82a1</CODE_VALUE>
    </ProjectCustomFields>
    </ProjectDataSet>
    </proj:dataset>
    <proj:validateOnly>true</proj:validateOnly>
    </proj:QueueCreateProject>
    </soapenv:Body>
    </soapenv:Envelope>
    Response
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
    <s:Fault>
    <faultcode>s:Server</faultcode>
    <faultstring xml:lang="en-US">ProjectServerError(s) LastError=GeneralUnhandledException Instructions: Pass this into PSClientError constructor to access all error information</faultstring>
    <detail>
    <errinfo>
    <general>
    <class name="General Unhandled Exception in _Project.QueueCreateProject_">
    <error id="42" name="GeneralUnhandledException" uid="184feeaf-906a-e411-9b2a-00155d388b02" Exception="System.Data.StrongTypingException: The value for column 'PROJ_TYPE' in table 'Project' is DBNull. ---> System.InvalidCastException: Specified cast is not valid.
    at Microsoft.Office.Project.Server.Schema.ProjectDataSet.ProjectRow.get_PROJ_TYPE()
    --- End of inner exception stack trace ---
    at Microsoft.Office.Project.Server.Schema.ProjectDataSet.ProjectRow.get_PROJ_TYPE()
    at Microsoft.Office.Project.Server.BusinessLayer.Project.FixupProjectType(ProjectDataSet projDS)
    at Microsoft.Office.Project.Server.BusinessLayer.Project.QueueCreateProject(Guid jobUid, ProjectDataSet dataset, Boolean validateOnly)
    at Microsoft.Office.Project.Server.Wcf.Implementation.ProjectImpl.&lt;>c__DisplayClasse.&lt;QueueCreateProject>b__d()
    at Microsoft.Office.Project.Server.Wcf.Implementation.WcfMethodInvocation.InvokeBusinessObjectMethod(String businessObjectName, String methodName, IEnumerable`1 actions)"/>
    </class>
    </general>
    </errinfo>
    </detail>
    </s:Fault>
    </s:Body>
    </s:Envelope>

    Julie,
    You can create the fields that are project specifc & you can create fields that apply to all projects but have specific options for projects. Your goal is to create fields that are specific to each project, but right now you get all fields from you old project - is this correct?
    From your description below it appears that the fields in your original project are marked as applied to all projects & hence when you create a new project they are inherited. If you mark those fields as applied to certain project & then create a new project those fields will not be inherited.
    But you are right in the sense that it is limiting that there is no multi-select for "applies to" field.

  • How to fill values  to custom fields created by EEWB

    Hi All,
    I am working in CRM 5.0,We have extended the BP transaction with two new fields using EEWB transaction.
    ZZABC
    ZZDEF
    Here goes my problem , i wanted to update data to the new fields using FM.
    I tried using BUPA_CENTRAL_CHANGE,where i found the structure of the  custom fields .But the FM is working for standard fields but not for Custom fields.
    Following are the FM generated  in EEWB.
    ZZG05_BUPA_EVENT_DINP2
    ZZG05_BUPA_EVENT_DLVE1
    ZZG05_BUPA_EVENT_DSAVB
    ZZG05_BUPA_EVENT_ISDST
    ZZG05_BUPA_EVENT_ISSTA
    ZZG05_BUPA_EVENT_XCHNG
    ZZG05_BUPA_PAI_ZG050100
    ZZG05_BUPA_PAI_ZG050101
    ZZG05_BUPA_PBO_ZG050100
    ZZG05_BUPA_PBO_ZG050101
    I have tried using the above FM.But didnt work.
    Can you please help me how to proceed  just to fill values using FM.
    Your suggestions  will be highly rewarded.
    Thanks,
    Gayathri.

    Hi Shiva,
    Thanks for your response.
    I have specified the FM that are generated while creating the fields, where i dnt find any update or delete.
    Further can u explain "you can play with screen config in the AREA MENU code BUPT".
    My requirement is to upload data to those fields through pgm for one time.
    Thanks,
    Gayathri.

  • Default value in custom field in webdynpro screen

    Hi.
    We have added a custom field in the Item level for Shopping Cart (SRM 7.1).
    I however want a default value to show up or get populated in that custom field all the time. What is the best way to achieve this?
    Thanks.
    Anuradha.

    depends upon how you have added it.
    if its just though the structures and not added in the WD then you need to do it with doc-change badi.. and this is a preferred option.
    if you have done it though WD then you can default the values using the post exits in the INIT method.
    you can check if the value is blank then populate this default value (so that it does not overwrite the edited values).
    moreover, do you want it as a non editable field or just a default value which user can change on the screen as well?

  • Adding new value in Pick list and sorted logic on basis of new value.

    Hi All,
    I have a requirement where I have to add a new value in seeded OAMessageBean and sort the page contents on basis of selected value.
    I see in about this page and found out that no VO is attached with this field.
    I assume that it attached somewhere in controller and tried to find out there but cannot able to find it there.Is there any way to find the VO which is attached to this bean?
    Also how to add a new values in this seeded picklist as I can able to get handle to OAMessageBean in custom controller.
    Please Help.
    Regards,
    889254

    Hi Peddi,
    Thanks a lot for your reply,
    I tried to open that page in jdeveloper but I dont see any choice bean on the page.Also tried to open CO attached to this page but no clue.As I am able to the get handle of this choicebean in controller.Is there any way I can find out which VO attached to this choiceBean.
    I tried using below depricated method and it is returning null
    messageField.getListViewObject();
    My another question is Can we add new value to choice bean In CO.
    I tried to add it by below methods but these are not reflecting in the application.
    messageField.addOption("TEMP");
    messageField.addIndexedChild("TEMP");
    Regards,
    889254

  • Copying the value of customized fields from one order to other in CRM

    Hi ALL,
    We have added new customized fields in web ui for Sales Order.
    Now when we are using the standard COPY functionality to copy one particular sales order, then all the fields are getting copied into new order except the customized fields which we have added.
    We have created new data elements for our fields and added it by EEWB transaction.
    Please let me know if there is any badi or any other way which we can implement so that our customized fields are also copied.
    Thanks,

    Hi!
    BADI "CRM_COPY_BADI" is the one you are looking for.
    Create badi implementation and assign copy routine to the copy management parameter.
    The parameter can be configured via IMG->CRM->Transactions->Basic settings->Copying Control for Business Transactions->Define Copying Control for Transaction Types.
    I hope it helps you.
    Regards,
    Fukuhara Yohei

  • Add a new tab with customer fields to shopping cart item

    Hello Experts,
    I wanted some help in adding a new tab to shopping cart items. I went through some posts and found ways of doing it using some spro settings, but there is no way i can handle the field type in this.
    I want a customer field which is a checkbox, how would i add this?
    Moreover if i use spro the tab will by default be called as "Table Extensions" , i want to give it a specific name.
    In case i am adding a new webdynpro component , how would i go ahead with this? what is the name of the fpm config where i need to add my customer webdynpro component?
    So could someone please help me with this requirement.
    Regards,
    cruiser

    Hello,
    Please follow below steps,
    1.  Appending the fields to the structure in Se11 i.e INCL_EEW_PD_ITEM_CST_SC
    x = header, item
    y = PO,SC
    2.  SAP SRM->SRM server-> Cross-Application Basic setting ->extension and field controls->create a  table extension and supply with data->define customer table extension .( ZAINCL_EEW_PD_ITEM_CST_SC)
    3.  Set the visibility of  table extension thru control table extension and their fields and actions
        use configure  visibility of table like item enchancements
    Bus. Object Set Type  : TICUS
    Bus. Object Type         :BUS2121
    Transaction Type        :SHC
    PDO set exist   :X
    4. Configure Control of Fields of Table Extensions
    Bus. Object Set Type : TICUS
    Structure Field Name : Field name
    Bus. Object Type       :BUS2121
    Set Level                   : ITEM
    Field visible: X
    Field Enable: X
    5. Configure control action
    6. Maintain  view /SAPSRM/V_MDFSBC_DEFAULT
    Bus. Object Set Type : TICUS
    Structure Field Name : Field name
    Bus. Object Type       :BUS2121
    Set Level                   : ITEM
    Field visible: X
    Field Enable: X
    Regards,
    Neelima

Maybe you are looking for