cancel
Showing results for 
Search instead for 
Did you mean: 

TSH1 UDF can't be updated by DI API

atessier
Explorer
0 Kudos
132

Hi experts

I've created UDF on TSH1 table through SAP B1 dedicated menu

No problem to add or update timesheet on SAP standard fields with Project Management TimeSheet Service DI API

if I try to add data in thoses UDF with DI API : error msg while executing the userfield line

Set OTSLine = oTS.PM_TimeSheetLineDataCollection.Add()

With OTSLine

.UserFields.Fields.Item("U_DOCENTRY_OWOR").Value = 100

To understand :

>>>> i've read thoses posts

https://answers.sap.com/questions/13280238/sap-b1-service-layer-2.html

https://answers.sap.com/questions/13593547/udf-not-showing-in-service-layer-metadata.html

https://answers.sap.com/questions/150199/system-matrix-time-sheet-tsh1-table-problem.html

but not relevant since my version is V10 FP 22.08

SAP NOte 2777696. indicates that only SAP versions update to 9.3 are concerned , so it should be OK on version 10...

Do you have the same behavior ??

thks

View Entire Topic
ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert

Hi antoinetessier,

I think that the correct line is:

oTimeSheetLine.UserFields.Item("U_Test").Value = "TEST";

while you are using UserFields.Fields.

Hope it helps!

Kind regards,

ANKIT CHAUHAN

SAP Business One Support