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,
Tomas

Hi 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

Similar Messages

  • New Data Transport Routine

    Hi,
    I am in the process of writing a new Data Transport Routine (RV60C702) for creating Billing documents (Maintain Copying Control for Billing Documents). I was informed that the new Routine's name (RV60C702) should be added in the Include 'RV60CNNN' and I was also informed that while transporting the new Routine (RV60C702) to the Production systems, I should add the Program 'RV80HGEN' also in a new transport which should be run in the Production system to include the new routine in the include 'RV60CNNN'.
    Could anyone please let me know how should I add the program 'RV80HGEN' in a new transport to make it run in the Production system.
    Could you please provide me some details on it.
    Thanks
    Priya

    Hi Naren,
    Thanks for the quick help!
    One more basic question. Can I add this Program in the same transport & in the same task which has the new routine or should this program be added to a new transport?
    Thanks..
    Priya

  • 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.
    djh

    Hi 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

  • When I try to disable cellular data in the settings for my apps it will toggle fine, but once I exit and go back in to the cellular settings its back on again all by itself.

    I have had a problem with my iphone 4s for some time now but I have just been so busy to try and fix it. When I try to disable cellular data in the settings for my apps it will toggle fine, but once I exit and go back in to the cellular settings its back on again all by itself. However, even though it says the data is on, I can’t use the data when I don’t have wifi. I tried restoring my phone a few times and the last time I did that, it wouldn’t turn my service on so I had to talk with a Verizon agent for a long time trying to fix it and finally they simply sent me another phone. I thought hey new phone, this part will be fixed. However, I got my service to work but it’s still the same problem with the cellular data. I have just left it alone and not worried about it, but it’s still not fixed and thought I could ask on here if anyone had any ideas. It has something to do with the apps actually installed on the iphone. Apps like the mail, safari, settings, itunes apps, etc. All my other apps turn on and off just fine. Does anyone have any ideas?

    Read the User's Guide... it covers how to backup and sync the device as designed.

  • How to capture data at exit command in module pool

    hello all,
    i have a scenario,on screen i enter some data and i press the cancel button a popup should be displayed saying do you want to cancel.if i press on yes then leave to screen 0.but if i press no then the previous data entered should be displayed on the same screen.
    can some body help me on this.
    Thanks,
    Mayank.....

    Hi,
    Create a button with type 'E' and
    call a POP UP FM 'POPUP_TO_CONFIRM' and write the code to return to the place where you want to.
    All the you need to write at at exit command.
    The code is like this:
    REPORT  ztest_at_exit.
    DATA:
      var1(10),
      var2(10),
      var3(10).
    CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'ZTEST_AT_EXIT'.
      SET TITLEBAR 'ZTEST_AT_EXIT'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      DATA:
        w_ucomm LIKE sy-ucomm.
      w_ucomm = sy-ucomm.
      CASE w_ucomm.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN 'CANCEL'.
          LEAVE TO SCREEN 0.
        WHEN 'ADD'.
          var3 = var1 + var2.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  EXIT_100  INPUT
          text
    MODULE exit_100 INPUT.
      DATA:
        answer.
      w_ucomm = sy-ucomm.
      CASE w_ucomm.
        WHEN 'EXIT2'.
          CALL FUNCTION 'POPUP_TO_CONFIRM'
            EXPORTING
              text_question = 'Do you want to save this ?'
            IMPORTING
              answer        = answer.
              exception
                   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.
            IF NOT answer EQ '1'.
              LEAVE TO SCREEN 0.
            ENDIF.
          ENDIF.
      ENDCASE.
    ENDMODULE.                 " EXIT_100  INPUT
    Regards,
    Rama Chary.P.

  • System asking me to fill MANDATORY fields, even I used EXIT-COMMAND for F3

    HI Experts,
    issue- there is mandatory field in the screen, so, am using the folllowing code, system asking me to fillup the mandatory field.
    then, i used exit-command, but, still its asking me to fill the mandatory fiels???????????
    code is,
    process after input.
    ***Exit command
    module cancel at exit-command.
    module cancel.
    module user_command_9001.
    module cancel input.
    case: ok_code.
    when wa_con_back.
    clear ok_code.
    set screen 0.
    leave screen.
    when wa_con_exit.
    clear ok_code.
    set screen 0.
    leave screen.
    endcase.
    endmodule. " cancel INPUT
    thanq

    I am not sure but try making a specific module for your exit handling, for instance:
    module do_exit at exit-command.
    module cancel
    module user_command_9001.
    Hope it helps you,
    Bert

  • I went to apple store sat 2.4 and was told that to get verizon not to charge me for the next cycle i should cancel the service .i lost my data that i pais

    i went to apple store sat 2.4 and was told that to get verizon not to charge me for the next cycle i should cancel the service .i lost my data that i paid for on 2.1.how do i restore my service that i paid for

    Go back to the store and discuss this with the person that gave you the advice.

  • Module exit at exit-command

    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.

  • Wht is EXIT-COMAND in module cancel at exit-command.?

    HI Experts,
    curious to know that,
    code is,
    process after input.
    ***Exit command
      module cancel at exit-command.
    module cancel.
      module user_command_9001.
    module cancel input.
    case: ok_code.
        when wa_con_back.
          clear ok_code.
          set screen 0.
          leave screen.
        when wa_con_exit.
          clear ok_code.
          set screen 0.
          leave screen.
      endcase.
    endmodule.                 " cancel  INPUT
    thanq

    hi check this...
    Calling a Module for Type E Function Codes
    When the user chooses a function with type E, the screen flow logic jumps directly to the following statement:
    MODULE mod AT EXIT-COMMAND.
    Regardless of where it occurs in the screen flow logic, this statement is executed immediately, and before the automatic checks for the field contents on the screen. Before the module mod is executed, only the contents of the OK code field are transported to the ABAP field with the same name. However, no other screen fields are transported. If you have more than one MODULE statement with the AT EXIT-COMMANDaddition, only the first is executed. If there are no MODULE statements with the AT EXIT-COMMAND statement, normal PAI processing resumes.
    If the user chooses a function whose function code does not have type E, the MODULE <mod> AT EXIT-COMMAND statement is not executed.
    regards,
    venkat.

  • Using AT-EXIT command

    hi
    can any one tell me about AT- EXIT COMMAND
    i know that it will provide exit options for the fuctions of type 'E'
    if any others apart from this will be helpfull.
    vamsi

    <b>MODULE </b>
    Syntax
    MODULE mod [ <b>AT {EXIT-COMMAND</b>|CURSOR-SELECTION} ]
               [ ON {CHAIN-INPUT|CHAIN-REQUEST} ].
    <b>... AT EXIT-COMMAND </b>
    <b>Effect </b>
    Addition AT EXIT-COMMAND at the event PAI causes module mod to be called exactly if:
    The function used to trigger event PAI has function type "E"
    Into the input field of the standard toolbar, the user entered a character string starting with "E" and confirmed it using ENTER.
    The dialog module is called before the automatic input checks defined in the system or in the ABAP Dictionary and independent of its position in the event block. The only screen field transported to the ABAP program is the OK field. If the function that triggered the PAI event does not fulfill any of the above prerequisites, the MODULE statement is not executed.
    If several MODULE statements have the AT EXIT COMMAND addition, only the first one is executed. If no MODULE statement has the addition AT EXIT COMMAND, a normal PAI processing is executed: The predefined input checks are executed and then the PAI event block is processed sequentially. Provided the screen processing is not terminated in the dialog module mod, after the return from the dialog module, the complete PAI processing is executed. You must not use the addition AT EXIT COMMAND in connection with the statement FIELD.
    Note
    The function type of a function is determined in the Screen Painter or Menu Painter. Usually those functions of the user interface are defined with function type "E" that are assigned to the icons Back, Exit and Cancel in the standard toolbar of the GUI status. Therefore, the called dialog module should terminate the screen processing and allow security checks, if required.
    Regards,
    Pavan

  • Master Data Services Add-in for Excel Issue

    I am trying to configure MDS in the Production server. I am running into isssues.
    (I was able to do the whole process successfuly in my local system - Versions are same in the local and server - Only difference is local machine is windows 7 server is Windows 2008 R2)
    I have installed SQL server 2012 Enterprise Version SP1. I am able to browse the MDS URL. User has got full permissions. When I try to access the MDS via Excel I get the below error.
    Can any one help me please I have spent days on this withou any joy.
    Error message
    TITLE: Master Data Services Add-in for Excel
    An error occurred while receiving the HTTP response to
    http://MYIPADDRESS/mds/service/service.svc/bhb. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See
    server logs for more details.
    ADDITIONAL INFORMATION:
    The underlying connection was closed: An unexpected error occurred on a receive. (System)
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. (System)
    An existing connection was forcibly closed by the remote host (System)
    BUTTONS:
    OK
    Bn

    I have finally found a solution for this problem!  Every time I opened Excel (unless I ran as administrator) I would have to activate the MDS add-in; this was time-consuming and annoying. It seems like there was no solution posted online anywhere! Well
    after much aggravation, I have finally found a solution:
    Fixing the Microsoft MDS Excel Add-In so it Stays Enabled
    Press the Start button (Windows button)
    In the search bar type “REGEDIT”
    Open regedit.exe
    A pop-up will ask permission for the Registry Editor to make changes to the computer, select Yes.
    In the Registry Editor expand HKEY_CURRENT_USER
    In the HKEY_CURRENT_USER folder, expand in the following order:  Software -> Microsoft -> Office -> Excel -> Addins
        Select Microsoft.MasterDataServices.ExcelAddIn
    Double-click on LoadBehavior in the right panel
        In the Edit Value popup, change the value to 
    Press OK
    Exit the Registry Editor
    The excel add-in should now be active anytime you open Excel. If multiple errors occur while using the add-in, the Load Behavior may change back to 0.  If that occurs simply follow these steps so the add-in will be active when Excel starts up.
    I hope this helps some of you avoid the long hours of trying to find a solution to this silly problem.
    Cheers!
    Tony

  • 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.

  • At Exit-command  not working

    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.
    Mahesh

    Hi 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

  • What is AT Exit-Command in MPP

    Hi all
    What is AT Exit-Command in MPP...

    Hi rohini,
    The statement associated with at exit command is :
    MODULE <module_name> AT EXIT-COMMAND.
    Addition AT EXIT-COMMAND at the event PAI causes module <module_name> to be called exactly as if:
    a)The function used to trigger event PAI has function type "E"
    b )Into the input field of the standard toolbar, the user entered a character string starting with "E" and confirmed it using ENTER.
    The dialog module is called before the automatic input checks defined in the system or in the ABAP Dictionary and independent of its position in the event block. The only screen field transported to the ABAP program is the OK field. If the function that triggered the PAI event does not fulfill any of the above prerequisites, the MODULE statement is not executed.
    If several MODULE statements have the AT EXIT COMMAND addition, only the first one is executed. If no MODULE statement has the addition AT EXIT COMMAND, a normal PAI processing is executed: The predefined input checks are executed and then the PAI event block is processed sequentially. Provided the screen processing is not terminated in the dialog module mod, after the return from the dialog module, the complete PAI processing is executed. You must not use the addition AT EXIT COMMAND in connection with the statement FIELD.
    The function type of a function is determined in the Screen Painter or Menu Painter. Usually those functions of the user interface are defined with function type "E" that are assigned to the icons Back, Exit and Cancel in the standard toolbar of the GUI status. Therefore, the called dialog module should terminate the screen processing and allow security checks, if required.
    If you are talking about the on exit-command in report programming,
    then the statement associated with it is
    at selection-screen on exit-command.
    Effect
    This event is triggered if the user has called one of the functions Back, Exit or Cancel. In the event block, possible clean-up actions can be executed.

  • EXIT-COMMAND in BADI

    Hi All,
    I am working with BADI ME_GUI_PO_CUST. I implemented a customer screen for customer fields. Everything is working fine but problem is that on some conditions some fields become required. Now i want to avoid this check " Fill in entry in required fields ". Actually i create a button with function code 'E' and fill data in these fields with some given value(e.g. from warranty master i want to populate all data in these fields so i create a button with exit-command for this purpose). But when i press this button, it gives me meassage  " Fill in entry in required fields ". bcoz some fields are already required. I want to avoid this mesaage & fill all fields according to warranty master. When i press this button, it did not go in this screen so EXIT-COMMAND does not execute & it still gives me message " Fill in entry in required fields ".
    Anybody have idea how to work with EXIT-COMMAND in BADI or customer-exit?

    Hi
    Exit command is used to come out of any kind of loop like:
    loop...endloop or
    Do...enddo... or
    While...endwhile.
    You can use them in BADI or userexit.
    Regards,
    Sankar

