9.6 ADD_DD_VALUES

Adds either a new set of dropdown values or appends to an existing set of dropdown values.

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Dropdown name Must begin with DD

4

4



2

A

Req

Separator Values: blank or *LOVAL means all one value

1

1



3

A

Req

Dropdown value(s)

1

256



Return Values

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Return code. Returned values possible are:

OK: Value(s) added successfully

ER: Error occurred

2

2



Example

To set up the dropdown values for an order status field:

     DEFINE   FIELD(#RETCOD) TYPE(*CHAR) LENGTH(2)
USE      BUILTIN(ADD_DD_VALUES) WITH_ARGS(DDST '/'
       'Raised/Open/Closed/Invoiced/History/Back Ordered')
           TO_GET(#RETCOD)
IF       COND('#RETCOD *NE OK')
* << error processing >>
ENDIF
USE      BUILTIN(ADD_DD_VALUES) WITH_ARGS(DDST ' ' 'Cancelled')
          TO_GET(#RETCOD)
IF       COND('#RETCOD *NE OK')
* << error processing >>
ENDIF
  • No labels