This tutorial video focuses on the implementation of an InfoPackage routine in SAP to read files from the AL11 directory. The presenter explains how to dynamically specify a file name for the InfoPackage to pick up from the AL11 directory, rather than from a local workstation. The video also covers how to handle scenarios where the file name changes daily, and how to write code to accommodate this.
Key topics covered in the video session:
- InfoPackage Execution and AL11 Directory: The presenter begins by explaining that an InfoPackage can be set to load data from the AL11 directory instead of a local workstation. This is useful when another team places files in the AL11 directory daily, and the InfoPackage needs to pick up these files.
- Hard Coding the File Path: The presenter shows how to hard code the file path in the InfoPackage. This is done by specifying the file path and name in the InfoPackage settings. This method works when the file name remains the same each day.
- Dynamic File Naming: The presenter then explains how to handle scenarios where the file name changes daily. This is done by implementing a routine in the InfoPackage that concatenates the current date with the file name. The presenter demonstrates how to write this routine.
- Implementing the Routine: The presenter shows how to implement the routine in the InfoPackage. The routine is written in a way that it provides the full file path and name to the InfoPackage. The presenter emphasizes that the file path and name must be passed to the ‘P_file_name’ variable in the routine.
- Case Sensitivity in File Extensions: The presenter concludes by highlighting the case sensitivity of file extensions. The system will not recognize a file if the case of the file extension specified in the InfoPackage does not match the case of the file extension in the AL11 directory.