01-23-2006 10:29 PM
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...
01-24-2006 2:30 AM
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.
01-24-2006 2:30 AM
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.
01-24-2006 2:52 AM
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.
01-24-2006 3:05 AM
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.
01-24-2006 4:33 PM
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...
01-25-2006 10:30 AM
Hi ,
Try using BAPI_SALESORDER_SIMULATE instead of creating it.
Cheers
10-29-2008 5:20 PM