2009 Jun 02 10:39 AM
Dear All ,
I have implemented one User Exit in the transaction JK02. In that I have written a code to send a mail whenever a perticular field is changed in that transaction.
My requirement is that mail sending process should only be tiggered if user is changing the field manually by going to transaction. But that process is also getting triggered whenever that transaction is recorded in BDC and when that BDC is run. I want to prevent it.
Please suggest.
Regards,
Nikhil
2009 Jun 02 10:42 AM
Hi
Check like this:
If SY-TCODE = ' JK02'.
Trigger u r logic.
ENDif.
Dear All ,
I have implemented one User Exit in the transaction JK02. In that I have written a code to send a mail whenever a perticular field is changed in that transaction.
My requirement is that mail sending process should only be tiggered if user is changing the field manually by going to transaction. But that process is also getting triggered whenever that transaction is recorded in BDC and when that BDC is run. I want to prevent it.
Please suggest.
Regards,
Nikhil
2009 Jun 02 10:42 AM
Hi
Check like this:
If SY-TCODE = ' JK02'.
Trigger u r logic.
ENDif.
2009 Jun 02 10:49 AM
I tried using the same.
When BDC is execusting the value in Sy-Tcode is JK02. So I cannot follow this logic.
Regards,
Nikhil
2009 Jun 02 11:01 AM
Hi Nikhil Joshi,
This is System field will hold the 'X' if its running under BDC / LSMW.
SYST-BINPT (Program Running Under Batch Input)
So.. your logic should be like..
IF SY-TCODE = 'JK02' and SYST-BINPT NE 'X'.
" Your Logic here
ENDIF.Regards,
Suneel G.
2009 Jun 02 11:29 AM
2009 Jun 02 10:42 AM
You can use the system variable sy-batch for value 'X'...because i believe that you will be running the BDC programs in background....while when in foreground sy-batch will have value 'space'.
May be you may get much better answer.
2009 Jun 02 10:50 AM
Dear Nikhil,
Even when you re using BDC the user exit will be hit. I mean your logic will be fired.
as you use call transaction 'JK02' .
But then you can use a combination of
if sy-tcode = 'JK02' and sy-batch ne 'X '.
your logic.
endif.
Regards,
Sai
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |