Not able to retrieve and insert the value to Home_country filed in MDM

Hi All,
I am new to the JAVA API,
I have creted one application in webdynpro using the JAVA API. I am able to search the data based on "Firstname" "Lastname" and "Email address".
I need to basically two functionalities
1) Search
2) Insertion of new records
*1) Search*__
But searching based on the Country is not able to do it.
we have two tables .
1) Country table> Contains all the list of the country codes and County name.
2) People table > Contains the country filed. So for this filed lookup table is country. also this country filed is drop down  not have opton edit in the MDM.
I am sending the following used for searching the records based on the First Name and country.
But based on the first name it is working fine but Country it is giving some code like "R100" "R12". It is not givng the actual name of the country.
FieldSearchDimension sd1 = new FieldSearchDimension(fields[2].getId());
               TextSearchConstraint sc1 = new TextSearchConstraint(First_Name,TextSearchConstraint.EQUALS);
               sch.addSearchItem(sd1,sc1);          
FieldSearchDimension sd4 = new FieldSearchDimension(fields[9].getId());
               TextSearchConstraint sc4 = new TextSearchConstraint(Home_Country,TextSearchConstraint.EQUALS);
//               TextSearchConstraint sc4 = new TextSearchConstraint("IN",TextSearchConstraint.EQUALS);
               sch.addSearchItem(sd4,sc4);
cmd = new RetrieveLimitedRecordsCommand(connections);
               cmd.setResultDefinition(rdPeople);
               cmd.setSearch(sch);
               cmd.setSession(sessionId);
try
                    cmd.execute();
                    catch(CommandException e)
                         e.printStackTrace();
                    recs = cmd.getRecords();
                    wdContext.nodeResult_Table().invalidate();
//retreiving the Data from the resultset
if(recs.getCount()!=0)
  for(int i=0;i<recs.getCount();i++)
       //First Name
     IResult_TableElement resEle=wdContext.nodeResult_Table().createResult_TableElement();
     if(!(recs.getRecord(i).getFieldValue(fields[0].getId()).isNull()))
     //wdComponentAPI.getMessageManager().reportSuccess("Network Id-->"+recs.getRecord(i).getFieldValue(fields[0].getId()).toString());
     resEle.setNetwork_ID(recs.getRecord(i).getFieldValue(fields[0].getId()).toString());
       //Country
      if(!(recs.getRecord(i).getFieldValue(fields[9].getId()).isNull()))
     resEle.setDisplay_Name(recs.getRecord(i).getFieldValue(fields[9].getId()).toString());
     wdContext.nodeResult_Table().addElement(i,resEle);
By the above field is not giving the respective country name is avilable. it is giving some value"R100" rather giving of India.
_ 2)  For creating the record in the  "people" table._
I am able to insert the data all the information "firstname" "Last name", "email" except "Country" entered by the user by using the following code.
//Insert
First_Name=wdContext.currentPersonal_DetailsElement().getAttributeAsText("First_Name");
     Last_Name=wdContext.currentPersonal_DetailsElement().getAttributeAsText("Last_Name");
     Middle_Name_or_Initial=wdContext.currentPersonal_DetailsElement().getAttributeAsText("Middle_Name_or_Initial");
     Home_Country=wdContext.currentPersonal_DetailsElement().getAttributeAsText("Home_Country");
CreateRecordCommand createRecordCommand =new CreateRecordCommand(connections);
     Record r1 = RecordFactory.createEmptyRecord(tables[0].getId());     
     try
//               Retrieve Lookup Field Properties, when Field Properties is given as input.
//           LookupFieldProperties lookupField = (LookupFieldProperties) fields[9];          
////     Retrieve Lookup Field Properties, when Field Properties is given as input.
//           LookupFieldProperties lookupFieldSer = (LookupFieldProperties) fieldProp;
//          //setting the values for firstname and lastname
        r1.setFieldValue(fields[0].getId(),new StringValue(Network_ID));
        r1.setFieldValue(fields[2].getId(),new StringValue(First_Name));
        r1.setFieldValue(fields[3].getId(),new StringValue(Last_Name));
