The Boyum external launcher is a means to access many external applications such as Notepad, Word, Excel, Outlook, PowerPoint, and vendor and customer applications on your system or the network. In this example the Boyum external launcher is used to access EDI XML documents received from customers that were rejected when being loaded into SAP. Using Notepad quickly gives the user a view of the XML files so they can focus in on the problem.
This example also uses a SQL query for data input and a line loop to process data.
User view of This function
In our example, the incoming EDI documents received from a customer have been 'rejected' as they were being processed into SAP Sales Orders. The reasons for the rejection are generally problems like: item not active, customer part not found, PO does not exist. When any such problem occurs, the user must do these things: 1. Determine why the problem exists; 2. If possible correct the problem within SAP; 3. Re-process the incoming EDI document.
In the course of doing these tasks the user often needs to review the incoming document for specifics pertaining to the problem. They need a means to do this.
After resolving the problem, the user needs the ability to re-process the incoming EDI document so the SAP Sales Order gets posted.
This functionality is added to the menu using the Boyum Add/Edit menus. The user clicks on the application, asnwers a couple of questions and either 'views' the XML file using Notepad, or initiates the reprocessing of the incoming EDI Document.
SQL Report Shows the Documents Available for Review
The available sales order XML files are shown in this SQL report. They are sorted by last date first because the problem files are likely the most recent ones. The user decides which file to view and clicks the process button.
Using Boyum's External Launcher Universal Function
In this demonstration of Boyum, the following features will be detailed:• Using the Universal Function ‘External Launcher’• Using a SQL report to provide the means to ‘select’ documents to view using Notepad via the External Launcher• Within the SQL report, use SQL statements to define the SQL variable selections• Within the SQL report, use the Edit and Hide options to allow entry when needed and to not display background fields required for processing (that may confuse the user)• Use a Line Loop Universal Function to process the calls to the External Launcher.
Menu Item to Reprocess an Incoming EDI FIle
Get the EDI Document Type & Flag for Reprocess or View
Notepad opens the file and displays the XML document. When the user is done reviewing, they close Notepad. If they selected multiple documents, Notepad gets called multiple times in the Line Loop Universal Function and they see each of the EDI files separately.
reprocess A File
If the option chosen is to reprocess the file, the system processes one file at a time as defined in the selection process and handled by the line loop. The files get copied to the 'Process' directory for the EDI XML documents and a SQL Server Agent job is called to execute the load of the EDI XML files into SAP Sales Orders.
Boyum Add-Edit Menus
Use the Add - Edit menus option to add the link to the Universal Function 'Reprocess a File'. This calls the EDI-40 Universal Function.
SQL Report Used for Selection
The EDI-40 SQL report universal function is a parameter driven SQL report. The output is the list of EDI XML documents available for review or reprocessing. The first field is a 'Check Box' that the user can click to 'Select' that particular XML file for review.
Boyum's Item Placement Tool was used to place the button 'Process' next to the 'Close' button on the SQL report.
SQL Variables defined
The user is asked for 2 inputs: A 'Filter' and an 'Option'. The filter is defined by a SQL statement and is presented to the user as a drop down. The options are also a SQL statement and presented to the user as a drop down selection. There are 2 options: Reprocess the file OR View the file. The 'View' option uses the Externally Launched application 'Notepad' to view the file.
SQL Column Formatting
The 1st column is set to 'Editable' and a 'Column Type' of Checkbox. The SQL report sets the value of this check box to 'N' = Not Selected.
There are 2 hidden fields from the SQL report in columns 5 and 6. While these are hidden from the user, they are available for use when processing data. One of the columns is the original input flag - 'V' = view or 'R' = Reprocess.
Selection Complete - Click 'Process'
This B1 Validation is invoked when the user clicks the 'Process' button on the SQL form list after selecting which EDI files are to be reprocessed or viewed.
There are no SQL conditions. The Universal Function EDI-41 is initiated.
Line Loop to Process Selected Files
The B1 Validation calls a 'Line Loop' UF to process either 'Viewing' the file (EDI-42) or 'Reprocessing' the file (EDI-45).
Note: since the last line in a query is 'real data', always uncheck the 'ignore last line' on the line loop.
Note: the 'HowtoProcess' SQL condition uses the hidden SQL column to determine if this is a 'View' or 'Reprocess' operation.
External Launch of Notepad
The actual call to Notepad.exe is a simple setup. The program is a 'Common program' that is selected from the drop down.
The argument required by Notepad is the full file name - including the directory and the name of the file. A SQL statement is used to 'build' the file directory plus the filename into the 'Full File Name'.
NOTE: the file directory and file name are columns in the SQL report. When naming the columns in the SQL report DO NOT BLANK SPACES. The SQL execution aborts if there are blanks in the dynamic syntax name. Inset underscores if you need a name that is clear.
Reprocess A File - Step 1
There are 2 steps to the 'Reprocess'. The first is to store the variables required. This is a macro that defines STORE1 through STORE3 and then calls the next UF EDI-54.
Reprocess A File - Step 2
Actual reprocessing a file consists of two steps: copy the file from the backup directory to the processing directory; and then initiating a SQL Server agent job to actually import the XML document as a SAP Sales order.