2006 Nov 28 1:59 PM
Dear Fords
I Facing a very strange Problem ,
I Created a Z function Module in which I used function modules like BAPI_PR_CHANGE & BAPI_REQUISITION_RESET_RELEASE & BAPI_REQUISITION_GETRELINFO
The Problem with the function module is that when i run the Function module through se 37 by F8 it is not giving me expected results
But when i run the function module through SE 37 with the same set of values but now in debugging mode it gives me desired output strange!!!!
Any Ideas are welcome
Dear Fords
I Facing a very strange Problem ,
I Created a Z function Module in which I used function modules like BAPI_PR_CHANGE & BAPI_REQUISITION_RESET_RELEASE & BAPI_REQUISITION_GETRELINFO
The Problem with the function module is that when i run the Function module through se 37 by F8 it is not giving me expected results
But when i run the function module through SE 37 with the same set of values but now in debugging mode it gives me desired output strange!!!!
Any Ideas are welcome
2006 Nov 28 2:05 PM
Its a matter of the changes being committed. Write a program and call your BAPI's in there and then finally the BAPI_TRANSACTION_COMMIT. It should work.
Regards,
Ravi
Note - Please mark all the helpful answers
2006 Nov 28 2:16 PM
Thanks Frnd
i called the BAPI_TRANSACTION_COMMIT but it is Not Happening Frnds
Here is the SEquence in which i am calling the function modules
1. BAPI_REQUISITION_GETRELINFO
2. BAPI_REQUISITION_RESET_RELEASE (To Reset the PR)
3. BAPI_PR_CHANGE (Change the PR )
4.BAPI_TRANSACTION_COMMIT (To commit the changes)
2006 Nov 28 2:31 PM
Shirish,
From Menu FunctionModule->Test->Test Sequence->
now you will see a popup, here in this popup give the BAPI's which you are testing
BAPI_REQUISITION_GETRELINFO
BAPI_REQUISITION_RESET_RELEASE
BAPI_PR_CHANGE
BAPI_TRANSACTION_COMMIT
are you doing all together. or one by one.
if it is one by one then you should have 3 Test sequence in place , each one with
BAPI_TRANSACTION_COMMIT
so you need to test 3 test sequence
Regards
Vijay
2006 Nov 28 2:47 PM
Thankx Vijay,
well .. I tried thid way i copied the all code in the function module and pasted in Executable program But same is the case with the program
I think it some thing specific to the BAPI function module
Plz throw your own ideas
2006 Nov 29 4:20 AM
Hi Frnds ,
The Problem has been sorted out .
I Put a statement
Wait up to 2 Seconds .
In BAPI_REQUISITION_RESET and BAPI_PR_CHANGE and it is working fine
Thankx For all.
Shirish
2006 Nov 28 2:06 PM
When running programs in debug mode. Commit Works are executed. I suspect this is your problem. You are not doing a commit work after the BAPI calls.
2006 Nov 28 2:07 PM
It is not strange.
in Debug mode Automatically COMMIT WORK triggers, so you are getting desired results. But in case of with out Debugging Direct run No Commit work.
if you want the same results then you have to Test it using Test Sequence.
from menu Create the Test Sequence
add your BAPI , and then BAPI_TRANSACTION_COMMIT and then test it and see.
Regards
vijay
2006 Nov 28 2:12 PM
try like this
GOto - SE37 -> Function module -> TEst --> Test Function module
2012 Dec 03 5:35 PM
Hi guys,
I'm sorry to say this but I think that you are all wrong, actually, and the original poster is right.
I'm sharing this because I don't want to forget about this in the future and search for it again.
So, in fact the problem is when you reset a release status for a Purchase Requisition and you want to reset the previous release status immediately after, using either BAPI_REQUISITION_RESET_RELEASE or BAPI_REQUISITION_RESET_REL_GEN. The problem is the following line of code:
CALL FUNCTION 'ME_UPDATE_REQUISITION_RELEASE' IN UPDATE TASK
So, the update to the database is made in update task... Which means... I think... you just have to wait...
Cheers!
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |