Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Credit Limit for SalesOrder

Former Member
0 Kudos

Here is my problem description:

Please forgive me if this is not the right forum or this is solved earlier. Pl guide me in these cases.

I am trying to solve this problem from external program, so I can use only remote enabled RFCs/BAPIs.

The problem is this. I want to be able to simulate Sales Order from Credit Checking point of view.

I don't want to save order but want to know if credit check would pass if I saved the order.

I am able to get error "Credit limit exceeded" in the GUI with all correct settings, but when I call BAPI_SALESORDER_CREATEFROMDAT2 it does not give any error

for the credit limit.

I have not even tried simulate because the BAPISALESORDER_CREATEFROMDAT2 itself does not fail.

Any settings or parameters to be supplied for causing credit limit checking thru BAPI ?

Thanks in advance...

1 ACCEPTED SOLUTION

former_member186741
Active Contributor
0 Kudos

when you say it's not giving any error, does this mean that a sales doc is being created by the bapi? If it is then it must be passing the credit checks. If it's not creating a doc then there is some sort of error occuring but you can't recognise it. Try to run the bapi in debug and set a debug on the 'call transaction' statement. Most bapi's call a transaction somewhere and I'm guessing this one will call VA01 somewhere. You might be able to see what's happening, maybe change the call mode of the transaction to 'A' to show all screens would help.

6 REPLIES 6

former_member186741
Active Contributor
0 Kudos

when you say it's not giving any error, does this mean that a sales doc is being created by the bapi? If it is then it must be passing the credit checks. If it's not creating a doc then there is some sort of error occuring but you can't recognise it. Try to run the bapi in debug and set a debug on the 'call transaction' statement. Most bapi's call a transaction somewhere and I'm guessing this one will call VA01 somewhere. You might be able to see what's happening, maybe change the call mode of the transaction to 'A' to show all screens would help.

0 Kudos

Yes, a SalesOrder is created and it does not check credit limit. In SAPGUI it does check, that means all config settings are correct.

I am not authorised and don't know debugging BAPI (ABAP code) - or at least I wanted to keep it last.

Regards.

0 Kudos

sorry but I can't hlep you. Try to get an abapper to help you debug. Have a look on OSS to see if the bapi has any known problems.

0 Kudos

Any one else can help ?

If you do not know the correct answer and still answer, the question gets hidden from other potential help.

Here is my original post...

Here is my problem description:

Please forgive me if this is not the right forum or this is solved earlier. Pl guide me in these cases.

I am trying to solve this problem from external program, so I can use only remote enabled RFCs/BAPIs.

The problem is this. I want to be able to simulate Sales Order from Credit Checking point of view.

I don't want to save order but want to know if credit check would pass if I saved the order.

I am able to get error "Credit limit exceeded" in the GUI with all correct settings, but when I call BAPI_SALESORDER_CREATEFROMDAT2 it does not give any error

for the credit limit.

I have not even tried simulate because the BAPISALESORDER_CREATEFROMDAT2 itself does not fail.

Any settings or parameters to be supplied for causing credit limit checking thru BAPI ?

Thanks in advance...

0 Kudos

Hi ,

Try using BAPI_SALESORDER_SIMULATE instead of creating it.

Cheers

0 Kudos

Hi MB

Can you fix this problem? I'm getting the same problem too