Wednesday, December 1, 2010

API to get the concatenated segment values for a code combination id (FND_FLEX_EXT.GET_SEGS)

This API FND_FLEX_EXT.GET_SEGS
  • Returns segment values for the given combination id for the specific key       flexfield
  •  Does not check value security rules.
  •  Returns TRUE if combination found and places displayed segment values in segments(1) through segments(n_segments) inclusive.
  • Returns FALSE, sets n_segments = 0, and sets global error message using the FND_MESSAGE utility on error or if combination not found.
Script:



SET SERVEROUTPUT ON;
DECLARE
  v_application_short_name VARCHAR2(200);
  v_key_flex_code          VARCHAR2(200);
  v_structure_number       NUMBER; -- Chart of Accounts ID
  v_combination_id         NUMBER;
  v_Return                 VARCHAR2(200);
BEGIN
  v_application_short_name := 'SQLGL';
  v_key_flex_code          := 'GL#';
  v_structure_number       := 50408;-- Chart of Accounts ID
  v_combination_id         := 3254;

  v_Return := FND_FLEX_EXT.GET_SEGS
                (
                 application_short_name => v_application_short_name,
                 key_flex_code          => v_key_flex_code,
                 structure_number       => v_structure_number,
                 combination_id         => v_combination_id
                );
  DBMS_OUTPUT.PUT_LINE('v_Return = ' || v_Return);
END;

0 Responses to “API to get the concatenated segment values for a code combination id (FND_FLEX_EXT.GET_SEGS)”

Post a Comment

Disclaimer

The ideas, thoughts and concepts expressed here are my own. They, in no way reflect those of my employer or any other organization/client that I am associated. The articles presented doesn't imply to any particular organization or client and are meant only for knowledge Sharing purpose. The articles can't be reproduced or copied without the Owner's knowledge or permission.