cancel
Showing results for 
Search instead for 
Did you mean: 

DocEntry and DocNum changing automatically

Former Member
0 Kudos

Hi all,

I have created a table in which whenever i update the table the  DOCENTRY and DOCNUM are getting changed and hence i could not update the table.

"This entry in the table already exists" - ERROR Occurs.

I dont know why this DocEntry and DocNum gets changed automatically.

How to update the table???

Please help me solving this issue.

Regards,

Jananisuba S

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jananisuba,

have you put some matrix in your form???

if yess then,

have you write code for adding new row in that like,

oMat.AddRow(1);

Then please avaid this all.

If you want to add new row then use following code,

oForm = clsAddOn.LDNA_Application.Forms.Item("frmName");

oMat = oForm.Items.Item("matName").Specific;

SAPbouiCOM.DBDataSource dbData = default(SAPbouiCOM.DBDataSource);

dbData = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item(1);

dbData.Clear();

oMat.AddRow(1, oMat.VisualRowCount + 1);

And then check you can Add or Update your records.

Regards

Pradeep

Former Member
0 Kudos

Hi Pradeep,

I tried the way you said but then the same error is coming.

I think the problem is not in my matrix because it is performing well and the ERROR-"This entry already exists in the table" is indicating the header table and not the Child (matrix) table.

I guess there is some problem with the DocEntry but i dint know how to find out and solve.

Help me solving this issue.

Regards,

Jananisuba S

Former Member
0 Kudos

Hi jananisuba

which SBO version adn VS version you are using???

Regards pradeep

Former Member
0 Kudos

Hi Jananisuba,

I know you did it all. But I think you go with my logic whatever i said..

Because same problem i had occured. and by this logic i have solve my problem..

so please try one more time. thank You

Regards

Pradeep

Former Member
0 Kudos

Hi Pradeep,

I have tried that many times but the ERROR is occuring.

I found out that in my child table matrix has three buttons namely 1.Browse 2.Delete 3.Display and whenever i click those buttons before i get the browse window the DOCENTRY is getting changed.

Why this problem is occuring??

I am unable to find out the reason of that changing of DocEntry.

Because of this DocEntry the Table is not getting updated.

I have attached my screenshot for ur reference.

Regards,

Jananisuba S

Former Member
0 Kudos

Hi pradeep,

I use 8.82 SBO version and 2010 VS

Former Member
0 Kudos

Hi Jananisua ,

Same problem i had occured, Now go to screen Painter and again check your textbox alias name. I m sure that is missing, Bcoz screen painter is tu dump here..

Check and let me know.

Regards

Pradeep

Former Member
0 Kudos

Hi Pradeep,

I tried that too, those are all perfect and now i deleted the whole attachments tab(matrix) and worked with only the text boxes but then when i update the fields in the table the DocEntry dint change but as soon as i click the Update button, the DocEntry Changes.

From this i guess the problem is with all these buttons.

So the updation in the table is not performing.

Regards,

Jananisuba S

Former Member
0 Kudos

Thank you Pradeep, I got the solution. It was the mistake in my XML file.

Now its working well.

Regards,

Jananisuba S

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you all for your suggestions.

Former Member
0 Kudos

hi janaisubha

have a look on below link may be u can get an idea..

This entry all ready exists in the following table...

Former Member
0 Kudos

Hi Srinivas,

I gone through the link you have given but then i have binded the fields correctly in the table but also i get the same error as "This entry already exists in the following table"

Should i need to give any function or event for UPDATING the table???

I donno what mistake i have did.

Help me solving this issue.

Regards,

Jananisuba S

Former Member
0 Kudos

hi..

see jananisuba..

i think the problem will come only in update mode at the time of adding the row..means after pressing the add button..

you should pass matrix line id  exisitng +1

suppose first you add 2 records in docentry=1

ok

again open the form  and you press the line add button.

here here you should pass line no 3  i think here is the problem..

i think you are passing  all ready existing values..

check it..

another thing  in form update event

put break point and check the matrix lined id values ok

i think pradeep khodke he mentioned some points check it..

Former Member
0 Kudos

Hi Srinivas,

I think the problem is not in my matrix because it is performing well and the ERROR-"This entry already exists in the table" is indicating the header table and not the Child (matrix) table.

I guess there is some problem with the DocEntry but i dint know how to find out and solve.

Help me solving this issue.

Regards,

Jananisuba S

Former Member
0 Kudos

HI,

You need not to bind docentry or docnum to any textbox in the front end.They will be automatically inserted when add the document.try this way.

CheckList:-

If Lineis not updated properly in the line level, this error may come.