SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 

Max amount in payment run

Former Member
0 Kudos

Hi experts,

When run FPY1 in FICA, I would like to check the total amount of all transactions.If total is above  XXXX amount,

I will not sedn the XML payment file to the bank, instead filoe will be blocked and an email has to be sent to a super user.

the sper user chekc the file, if everything is ok, he unblock the file.

has anyone deal with this before, to give any good idea ?

Reagrds,

Thierno.

11 REPLIES 11

william_eastman
Advisor
Advisor
0 Kudos

Thierno:

You can execute the payment run in simulation mode.  Then your custom program could check DPAYH and get the total for your desired outcome.

regards,

bill.

AmlanBanerjee
Active Contributor
0 Kudos

Hi Thierno,

Just adding to Bill's point, its recommended to have the approval\unblocking from the Super User before the actual payment run is scheduled as because if the file is not approved\unblocked for some reason, the actual payment run has to be reversed in SAP.   

You can plug in an enhancement in event 601, where in once the payment amount in the simulated payment run is greater than a given amount , it would trigger a workflow to the super user.

If the super user approves the payment amount, then it will get stored in a custom table, based on the date ID and identification of the payment run.

Now, when the actual payment run is executed and the total amount is greater than a given amount, it would check the custom table and depending on the entries maintained in the custom table it would proceed\error out the payment run.

Hope it helps..

Thanks,

Amlan

0 Kudos

Hi,

Thnak you Amlan and William for your replies. It looks a good idea to start a work flow when a certain amount is reached but I first need to get this amount. When I look to the xml payment file in the tag <CtrlSum> </CtrlSum>, I can find the toatl amount I need.

From which event (may be 0601) I can get the value of this tag so that I can test ?

If total amount > XXX then

    start workflow to send infor to inbox super user

    don't send file to the bank

else

   continue, generate file

   sedn file to the bank

endif

 

the program FPY1 will be scheduled in background so, it wil not be run in simulation mode.

Thanks in advance

0 Kudos

Hi Thierno,

Event 601 would give you the total amount that you are getting from a payment run and which would eventually go into the payment file.

I don't think so the payment file is created at this point.

You have to also think of the scenario, where the Super User does not approves the file.

So in that scenario, you have to reverse the payment documents that have already been created in SAP.

This is where the payment run in simulation mode comes in to play. If you are running the payment run in simulation mode and triggering the workflow and it gets routed to the Super User, where in, if its approved, then you can proceed with the actual payment run in the background.

However, if its not, you can delete the simulated payment run from the System. This would reduce the effort of reversing the payment entries in SAP. 

Hope it helps..

Thanks,

Amlan

raviahuja
Contributor
0 Kudos

Hi,

In our project too, we run FPY1 first in simulation mode, get the approval and then run FPY1 in actual mode. This saves the risk of reversing the payment documents in case file is rejected or has got some issue.

Regards,

Ravi

Former Member
0 Kudos

Hi,

Thank you Amlan & Ravi. I think it's a good idea to first run id in sumilation mode and there afetr if everything is ok, run it in actual mode.

If I understand you, I have to schedule one job for FPY1 in simulation mode. In event 601, then I test the amount.

If it's ok how to rerun the payment in actual mode, as the job should already finished ?

To get the total amount, do I have to aggregate value of T_0601-BETRH (amount in local currency for current item) ? But what is the structure containing all selected items in the payment run ?

How can I loop through the strcuture to get the total amount ?

Thanks in advance.

Regards,

Tierno

0 Kudos

When you run the FPY1 in simulation mode, it just creates the payment list without updating any tables. Now, if you want to automate the approval process, you can use event 601 based on amount you get from simulation mode. If this can be manual, simply send the payment list to approver.

Now, once approved you can run FPY1 in actual mode. For this, just use the same parameters as in simulation mode without checking the simulation run. This should be ok as simulation mode just creates payment list but does not post the actual payment document.

Regards,

Ravi

Former Member
0 Kudos

Thank you Ravi for your quick reply.

this operation must be automated, this is a business requirement to run in the night the payment program.

I’m still looking how to go
further of your idea, with other words:

How to run the program in simulation mode, test the amount:

if it’s ok run in actual mode(without manual intervention) ?

else trigger Workflow to a user

How can you get the total amount in simulation mode from event 601, when debugging there I see only one line item in t_0601 so cannnot make the sum?

Thanks in advance for your ideas.

Regards,

Tierno

0 Kudos

Hello all,

Just in addition to the problem of Thierno there is something you have to concider using the test run / actual run in the FPY1.

When in the time between the test run and actual run a new document is posted (that will suit the parameters of the payment run) then this new document will not be shown in the test run but will but payed / collected in the actual run.

Please note that this could also be the case if a document is reversed / cleared somewhere in another process. So in this case a document could appear on the test run but not in the actual run.

Regards,

Lukas

0 Kudos

Hi,

Thanks all of you for your effort. It has became more clera for me how to deals with this.

I dont' succeed to get the total amount in simulation mode in event 0601.

Can anyone tell where to get this value so that i test if is greater or not. Or do i have to calculate it in loop ?

Thanks in advance.

Regards,

Tirenro

0 Kudos

Hi Thierno,

I think event 630 will cater your requirement.

All the data used in payment program are stored in tables DPAYH and DPAYP.

Table DPAYH has an entry for each payment order. This table contains application and customer includes whose fields can be filled in this event. All information available to the payment program is transferred:

  • Paid items
  • Business partner
  • Contract account
  • House bank information
  • Clearing item created by the house bank
  • Pre-filled structure PAYH

So you can use this event to find the total amount against a particular combination of date ID and identification.

Hope it helps..

Thanks,

Amlan