View previous topic :: View next topic
|
Author |
Message |
bharat_juneja
New User
Joined: 21 Dec 2005 Posts: 20 Location: US
|
|
|
|
Hi,
I want to define a code-table wherein I want to pass the value for a field that I am getting from the database and display the corresponding field on the screen.
Please help with the steps to achieve this.
Thanks,
Bharat |
|
Back to top |
|
|
Pjoe
New User
Joined: 22 Jul 2005 Posts: 17
|
|
|
|
Hi,
You can define the code table using the IDDM .
In the first screen press PF9
Next screen select code table and add the table.
Using the option CVAL = CODE TABLE VALUES you can specify the values
ENCODE VALUE.: JOE
DECODE VALUE.: JANUARY
ENCODE VALUE.: JIM
DECODE VALUE.: FEBRUARY
here in encode value give the database value
and decode value give display value
Attatch the code table to the display field in the map. you can do this thru mapc.
HTH
-Joe |
|
Back to top |
|
|
bharat_juneja
New User
Joined: 21 Dec 2005 Posts: 20 Location: US
|
|
|
|
Thanks Joe.
That helped. |
|
Back to top |
|
|
bharat_juneja
New User
Joined: 21 Dec 2005 Posts: 20 Location: US
|
|
|
|
I more small problem in Code Table:
I have 3 fields defined in a group:
01 Type-desc
02 Type x(2)
02 Dash x(1)
02 Description x(10)
This Type-desc is a MAP field.
Now, I want to use code-table for field "Description". I want to pass type into it and it should pick the corresponding desc from code-table. Is there any way out?
I have already defined it to map Or that I have to remove everything (the whole array of which it is a part) from map and then changes to map-rec and all that re-work. I don't wanna do that neither I want to code lots off IF-ELSE.
Thanks for your assistance.
Bharat |
|
Back to top |
|
|
bharat_juneja
New User
Joined: 21 Dec 2005 Posts: 20 Location: US
|
|
|
|
I more small problem in Code Table:
I have 3 fields defined in a group:
01 Type-desc
02 Type x(2)
02 Dash x(1)
02 Description x(10)
This Type-desc is a MAP field.
Now, I want to use code-table for field "Description". I want to pass type into it and it should pick the corresponding desc from code-table. Is there any way out?
I have already defined it to map Or that I have to remove everything (the whole array of which it is a part) from map and then changes to map-rec and all that re-work. I don't wanna do that neither I want to code lots off IF-ELSE.
Thanks for your assistance.
Bharat |
|
Back to top |
|
|
|