[Audio] Hello, and welcome to this walkthrough of the COGI Email Trigger tool. In this session, I will demonstrate the purpose of the tool, its prerequisites and the execution process..
[Audio] First, a quick overview. In production, the weekly TECO jobs try to close production orders. Some of these orders cannot be closed because of COGI errors. These errors have to be found, and the plant users have to be informed, otherwise the orders stay open. Until now, this meant checking the job results and the COGI errors by hand and then informing the plant users. This tool does that automatically. It reads the finished runs of the three TECO weekly jobs in a date range that you enter, finds the production orders with COGI errors, groups them by plant, and sends one email to each plant. The people who benefit are the plant users and the production support team. They get an automatic notification, one email per plant with the list of orders, and the action required..
[Audio] Now let us look at the tool in a bit more detail. The tool sends emails to plant users about production orders that could not be closed in the weekly jobs because of COGI errors. You only need to enter a Start Date range. The tool then sends one email per plant with the order table, the action required. Please note that the tool only reads and notifies. It does not reprocess anything in COGI..
[Audio] Before you start, a few things need to be in place. First, the standard report PPIO_ENTRY must be scheduled as three jobs, named P2D_PE_TECO_WEEKLY1, P2D_PE_TECO_WEEKLY2, and P2D_PE_TECO_WEEKLY3. The tool reads only these three names, so they must match exactly. Second, the table ZP2D_COGI_EMAIL must be maintained with the plant, user name, and mail ID of each recipient. Third, the system must be able to send email. Finally, each user or business creates their own jobs and variants, using exactly these job names..
[Audio] Let us look at the recipient table. Table ZP2D_COGI_EMAIL decides who receives the email. For each recipient, add one entry with the plant, the user name, and the mail ID. The tool uses the plant to find who should get the email. You can open the table in SE16N and add your entries. As you can see on the screen, this is how the maintained entries look.
[Audio] Now we start with step one, which is creating the variant. We first open the standard report PPIO_ENTRY. Go to transaction SE38, enter the program name PPIO_ENTRY, and execute it. This is the standard report that the weekly TECO jobs run..
[Audio] On the selection screen, enter the values for mass TECO. Each user or business sets their own values here, based on what they need to close..
[Audio] Once the values are filled in, save them as a variant. From the menu, choose Goto, then Variants, then Save as Variant. Give the variant a name and save it..
[Audio] Step two is to schedule the variant as a background job. Open transaction SM36 and enter the job name. The job name must be one of the three names you see here: P2D_PE_TECO_WEEKLY1, P2D_PE_TECO_WEEKLY2, or P2D_PE_TECO_WEEKLY3..
[Audio] Next, add the job step. Choose Step, select ABAP program, enter PPIO_ENTRY as the program name, and enter the variant name that we just created. Then save the step..
[Audio] Now set the start condition. Decide when the job should start and save the job..
[Audio] Step three is to check the job. Open transaction SM37, enter the job name and the date range, and execute. This shows the list of jobs..
[Audio] Here we confirm that the job status is Finished and that the spool exists. This is important because the tool reads only finished runs and their spool..
[Audio] Step four is to run the program. Use Transaction code ZVP_COGI to open the program . On the selection screen, enter a Start Date range that covers the date of the job run, and execute the program with F8..
[Audio] Let me explain what happens when you run it. The tool first reads the Start Date range from the selection screen. Then it finds the finished runs of the three TECO weekly jobs in that range. It reads the spool of each run and picks out the production orders with postprocessing records. Next, it runs the standard COGI report, CORUAFFW, in the background to get the error records. After that, it groups the orders by plant and finds the recipients in the table ZP2D_COGI_EMAIL. Finally, it builds one email per plant, with the order table, the action required and sends it..
[Audio] Now let us look at the output. After the emails are sent, the tool shows a confirmation message on the screen..
[Audio] Each plant user then receives one email. The email contains the table of production orders, and the action required, so the user knows exactly what to do..
[Audio] That completes the walkthrough.Thank you for watching..