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: 

Commit Work in Dialog Programs

Former Member
0 Kudos

Dear Gurus ,

I have an ALV that has a Hotspot click . This hotspot click runs a a dialog program that i have create .

In this dialog program i send an email and the problem is when i send it i say Commit_work .

After the Commit_work the program leaves the dialog and goes back to ALV.

I found that the problem is the Commit_work but i cant find the solution .

Do you have any idea ???

1 ACCEPTED SOLUTION

nabheetscn
Active Contributor
0 Kudos

Can you please paste your code here how are you calling the module pool program if is via function module etc it will return to original screen else if uit call tcode or something it should not.

6 REPLIES 6

raymond_giuseppi
Active Contributor
0 Kudos

This is standard behavior, the commit-work will raise the event TRANSACTION_FINISHED of a system class, read some documentation like [COMMIT WORK|http://help.sap.com/abapdocu_70/en/ABAPCOMMIT.htm] - how did you call the dialog, via a call transaction or via a FM call ?

Regards,

Raymond

0 Kudos

I have created a small batch input because i have to "hit" a button in the dialog program to go to a certain point .

0 Kudos

In a program executed using batch input, or if you have called the program using the USING addition of the statement CALL TRANSACTION, COMMIT WORK terminates the batch input processing when using the corresponding settings.

So batch-input will terminate as soon as the commit-work will trigger.

Regards,

Raymond

nabheetscn
Active Contributor
0 Kudos

Can you please paste your code here how are you calling the module pool program if is via function module etc it will return to original screen else if uit call tcode or something it should not.

0 Kudos

This is the code how i call tha dialog thru ALV ...

DATA:   MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
  PERFORM BDC_DYNPRO      USING 'YDP_PROJECTS'    '0100'.

  PERFORM BDC_FIELD       USING 'BDC_OKCODE'  'SEARCH'.         "


  PERFORM BDC_FIELD      USING 'BDC_CURSOR' 'W_BUKRS'.
  PERFORM BDC_FIELD       USING 'W_BUKRS'  ITAB-BUKRS.

  PERFORM BDC_FIELD      USING 'BDC_CURSOR' 'W_COMPL'.
  PERFORM BDC_FIELD       USING 'W_COMPL'  ITAB-PROJECT.

  CLEAR MESSTAB.
  CLEAR MESSTAB[].
  CALL TRANSACTION 'YPROJECTS'
  USING BDCDATA
  MODE  'E'                          "'A'  'E'
  UPDATE 'S'
  MESSAGES INTO MESSTAB.

  REFRESH BDCDATA .
  PERFORM REFRESH.

0 Kudos

Hi,

In transaction flow commit work is the last state and that is why it happens. In SDN please search for RACOMMIT in call transaction. This will solve your problem.

Keshav