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: 

call transaction and returns to program, but no data are saved

Raxph
Participant
0 Kudos
259

Hi all,

I am having one issue, when I use the call transaction and returns to program, but no data are saved. The code that I have written is as follows:

I have implemented a double click event in an ALV List, and the part where the call transaction is happening is:

SET PARAMETER ID 'MPL' FIELD lv_warpl.
          CALL TRANSACTION 'IP02'.
*         COMMIT WORK.
            LEAVE TO SCREEN '400'.

If I use the leave transaction, the data are saved, but it does not return back to my program. I also used the commit work, but the data are still not saved. Can anyone please help me with this issue?

Thanks,

R

3 REPLIES 3

Sandra_Rossi
Active Contributor
180

You say that the data is not saved, is it the data of your custom program, or the standard data that the user changes in IP02?

The second case is not linked to the custom program, if there's a problem with standard data, it's not related to your code.

In the first case, we can't help you because we don't know the rest of your code.

raymond_giuseppi
Active Contributor
0 Kudos
180

Most transactions use the WAIT option when they update data in their COMMIT statements, so you will have to wait for update tasks to be fully executed (and database buffer to be refreshed)

  • You could try to lock (and release) the relevant record with ENQUEUE/DEQUEUE FM with a WAIT option in a small DO/ENDDO loop.

touzik_itc
Active Participant
0 Kudos
180

If you get the expected result with LEAVE TO TRANSACTION, you could compare INSERT and UPDATE statements in ST05 traces for implementations with CALL and LEAVE TO find out a difference.