2006 Sep 28 2:17 PM
hi all,
how can we fecth the domain values
inside the program.
regards
anver
2006 Sep 29 12:47 PM
hi,
chk this sample code.
DATA : BEGIN OF int_orient OCCURS 10,
domvalue_l LIKE dd07v-domvalue_l,
ddtext LIKE dd07v-ddtext,
END OF int_orient.
DATA: ZPETS_PORTORIEN type dd07l-domname,
int_values_table TYPE dd07v OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'GET_DOMAIN_VALUES'
EXPORTING
domname = 'ZPETS_PORTORIEN'
text = 'X'
TABLES
values_tab = int_values_table
EXCEPTIONS
no_values_found = 1
OTHERS = 2.
LOOP AT int_values_table.
int_orient-domvalue_l = int_values_table-domvalue_l.
int_orient-ddtext = int_values_table-ddtext .
append int_orient.
ENDLOOP.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ZMPETS_PORT-PORTOREIN'
value_org = 'S'
TABLES
value_tab = int_orient
return_tab = int_ret
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
READ TABLE int_orient WITH KEY ddtext = int_ret-fieldval.
IF sy-subrc EQ 0.
zmpets_port-portorein = int_orient-domvalue_l.
wf_orient_text = int_ret-fieldval.
PERFORM f_update_values.
ENDIF.
rgds
anver
pls mark all helpful answers
2006 Sep 28 2:19 PM
2006 Sep 28 2:19 PM
Domain is just a type which describes the fields.
its output length ,
can you clarify ur requirement a bit more
2006 Sep 28 2:19 PM
2006 Sep 28 2:20 PM
Hi, use the below code.
data: lt_caltype type standard table of DD07V with header line.
*--Domain Values for Calculation type for condition
CALL FUNCTION 'DDUT_DOMVALUES_GET'
EXPORTING
name = 'KRECH'
LANGU = SY-LANGU
TEXTS_ONLY = ' '
tables
dd07v_tab = lt_caltype
EXCEPTIONS
ILLEGAL_INPUT = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
perfectly it will work.reward the points,
Thanks
Eswar
2006 Sep 28 3:22 PM
Use the FM <b>GET_DOMAIN_VALUES </b>.
Pass the Domian name and Text = 'X'. It will return you values maintained in domain + Text in VALUE_TAB.
Regards,
Prakash.
2006 Sep 28 4:46 PM
Hi,
You will find them in <b>DD07L</b> table ..
Regards,
Santosh
2006 Sep 28 4:47 PM
U should be able to get it from table DD07V.
SELECT DOMNAME VALPOS DOMVALUE_L DOMVALUE_H
into idomval
from dd07v
where domname = Domain Name
and ddlanguage = sy-langu.
2006 Sep 28 5:12 PM
2006 Sep 29 12:47 PM
hi,
chk this sample code.
DATA : BEGIN OF int_orient OCCURS 10,
domvalue_l LIKE dd07v-domvalue_l,
ddtext LIKE dd07v-ddtext,
END OF int_orient.
DATA: ZPETS_PORTORIEN type dd07l-domname,
int_values_table TYPE dd07v OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'GET_DOMAIN_VALUES'
EXPORTING
domname = 'ZPETS_PORTORIEN'
text = 'X'
TABLES
values_tab = int_values_table
EXCEPTIONS
no_values_found = 1
OTHERS = 2.
LOOP AT int_values_table.
int_orient-domvalue_l = int_values_table-domvalue_l.
int_orient-ddtext = int_values_table-ddtext .
append int_orient.
ENDLOOP.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ZMPETS_PORT-PORTOREIN'
value_org = 'S'
TABLES
value_tab = int_orient
return_tab = int_ret
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
READ TABLE int_orient WITH KEY ddtext = int_ret-fieldval.
IF sy-subrc EQ 0.
zmpets_port-portorein = int_orient-domvalue_l.
wf_orient_text = int_ret-fieldval.
PERFORM f_update_values.
ENDIF.
rgds
anver
pls mark all helpful answers