cancel
Showing results for 
Search instead for 
Did you mean: 

Does EVS assumes first column as Primary Key

Former Member
0 Kudos

Hello All,

Does EVS Value Help assumes first column as Primary Key ?

In my project i have EVS like [<b>TitleCol</b> , <b>DescriptionCol</b>]

<b>TitleCol</b> can have same multiple entries having different IDs but IDs are not shown here. So i am supposed to get all the entries even if all entries are same, but i am only getting single entry.

for example: if i have 4 entries like

abc

abc

abc

abc

i am only getting single entry as "abc" in valuehelp.

any idea ? why EVS is filtering this ?

Best Regards,

Amol Bharti

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Amol,

Are you sure you mean EVS but not OVS?

Because EVS displays key->value pairs based on enumeration saved in SimpleType (or it sublcass SimpleTypeModifiable), and this enumeration is represented as map, and map keys should be unique (in fact, they do), so I'm wondering how you trap into problem with duplicate keys. Are you modifying simple type from code?

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Hi Valery,

Yes i exactly mean EVS and i am modifying simple type from code.

Actually the thing is i want duplicate values in EVS but yes i am not getting.

The reason is the first column turns to be the key column and it has been confirmed by you as well.

but is there any workaround to do this ?

any hack ?

Regards,

Amol

Former Member
0 Kudos

Hi ,

How will a user know what he is clicking ?

And how will you know what the user has clicked.. ?

Coz u will get the keys..!

How abt formatting it a bit like.. abc-1 ,abc-2 .. somethin like that.. ! or using ID here as key and value as

"titleID-description" !

Regards

Bharathwaj..

Message was edited by:

Bharathwaj

Former Member
0 Kudos

Okay,

what if i have a form for different end users to fill.

1) Names 2) IDs

Now obviously different person can have similar name but yes we can differentiate between them with the corresponding IDs which can not be same.

Now on screen where i have implemented EVS <b>i do not wish to show logical ID on the selection but yes i want to show the Name</b>. what to do in this case ?

what i did, i shifted name in the first column(which aparently became key)left side and IDs in right side. now what i see is the last duplicate entry of the name.

Regards, Amol

Former Member
0 Kudos

Hi ,

Whatever is unique should come as Key ! (Its the logical conclusion... )

If in your scenario , your requirement is to show the user the name also after selection..

use EVS+ or EVS ++. !

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/28113de9-0601-0010-71a3-c87806865f26?rid=/library/uuid/391ee590-0201-0010-1c89-f1193a886421">evs [original link is broken] [original link is broken]

Regards

Bharathwaj.. !

Former Member
0 Kudos

Hi All,

i think i have found a way to do this.

this is just a hack. here is how i did it.


String Orgunit_Title2;
for (int i=0; i<wdContext.nodeEt_Orgunit_List().size(); i++)
{ 
Orgunit_Title2 = wdContext.nodeEt_Orgunit_List().getEt_Orgunit_ListElementAt(i).getAttributeAsText("Orgunit_Title");

while(valueset.containsKey(Orgunit_Title2))
{
Orgunit_Title2 = Orgunit_Title2 + " ";
}
valueset.put(Orgunit_Title2, wdContext.nodeEt_Orgunit_List().getEt_Orgunit_ListElementAt(i).getAttributeAsText("Orgunit_Id"));
}

So if i have same key entries i am adding a space in the end to differentiate in keys.

Thanks to all who replied.

Best Regards,

Amol Bharti

Former Member
0 Kudos

Amol,

Probably I don't know your business logic, but I feel some difference between words Title and ID, so, in my humble opinion, you are confusing KEY (ID here) and DESCRIPTION (title here).

Your code should looks like:


for (int i=0; i<wdContext.nodeEt_Orgunit_List().size(); i++)
{ 
   String Orgunit_ID2 = wdContext.nodeEt_Orgunit_List().getEt_Orgunit_ListElementAt(i).getAttributeAsText("Orgunit_Id");

   String Orgunit_Title2 = wdContext.nodeEt_Orgunit_List().getEt_Orgunit_ListElementAt(i).getAttributeAsText("Orgunit_Title");

  valueset.put(Orgunit_ID2, Orgunit_Title2);
}

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Answers (1)

Answers (1)

Sharadha1
Active Contributor
0 Kudos

Hi Amol,

Yes, it first field is like a key field..

Please refer this link

http://help.sap.com/saphelp_nw2004s/helpdata/en/b3/f68e4ab25d7549888eb612bcb359f1/frameset.htm

Regards,

Sharadha

abhijeet_mukkawar
Active Contributor
0 Kudos

Amol,

yeah though not exactly key field but it demands us the value of entries to be filled distinct, it doesnt throw any exception but even wont show.

if the description is same it doesnt affect anything but value should be distinct.

regards