| Home • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us | ||
ABAP QUIZ 5 NEWTips Categories:
Contribute?What's New?
What's Hot? |
Retrieving Domain fixed valuesBy Bhumika Mahawar, YASH Technologies The F4 for screen field
can be fetched either through value table, explicit F4 help or through fixed
values associated with the domain. Sometimes there might
be a requirement to fetch the fixed values associated with a domain. Database
view “DD07V” contains this information along with the text maintained for
these fixed value. To fetch these values we have a simple Function Module “DD_DOMA_GET”.
There are other FM’s as well. However the advantage of using this FM is that
unlike other FM’s you have the option to fetch the text as and when required. As the following fig
shows, the fixed value for the domain XFELD are:-
The code is as
follows:- *&------------------------------------------------------- *&-------------------------------------------------------- REPORT ztest_yh1148. DATA: fs_taba TYPE dd07v. DATA: it_taba TYPE STANDARD TABLE OF dd07v, it_tabb TYPE STANDARD TABLE OF dd07v. CALL FUNCTION 'DD_DOMA_GET' EXPORTING domain_name = 'XFELD' langu = sy-langu withtext = 'X' TABLES dd07v_tab_a = it_taba dd07v_tab_n = it_tabb EXCEPTIONS illegal_value = 1 op_failure = 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. WRITE: 'The fixed values for the domain','''XFELD''','are:-'. LOOP AT it_taba INTO fs_taba. WRITE: / sy-tabix,fs_taba-domvalue_l CENTERED ,fs_taba-ddtext CENTERED. ENDLOOP. ULINE. *----------------------END OF CODE----------------------* The output is shown below:
|
|
|
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us ©2006-2007 SAPTechnical.COM. All rights reserved. All
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG. Graphic Design by Round the Bend Wizards |
||