Application Development and Automation 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: 
Read only

Domain Length in ABAP Program

former_member611006
Active Participant
0 Likes
4,815

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

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
Read only

arthur_alvesteixeira
Active Participant
0 Likes
3,921

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.

Read only

0 Likes
3,921

... 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
Read only

SharathYaralkattimath
Contributor
0 Likes
3,921

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

Read only

0 Likes
3,921

Yes I use a Data Type with this Domain.


Read only

0 Likes
3,921

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.

Read only

0 Likes
3,921

Read only

0 Likes
3,921

David,

check the domain output length
available in 'Output Characteristics'

Read only

0 Likes
3,921

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

Read only

Former Member
0 Likes
3,921

Hi,

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

Read only

mmgc_riel
Participant
0 Likes
3,921

Hi,

Have you tried ?

PARAMETERS:

   p_z1test TYPE z1_test AS LISTBOX VISIBLE LENGTH 20.

Read only

Preetha33
Explorer
0 Likes
3,921

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.