02-22-2006 9:32 AM
Hi All,
I have a report for which the first line of Code is "call transaction trnx ' . and rest of the code to display ALV.
Now once i execute program , that transacation will run , now if the user doesnt enter any input and trigers Back button , the desired action is to exit from the program.
will sy-ucomm work , if so how do i catch the event.
The transactions are Standard Transaction which is similar to F-49.
Thanks in Advance
Kishore kumar Yerra.
02-22-2006 9:35 AM
Write Ur statements after
At user command event. (i.e. to handle the back button)
U can capturre sy-ucomm .
02-22-2006 10:00 AM
Hi kishore,
1. BDCMSGCOLL (BDC MEssages)
2. We can capture the messages
in call transaction.
3. Probably,
the transaction must be issuing
some message when BACK / EXIT button is pressed.
4. We can loop at the bdc messaages,
and detect the message type and description,
to know what the user has done.
5 Then accordingly we can take further action.
regards,
amit m.
02-22-2006 10:30 AM
Hi ,
we have tested with BDCMSGCOLL but that structure is empty .
or is there any system filed to check whether the transaction code is executed properly or not.
Thanks in Advance
Kishore Kumar Yerra.
02-22-2006 10:37 AM
hi
i am just sending an example. may b helpful
Example
DATA: BDCDATA TYPE TABLE OF BDCDATA.
DATA: ITAB TYPE TABLE OF BDCMSGCOLL.
DATA: PROGRAM LIKE SY-REPID,
WA_BDCDATA TYPE BDCDATA.
WA_BDCDATA-PROGRAM = 'SAPMS38M'.
WA_BDCDATA-DYNPRO = '0100'.
WA_BDCDATA-DYNBEGIN = 'X'.
APPEND WA_BDCDATA TO BDCDATA.
CLEAR WA_BDCDATA.
WA_BDCDATA-FNAM = 'RS38M-PROGRAMM'.
WA_BDCDATA-FVAL = PROGRAM.
APPEND WA_BDCDATA TO BDCDATA.
...
CALL TRANSACTION 'SE38' USING BDCDATA MODE 'N'
MESSAGES INTO ITAB.
Exceptions
Non-Catchable Exceptions
Cause: Transaction is a menu
Runtime Error: CALL_TRANSACTION_IS_MENU
Cause: Transaction is locked Runtime Error: CALL_TRANSACTION_LOCKED
Cause: Transaction is unknown
Runtime Error: CALL_TRANSACTION_NOT_FOUND
Cause: Recursion CALL TRANSACTION USING
Runtime Error: CALL_TRANSACTION_USING_NESTED
02-22-2006 10:29 AM
Hi,
Is it a Z program or a standard program.
regards,
Lakshmikanth.T.V