Using Upload Collection Control

  • Attachments are directly synced with SAP backend.
    Any additions or deletions you make to attachments in the Upload Collection Control immediately affect the backend, even without submitting or saving the request as draft.

 

  • Attachments May Persist in SAP Even If Requests Aren't Saved
    Attachments added to requests in FAB versions 3.3 and below remain in SAP's storage, even if the request itself is never submitted or saved.

Recommended Action:
Create an SAP Program for Cleanup:
Develop a program specifically designed to identify and delete attachments that lack links to actual requests. This program will actively manage orphaned attachments and prevent unnecessary storage usage.

 

  • Upload Collection Control integrated within a Table Control
    When using the Upload Collection Control within a table control, deleting a line item must also trigger the deletion of the corresponding file from the backend to ensure consistency.

Recommended Action:
FAB 3.3 and Above:
Utilize Built-in Method:

Use the READ_ATTACHMENTS_BY_KEY method of the /IQX/CL_FORMS_ASSIST class.

Pass the instance number to retrieve linked files.

Reflect changes and update details in the table control accordingly.

FAB Versions Lower than 3.3:
Enhance Existing Class:

Create an enhancement on the /IQX/CL_FORMS_ASSIST class.

Insert an Overwrite-Method for the READ_ATTACHMENTS_BY_KEY method. Use the logic from the latest FAB version.

 

  • Fixing Error Message Issue in FAB 3.3 and Below
    The fabOnFileByKeyDeleted script may not generate error messages as intended due to a parameter name mismatch.

Recommended Action:
To address this, start by creating a copy of the script within your app's form controller. Within the else statement of the copied script find the variable name data.DeleteAttachment and replace it with data.DeleteAttachmentByKey.

 

  • Renaming Attachments in FAB 3.3 and Below: Not Currently Supported
    The ability to rename attachments directly within the Upload Collection Control is not available in FAB versions 3.3 and below.

Recommended Action:
To prevent confusion and potential errors, it's strongly advised to hide the rename button within the Upload Collection Control. This ensures users are aware of the limitation and avoids any attempts to use a feature that's not supported.