Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Domain Length in ABAP Program

former_member611006
Active Participant
0 Kudos

Hi Experts,

I created a new Domain Z1_TEST with Data Type CHAR(10) and 3 Entries (TEST1,TEST2, TEST3).

I use it for a Parameter in my Program, to let the user choose TEST 1, 2 or 3.

In the Debugger, when I check the value on the Parameter, I don't have TEST1 but only T (1 character ?).

Any idea ?

Best Regards,

David

11 REPLIES 11

arthur_alvesteixeira
Active Participant
0 Kudos

David,

to get the domain description apply the function module: DDIF_DOMA_GET

Export to function:

Domain name

Language

And import all values and respective descriptions.

0 Kudos

... the imported values are in DD07V_TAB internal table.

Example: (se37)

Export:

  • NAME                            VBTYP
  • LANGU                           EN

Import: DD07V_TAB (Internal table)

  • A                     Inquiry
  • B                     Quotation
  • C                     Order
  • D                     Item proposal
  • E                     Scheduling agreement
  • F                     Scheduling agreement with external service agent
  • G                     Contract
  • H                     Returns

SharathYaralkattimath
Contributor
0 Kudos

Hi David,

Could you please attach snapshot of fixed-values maintained at domain?

Have you created a data element with the domain & used that as data type to your parameter?

Thanks,

Sharath

0 Kudos

Yes I use a Data Type with this Domain.


0 Kudos

Hi David,

Please also attach your code, you may have declared parameter without any data type.

It will take it as Char1 as by default.

0 Kudos

0 Kudos

David,

check the domain output length
available in 'Output Characteristics'

0 Kudos

Domain -> Definition ->Output Characteristics -> Output Length

former_member289261
Active Contributor
0 Kudos

Hi,

How have you declared your parameter ? I am sure you have missed field length somewhere.

mmgc_riel
Participant
0 Kudos

Hi,

Have you tried ?

PARAMETERS:

   p_z1test TYPE z1_test AS LISTBOX VISIBLE LENGTH 20.

Preetha
Explorer
0 Kudos

Hi,

U have to provide fixed length to the parameter or else we get initial value.

Parameters:
P_z1test type z1_test VISIBLE LENGTH 10.

Thanks & Regards,

Preetha.