Download the file into local machine.
Refer - Working with Large objects(LOB) in RAP
Step 1: Change consumption view.
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Consumption view for Item'
@Metadata.ignorePropagatedAnnotations: true
define view entity zcv_ab_itm_stu12 as projection on ZIV_AB_ITM_STU12
{
@UI.facet:
[{
id : 'attach',
purpose: #STANDARD,
type: #IDENTIFICATION_REFERENCE,
label: 'Attchment Information',
position: 10
}]
@UI:
{
lineItem: [{ position: 10 , label : 'Attachment ID'}],
identification: [{ position: 10 , label : 'Attachment ID' }]
}
key AttchId,
@UI:
{
lineItem: [{ position: 20 , label : 'Student ID'}],
identification: [{ position: 20 , label : 'Student ID' }]
}
StuId,
@UI:
{
lineItem: [{ position: 30 , label : 'Comments'}],
identification: [{ position: 30 , label : 'Comments' }]
}
Comments,
@Semantics.largeObject:{
mimeType: 'Mimetype',
fileName: 'Filename',
contentDispositionPreference: #ATTACHMENT
}
@UI:
{
lineItem: [{ position: 40 , label : 'Attachment'}],
identification: [{ position: 40 , label : 'Attachment' }]
}
Attchment,
Mimetype,
Filename,
/* Associations */
_Student : redirected to parent zcv_ab_hdr_stu12
}
Step 2: Activate the consumption view.
Step 3: Preview the application and click on go to see all records.
Step 4: Click on file name it will download to local machine.
********************************Thank you*****************************
Comments
Post a Comment