r1.serFieldValue(FieldValue(fields[9].getId(), new Stringvalue(Home_country));
        createRecordCommand.setSession(sessionId);
        createRecordCommand.setRecord(r1);
     try {
          createRecordCommand.execute();
      } catch (CommandException e2) {
Let me know what are the changes need to be done for inserting the country information in people table.

Hi Greg,
Thanks for the reply,
Actually,I  was doing the same thing what  you suggested. I am sending the piece of code . Can look it it .Is any thing wrong.
          //inserting the Country lookup filed to record object.
*       if(Home_Country.length()!=0)*
*     /when pass the int position number for the country by retreiving from the country table it is working fine. But we      cannot depend on position. Because People table internally refering the other db table while inserting the country      filed in the People table./     *
*          r1.setFieldValue(fields[9].getId(),new LookupValue(new RecordId(12)));*
*     //When i PAss the String to the following function i am getting the unsupportedFormat Exception          *
*          r1.setFieldValue(fields[9].getId(),new LookupValue(new RecordId("Australia")));*
InCountry . They have defined only two columns called.
1) ISO-2 Code
2) Country Name.
Sample data
ISO-2 Code  |   Country Name
US                    United StatesOf America
AU                    Australia
Ar                     Argentina
Like the above data we have 250 country names
So , I displaying all the country list in my interface and holding in the Array.
Ex: When the user chooses the Australia.  When I pass directly as an "Australia" to
r1.setFieldValue(fields[9].getId(),new LookupValue(new RecordId("Australia"))).  it is giving me error.
Then i try to pass the postion of the"Australia" in country table. Like if the Austrila is an 2 record. I am looping through my array and find the record position as "2".
I am passing as
r1.setFieldValue(fields[9].getId(),new LookupValue(new RecordId(2)));
It is inserting into the people database. But not an Australia. It is inserting as "Argentina".
When the record inserting in people table refering some table at the database level , that table called "A2i_16_TEXT" This contains three columns.
A2i_16_TEXT(columns)
1) Id
2) LangId
2) Field Id
4) TextField
Example Data
Id  |  LangId  |  Textfield
3       0            Australia
2       0            Argentina
4       0            United States Of America
As i am showing the above table for "Argentina" Id is "2". When i pass the 2 for inserting the country filed.Instead of inserting "Australia". It is inserting the "Argentina" by refering this table.
Through MDM API we are not able to access this " A2i_16_TEXT"  table. Because it is maintaining at the db level to find the perticular id for the respective country before inserting in to the people table.
So kindly suggest me how to solve this problem. What i am doing in the code is correct or not.
Regards
Vijay

