cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Business One Get description of fields

former_member319241
Participant
0 Kudos

Hi,

I want to get description of fields on system forms using SQL Query.

For example, on AR Invoice form

Field                                 Description

OINV.DocDate      -->       Posting Date

OINV.TaxDate       -->       Document Date

I know that if we change the label name then it is stored in SDIS Table

and user defined fields description is stored in CUFD table.

So is there any way to get the description using SQL Query or any other method.

Please reply.

Thanks.

Accepted Solutions (0)

Answers (4)

Answers (4)

K_Pauquet
Advisor
Advisor
0 Kudos

Displayed field names depend on the language, so as Johan says above, you could try to do a little add-on that correctly maps the English descriptions to the fields.

josedvm
Participant
0 Kudos

Hi,

I could not get the fields descriptions using a SQL Query (in the TABLE_COLUMNS view, the COMMENTS field is empty for SAP Business One tables), but it is possible to retrieve field descriptions with the SDK using the DI Server.

You can send a GetTableFieldList message and it will return the fields with their description. Furthermore, if you use a different language in the Login message, the returned description will appear in that language!

You can find examples for Login and GetTableFieldList requests / responses in the SDK Help. I copy them here (using Postman I had to remove XML declaration):

Login

<?xml version="1.0" encoding="UTF-16UCS-4"?>
<env:Envelope 
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
  <env:Body>
    <dis:Login xmlns:dis="http://www.sap.com/SBO/DIS">
      <DatabaseServer>p5053655</DatabaseServer>
      <DatabaseName>SBODemo_US</DatabaseName>
      <DatabaseType>dst_MSSQL</DatabaseType>
      <DatabaseUsername>sa</DatabaseUsername>
      <DatabasePassword></DatabasePassword>
      <CompanyUsername>manager</CompanyUsername>
      <CompanyPassword>manager</CompanyPassword>
      <Language>ln_English</Language>
      <LicenseServer>ILTLVH25</LicenseServer>
    </dis:Login>
  </env:Body>
</env:Envelope>

GetTableFieldList

<?xml version="1.0" encoding="UTF-16UCS-4"?>
<env:Envelope 
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
 <env:Header>
  <SessionID>32D83BB6-F3AD-985F-D4BC-655B3D9ACBE2</SessionID>
 </env:Header>
 <env:Body>
  <dis:GetTableFieldList 
xmlns:dis="http://www.sap.com/SBO/DIS">
   <TableName>@Vids</TableName>
  </dis:GetTableFieldList>
 </env:Body>
</env:Envelope>

I would like to get this from DI API or Service Layer, though.

With the DI API, the SBObob object has a method called GetTableFieldList, but the Description is not retrieved, I got the same value as for the Name.

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

For example, if run below query, in query result you can see OINV.Docdate as posting date and OINV.taxdate as Document Date. System will show description of selected field from the query.

Select T0.Docdate, T0.taxdate from OINV T0 where t0.docdate between [%0] and [%1]

Thanks.

Johan_H
Active Contributor
0 Kudos

Hi,

Field descriptions are maintained in LRF files: C:\Program Files (x86)\SAP\SAP Business One\GUI\ or C:\Program Files\SAP\SAP Business One\GUI\

Only manually changed labels are stored in the company database.

You can try to build an LRF file interpreter function or stored procedure, but I don't think it will be easy.

An alternative might be to build an addon or windows application, and somehow use the DI API to get the field descriptions, in the required language.

Regards,

Johan

former_member319241
Participant
0 Kudos

Hi,

Thanks for reply.

Can you please explain how to get description using DI API?

Thanks.

Johan_H
Active Contributor
0 Kudos

Hi,

I have not had to do this yet, so you will have to investigate yourself.

Please take a look at the MultiLanguageTranslation object. You can look up information in the SDK help file:

Developer's guide > DI API > Reference > Overview > Objects > MultiLanguageTranslation object

Regards,

Johan