Skip to content

Add_Aggregate

Add a record to a record attribute of type aggregate. Add_Aggregate works in the same way as Add_Array.

PROCEDURE Add_Aggregate (  
   master_record_ IN OUT type_record_,  
   name_          IN     type_name_,  
   record_        IN OUT type_record_ )

Parameters

master_record_
Foundation1 record.

name_
    The name of master_record_ aggregate attribute.

record_
    Foundation1 record.

Example

SET SERVEROUT ON SIZE 100000  
DECLARE  
   AM Plsqlap_Record_API.type_record_;  
   TB Plsqlap_Record_API.type_record_;  
BEGIN  
   AM := Plsqlap_Record_API.New_record('APPLICATION_MESSAGE');  
   TB := Plsqlap_Record_API.New_record('TEXT_BODY');  

   Plsqlap_Record_API.Set_Value(AM,'APPLICATION_MESSAGE_ID','100',Plsqlap_Record_API.dt_Text_Key);  
   Plsqlap_Record_API.Set_Value(AM,'SENDER','Jan H Malmberg',Plsqlap_Record_API.dt_Alpha);  
   Plsqlap_Record_API.Set_Value(AM,'MESSAGE_TYPE','A1',Plsqlap_Record_API.dt_Alpha);  
   Plsqlap_Record_API.Set_Value(TB,'TEXT_BODY_TYPE','Str',Plsqlap_Record_API.dt_Enumeration);  
   Plsqlap_Record_API.Set_Value(TB,'TEXT_VALUE','This is a demonstration',Plsqlap_Record_API.dt_Long_Text);  
   Plsqlap_Record_API.Add_Aggregate(AM,'TEXT_BODY',TB);  
   Plsqlap_Record_API.Debug_Record(AM);  
END;  
/  
main: Fnd_View APPLICATION_MESSAGE New_Record  
main:    Text_Key APPLICATION_MESSAGE_ID '100^*'  
main:    Alpha SENDER 'Jan H Malmberg'  
main:    Alpha MESSAGE_TYPE 'A1'  
main:    Array TEXT_BODY (1 elements):  
main:       1:Fnd_View TEXT_BODY New_Record element of APPLICATION_MESSAGE.TEXT_BODY  
main:          Enum      TEXT_BODY_TYPE Str  
main:          Long_Text TEXT_VALUE     'This is a demonstration...' (23 characters)  

PL/SQL procedure successfully completed.