tapzhou
25th April 2004, 14:37
I am writing certain reports where I need the description of certain drop down fields. Please let me know which tables store these:

- Customer status (blocked, normal etc). At the moment when I report from the field tccom010.cnpa gives me a status code which is a number but I need the description. Same as for supplier status tccom020.sust only gives me the code.


I also need the correct descriptions in my reports for the following
Customer Blocking code in tdsls044 ( field cblc). At the moment I get codes 1,4,etc yet I need descriptions like Credit limit exceeded
Transaction type field in tdinv700 (field tdinv.kost). I need the correct description for transaction type, like Inventory adjustment, production receipt Purchase order receipt, replenishement etc.

Thank you in dvance for your assistance

jmathew
25th April 2004, 15:06
In the report script, before layout, you could declare a string which has a length to accomodate the description of the enumerated field. The use the following function and you will get the description. The following is an example to get the description of Customer status which is a drop down field. If the session script is available the same can be written in the session script. If it is a standard session it can be written as given below in the report script.


declaration:
extern domain tcdsca descr

detail.1:
before.layout:
descr = ""
descr = enum.descr$("tccnpa", tccom010.cnpa)

Hope the above will help you.

Regards,
John.

p.cole
25th April 2004, 19:30
You need to use the standard enum.desc$ function as explained here:

http://www.baanboard.com/programmers_manual_baanerp_help_functions_enumerates_enum_descr