Maybe you are looking for

  • Crystal report close button hangs the application

    Dear All, I am working on 2005 B PL 46. we have developed an application to open a particular crystal report when a button is pressed in AR Invoice form. this works fine and the data is loaded properly. The problem is, when I close this report, this

  • How to delete songs on itunes and hard drive at the same time?

    hi guys. i have been looking around the forum and simply couldnt find and answer to my problem. when i delete a song from my itunes library it only deletes the song on itunes, and not from my harddrive. all my songs is allready in the itunes media fo

  • How can I get credit in Mac App Store for software installed from CD?

    So I have purchased iLife '11 and iWork '09 disks.  I have had them installed on my MacBook Pro since 2010.  The Mac App Store has happily been updating the all the apps for as long as I can remember.  However, the MAS doesn't recognize the iLife and

  • Do SMP3.0 supports JSON based RESTful services exposed via JBOSS server??

    Hi All, We are working on a PoC for a customer to consume JSON based RESTful (exposed via JBOSS Server) service from SMP 3.0. We were not able to get the DataSet. the below are the steps which we performed and the respective result. 1) Created a SMP

  • USE OF AT LINE-SELECTION IN AN ALV_GRID REPORT

    Hi people, I am a learner in Abap. I have generated a report through 'REUSE_ALV_GRID_DISPLAY'. Now I want to display the additional records of the contents of the line which gets selected, help me to do that. any report code which does the same thing