cancel
Showing results for 
Search instead for 
Did you mean: 

CServiceData::SetPropertyValueString failed; Value too long in property

Former Member
0 Kudos

hi

i am facing this error at sdk coding..

in Asp.net  grid  i entered some value... ok..

Through the button click  ...

i am reading and  using  general service..

i am storing  the value in  krar.tostring  adding 

  oChild = oChildren.Add()

   oChild.SetProperty("U_KRAR", krar.ToString)

  oChild = oChildren.Add()

                            oChild.SetProperty("U_KRAR", krar.ToString)

                            oChild.SetProperty("U_trgt1", box2.Text)

                            oChild.SetProperty("U_WEIG", box3.Text)

                            oChild.SetProperty("U_SELF", box4.Text)

                            'oChild.SetProperty("U_SELF", box4.SelectedValue)

                            oChild.SetProperty("U_SRMK", box5.Text)

                            oChild.SetProperty("U_trgt3", box6.Text)

                            oChild.SetProperty("U_trgt2", box7.Text)

                            ''oChild.SetProperty("U_RCom", box8.Text)

                            oChild.SetProperty("U_KPI", box9.Text)


This error will come..

1) i Checked in database field size is  500  alpha numeric

2) allready i entered  record 

i updated   the record through the  query     for field  U_krar="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 

successfully updated ..

3)but same value through the sdk  i am not able to  insert it...

4) small values i am able to enter like u_krar="xxx"

any solution plz inform me

i need urgently..

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Dear Srinivas,

I have the same problem but i can rectify it with the below steps,

     1.If you have tries to insert the value to the UDF means, then You have the change the size of the UDF that you have created.

     2.Tools---> Customized tools---> User defined Fileds---->open your UTD and Choose Your UDF and change the length of the filed on Field Data Screen, and You can update it.

3. Now you can tries to insert the value, its added successfully. Now i have checked it.

edy_simon
Active Contributor
0 Kudos

Hi Srinivas,

Checked the your UDF datatype and size in your SAP UDF Management screen

In order to store 500, you need to use

Type = AlphaNumeric

Structure = Text

Regards

Edy

Former Member
0 Kudos

Hi Edy,

I don't think Alphanumeric and text are not required in UDF mgmt screen.

Because it is nvarchar type field in sql server.

Even we create field like alphanumeric and regular with 250 size,SQl server gives 500 as length.

This might be some other problem.

edy_simon
Active Contributor
0 Kudos

Hi Vivek,

When you use SAP DI to update the field,

DI will check against the size registered in the table CUFD first.

Query out this table and you should see the size for each of your UFD.

If it is more than the size, this error will be thrown.

As you can see the error is not thrown from SQL server.

It is thrown from a C++ code (DI API)

Regards
Edy

Former Member
0 Kudos

hi edy can u plz help me..

i am not able to upload the image..

i dont know some error is comming..

the field  KRAR  as alpha numeric size(50)

after error came i changed to  250  ok

what should i tell me for  solving the problem...

in table i checked in coding... the size is  500   , nvarchar  500 

what i should i do...

Former Member
0 Kudos

HI SIR.. AND VIVEK..

I CHECKED IN  CUFD TABLE.

THAT PARTICULAR TABLE..

PROPERTIES ARE

TYPEID: A   EDITTYPE: NOTHING  EDITYSIZE:250  SIZEID:250

Any information need tell me ..

edy_simon
Active Contributor
0 Kudos

Hi Srinivas,

Can you try to remove this UDF and recreate this UDF with Type Alpha and Structure = Text ?

Regards

Edy

Former Member
0 Kudos

HI Edy no i can not do this 

Data is all ready there...

if i remove i can lost the data

What should i do..

Tell me..

in demo data base  i increased  60  to 250  in udf screen

edy_simon
Active Contributor
0 Kudos

Hi Srinivas,

What if you create a new one and test your code on this new UDF ?

If you said your UDF is 250 already it should not give you any problem.

Unless the problem is in another UDFs ?

Regards

Edy

Former Member
0 Kudos

HI ARE U ABLE TO SEE BELOW IMAGE

