API to get combination id based on segment info (FND_FLEX_EXT.GET_COMBINATION_ID)

This API FND_FLEX_EXT.GET_COMBINATION_ID is used to get the code combination id based on the segment data. Returns NULL if structure not found.
SET SERVEROUTPUT ON;

DECLARE
   application_short_name   VARCHAR2 (200);
   key_flex_code            VARCHAR2 (200);
   structure_number         NUMBER;
   validation_date          DATE;
   n_segments               NUMBER;
   segments                 apps.fnd_flex_ext.segmentarray;
   combination_id           NUMBER;
   data_set                 NUMBER;
   v_return                 BOOLEAN;
BEGIN
   application_short_name := 'SQLGL';
   key_flex_code := 'GL#';
   structure_number := 71523;
   validation_date := SYSDATE;
   n_segments := 7;
   segments (1) := '210';
   segments (2) := '7001499';
   segments (3) := '40460';
   segments (4) := '81010';
   segments (5) := '02000';
   segments (6) := '010';
   segments (7) := '00000';
   data_set := NULL;
   v_return :=
      fnd_flex_ext.get_combination_id
                           (application_short_name      => application_short_name,
                            key_flex_code               => key_flex_code,
                            structure_number            => structure_number,
                            validation_date             => validation_date,
                            n_segments                  => n_segments,
                            segments                    => segments,
                            combination_id              => combination_id,
                            data_set                    => data_set
                           );
   DBMS_OUTPUT.put_line ('COMBINATION_ID = ' || combination_id);

   IF v_return
   THEN
      DBMS_OUTPUT.put_line ('v_Return = TRUE');
   ELSE
      DBMS_OUTPUT.put_line ('v_Return = FLASE');
   END IF;
END;
/



No comments:

Post a Comment

How to find all cancel Requisitions

SELECT prha . *   FROM po_Requisition_headers_all prha , po_action_history pah   WHERE      1 = 1        AND pah . object_id ...