1. creataing a function returns a sql that displays fields in the order of filed name:
Ex:
- select fo('installation') from dual -- default to 'PS_'
 - select fo('psrecdefn') from dual
 - select fo('all_objects') from dual
 
|   Page Name  |    Object Name  |    Navigation  |    Usage  |  
|   URL Maintenance  |    URL_TABLE  |    PeopleTools, Utilities, Administration, URLs  |    Specify an FTP server for storing file  | 
|   Page Name  |    Object Name  |    Navigation  |    Usage  |  
|   Maintain File Att Servers  |    PV_ATT_SRV_ADMIN  |    Set Up Financials/Supply Chain, Utilities, Administer File Attachments, Administer Attachment Servers  |    Used to set up the FTP server location for PDF and XML file attachments which are included with notifications.  | 
|   Page Name  |    Object Name  |    Navigation  |    Usage  |  
|   Maintain File Att Servers  |    PV_ATT_SRV_ADMIN  |    Set Up Financials/Supply Chain, Utilities, Administer File Attachments, Administer Attachment Servers  |    Identify servers on which to store attachments.  |  
|   Maintain Component Subdirs  |    PV_ATT_SRV_ADMIN  |    Set Up Financials/Supply Chain, Utilities, Administer File Attachments, Administer Attachment Servers, Maintain Component Subdirs  |    Define component names and paths where the attachments are stored.  |  
|   Vendor Address  |    VNDR_ADDRESS  |    eProcurement, Procurement Application Admin, Maintain Vendors, Vendor Profile, Address  |    Define vendor email addresses for sending attachments.  |  
|   URL Maintenance  |    URL_TABLE  |    eProcurement, Procurement Application Admin, Maintain Overall System Options, Maintain FTP Server Location  |    Requires end users to enter the file location manually for attachments (not the recommended method). 
  | 

| System Variable for &RETCODE | Value | FTP Code | Comments | 
| %Attachment_Success | 0 | ||
| %Attachment_Failed | 1 | ||
| %Attachment_Cancelled | 2 | user hit “CANCEL” instead of “Upload” | |
| %Attachment_FileTransferFailed | 3 | ||
| %Attachment_NoDiskSpaceAppServ | 4 | N/A for FTP | |
| %Attachment_NoDiskSpaceWebServ | 5 | N/A for FTP | |
| %Attachment_FileExceedsMaxSize | 6 | 552 | |
| %Attachment_DestSystNotFound | 7 | ||
| %Attachment_DestSysFailedLogin | 8 | 530 | sftp cannot authenticate | 
| %Attachment_FileNotFound | 9 | 550 | user “Upload” a 0-byte file; “View” file does not exist | 
| %Attachment_DeleteFailed | 10 | 552 | user hit “delete” but file does not exist | 
| %Attachment_NoFileName | 11 | user hit “Upload” without selecting a file | |
| %Attachment_FileNameTooLong | 12 |