on 09-06-2014 2:48 AM
I have a UI add-on that assigns values to a UDT by usertable object of the DI API, the problem is generated after adding a UDF from SAP menu and try to assign a value from the DI. The error is Invalida Field Name
My question is, is necessary to wait a while until SAP records the new field to be accessible by usertable?
Any suggestions?
oUserTable.UserFields.Fields.Item("U_" + colName).Value = respuesta;
Hi Ricardo,
Not sure also why it sometimes does not refresh metadata After you have add a UDF In UDT and UDO.
when the first time you create the udt together with the udfs, this never happen.
but when you update the udt to add new column, it will sometime give you this error.
when this happen, the only solution is to restart the sbo.
I Dont think the problem is with our code.
regards,
edy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ricardo,
As far as I know, you can use this field as soon as it is added to the usertable. But please make sure that this has been added successfully in your table and also make sure that ("U_" + colName ) is the same as it appears in SQL Server. Make sure that you are providing the right field name.
Hope it helps.
Thanks & Regards
Ankit Chauhan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If I add a field using Meta data objects, then I get a message that the Database structure has been modified something like this. So this could be the issue.
Anyways.. What you are trying to do ? Has your problem been resolved. ? If yes, please close the thread.
Thanks & Regards
Ankit Chauhan
What my add-on is doins is in a UDO Automanaged Form open by a button another form and capture some data, this form is not Automanaged by SAP, so when the data is capture I filter OK button event and iterate in the items of the form one by one saving in the UDT with the UserTable object of the DI, this process works fine.
But...
If I add a new column to the UDT and then reopen my UDO, click button, open the form, capture the data, save then fail. Every time I save the data the code take care of referecing usertable to the UDT id again.
I need to restart SAP when this happen, then I repeat the process and "voila" nothing happen and every thing works fine. So my only clue is what say Edy.
I'm goin to continue with debuggin next mark the correct answer. Thanks
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.