Skip to Content

Interface for loading bank BAI format document into SAP

HI Experts,

I have to write a script program that retrieves and uploads the EBS file into SAP will ensure that all files are received and uploaded into SAP. The program will inform the responsible parties if some files are not received or are uploaded with errors.

here the file is in appl server. So, i decided to schedule a job for FF_5 Transaction, then it will archived. while job is scheduled, if some documents got fail. so here how can i identify which one got failed/error and send a mail to

hope it is brief. could you help me out.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Apr 27, 2012 at 01:09 PM

    We utilize a similar process. The steps within a single scheduled job, for me, are:

    Execute our custom program that will:

    1. Get the bank/account information from T012, T012k and make the set unique, as needed.

    2. Open the BAI2 file dataset and read to find the file header (for the run date, etc.) If no file, abend the scheduled job with an E message.

    3. Submit our custom program to upload the BAI2 file and convert it to the needed format, storing a file for each combination of company code and payment ID (HKTID) or acct (BANKN). This produces a set of files with the unique file header, the account / company code header, etc. needed for next steps.

    loop at our derived unique rows from T012/T012k.

    4. Construct a unique runid code for the company and HKTID or BANKN.

    5. try to open the corresponding (to runid) dataset created from 3 above. If successful, close and continue, if not successful, continue to next row in t012/t012k table.

    6. Submit rfkkcr00 with the needed parameters to create a run id and to prevent accidental reruns.

    7. Create the parameters for rfkkcrcash_check into a parameters table.

    8. Submit rfkkcrcash_check with the parameters table.


    Of course, we're checking for success at each step of the way. Our process is probably much more complex than you need, since we have multiple company codes and multiple bank accounts.

    Afterward, a little later in the morning, we have a scheduled job that reads the RUNIDs from DFKKCRST to see if any runids were generated (or which runids were generated), since in my case, I store runids by YYMMDD, Company code and last two of HKTID. If nothing is found, and it is Tuesday - Saturday, and yesterday was not one of the known, predicable holidays (Dec 25, Jan1, July4), we issue an E-error message to the log to cause an abend. The job log then shows the cancellation, and we read the log to see what happened (since I output a message for each step).

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.