MODULE AT EXIT-COMMAND not triggered
Hi,
I have placed module USER_COMMAND_9000 at exit-command in PAI but it will never be called whenever I click on button Entr, Back, Exit and Canc. I have activated the interface and everything else, also set the function key. Below is my code.
PROCESS BEFORE OUTPUT.
MODULE STATUS_9000.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_9000 AT EXIT-COMMAND.
MODULE STATUS_9000 OUTPUT.
SET PF-STATUS 'STATUS_9000'.
SET TITLEBAR 'TITLE_9000'.
ENDMODULE. " STATUS_9000 OUTPUT
MODULE USER_COMMAND_9000 INPUT.
CASE sy-ucomm.
WHEN 'ENTR'.
PERFORM populate_output.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANC'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_9000 INPUT
Hi,
Do the following.
In the screen flow logic.
PROCESS BEFORE OUTPUT.
MODULE STATUS_1000.
PROCESS AFTER INPUT.
MODULE exit AT EXIT-COMMAND.
MODULE USER_COMMAND_1000.
Now in F01,
MODULE exit INPUT.
CASE sy-ucomm.
WHEN 'ENTR'.
PERFORM populate_output.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANC'.
LEAVE TO SCREEN 0.
ENDCASE.
endmodule. " exit INPUT
Thanks,
Sri.
Similar Messages
-
Hi experts.
I am working on At Exit command and in my screen i have field validation and i have coded AT EXIT COMMAND in my PAI to execute when we exiting BACK/CANCEL/EXIT. I have taken Function type as "E' in GUI. but too i am not able to exit without field validation and when i debug the control is not coming to At exit Module. plz help me on this..
waiting for your suggestions.
MaheshHi Mahesh,
Please try following code.
PROCESS AFTER INPUT.
MODULE leave_dynpro AT EXIT-COMMAND.
CHAIN.
FIELD v_lifnr.
FIELD wv_ebeln.
MODULE check_ebeln ON CHAIN-REQUEST.
ENDCHAIN.
FIELD v_lifnr MODULE check_lifnr ON REQUEST.
CHAIN.
FIELD wv_lfsnr.
MODULE validate_delivery_no ON CHAIN-REQUEST.
ENDCHAIN.
MODULE user_command_0100.
PROCESS ON VALUE-REQUEST.
FIELD wv_lfsnr MODULE f4_vbeln.
*& Module LEAVE_DYNPRO INPUT
text
MODULE leave_dynpro INPUT.
PERFORM leave_dynpro.
ENDMODULE. " LEAVE_DYNPRO INPUT
Regards,
Anil -
Hi,
Inside this module I have logic for ok_code
WHEN 'EXIT'.
perform pop_up.
form pop_up.
function module: do you want to save the changes?
if yes.
" perform save_changes.
" leave program
for msave_changes.
perform incompletion_logic.
" save changes
endform.
when iam doing this I have error messages for incompletion inside the incompletion_logic routine.
and when i issue an error message
iam getting short dump saying 'error message inside module atexit command' invalid dynpro state'.
what is the correct process to do this.
ThanksLike the system message, you cannot throw a error message inside the AT_EXIT module.
You can call that module, in the PAI (Not at AT-EXIT command) and call the popup and do the required validations.
Regards,
Ravi
Note :Please mark the helpful answers -
User Exit RV60AFZZ not Triggered When Processing IDOC
Hi,
I'm writing to seek some advice on why is the user exit RV60AFZZ not getting triggered when I do a vf01 bdc inside my inbouund IDOC function module. But when I try SHDB the user exit is getting triggered normally.
Thanks,
MawiHi,
Yes I'm creating invoice using delivery orders, inside the idoc function module I'm using bdc call transaction vf01 but somehow it does not trigger the user exit.
But when I do manual vf01 in sap, the user exit is getting triggered.
I cant figure out why this is the behavior of sap.
Regards,
Mawi -
Xorg: module "glx" and commands not found???
Hello, all.
I'm fairly new to Linux but I'm not a total noob. I have FC6 on my laptop and am currently trying to get a GUI working for Arch on my desktop.
I pacman-ed hwd, and ran it to create a Xorg.conf, and upon running it I get the following errors:
(EE) Failed to load module "glx" (module does not exist, 0)
/etc/X11/xinit/xinitrc: line 28: twm: command not found
/etc/X11/xinit/xinitrc: line 29: xclock: command not found
/etc/X11/xinit/xinitrc: line 30: xterm: command not found
/etc/X11/xinit/xinitrc: line 31: xterm: command not found
/etc/X11/xinit/xinitrc: line 32: exec: xterm: not found
waiting for X server to shut down FreeFontPath: FPE "/usr/share/fonts/misc:unscaled" refcount is 2, should be 1; fixing.
The last comment it makes I know isn't critical, so I'm not worried about that. But I need help with the "glx" part and the commands not found.
Thanks in advance.Did you installed libgl-dri? If not install it, and it will fix glx problems.
For the command not found, you need to create a ~/.xinitrc file. Before, you'll need to install the WM/DE that you want to use.
There is a sample file in the wiki: http://wiki.archlinux.org/index.php/Sta … ents_HOWTO -
User Exit EXIT_SAPMQEVA_003 Not Triggered
Dear All,
i am using EXIT_SAPMQEVA_003 to change Next inspection Date but this is not trigered in any Transaction of QM.
Pl kindly give solution ASAP.
Thanks and Regards,
NavinHi,
This EXIT is triggered only for 09 type of inspection lot (recuring inspection).
In Form WIEDERKEHRENDE_PRUEFUNG , is line with check qals-herkunft eq hk_wiederkehr.
qals-herkunft -> insp. lot origin
hk_wiederkehr is declaration with initial value 09
HK_WIEDERKEHR
LIKE QALS-HERKUNFT
VALUE '09',
For other insp. lot origin, You have to use other EXITS.
Hope this helps... -
For a PO with item catagory S user exit was not triggering
HI SDN,
I wrote a code for invoicing plan in EXIT_SAPLMRMP_001 for block the payment with INVOICE VERIFICATION block .
it is working fine for a PO with item catagory Blank
and not working for item catagory S.
please suggest me is there any solution for this?y
-
ESS CATS user exit not triggered
Hi,
I am making some validations on the time sheet using enhancement cats0006, but that user exit is not triggered in the portal, in ESS.
I have my project activated through tr. CMOD, the user exit is triggered in R/3 using transaction CAT2.
What could be the reason ?
Thanks,
Stefan
Edited by: Stefan Kolev on Jan 24, 2012 10:51 AMSolved
-
Custom Exit Button not working..looks for required input field on screen?
I defined this EXIT button as type E in Menu Painter.
I am using "MODULE At EXIT-COMMAND" in my PAI.
SAP message still asks for the required input field when I select the function EXIT button?
The logic still will not break into the At EXIT-COMMAND of my PAI?
Thank-You.Hi
Have you assigned variable OK_CODE in the list of screen element?
IF NOT zin_railid is initial.
LEAVE TO SCREEN 0100.
ENDIF.
Which is the sense to create a button for exit-command and doesn't allow the exit if the input field is empty?
In SE41 I entered "Back" over the back button, "EXIT" over the exit button, and "CANCEL" over the cancel button.
I selected each one, and got a popup to enter "E" for each type. As I said they appear, but do nothing?
Did I need to set a status for these?
No you don't, it's only important to define a functional having the attribute for EXIT-COMMAND
Max
Max
Edited by: max bianchi on Nov 5, 2010 6:31 PM -
Data transport at PAI for EXIT-COMMAND
Hi,
I'm using module AT EXIT-COMMAND in my dynpro flow logic. As far as I know, data transport doesn't occur when function code of type 'E' is triggered,except for OK code. But I need all the dynpro fields to be transported even for 'E' type function, since I have implemented buttons 'Back', 'Exit', and 'Cancel' as 'E' type function, and I need to propose the save data to the user before exit. Thus, I need the dynpro fields to populate ABAP fields so I can save them. Is there any way how to do this?
Thanks in advance.
Best regards,
TomasHi Tomas,
even you can write your own logic Field validation ...
process after input.
Chain.
* << write your Own logic
endchain.
you can write your own logic at at AT EXIT-COMMAND ...
module user_command_0200 input.
* << write your Own logic
case ok.
*------Leave screen
when 'BACK'.
leave to screen 100.
*------Leave transaction
when 'EXIT'.
leave program.
*------Select sales item details
When Others.
endcase.
or you can write own logic at ..
process after input.
module user_command_0200.
module user_command_0200 input.
case ok.
*------Leave screen
when 'BACK'.
leave to screen 100.
*------Leave transaction
when 'EXIT'.
leave program.
*------Select sales item details
when 'OTHERS'.
* << "Write your own logic
endcase.
ENDmodule.
Regards,
Prabhudas -
LT09 - Transfer Order User Exit is not getting trigerred though its active
Hi,
I am trying to assign the enhancement : MWMTO001
( Enhancements for end of transfer order generation )
which contains the user exit component : EXIT_SAPLL03T_001
I have created a project in CMOD and assigned the enhancement.
When I execute the TCode LT09 for transfer order, I noticed that this exit is not getting trigerred ...
I need to call a smartform whenever we save the data in the T-code LT09.
Am i using a wrong Exit ? Please help me to find out why this exit is not getting triggered though its activated ....
Thanking you in advance..
Nagasubramanyam.Hi
Thank you for reply.
According to 1st scenario prgm is activated & also activated enhancement in CMOD.
According to 2nd scenario, can u suggest how to find out the correct exit...
Actually I written a print prgm in include of EXIT_SAPLL03T_001 & designed SMARTFORM for that...
if I do process thru LT09 transaction & save that SMARTFORM should be triggered which is not happening...I put break points & tried but the exit is not triggering.
pls suggest how to find out the correct exit of LT09 .
Thanks&Regards
NagaSubramanyam. -
To perform database update in a module with AT EXIT-COMMAND addition
Dear All,
I have a function code 'EXIT' with function type 'E'. When this function code is triggered, my screen should close.
In the module that handles this function code (defined with AT EXIT-COMMAND addition), I will prompt the user whether he/she want's to save the data before exiting with the POPUP_TO_CONFIRM_STEP function module. The text message in the dialog box is "Do you want to save before exiting?".
When the user wants to save the data, a simple UPDATE statement will be executed to write the data on screen to database.
The problem here is since the module is defined with AT EXIT-COMMAND addition, the data on screen won't be copied to their corresponding variable on the code (correct me if I'm wrong). Therefore, even though database update is performed, the data written to database are no different that the original.
How to perform database update in a module with AT EXIT-COMMAND addition?
or
Is it even a "custom" or a "good practice" to prompt user to save data before exiting?
Thanks in advance,
HarisWith an exit command, if there's anything that would be lost, I would prompt "Data will be lost, do you wish to continue?". If they do, the database is not updated, if they don't, they stay in the transaction.
This is because the exit command runs before validation. So how can you know the data is correct?
If you have a button to leave the transaction that isn't an exit command, then you could prompt to save instead. There the choices should be - quit without saving, save and quit, don't quit.
Doing a database update in an exit command is not a good idea.
matt
Edited by: Matt on Mar 15, 2011 11:53 AM -
Table T063O and the PAI delcare "MODULE paimodule AT EXIT-COMMAND.
I have never declared a PAI module with the addition AT EXIT-COMMAND .
And I never hope to have to do so.
But if you want EXIT_SAPLIE01_007 to fire in MB02 like it fires in MIGO, you're gonna have to learn all about the "AT EXIT-COMMAND addition".
And then, you're gonna have to learn about table T063O.
And then, you're gonna have to try and remember who your IM configurator was or is.
Reminds me of the old old big blue joke:
"It's 10pm - do you know where your JCL is?".
Anyway, do you think the "AT EXIT-COMMAND addition to PAI module declares is worth a blog? If so, then I've got two blogs stored up that I can post in the future, because Gareth has already said that the *tablename blog is worth posting.
djhHi Rich -
Yes - that's why I gave the flow of control through the various modules.
You can't get to the user exit call in the lowest module UNLESS you type in a character string starting with "E" in the tcode/fcode box at the top of the screen (it doesn't have to be just an "E" - it can be any character string starting with E.)
But note that the reason for T063O is to place a little more security on this process in the case of the various MB02 screens that have this feature. The "E-initial" string that you type in to the tcode/fcode box has to be "pre-registered" in T063O - otherwise you get a message saying "Function Exxx not supported here" (this is done by the second module down in the flow of control.)
I can see why SAP did this - if it didn't have some control at the config level, then any consultant could "backdoor" an exit into MBO2 or MB03 and take home some really private data. I also suspect this is why you can't maintain T063O in SM30 - it's probably a config function - I haven't ascertained this yet for sure.
Finally, the only reason I happened to discover what SAP was up to here is because I couldn't figure out why the same exit that's been working fine in MIGO didn't work at all in MB02 - it wasn't even called. And to figure this out I had to trace the flow of control backwards until I discovered the "E-string" logic and the "T0630" pre-registration logic in the top two PAI modules.
So that's why SAP's use of this feature was a big surprise to me too - I also have never seen it and I've studied a fair amount of SAP standard code looking for exits and BADI interrupts.
Best
djh -
MODULE USER_COMMAND_0200 AT EXIT-COMMAND.
Hi Experts,
I knew that the following statements allows user to by pass all the screen validations, so to achieve this we have to declare a function code in SET PF-STATUS of type Exit Command. So, my doubts r,
1- Anyway, we r adding the AT EXIT-COMMAND as a suffix to to Module statement, so again What is the necessity declaring in the SET PF-STATUS as a function code?
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0200 AT EXIT-COMMAND.
2- What else wuld do the above statement apart from overcoming the validations(coz the author has mentioned this statement - ''An Exit-command allows you to insert functionality into the PAI that by passes all screen validation '', Which is I dont understand!)?
ThanQ.hi Srinivas,
Let us consider the following example:
If a user wants to exit a screen, by clicking the BACK button, he should be taken out ..right?
Instead, should there be a message poping up saying "Mandatory fields are not entered".. or "enter character data in name field"...ect..?
no...hence, to ignore these validation, we put the code to exit the screen in a module. This module has to be defined with ...AT EXIT-COMMAND extension.
Hope this answers your question.
Sajan Joseph. -
Hi all,
While I am using MODULE EXIT AT EXIT-COMMAND
its not working properly in module pool in PAI for the main screen.
code tht i m using for it is as follows.
DATA : l_ans TYPE c.
CLEAR ok_code.
*ok_code = sy-ucomm.
CASE ok_code.
WHEN 'BACK' OR 'CANCEL' OR 'EXIT'.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
text_question = 'Would you like to Quit ?'(004)
text_button_1 = 'Yes'(005)
text_button_2 = 'No'(006)
IMPORTING
answer = l_ans
EXCEPTIONS
text_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CHECK l_ans = '1'.
LEAVE PROGRAM.Hello Amit,
Please check whether you have assigned Exit Command Type to your buttons or not; in order to do that, go to the specific screen->PF-Status->Choose any standard button(you have assigned)->double-click->Set FUNCTIONAL TYPE.
E Exit Command (MODULE xxx AT EXIT-COMMAND)
S System Function
T Call a Transaction
Normal Application Function
P Local GUI Functions
H Internal Use
Moreover, Module set for this exit-command with screen, should be;
In PAI;
MODULE exit_scr100 AT EXIT-COMMAND.
MODULE exit_scr100 INPUT.
CASE ok_code.
WHEN 'CANCEL'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE. " CASE OK_CODE
ENDMODULE.
We use AT EXIT-COMMAND, when we want to cancel out the screen or exit the screen, despite errors. Otherwise, screen would hang-up asking for correcting errors.
Hope it helps you,
Zahack.
Maybe you are looking for
-
Left outer join issue, please help
Hi All, My oracle DB : 10G I have 3 tables: 1) w_orders_fs 2) w_product_d 3) w_order_f (Below are the scripts for creating these 3 tables along with data) I have a sql which : select o_fs.invoice_number , o_fs.product_id o_fs_product_id
-
How do I convert my iPod Nano from Windows to Mini Mac?
I got an iPod Nano a few months ago. I have been doing pretty well with it... My husband just bought me a mini Mac and I want to convert it to be used on the mini Mac instead of my laptop. I have my music on a USB hard drive, so I know how to import.
-
I just tried to update Itunes. Something went wrong with the update and now itunes won't open
I was notified of an update to itunes when I opened it on my PC this morning. I agreed to the update. The update did not finish and now I can't open itunes on the PC. I tried "repair" in the control panel to no avail. HELP!!
-
How to generate a single Journal Entry for multiple Payments
Hi All When creating a payment batch with 2 notes for example, would be possible in the accounting GL batch summarize only the line of Cash? Thanks
-
MENU NOT FOUND [ 66000-27] in Manage Crystal Report
Hi All, I had installed crystal report add-on in my SAP Business One System but when I am going to Adminstration > Crystal Report Administration > Manage Crystal Report, I am getting the following error as - MENU NOT FOUND 66000-27. Please note that