Similar Messages

  • Not able to retrieve netui hidden field values in java script

    I have problem in retrieving hidden field values in javascript
    I have declared hidden field as below,
    <netui:hidden dataSource="actionForm.selectedColumns" tagId="hiddenSelectedfield"></netui:hidden>
    and retrieving with tagId in javascript as below,
    obj1 = document.getElementById(tagId).style;
    its not getting value with tagId defined in netui tag.
    Any suggestion...
    Thanks,
    Amit

    Hi,
    I'm a new bee to this adobe forms and VBS.Could you explain more on that Fdf file or Can you send some documentation where i can go through of.
    Even i'm very much happy to share the pdf file..the problem is it is binded with the SAP browser.So i cant make a copy to my local system,But i can explain all the technical stuffs inside the form.
    The form is developed using adobe lifecycle designer,i can see the fields are defined in the design view.
    The fields which i'm accessing to enter the values are visible & Set user defined values..
    when you access through the SAP portal,it opens up inside the browser ..so every field you choose or select additional fields get added based on the selection..
    The "GetField" code you have shared works perfectly fine..i could read all data,or i could select a particular field to retrieve the field.
    But the "SetField" code you have shared locating the field but it is not writing the value into the field.I called a setfocus method on the particular field as well..then put f.value = fieldvalue still it chooses the particular field but didnt feed the value...
    is it possible to call a keystroke to the particular field?
    if you have any ideas please throw it up on me..i'll try all my possibilities.
    Thanks for your time !

  • I keep getting this error messge and I am not able to download and sync the latest update, any idea's? Help ... AppName: itunes.exe      AppVer: 10.6.3.25      ModName: msvcrt.dll ModVer: 7.0.2600.2180      Offset: 000372e3

    Hi Guys,
    Please help... All of sudden my iTunes isn't working. I'm trying download and update the latest version and I keep getting error messages
    I don't know what the issue is or how to correct it... any suggestions would be awesome.
    Cheers,
    Sarah.

    Thank you so much the suggestion Tiger 
    I followed your advice to the letter and it was unfortunatley unsuccessful....
    I am seriously at a loss ....  I got the below error after I deteted, restarted and installed the new version ...
    Any other suggestions guys? Help ...
    AppName: itunes.exe
    AppVer: 10.7.0.21
    ModName: msvcrt.dll
    ModVer: 7.0.2600.2180
    Offset: 000372e3

  • EHPI not able to start and stop services shadowsystem

    All,
    I am working on an installation of EHP4 but am running in the following issue:
    When I get to the phase SHDINST_OS the EHPI is not able to stop and start the service for the shadowsystem. The ehpi log gives:
    Phase SHDINST_OS:
    SAPehpi> Starting subprocess sapstartsrv.exe with id 7348 at 20100512081320
    Environment: JAVA_HOME=C:\Program Files\Java\jdk1.5.0_19
    Environment: PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    Environment: Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;F:\usr\sap\HRS\SYS\exe\uc\NTAMD64;F:\usr\sap\HRS\SYS\exe\nuc\NTAMD64
    Environment: auth_shadow_upgrade=0
    Environment: dbs_mss_schema=hrs
    Service not started.
    Process with ID 8132 terminated with status -1
    The EHPI gives:
    An error occurred during the installation of the
    SAP service SAPHRS_03:
    Possibly the password for user .\SAPServiceHRS entered in phase
    INITPUT was wrong. You can reset it by calling 'SAPehpi set stdpar'.
    Try to execute SAPSTARTSRV.EXE manually using the following syntax:
    G:\EHPI\abap\exe\sapstartsrv.exe -r
    -p G:\EHPI\abap\HRS\SYS\profile\START_DVEBMGS03_NLDBHRS01 -s HRS -n 03
    -U .\SAPServiceHRS -P <PASSWORD> -e NLDBHRS01\hrsadm
    and check if the service SAPHRS_03 can be stopped and restarted.
    When I follow up on the sapstartsrv first I can start/create it but that when I restart the EHPI it fails again on the same issue.
    Anybody any ideas?
    the passwords given in the EHPI are the ones of the SAPService user in the windows environment
    Chris

    Hi
    Have you tried below option as suggested in logs ?
    > Possibly the password for user .\SAPServiceHRS entered in phase
    > INITPUT was wrong. You can reset it by calling 'SAPehpi set stdpar'.
    > Try to execute SAPSTARTSRV.EXE manually using the following syntax:
    > G:\EHPI\abap\exe\sapstartsrv.exe -r
    > -p G:\EHPI\abap\HRS\SYS\profile\START_DVEBMGS03_NLDBHRS01 -s HRS -n 03
    > -U .\SAPServiceHRS -P <PASSWORD> -e NLDBHRS01\hrsadm
    > and check if the service SAPHRS_03 can be stopped and restarted.
    >
    Thanks
    Sunny

  • I have lost my contact from iphone 5 and not able to retrieve the data, however  it reflects old contacts are reflected with Whats app messages

    i have lost my contact from iphone 5 and not able to retrieve the data, however  it reflects old contacts are reflected with Whats app messages

    WWhat are you syncing your contacts with? A supported application on the computer or cloud service? They should still be there.

  • To retrieve the PRT document (a PDF file) and insert the doc in PM order

    Hello guys,
    I have a challenging task in from printing as follows,
    By using TC: IW3D we get print preview of PM Order Set (PM Print Program: YIPRJT01), currently the PRT document number prints in the PM Order. Now we have to insert the PRT documents (a PDF file) into the PM Order set rather than printing the PRT document number ( By using TC: IW33 by going OPERTIONAL TAB we will get the PRT document(a PDF file))
    The requirement is to retrieve the PRT document (a PDF file) and insert the document in PM  order set with out navigating separately by using the TC: IW33.
    If you run the script in the print preview we can able to see PM the order set along with the PRT document (a PDF file).
    Thanks & Regards
    Vishnu

    I'm also trying to print PRT document with shop papers and still not able to do so. I selected "P" for print on the control key and it should print but still didn't print.
    If I understand it right, I think you are trying to do the same.
    Have you resolved this issue ?
    Thank you,
    Sam

  • Sales Order form error  "Not able to retrieve Display values for Service"

    Hi,
    Few of our orders flash the below error message when the order is queried
    "Not able to retrieve Display values for Service"
    Below are the points I observed
    1.The orders I am referring to are imported order via EDI interface.
    2.The service reference type code has value of ORDER, however no other service related fields (like service reference line id) have any values.
    3. The item is not a service item (service tab in Item setup is disabled)
    4. Same item when imported with value of "Customer Ordered" in "service reference type code" field, does not throw an error.
    5. If I update "service reference type code" with value null or change it to CUSTOMER_PRODUCT, the error disappears.
    Can someone explain the significance of this column value and what could have been causing this error message?
    May be there are some dependent fields/setups which must have a value when service reference type code =ORDER.
    Thanks in advance,
    JC
    Edited by: user10174990 on Oct 25, 2012 10:58 AM

    Hi,
    Maintain the dafault values using Tcode OISF with respective to Planning Plant you have to maintain the following values like Order Type, Main Work Center, Maint. Plant,Group,Group Counter,Business Area & Task List type.
    or
    Apply these OSS note 150732 / 195993.
    regards,
    Venkatesan Anandan

  • SharePoint List Form using InfoPath 2010 "Cannot insert the value NULL into column 'tp_DocId', table 'Content_SP_00003.dbo.AllUserData'; column does not allow nulls"

    I am experiencing issue with my SharePoint site , when I am trying to add new Item in List . Error given below :--> 02/03/2015 08:23:36.13 w3wp.exe (0x2E04) 0x07E8 SharePoint Server Logging Correlation Data 9gc5 Verbose Thread change; resetting trace
    level override to 0; resetting correlation to e2e9cddc-cf35-4bf8-b4f3-021dc91642da c66c2c17-faaf-4ff9-a414-303aa4b4726b e2e9cddc-cf35-4bf8-b4f3-021dc91642da 02/03/2015 08:23:36.13 w3wp.exe (0x2E04) 0x07E8 Document Management Server Document Management 52od
    Medium MetadataNavigationContext Page_InitComplete: No XsltListViewWebPart was found on this page[/sites/00003/Lists/PM%20Project%20Status/NewForm.aspx?RootFolder=&IsDlg=1]. Hiding key filters and downgrading tree functionality to legacy ListViewWebPart(v3)
    level for this list. e2e9cddc-cf35-4bf8-b4f3-021dc91642da 02/03/2015 08:23:36.17 w3wp.exe (0x1B94) 0x1A0C SharePoint Server Logging Correlation Data 77a3 Verbose Starting correlation. b4d14aec-5bd4-4fb1-b1e3-589ba337b111 02/03/2015 08:23:36.17 w3wp.exe (0x1B94)
    0x1A0C SharePoint Server Logging Correlation Data 77a3 Verbose Ending correlation. b4d14aec-5bd4-4fb1-b1e3-589ba337b111 02/03/2015 08:23:36.31 w3wp.exe (0x2E04) 0x07E8 SharePoint Foundation Database 880i High System.Data.SqlClient.SqlException: Cannot insert
    the value NULL into column 'tp_DocId', table 'Content_SP_00003.dbo.AllUserData'; column does not allow nulls. INSERT fails. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject
    stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavi... e2e9cddc-cf35-4bf8-b4f3-021dc91642da 02/03/2015
    08:23:36.31* w3wp.exe (0x2E04) 0x07E8 SharePoint Foundation Database 880i High ...or runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream,
    Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior,
    RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand
    command, CommandBehavior behavior,

    Are you trying to setup P2P? Could you explain the process you followed completely? By anychance you create the backup and then created the publication?
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • When I am on a phone call and I double click the button to go to my home screen, then open another application (usually my calendar program, Calengoo), my screen goes blank and I am not able to return to either the app, the phone, or the home screen.

    When I am on a phone call and I double click the button to go to my home screen, then open another application (usually my calendar program, Calengoo), my screen goes blank and I am not able to return to either the app, the phone, or the home screen. If I am speaking to a person, if they hang up then I am back to the phone application. If I'm leaving a message, I am unable to return to the phone screen to end the call, and have to wait until the other phone hangs up. I'm also unable to switch back and forth to look at my calendar if I'm calling someone about scheduling. This has only started happening since the most recent iOs update. I run into situations similar to this about once per day during the work week, as I use my phone is this manner quite often. While not life altering it is quite frustrating. Can anyone here help me figure out a way to avoid this? If it helps, I have noticed a general downgrade in overall performance starting two system updates ago (apps opening more slowly, closing unexpectedly more often, etc.). I have an iPhone 3GS with the latest OS update.
    Thank you for any help or suggestions,
    Chris

    I could be corrupted backup.
    You can check the notification settings for message.
    Settings>Notification Center>Messages>Alert Style
    It should be on Banners or Alerts.
    Settings>Messages> Turn on Imessage and send as SMS and below that "Blocked" to check if you have any numbers block might be blocking the message.
    You can also do a hard reset by holding power and home till it restarts and release after seeing the apple logo.
    Still doesn't work? Settings>General>Reset>Reset all settings

  • I have the iPhone 5s. I synced it with my Mac and got all the old apps from my old phone. I was not able to update any of the apps on the old phone and they will not update on the new iPhone 5s either! What can I do?

    I have the iPhone 5s. I synced it with my Mac and got all the old apps from my old phone. I was not able to update any of the apps on the old phone and they will not update on the new iPhone 5s either! What can I do?

    Hey there rmflint,
    It sounds like you are wanting to update the Apps that were synced over from your computer to your new iPhone 5s. If you are clicking Updates in the App Store in the bottom right corner, would you mind clarifying what happens when you are trying to update them? 
    App Store at a glance
    http://help.apple.com/iphone/7/#/iph3dfd8c19
    Thank you for using Apple Support Communities.
    Take care,
    Sterling

  • My wife and I share the same email address and Apple ID.  We are not able to send and receive Text Messages to one another.

    My wife and I share the same email address and Apple ID. We are not able to send and receive Text Messages to one another. Is the cause of this because we share the same Apple ID? Will we have to set up 2 separate primary email addresses to be able to  send and receive Tex Messages to one another? Like I said, we share the same email address and woul like to keep it that way to keep up with our email together. Is there a way to by-pass having to set up 2 primary emaill addresses if this is the problem?
    Thanks.

    go to the settings and turn off imessage
    but that don't change the issue that you will never be able to facetime eachtoher
    the appleID is really meant as the handle that identify you it was not meant to be shared
    but can see that people may want to do not buy apps more then once

  • HI. I have itunes 10.6.1.7. When I goto movies i am not able to add and when I click on add file to library and select the file and add its not getting added. When i goto Library it says  that movies I add are in library.Which I cant add

    HI. I have itunes 10.6.1.7. When I goto movies i am not able to add and when I click on add file to library and select the file and add its not getting added. When i goto Library it says "feature films and home movies you add to itunes appear in movies in your iTunes library. To play a movie, just double click it". And below are two options for Downloading movies from store and rent movies. Please help.

    I get the exactly the same problem with win 7, i rang apple support who suggested i try another machine/or create another account on my machine???? why should i, stupid ipad 3rd gen is now sitting here un syncable, apple support ....tut tut very poor support, its a shame im out of the 7 day period otherwise this ipad would be going straight back, older versions of itunes worked fine, some one must know a fix for this??

  • In SharePoint 2013, some of the userswith contribute or full control rights are not able to edit and save office doucuments to SharePoint library.

    In SharePoint 2013, Office 2010 and IE 8. Office web apps is not configured.
    Some users with Contribute or full control are not able to edit and save documents back to SharePoint library.
    When they try to save they are getting following error:
    1. https://.....pptx is read-only. Do you want to save changes to a different file name?
    2. Project canot access "https://...." 
       Try one of the following
    The file may be temporarily open by another program. wait a momoment and try again.
    A file with the same name may already exists. Save it with a different file name.
    You may be trying to save to a read only folder. Save to a different folder instead.
    Please help me with this issue.
    will be waiting for any suggestions or solutions.
    Thanks
    Krish
    99

    Thanks again for quick response.
    I have requested users who are having this issue to try check in/ check out, and share the results.
    Result with CheckIn/CheckOut:
    User was able to check out but no edit option.
    'Edit Document' option under 'Files' tab was greyed out. I did check permissions every thing seems fine he has full control over the site and document library.
    Please advise.
    Thanks
    Krish
    99

  • My tel Goes after 10 minutes offline, apears à enige Apple, and i have to unlock again. People are not able to call me while THE Apple apears. Question what can be THE solution ?? It is à 3GS tel iOS 4.2.1

    My tel Goes after 10 minutes offline, apears à enige Apple, and i have to unlock again. People are not able to call me while THE Apple apears. Question what can be THE solution ?? It is à 3GS tel iOS 4.2.1

    Hi Richard,
    You mentioned that 'Apple put the AirPrint spec out there for all printer makers'. I've been looking around but I haven't found any spec. Where did you find it?
    Do printer makers have to buy a license in order to be able to advertise that they've implemented the AirPrint protocol? Is there maybe an Apple review process in place?
    TIA
    Geert

  • My tel Goes after 10 minutes offline, apears à white Apple, and i have to unlock again. People are not able to call me while THE Apple apears. Question what can be THE solution ?? It is à 3GS tel iOS 4.2.1

    My tel Goes after 10 minutes offline, apears à white Apple, and i have to unlock again. People are not able to call me while THE Apple apears. Question what can be THE solution ?? It is à 3GS tel iOS 4.2.1

    Hi Richard,
    You mentioned that 'Apple put the AirPrint spec out there for all printer makers'. I've been looking around but I haven't found any spec. Where did you find it?
    Do printer makers have to buy a license in order to be able to advertise that they've implemented the AirPrint protocol? Is there maybe an Apple review process in place?
    TIA
    Geert

Maybe you are looking for