Skip to content

Add_Array

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

PROCEDURE Add_Array (   
   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_ array attribute.

record_ Foundation1 record.

Example

SET SERVEROUT ON SIZE 100000  
DECLARE  
   AM  Plsqlap_Record_API.type_record_ := Plsqlap_Record_API.New_record('APPLICATION_MESSAGE');  
   TB  Plsqlap_Record_API.type_record_ := Plsqlap_Record_API.New_record('TEXT_BODY');  
   AL1 Plsqlap_Record_API.type_record_ := Plsqlap_Record_API.New_record('ADDRESS_LABEL');  
   AL2 Plsqlap_Record_API.type_record_ := Plsqlap_Record_API.New_record('ADDRESS_LABEL');  
BEGIN  
   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.Set_Value(AL1,'TRANSPORT_CONNECTOR','Mail',Plsqlap_Record_API.dt_Alpha);  
   Plsqlap_Record_API.Set_Value(AL1,'ADDRESS_DATA','Kalle@ifsab.se');  
   Plsqlap_Record_API.Set_Value(AL1,'SENT',TO_DATE('20010425','yyyymmdd'));  
   Plsqlap_Record_API.Add_Array(AM,'ADDRESS_LABEL_LIST',AL1);  
       
   Plsqlap_Record_API.Set_Value(AL2,'TRANSPORT_CONNECTOR','Mail',Plsqlap_Record_API.dt_Alpha);  
   Plsqlap_Record_API.Set_Value(AL2,'ADDRESS_DATA','Olle');  
   Plsqlap_Record_API.Set_Value(AL2,'SENT',TO_DATE('20010425','yyyymmdd'));  
   Plsqlap_Record_API.Add_Array(AM,'ADDRESS_LABEL_LIST',AL2);  
     
   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)  
main:    Array ADDRESS_LABEL_LIST (2 elements):  
main:       1:Fnd_View ADDRESS_LABEL New_Record element of APPLICATION_MESSAGE.ADDRESS_LABEL_LIST  
main:          Alpha TRANSPORT_CONNECTOR 'Mail'  
main:          Text ADDRESS_DATA 'Kalle@ifsab.se'  
main:          Date SENT 2001-04-25-00.00.00  
main:       2:Fnd_View ADDRESS_LABEL New_Record element of APPLICATION_MESSAGE.ADDRESS_LABEL_LIST  
main:          Alpha TRANSPORT_CONNECTOR 'Mail'  
main:          Text ADDRESS_DATA 'Olle'  
main:          Date SENT 2001-04-25-00.00.00  
        
PL/SQL procedure successfully completed.