FILD SIZE  IS 250  IN UDF SCREEN

BUT GIVING  ERROR..

IF YOU NOT ABLE TO SEE THE IAMGE

http://www.filedropper.com/alphanuemaric

edy_simon
Active Contributor
0 Kudos

Hi Srinivas,

Yes I can see it is 250.

Can you debug your code and make sure that your krar.ToString.Length is less than 250 ?

And can you also post the complete error message ? it should give you the field name in the error message.


Regards

Edy


Former Member
0 Kudos

hi

Thanks For your reply..

This is my error message

http://www.filedropper.com/errormsg

edy_simon
Active Contributor
0 Kudos

Hi Srinivas,

Couple of things to check :

1. Are you targeting the correct database ?

2. Correct Table ? TI_PRA1 ?

3. Insert this code before you enter the krar

Dim iSize as Integer = oChild.Fields.Item("U_KRAR").Size

Dim iKrar as integer = krar.length

oChild.SetProperty("U_KRAR", krar)

Debug and stop your code on oChild.SetProperty.

Check and post the value of iSize and iKrar here.

Regards

Edy


Former Member
0 Kudos

Hi,

Sorry for the late..

currect Data base. And Currect Table..

i created one more field  alphanumeric-> type -> regular -> 250  lenght

it is storing the data ..

So, that currect  database And  Currect Field..

i am not able to check database field  size..

but entering field value is 54  i checked..

Dim iSize as Integer = oChild.Fields.Item("U_KRAR").Size

Dim iKrar as integer = krar.length

so, i will take the backup and  delete the field and create one more filed like previous one and i will try to update the values i dont have any choice....

Former Member
0 Kudos

Hi.. Edy  And Vivek 

Thanks For your reply..

only 20  records are there in server in particular this table

i took  the data

Remove the field  And  Crate  new field name like previous name

through the query i was updated previous values

This is bad method  i know , but i have no option i should show the result to the  client..

what am i understood is  ..

if i take  alphanumeric  type  regular  at a time  250 

at the time giving  250  size working properly....

  Once Create  with  30  or 60  after update the filed  it is not working..

alphanumeric  type  text wokring.......

Thank u  mr Edy  ...

Keep posting...By Sir..

Former Member
0 Kudos

i want to pass "Dealer Billing by 15th of Next Month to reach Mumbai" this value in to  U_KRAR

how can i do it..

Former Member
0 Kudos

Hi,

please mentiion the code for declarations and initialization of variables(like krar etc...).

1 check point in the above code:

use CSTR() function for krar.

Former Member
0 Kudos

hi.

i al ready  saved the variable value in string 

                          Dim krar As String = CStr(box1.Text)

                                  oChild = oChildren.Add()

                            oChild.SetProperty("U_KRAR", krar)

                            oChild.SetProperty("U_trgt1", box2.Text)

                            oChild.SetProperty("U_WEIG", box3.Text)

                            oChild.SetProperty("U_SELF", box4.Text)

                            'oChild.SetProperty("U_SELF", box4.SelectedValue)

                            oChild.SetProperty("U_SRMK", box5.Text)

                            oChild.SetProperty("U_trgt3", box6.Text)

                            oChild.SetProperty("U_trgt2", box7.Text)

                            ''oChild.SetProperty("U_RCom", box8.Text)

                            oChild.SetProperty("U_KPI", box9.Text)

                            'oChild.SetProperty("U_RMKS", box1.Text)

Former Member
0 Kudos

Hi srinivas,

You specified 500 as size in database.Is that in SQL server or SAP UDF mgmt screen..

Former Member
0 Kudos

hi vivek  500  is   in  sql server only..

in udf normally i given  250  only..

what action should i do...

in demo database  i increased  60  to  250  in udf screen  for kra filed

Result is same  what should i do..

if i change delete and  create again   kra filed  old data should be lost i think..

Former Member
0 Kudos

HI Srinivas,

If it is demo db,you remove the line to set the value to that field.

so that you can know other fields are able to be added or not.

Former Member
0 Kudos

Hi Srinivas,

Have you tested with out passing value to that particular field?