SAP ABAP IMG Activity RCF_DOC_UPLOAD (BAdI: Upload Documents)
Hierarchy
ERECRUIT (Software Component) E-Recruiting
   PA-ER (Application Component) E-Recruiting
     PAOC_RCF_BL (Package) Recruitment Factory: Business Logic
IMG Activity
ID RCF_DOC_UPLOAD BAdI: Upload Documents  
Transaction Code S_KER_43000163   (empty) 
Created on 20040209    
Customizing Attributes RCF_DOC_UPLOAD   BAdI: Upload Documents 
Customizing Activity RCF_DOC_UPLOAD   BAdI: Upload Documents 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name HRRCF00_DOC_UPLOAD    

Use

The purpose of this Business Add-In (BAdI) HRRCF00_DOC_UPLOAD is to check files that are uploaded as attachments to the E-Recruiting System.

The BAdI supplies the following methods for an implementation. These methods are executed one after another in the sequential order specified below:

CHECK_ATTACH_FILE_TYPE

This method checks the file type of an attachment. You can specify what file types may be uploaded for a given HR object. If a file type is not stored, the file may not be uploaded and the user receives notification of this.

Parameter    Type    Reference Type    Description

FILENAME    Importing    STRING    Name of file. Using the function module SKWF_MIMETYPE_OF_ FILE_GET, the file type can be determined from the file name extension.

HROBJECT    Importing    HROBJECT    Key of HR object with which the file is to be linked as attachment. The following object types are possible: Candidate = 'NA', Requisition = 'NB', Application = 'ND', Candidacy = 'NE'.

SUBTYPE    Importing    SUBTY    Subtype for Attachments infotype (5134) according to control table T778U. Specifies the purpose of the attachment, for example, candidate profile, Talent Relationship Management, requisition.

ATTACHMENT_TYPE    Importing    RCF_ATTACHMENT_TYPE    Attachment type according to the Customizing table T77RCF_ATTTYPE. Specifies the content the attachment has, for example, curriculum vitae, application photograph, copy of certificates.

MIME_TYPE    Importing    W3CONTTYPE    MIME content type according to the file name extension. The parameter is not supplied in general since it can be determined automatically when saving the file (see function module SDOK_MIMETYPE_GET).

IS_NOT_VALID    Exporting    BOOLE_D    Result of check: The file format is not permitted - TRUE = 'X' or FALSE = ' '. If the check ends with a negative result, the file is no longer processed and is not uploaded to the system. The user receives an onscreen notification.

RETURN    Exporting    BAPIRETTAB    Table with return information in the case of an error during the check. If this table contains an entry, the file is no longer processed and is not uploaded to the system. There is no further handling of the error.

CHECK_ATTACH_FILE_SIZE

This method checks the file size of an attachment. A maximum size may be specified. If files exceed the maximum size, they cannot be saved and the user receives notification of this.

Parameter    Type    Reference Type    Description

CONTENT    Importing    XSTRING    File content in the form of a byte sequence of variable length

HROBJECT    Importing    HROBJECT    Key of HR object with which the file is to be linked as attachment. The following object types are possible: Candidate = 'NA', Requisition = 'NB', Application = 'ND', Candidacy = 'NE'.

SUBTYPE    Importing    SUBTY    Subtype for Attachments infotype (5134) according to control table T778U. Specifies the purpose of the attachment, for example, candidate profile, Talent Relationship Management, requisition.

ATTACHMENT_TYPE    Importing    RCF_ATTACHMENT_TYPE    Attachment type according to the Customizing table T77RCF_ATTTYPE. Specifies the content the attachment has, for example, curriculum vitae, application photograph, copy of certificates.

MIME_TYPE    Importing    W3CONTTYPE    MIME content type according to the file name extension. The parameter is not supplied in general since it can be determined automatically when saving the file (see function module SDOK_MIMETYPE_GET).

IS_OUT_OF_RANGE    Exporting    BOOLE_D    Result of check: The file size exceeds the permitted limit - TRUE = 'X' or FALSE = ' '. If the check ends with a negative result, the file is no longer processed and is not uploaded to the system. The user receives an onscreen notification.

