In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Transferred from: https://blog.csdn.net/rfb0204421/article/details/8204103
In the custom development of Oracle Forms, if we encounter the support of key elastic domain (hereinafter referred to as "key elastic domain") on Form, we can use the FND_KEY_FLEX.DEFINE function to easily complete all the initialization work. It also includes the initialization of the display of the combination description field of the key elastic field: as long as the DESCRIPTION parameter is specified when the FND_KEY_FLEX.DEFINE call is made. Sometimes, however, we just want to display this description combination field, that's all. There is no need to provide complete key elastic domain functionality. So what is a quick and effective way to get this description combination field? Try the method in the fnd_flex_keyval package below.
Example: get the category combination "description" field in the item category set of the stock material
The methods that need to be used:
Fnd_flex_keyval.validate_segs () fnd_flex_keyval.concatenated_descriptions () fnd_flex_keyval.validate_segs has many parameters, and we only need five of them to get the material category combination field, as follows: fnd_flex_keyval.validate_segs (operation = >
< OPERATIONS>, appl_short_name = >
< Application Short Name>, key_flex_code = >
< Key Flex Code>, structure_number = >
< ID_FLEX_NUM>, concat_segments = >
< CONCATENATED_SEGMENTS>);
Parameter description:-operation optional values are: FIND_COMBINATION-the given combined field must have been defined in the system CREATE_COMBINATION-if the combined field does not exist, create the combined CREATE_COMB_NO_AT in the system-the function is the same as CREATE_COMBINATION, but unlike the former to use a relatively independent sub-transaction autonomous transactionCHECK_COMBINATION-just check whether the given combined field is legal, regardless of the check result Do not create a new combination DEFAULT_COMBINATION-return the default minimum combination (I don't quite understand the value of this parameter, hehe) CHECK_SEGMENTS-verify fields separately (this is also very confused ~)-appl_short_name application abbreviation, for example, the application corresponding to the inventory module is called INV-key_flex_code key elastic domain code, which can be found in the key elastic domain definition interface. For example, MCAT, GL#, etc.-structure_number specifies a structure NUM under the key elastic domain, which can be found in the key elastic field definition interface. The corresponding field is ID_FLEX_NUM-concat_segments to get the corresponding "value" combination field of the combination description field. For example: once A.000.MISC initializes the verification field successfully, then the description combination field can be obtained by calling fnd_flex_keyval.concatenated_descriptions (). The complete code is as follows: FUNCTION get_concat_descriptions (p_concat_segs IN VARCHAR2) RETURN VARCHAR2 IS BEGIN IF fnd_flex_keyval.validate_segs (operation = > 'FIND_COMBINATION'-- Please modify it on a case-by-case basis, appl_short_name = >' INV'-- on a case-by-case basis, key_flex_code = > 'MCAT'-- on a case-by-case basis, structure_number = > 101-- on a case-by-case basis Concat_segments = > p_concat_segs) THEN RETURN (fnd_flex_keyval.concatenated_descriptions ()) ELSE RETURN'; END IF; END
Parameter description:-operation optional values are: FIND_COMBINATION-the given combined field must have been defined in the system CREATE_COMBINATION-if the combined field does not exist, create the combined CREATE_COMB_NO_AT in the system-the function is the same as CREATE_COMBINATION, but unlike the former to use a relatively independent sub-transaction autonomous transactionCHECK_COMBINATION-just check whether the given combined field is legal, regardless of the check result Do not create a new combination DEFAULT_COMBINATION-return the default minimum combination (I don't quite understand the value of this parameter, hehe) CHECK_SEGMENTS-verify fields separately (this is also very confused ~)-appl_short_name application abbreviation, for example, the application corresponding to the inventory module is called INV-key_flex_code key elastic domain code, which can be found in the key elastic domain definition interface. For example, MCAT, GL#, etc.-structure_number specifies a structure NUM under the key elastic domain, which can be found in the key elastic field definition interface. The corresponding field is ID_FLEX_NUM-concat_segments to get the corresponding "value" combination field of the combination description field. For example: once A.000.MISC initializes the verification field successfully, then the description combination field can be obtained by calling fnd_flex_keyval.concatenated_descriptions (). The complete code is as follows: FUNCTION get_concat_descriptions (p_concat_segs IN VARCHAR2) RETURN VARCHAR2 IS BEGIN IF fnd_flex_keyval.validate_segs (operation = > 'FIND_COMBINATION'-- Please modify it on a case-by-case basis, appl_short_name = >' INV'-- on a case-by-case basis, key_flex_code = > 'MCAT'-- on a case-by-case basis, structure_number = > 101-- on a case-by-case basis Concat_segments = > p_concat_segs) THEN RETURN (fnd_flex_keyval.concatenated_descriptions ()) ELSE RETURN'; END IF; END
Get description of location:-- combination and description of Get Stock Locators (MTLL) inventory location-- SELECT cux_flex_pkg.get_mtll_flexfields (p_locator_id = > 3950, p_organization_id = > 7890, p_return = >'s') locator_name FROM dual; FUNCTION get_mtll_flexfields (p_locator_id NUMBER, p_organization_id NUMBER, p_return VARCHAR2 DEFAULT's') RETURN VARCHAR2 IS l_concatenated_descriptions VARCHAR2 (2000); l_success BOOLEAN; l_concatenated_segments VARCHAR2 (2000) C_structure_number NUMBER; c_key_flex_code VARCHAR2 (20); c_appl_short_name VARCHAR2 (20); l_application_id NUMBER;-- Keeps track of the current delimiter l_delim VARCHAR2 (1): ='; l_error_message VARCHAR2 (1000); BEGIN-Bug: Value & VALUE for the flexfield segment Subinventory does not exist in the value set @ VALUE_SET. -- if PROFILE is used in the value set defined in a healthy elastic field, you need to initialize the assignment, otherwise the above error will occur-- SELECT FND_PROFILE.VALUE_WNPS ('MFG_ORGANIZATION_ID') FROM DUAL;-- fnd_global.apps_initialize (resp_appl_id = > 401, resp_id = > 65780, user_id = > 1013436) IF FND_PROFILE.VALUE_WNPS ('MFG_ORGANIZATION_ID') IS NULL THEN fnd_profile.put (' MFG_ORGANIZATION_ID', p_organization_id); END IF; c_key_flex_code: = 'MTLL'; c_appl_short_name: =' INV'; c_structure_number: = 101; SELECT application_id INTO l_application_id FROM fnd_application_vl a WHERE a.application_short_name = c_appl_short_name -- Get the delimiter l_delim: = fnd_flex_apis.get_segment_delimiter (x_application_id = > l_application_id, x_id_flex_code = > c_key_flex_code, x_id_flex_num = > c_structure_number) -- the parameter DATA_SET must be set, the same principle as the bond elastic field definition of the material: because INVENTORY_LOCATION_ID is not the only value in the base table of the database-- SELECT set_defining_column_name,unique_id_column_name,application_table_name FROM fnd_id_flexs WHERE id_flex_code IN ('MTLL',' MSTK') L_success: = fnd_flex_keyval.validate_ccid (appl_short_name = > c_appl_short_name, key_flex_code = > c_key_flex_code, structure_number = > c_structure_number, data_set = > to_char (p_organization_id),-- Requied combination_id = > p_locator_id); dbms_output.put_line ('l_success =' | to_char (sys.diutil.bool_to_int (l_success) L_error_message: = fnd_flex_keyval.error_message; IF l_success THEN l_concatenated_descriptions: = fnd_flex_keyval.concatenated_descriptions;-- dbms_output.put_line ('Concatenated Descriptions:' | | l_concatenated_descriptions); l_concatenated_segments: = fnd_flex_keyval.concatenated_values;-- dbms_output.put_line ('Concatenated Segments:' | | l_concatenated_segments); ELSE l_concatenated_segments: = NULL; l_concatenated_descriptions: = NULL Fnd_message.set_name ('FND',' FLEX-SSV EXCEPTION'); fnd_message.set_token ('MSG', l_error_message); dbms_output.put_line (fnd_message.get); RAISE app_exceptions.application_exception; END IF; IF p_return =' S' THEN RETURN (l_concatenated_segments); ELSIF p_return ='D' THEN RETURN (l_concatenated_descriptions); ELSE RETURN (l_concatenated_segments); END IF; EXCEPTION WHEN OTHERS THEN RETURN NULL; app_exception.raise_exception END get_mtll_flexfields
Combination and description of inventory materials: FUNCTION get_mstk_flexfields (p_item_id NUMBER, p_organization_id NUMBER, p_return VARCHAR2 DEFAULT's') RETURN VARCHAR2 IS l_concatenated_descriptions VARCHAR2 (2000); l_success BOOLEAN; l_concatenated_segments VARCHAR2 (2000); c_structure_number NUMBER; c_key_flex_code VARCHAR2 (20); c_appl_short_name VARCHAR2 (20); l_application_id NUMBER -- Keeps track of the current delimiter l_delim VARCHAR2 (1): ='; l_error_message VARCHAR2 (1000); BEGIN-if PROFILE is used in the value set defined in a healthy elastic domain, the assignment needs to be initialized, otherwise the above error-- SELECT FND_PROFILE.VALUE_WNPS ('MFG_ORGANIZATION_ID') FROM DUAL;-- fnd_global.apps_initialize (resp_appl_id = > 401, resp_id = > 65780, user_id = > 1013436) will occur. IF FND_PROFILE.VALUE_WNPS ('MFG_ORGANIZATION_ID') IS NULL THEN fnd_profile.put (' MFG_ORGANIZATION_ID', p_organization_id); END IF; c_key_flex_code: = 'MSTK'; c_appl_short_name: =' INV'; c_structure_number: = 101; SELECT application_id INTO l_application_id FROM fnd_application_vl a WHERE a.application_short_name = c_appl_short_name -- Get the delimiter l_delim: = fnd_flex_apis.get_segment_delimiter (x_application_id = > l_application_id, x_id_flex_code = > c_key_flex_code, x_id_flex_num = > c_structure_number) -- the parameter DATA_SET must be set, the same principle as the bond elastic field definition of the material: because INVENTORY_LOCATION_ID is not the only value in the base table of the database-- SELECT set_defining_column_name,unique_id_column_name,application_table_name FROM fnd_id_flexs WHERE id_flex_code IN ('MTLL',' MSTK') L_success: = fnd_flex_keyval.validate_ccid (appl_short_name = > c_appl_short_name, key_flex_code = > c_key_flex_code, structure_number = > c_structure_number, data_set = > to_char (p_organization_id),-- Requied combination_id = > p_item_id); dbms_output.put_line ('l_success =' | to_char (sys.diutil.bool_to_int (l_success) L_error_message: = fnd_flex_keyval.error_message; IF l_success THEN l_concatenated_descriptions: = fnd_flex_keyval.concatenated_descriptions;-- dbms_output.put_line ('Concatenated Descriptions:' | | l_concatenated_descriptions); l_concatenated_segments: = fnd_flex_keyval.concatenated_values;-- dbms_output.put_line ('Concatenated Segments:' | | l_concatenated_segments); ELSE l_concatenated_segments: = NULL; l_concatenated_descriptions: = NULL Fnd_message.set_name ('FND',' FLEX-SSV EXCEPTION'); fnd_message.set_token ('MSG', l_error_message); dbms_output.put_line (fnd_message.get); RAISE app_exceptions.application_exception; END IF; IF p_return =' S' THEN RETURN (l_concatenated_segments); ELSIF p_return ='D' THEN RETURN (l_concatenated_descriptions); ELSE RETURN (l_concatenated_segments); END IF; EXCEPTION WHEN OTHERS THEN RETURN NULL; app_exception.raise_exception END get_mstk_flexfields
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.