Bandag Import Program

This program aims to import the costs of vehicle tires from Bandag to SIGAMNT. This is done by generating service orders for the vehicle code sent via .txt file. Since a vehicle may have multiple records of the costs of tires, the vehicle will contain an order with multiple inputs.

It also allows to make the import of all vehicles from various companies and branches.

Process Details:
First the program reads all the records by checking the .txt file line by line to identify if any company code, branch, vehicle code, event date or cost is empty. If some is empty, it generates a report of inconsistencies.
Checks if the vehicles exist in the companies and branches informed.
If the program finds any inconsistency and have data to import, before making the import it asks you whether to proceed. If the you do not proceed, it is still possible to print the report of inconsistencies.
If you proceed, it will import the not inconsistent data and in the end it will allow printing of inconsistent data and data imported
If the import was made even with inconsistencies, you cannot run it again after fixing the inconsistencies, otherwise the costs of vehicles previously imported will be duplicated.

 

Consistencies that are made during the import process:
It consists if the file exists in the specified path, otherwise it displays a message.
The program must search the file generated by Bandag based on the path and file parameters and copy to the root path of Protheus to start reading.
Checks if the file contains data, otherwise it displays a message.
It Reads all the important data for import (company code, branch code, vehicle code, the event date and cost of the tire) and checks if they are completed. If any information is empty, it does not import and records it in the inconsistencies file to display at the end of the inconsistencies report.
It checks in sigamat.emp (companies and branches file) if the company and branch exist, if not found. it generates an inconsistency and it does not import.
Checks whether the vehicle exists in the company and branch. If the asset in not found, it records the inconsistencies and it does not import.
It checks whether the product entered in the parameter exists for the company and branch registered in SB1.
It checks whether the service entered in the parameter is duly registered for the vehicle's company and branch registered in ST4.
If found, it checks whether the type of maintenance exists in table STE.
If the type of maintenance exists in the table, it checks whether it is corrective type.
It checks if the area code of the service is also registered in maintenance area table.
If the vehicle's company index files (SX2 and SIX) are not found, it does not import and inconsistencies record is generated.
If after all the above checks inconsistencies are found for every record, it displays a message warning the user that all data is inconsistent and it displays the inconsistency report.
If there is any record to be imported and others with inconsistencies, first it asks you whether to continue the import even with inconsistencies.
If you continue, it does the import and at the end it generates the report of import result and inconsistencies generated during the import process.

 

Treatment of the company and branch
In the \".txt\" file generated by Bandag, the first position indicates the company number, and the second position, the branch number of the vehicle in SIGAMNT.

Procedures

Importing the Bandag file for Maintenance of Assets:

1. In Miscellaneous, Bandag, select the option Import Bandag;

2. Fill out the fields of the following parameters: S.O. Service?, Costing Product?, File Name?, Path?

3. Check the information and confirm the parameters.

 

Important:

The parameter MV_NGMNTBG  must be indicated with service code that is used in the opening of the costs import service orders, the type of the service must be of the corrective type. Both costing product and service must be registered in the companies and branches where the costing records are imported.

 

 

For integration to occur properly, in the Bandag system, a table was created to match companies and branches from Bandag system to the Maintenance of Assets. When the customer uses this integration, this table must register the companies related between Bandag and Maintenance, to be identified at the time of generation of \".txt\" file.

Example:

Bandag Company

Bandag Branch

Maintenance Company

Maintenance Branch

001

001

01

01

002

002

02

02

 

See Also

The data Export process for Bandag:

Data Export for Bandag