RETURN    Exporting    BAPIRETTAB    Table with return information in the case of an error during the check. If this table contains an entry, the file is no longer processed and is not uploaded to the system. There is no further handling of the error.

CHECK_NUMBER_OF_ATTACH

This method checks the number of files already uploaded for an object. A maximum number of files or a maximum amount of memory space for all files may be specified. When the maximum specified is reached, no more files may be uploaded and the user receives notification of this.

Parameter    Type    Reference Type    Description

CONTENT    Importing    XSTRING    File content in the form of a byte sequence of variable length

HROBJECT    Importing    HROBJECT    Key of HR object with which the file is to be linked as attachment. The following object types are possible: Candidate = 'NA', Requisition = 'NB', Application = 'ND', Candidacy = 'NE'.

SUBTYPE    Importing    SUBTY    Subtype for Attachments infotype (5134) according to control table T778U. Specifies the purpose of the attachment, for example, candidate profile, Talent Relationship Management, requisition.

ATTACHMENT_TYPE    Importing    RCF_ATTACHMENT_TYPE    Attachment type according to the Customizing table T77RCF_ATTTYPE. Specifies the content the attachment has, for example, curriculum vitae, application photograph, copy of certificates.

MIME_TYPE    Importing    W3CONTTYPE    MIME content type according to the file name extension. The parameter is not supplied in general since it can be determined automatically when saving the file (see function module SDOK_MIMETYPE_GET).

IS_OUT_OF_RANGE    Exporting    BOOLE_D    Result of check: The maximum number of attachments was exceeded - TRUE = 'X' or FALSE = ' '. If the check ends with a negative result, the file is no longer processed and is not uploaded to the system. The user receives an onscreen notification.

RETURN    Exporting    BAPIRETTAB    Table with return information in the case of an error during the check. If this table contains an entry, the file is no longer processed and is not uploaded to the system. There is no further handling of the error.

CHECK_VIRUS

This method scans files for viruses before the files are stored in the database. SAP recommends that you use the method CHECK_ATTACH_VIRUS_VIA_VSA for SAP E-Recruiting, Release 3.00 and higher.

Parameter    Type    Reference Type    Description

CONTENT    Importing    XSTRING    File content in the form of a byte sequence of variable length

IS_INFECTED    Returning    BOOLE_D    Result of virus scan: The file contains a virus - TRUE = 'X' or FALSE = ' '. If the check ends with a negative result, the file is no longer processed and is not uploaded to the system. The user receives an onscreen notification.

CHECK_ATTACH_VIRUS_VIA_VSA

This method scans files for viruses before they are stored in the database. The method uses the virus scan interface to integrate external virus scanner programs. The interface is generally available as of SAP NetWeaver 04. For more information, see the SAP Library under SAP NetWeaver -> Security -> System Security -> Virus Scan Interface.

Parameter    Type    Reference Type    Description

CONTENT    Importing    XSTRING    File content in the form of a byte sequence of variable length

HROBJECT    Importing    HROBJECT    Key of HR object with which the file is to be linked as attachment. The following object types are possible: Candidate = 'NA', Requisition = 'NB', Application = 'ND', Candidacy = 'NE'.

SUBTYPE    Importing    SUBTY    Subtype for Attachments infotype (5134) according to control table T778U. Specifies the purpose of the attachment, for example, candidate profile, Talent Relationship Management, requisition.

ATTACHMENT_TYPE    Importing    RCF_ATTACHMENT_TYPE    Attachment type according to the Customizing table T77RCF_ATTTYPE. Specifies the content the attachment has, for example, curriculum vitae, application photograph, copy of certificates.

MIME_TYPE    Importing    W3CONTTYPE    MIME content type according to the file name extension. The parameter is not supplied in general since it can be determined automatically when saving the file (see function module SDOK_MIMETYPE_GET).

IS_INFECTED    Exporting    BOOLE_D    Result of virus scan: The file contains a virus - TRUE = 'X' or FALSE = ' '. If the check ends with a negative result, the file is no longer processed and is not uploaded to the system. The user receives an onscreen notification.

RETURN    Exporting    BAPIRETTAB    Table with return information in the case of

Business Attributes
ASAP Roadmap ID 255   Create Interfaces 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency A   Valid for all countries 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20040629 
SAP Release Created in 200