File type validations in RAP

                  Refer - Working with Large objects(LOB) in RAP

                Refer - Download the file into local machine.

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,

acceptableMimeTypes: [ 'application/pdf' ]

}

@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 edit and add one more text file it will through error.


Step 5: Click on edit and add one more pdf file it will allow.


********************************Thank you*****************************


Comments

Popular posts from this blog

New syntax for append- VALUE (new syntax 7.4+) in ABAP

Read statement new syntax in ABAP. (7.4+).

Concatenation new syntax( 7.4+ ).