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

Similar Messages

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

  • Z97 GAMING 9 AC - PCIE and the wi-fi module no longer detecting

    Hi,
    I 'm Overclocking enthusiast and recently decided to take to my hometown in Brazil using a platform products from MSI, to make disclosure of benchmark tests in social networks and in gaming blogs.
        So i purchased a new system including the MSI Z97 GAMING 9 AC motherboard and MSI Gaming N770 TF 4GD5/OC GeForce GTX 770 4GB graphics card. After building the system I initially had problems with the graphics card not being detected and the wi-fi module (that hard to fit in the mobo) don't even appear in device manager. I already tried to dismount and remount the module on the motherboard with extreme care, no success. After some research I updated the bios to 1.5 and used the onboard graphics card to install windows 8.1, drivers etc. After windows, drivers etc were installed the graphics card and the wi-fi module still would not detect.
    I have tried another graphics card in this system and it does not seem to work either. In bios it just always says that the PCIE slots are 'empty'.
    So I have tried the following:
    1. Cleared CMOS.
    2. Updated BIOS.
    3. Updated Chipset, drivers etc.
    4. Tested the Graphics Card in other computers.
    5. Used a different graphics card in this system.
    6. Tried PCIE 2.0, 3.0 and auto.
    7. Completely reformated and started from scratch.
    So after many attempts I am disappointed with MSI and need some solution to my problem, since I saw that several customers who have purchased from MSI are the same product with exactly the same problem which possibly conclude that MSI has a duty to resolve these cases.
    Full Specs:
    •   EVGA SuperNOVA 1300G2 ATX12V/EPS12V 1300W 80Plus Gold Power Supply 120-G2-1300-XR
    •   Corsair Cooling Hydro Series H100i Liquid CPU Cooler - Extreme Performance CPU Cooling and Built-In
    •   Intel Core i7 4790 LGA1150 CPU 3.6Ghz
    •   Corsair Vengeance Pro 16GB 2x8GB DDR3
    •   2 x Kingston 120GB SSD 6Gbs
    •   Microsoft Windows 8.1 Pro 64bit OEM
    •   MSI Z97 Gaming 9 AC Motherboard
    •   MSI Gaming N770 TF 4GD5/OC GeForce GTX 770 4GB 256-Bit GDDR5 PCI Express 3.0 HDCP Ready SLI Support Video Card

    I have the exact same problem with my gaming 9 AC only the PCIe slot for gfx card worked initially. MSI support sent me a new WiFi adapter, it also didnt work. When I installed it, the PCIe slot would not identify my graphics card anymore. MSI support then advised me to return the board to the reseller, where it is now - they are checking it for defects before they do anything.
    Ill keep you updated how they proceed from here. If there are any more problems I will just ask my reseller to downgrade me to a gaming 7, I can add a pcie wifi card on my own, and avoid the hassle.

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

  • 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,
    Haris

    With 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

  • Getting the original values in table maintenance and the new one and send t

    Hello experts,
    In table maintenance, I need to capture the original values in that selected column/field and
    also the new one and send it to email. For example, I have a field in my z table named zaddress and whenever
    the user changes the contents of that selected row I need to get/fecth the original value and the new and send it to email.
    So the email will be something like this:
    Dear Admin,
    Changes were made to ztable. Here are the changes:
    Customer : Customer 1
    Order no : 1
    Original Address : example address A
    New Address : example address B
    NOTE: Do not reply to this email.
    Again, thank you guys and have a nice day!

    Hi Vijay,
    <b>1</b>.
    If u r using Modulepool programming to change the field contents ,u just capture field value into one  variable .This is possible in <b>PBO</b>.before displaying .once u change the field value and press something ,now capture changed value in another variable .This is possible in <b>PAI</b>.After pressing something to modify Database.
    I think u can get one idea after reading this .
    <b>2</b>.
    For sending mail it is not a problem.
    You can check the following code.
    *-------Mail related tables ,structures and variables
    DATA:
       w_subject       LIKE sodocchgi1,
       i_pack_list     LIKE sopcklsti1 OCCURS  1  WITH HEADER LINE,
       i_objhead       LIKE solisti1   OCCURS  1  WITH HEADER LINE,
       i_contents_text LIKE solisti1   OCCURS 10  WITH HEADER LINE,
       i_cont_bin      LIKE solisti1   OCCURS 10  WITH HEADER LINE,
       i_objhex        LIKE solix      OCCURS 10  WITH HEADER LINE,
       i_receiver      LIKE somlreci1  OCCURS  1  WITH HEADER LINE,
       i_listobject    LIKE abaplist   OCCURS  1  WITH HEADER LINE,
       pdf             LIKE tline      OCCURS 100 WITH HEADER LINE,
       content_out     LIKE solisti1   OCCURS 0 WITH HEADER LINE.
    DATA:
       tab_lines       TYPE i,
       doc_size        TYPE i,
       att_type        LIKE soodk-objtp,
       obj_desc        LIKE w_subject-obj_descr,
       sent_to_all     LIKE sonv-flag,
       client          LIKE tst01-dclient,
       name            LIKE tst01-dname,
       objtype         LIKE rststype-type,
       type            LIKE rststype-type,
       is_otf          TYPE c ,
       no_of_bytes     TYPE i,
       pdf_spoolid     LIKE tsp01-rqident,
       jobname         LIKE tbtcjob-jobname,
       jobcount        LIKE tbtcjob-jobcount,
       pn_begda        LIKE sy-datum,
       val(1)          TYPE c,
       pripar          TYPE pri_params,
       arcpar          TYPE arc_params,
       lay             TYPE pri_params-paart,
       lines           TYPE pri_params-linct,
       cols            TYPE pri_params-linsz,
       spool_name      TYPE pri_params-plist.
      CLEAR :w_subject,
             sent_to_all,
             i_pack_list[],
             i_objhead[],
             i_cont_bin[],
             i_contents_text[],
             i_receiver[].
      i_cont_bin = '  |  '.
      APPEND i_cont_bin.
    Subject of the mail.
      obj_desc  = 'Outstanding Appraisals' .
      w_subject-obj_name  = 'MAIL_ALI'.
      w_subject-obj_descr = obj_desc.
    Body of the mail
      DATA :head_desc LIKE i_contents_text,
            body_desc LIKE i_contents_text.
      i_contents_text = space.
      APPEND i_contents_text.
      CLEAR  i_contents_text.
      CONCATENATE
      'Please refer to the attached list of appraisal(s) that require your'
      'attention. Please log in to the eHR System and use the eAppraisal'
      'function to work on it.'
      INTO body_desc
      SEPARATED BY space.
      i_contents_text = body_desc.
      APPEND i_contents_text.
      CLEAR  i_contents_text.
      CLEAR body_desc.
      i_contents_text = 'Thank You.'.
      APPEND i_contents_text.
      CLEAR  i_contents_text.
      i_contents_text = space.
      APPEND i_contents_text.
      CLEAR  i_contents_text.
      CONCATENATE '(Note: This is system generated message, please'
                  'do not reply'
                  'to this Email.)'
               INTO i_contents_text
               SEPARATED BY space.
      APPEND i_contents_text.
      CLEAR  i_contents_text.
    Write Packing List (Body)
      DESCRIBE TABLE i_contents_text LINES tab_lines.
      READ     TABLE i_contents_text INDEX tab_lines.
      w_subject-doc_size = ( tab_lines - 1 ) * 255 + STRLEN(
      i_contents_text ).
      CLEAR i_pack_list-transf_bin.
      i_pack_list-head_start = 1.
      i_pack_list-head_num   = 0.
      i_pack_list-body_start = 1.
      i_pack_list-body_num   = tab_lines.
      i_pack_list-doc_type   = 'RAW'.
      APPEND i_pack_list.
      CLEAR  i_pack_list.
    Create receiver list
       i_receiver-receiver = g_email_next_man.
      i_receiver-rec_type = 'U'.
      APPEND i_receiver.
      CLEAR  i_receiver.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = w_subject
          put_in_outbox              = 'X'
          commit_work                = 'X'
        IMPORTING
          sent_to_all                = sent_to_all
        TABLES
          packing_list               = i_pack_list
          object_header              = i_objhead
          contents_bin               = i_cont_bin
          contents_txt               = i_contents_text
          receivers                  = i_receiver
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorization = 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 7
          OTHERS                     = 8.
      IF sy-subrc NE 0.
      ENDIF.
    I think it helps u something.
    <b>Thanks,
    Venkat.O</b>

  • When I mail merge a message that incudes a table with an excel spreadsheet, the table disappears and the data appears in list form

    I've tried both creating the table using Thunderbird, as well as creating the table in Word first and the problem is the same. I've reinstalled and updated both the mail merge add on and Thunderbird.

    If you do not need all the excel specific items you can just write it to a spreadsheet using the write to spreadsheet file vi's.
    If you want to go the excel route you will have to use active x. you can see a lot of examples on the excel board under the breakpoint forum. please post a sample of how you want your data to look and I can maybe help explain what options you have. and also oyu do not necesarily need the report generation toolkit.
    Joe.
    "NOTHING IS EVER EASY"

  • Module user_exit_102 at exit-command.

    hi
    in my dialog programming i am having a table control in which 8 colums are mandatory. if i want to exit from that screen it ask me to fill all the required field.with out filling those mandatory fields how to exit from that screen.
    please solve my issue.
    Thanks.

    Hi Rajiv,
    you can use the user exit USEREXIT_SAVE_DOCUMENT or USEREXIT_SAVE_DOCUMENT_PREPARE in the include MV45AFZZ(use se38 to access this) to do your validation
    All VBAP details are available in XVBAP
    and all VBAK details are available in XVBAK
    Reward if helpful
    Regards
    Byju

  • Data Pump .xlsx into a SQL Server Table and the whole 32-Bit, 64-Bit discussion

    First of all...I have a headache!
    Found LOTS of Google hits when trying to data pump a .xlsx File into a SQL Server Table. And the whole discussion of the Microsoft ACE 64-Bit Driver or the Microsoft Jet 32-Bit Driver.
    Specifically receiving this error...
    An OLE DB record is available.  Source: "Microsoft Office Access Database Engine"  Hresult: 0x80004005  Description: "External table is not in the expected format.".
    Error: 0xC020801C at Data Flow Task to Load Alere Coaching Enrolled, Excel Source [56]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Excel Connection Manager"
    failed with error code 0xC0202009.
    Strangely enough, if I simply data pump ONE .xlsx File into a SQL Server Table utilizing my SSIS Package, it seems to work fine. If instead I am trying to be pro-active and allowing for multiple .xlsx Files by using a Foreach Loop Container and a variable
    @[User::FileName], it's erroring out...but not really because it is indeed storing the rows onto the SQL Server Table. I did check all my Delay
    Why does this have to be sooooooo difficult???
    Can anyone help me out here in trying to set-up a SSIS Package in a rather constrictive environment to pump a .xlsx File into a SQL Server Table? What in God's name am I doing wrong? Or is all this a misnomer? But if it's working how do I disable the error
    so that is stops erroring out?

    Hi ITBobbyP,
    According to your description, when you import data of .xlsx file to SQL Server database, you got the error message.
    The error can be caused by the following reasons:
    The excel file is locked by other processes. Please kindly resave this file and name it to other file name to see if the issue will be fixed.
    The ACE(Access Database Engine) is not up to date as Vaibhav mentioned. Please download the latest ACE and install it from the link:
    https://www.microsoft.com/en-us/download/details.aspx?id=13255.
    The version of OFFICE and server bitness is not the same. To solve the problem, please refer to the following document:
    http://hrvoje.piasevoli.com/2010/09/01/importing-data-from-64-bit-excel-in-ssis/
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • How to display four rows in one table and the rest in another table?

    Hello everybody,
    I am trying to solve a problem that I cannot find any direct answers to.  In essence the problem goes like this:
    1) I want to populate two tables from xml data.
    2) The first table should only diplay the first four rows of data.
    3) The second table should display the rest of the rows (starting from row 5).
    I can create the first table so that it only shows up to the first four rows.
    I cannot find a way to set up the second table so that it shows the rest of the rows starting at row 5.
    To illustrate the problem I have attached my livecycle template file with the two table definitions and the corresponding xml data.  If you put these two files in the same directory and open the pdf file using LiveCycle designer you should see what I mean. (The table with column heading 'Item List 2' shows all of the records in the xml file when I only want it to show records 5 and 6)
    Some other niggling issue I have come up against is the data displays differently when I open the pdf file with Adobe Acrobat pro and then use the Forms/manage form data/import data menu to bind that xml file.  ( For some the 'Item List 2' table does not display any data)  Does anybody know why that is occurring?
    Any help on this would be very much appreciated because it will help me get past a significant issue I am running into with a complex form I am trying to build for a client of mine.
    Note:  I am using Adobe Acrobat Pro version 9 and the Adobe Livecycle is version 8.2.1
    Thanks in advance.
    Geoff.

    Hi,
    First solution is you can play with predicates:
    val value = 4
    var items= Ref(xfa.resolveNodes(concat("$record.itemsCollection.item.[itemNumber>""",value,"""]")))
    after that you will have to use addInstance and assign all fields by scripting. It is hard way.
    Second solution you can simply hide unneccessary rows by putting initialise script on item row:
    if (this.index <4){this.presence = "hidden" }
    Hope this helps.
    Paul Butenko

  • No page break between table header and first line of the table main area

    Hi all.
    I'm printing a form which contains a lot of tables. Sometimes while printing the table header line remains at the bootom of  the page and the lines of internal table are printed on the next page (also with header because i have marked 'at page break' in the header). How is it possible not to break header line of 'Table'-node and the first line of internal table?
    Regards, Nikolai.

    Hello Niki,
    try to use page protection......
    create a folder and place the text that r to be displayed without break.........
    and check the checkbox page protection.
    I think you cannot put an entire table in a folder & turn "Page Protection" on simultaneously.
    Any ideas?
    BR,
    Suhas

  • Tables in SD and the details

    Hi guys,
    I need your assistance to know the Table names and the corresponding keys for the following fields.
    We want to develop a report  that has the following fields(ABC) .
    The report needs the following details in an Inquiry(A) ,if a Quotation exist for the same  need the following Quotation detail(B) ,if Sales order Exist for the Quotation(C) ,need the Following Sales Doc. details.
    A.Inquiry details .Fileds needed
    1. Inquiry Date
    2.created by
    3.closing date/Due date
    4.Estimated Value
    5.Customer
    6.Material.
    B.Quotation.
    1.Quotation date
    2.Quotation Amount
    3.Created by
    4.Reason for Rejection/Status fo Quotation
    C.Sales Document
    1.Sales Order On.
    2.Amount.
    3.Status.
    4.good delivered date
    Regards.

    hi
    A.Inquiry details .Fileds needed
    1. Inquiry Date
    2.created by
    3.closing date/Due date
    4.Estimated Value
    5.Customer
    6.Material.
    B.Quotation.
    1.Quotation date
    2.Quotation Amount
    3.Created by
    4.Reason for Rejection/Status fo Quotation
    All ABove you can get in VBAP table
    C.Sales Document
    1.Sales Order On. - VBAK
    2.Amount. - VBAK / VBAP
    3.Status. What status you are looking for?
    4.good delivered date - VBEP

  • Table Name and Column name for Product Family Field under the Product Famil

    Hi,
    Please help me finding the table name and the column name for the 'Product Family' field and the 'Item' field under the Product families form. The navigation to this form is as follows:
    Material Planner Responsibility -> Setup -> Product Family
    Please help.
    Thanks,
    KM

    2 months ago, you asked a very similar question... and Markus gave you a good answer. His 2-months old answer still applies here.
    I recommend that you read it a again at Table name for backorder qty on sales order.
    When you have read his answer, please close both threads.

  • Help needed for report on tables vbak and vbap

    Hello,
    I needed help in one of my work issues, this is my first project and Iam still learning. kindly help.
    I was asked to take erdat,vbeln,posnr from selection screen and compare it with the data already in tables vbap,vbak. If the data
    already exists and exception needs to be raised saying that the 'data exists',but if the data is not present in the tables the
    tables have to be updated. This has to be done using function module only.
    Then I have to write a REPORT calling the above function module and finally displaying the number of records updated and the
    list of them.
    I have started writing a function module:
    FUNCTION z_tableupdate.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(DATE) LIKE  VBAK-ERDAT DEFAULT SY-DATUM
    *"     VALUE(SALESORDERNO) LIKE  VBAK-VBELN
    *"     VALUE(ITEMNO) LIKE  VBAP-POSNR
    *"  EXPORTING
    *"     VALUE(EX_VBAP) LIKE  VBAP STRUCTURE  VBAP
    *"     VALUE(SYS) LIKE  SY-SYSID
    *"     VALUE(EX_VBAK) LIKE  VBAK STRUCTURE  VBAK
    *"  EXCEPTIONS
    *"      DATA_UPDATED
    *"      DATA_EXISTS
      SELECT * FROM vbak INTO vbak_wa WHERE erdat = date
                                        AND vbeln = salesorderno.
      ENDSELECT.
      SELECT * FROM vbap INTO vbap_wa WHERE posnr = itemno.
      ENDSELECT.
      IF sy-subrc EQ 0.
        ex_vbap = vbap_wa.
        ex_vbak = vbak_wa.
      ELSE.
        RAISE data_exists.
      ENDIF.
      sys = sy-sysid.
    ENDFUNCTION.
    How is the above code for function module, will this work??
    Now can I write a report to call the above function module and update the record?? if so, how to update ??? please help...Lots of thanks in advance.

    Hi
    Welcome to SDN forum
    Whay can't you write a simple report in SE38.
    why you are using Fun module
    Nothing wrong in it.
    But first become perfetc in reports in SE38 and then do using the fun modules
    write a simple select statement like
    SELECT AVBELN AERDAT BPOSNR BMATNR
    INTO TABLE ITAB
    FROM VBAK AS A JOIN VBAP ON
    AVBELN = BVBELN
    WHERE A~VBELN  IN  S_VBELN AND
                 A~ERDAT  IN  S_ERDAT AND
                 B~POSNR IN S_POSNR.
    IF SY-SUBRC <> O.
      WRITE: / 'No data found'.
    ENDIF.
    First write this in SE38 by defining a proper selection screen and internal tables
    then do as fun module
    see the doc for fun module
    Function Modules;
    Check this matter.
    Function Modules are Global ABAP programs created by SAP for reusable purpose.they have IMPORT,EXPORT and TABLE parameters, and EXCEPTIONS to through when error occurs.
    You can create them from TCode SE37.
    Go through the following doc:
    Function modules are cross-program, reusable procedures that are organized into function groups, and whose functions are implemented between the statements FUNCTION and ENDFUNCTION. Function modules and their interfaces are created in the Function Builder.
    Function Module Interfaces
    The parameter interface of a function module is defined in the Function Builder. It includes the definition of interface parameters and the specification of exceptions that can be triggered by a function module. The Function Builder automatically generates comment lines below the FUNCTION statement in the source code of the function module, which represent the interface of the function module with the following syntax:
    Syntax
    ... [IMPORTING parameters]
    [EXPORTING parameters]
    [CHANGING parameters]
    [TABLES table_parameters]
    [{RAISING|EXCEPTIONS} exc1 exc2 ...]
    The syntax and semantics of IMPORTING, EXPORTING, CHANGING, RAISING, and EXCEPTIONS mainly correspond to the definition of method interfaces with [CLASS-]METHODS. The additional option of defining table parameters using TABLES is obsolete.
    Interface parameters
    The interface parameters are defined on the relevant tab pages in the Function Builder.
    IMPORTING parameters are input parameters. When the function module is called, a suitable actual parameter must be specified for every non-optional input parameter. The content of the actual parameter is passed to the input parameter when the call is made. The content of an input parameter for which 'pass by reference' is defined cannot be changed in the function module.
    EXPORTING parameters are output parameters. When the function module is called, a suitable actual parameter can be specified for every output parameter. The content of an output parameter that is defined for 'pass by value' is transferred to the actual parameter if the function module is completed without errors. An output parameter that is defined for pass by reference is not initialized when the function module is called.
    CHANGING parameters are input and output parameters. When the function module is called, a suitable actual parameter must be specified for every non-optional input or output parameter. When the function module is called, the content of the actual parameter is passed to the input/output parameter, and when the function module is completed, the content of the input/output parameter is passed to the actual parameter.
    TABLES parameters are table parameters. Table parameters are obsolete CHANGING parameters that are typed as standard tables with a header line. If an internal table without a header line or a table body is passed as an actual parameter to a formal parameter of this type, an empty local header line is generated in the function module. If an internal table with a header line is used as an actual parameter, both the table body and the header line are passed to the function module. Pass by value is not possible in formal parameters defined using TABLES. Formal parameters defined with TABLES can be replaced by formal parameters defined with CHANGING. A local work area can be created for the internal table in the function module by using the addition LIKE LINE OF itab of the DATA statement.
    Exceptions
    The exception of a function module are defined on the Exceptions tab page in the Function Builder. Here you can select exception classes to define whether class-based exceptions are declared or non-class-based exception are defined. Class-based exceptions are represented in the above syntax by RAISING, and non-class-based exceptions are represented by EXCEPTIONS.
    The addition RAISING is used to declare class-based exceptions that can be propagated from the function module to the caller. Exceptions in the categories CX_STATIC_CHECK and CX_DYNAMIC_CHECK must be explicitly declared, otherwise a propagation can lead to an interface violation. A violation of the interface leads to the treatable exception CX_SY_NO_HANDLER. Exceptions of the category CX_NO_CHECK are implicitly always declared. The declaration of exceptions of the category CX_STATIC_CHECK is statically checked in the syntax check. For exceptions of the category CX_DYNAMIC_CHECK, the check is not performed until runtime. In a function module in which class-based exceptions are declared with the RAISING addition, the statement CATCH SYSTEM-EXCEPTIONS cannot be used. Instead, the relevant treatable exceptions should be handled in a TRY control structure.
    The addition EXCEPTIONS is used to define a list of non-class-based exceptions that can be triggered in the function module using the statements RAISE or MESSAGE RAISING. Exceptions defined in this way - as with formal parameters - are bound to the function module and cannot be propagated. If an exception of this type is triggered in a function module, and no return value has been assigned to it with the homonymous addition EXCEPTIONS of the CALL FUNCTION statement when the call was made, this leads to a runtime error.
    Note
    For new developments after release 6.10, SAP recommends that you work with class-based exceptions that are independent of the function module.
    RFC is a technology which is used to access a functions (Modules) from
    the remote systems.
    If a function module is set as remote enabled which can be access from
    the remote system via RFC.Eg: U can access the Remote enabled function modules in ur VB,Webdynpro,Java,Visual composer program.
    A function module can be set as remote enabled by SE37->Go to ur FM->click the option Button "remote enabled".
    But Normal function modules can not accessd from the remote system.
    Good Example for RFC enabled function module is : BAPI(Business Application Programming Interface)
    Note: All BAPIs are Remote enabled but not all remote enabled function modules are BAPI.
    CALLING A FUNCTION MODULE:
    1)In U ABAP Editor --> Click "Patter" ---> Selection Option Button "Call Function"
    --> Write the Corresponding FM name --> Hit Enter
    2)The appropriate import ,export Parameters will be displayed in ur editor
    3)Pass the Values Here.
    Also check these links.
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    Check this link:
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    Check this link:
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    See the following links:
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
    Regards
    Anji

  • Help regarding 'table controls' and 'internal table' updation

    Hi all.
    Basically this is what i have done..... I have created a table control in module pool program. I declared an Internal table and also have populated it from a database table. I have also used insert statement to insert an blank record in the table control view and delete statements to delete any record,  also in the table control view... .
    But I am not able to update any new record into an Internal table or  the  original table ..
    Any Ideas how to do it ,Gurus
    Thanks

    HEllo,
    Check thsi simple report.
    REPORT ZTFH_TABLECONTROL .
    TABLES : ZEMPTABLE.
    DATA : SELLINE .
    DATA : FLD(20).
    DATA : LINNO TYPE I , OFF TYPE I.
    DATA : ITAB LIKE ZEMPTABLE OCCURS 10 WITH HEADER LINE.
    CONTROLS  : CON_TAB TYPE TABLEVIEW USING SCREEN 100.
    SELECT * FROM ZEMPTABLE INTO TABLE ITAB.
    DESCRIBE TABLE ITAB LINES CON_TAB-LINES.
    CALL SCREEN 100.
    *&      Module  EXT_COMM  INPUT
    *       text
    MODULE EXT_COMM INPUT.
    LEAVE PROGRAM.
    ENDMODULE.                 " EXT_COMM  INPUT
    *&      Module  TAB_UPDATE  INPUT
    *       text
    MODULE TAB_UPDATE INPUT.
    CASE SY-UCOMM.
    WHEN 'DEL'.
          IF SELLINE = 'X'.
            DELETE ITAB WHERE EMPNO = ITAB-EMPNO.
            MESSAGE I000(ZYF_DEL).
          ENDIF.
    WHEN 'UPD'.
        IF SELLINE = 'X'.
             MODIFY ITAB INDEX CON_TAB-CURRENT_LINE.
             MESSAGE I001(ZYF_DEL).
        ENDIF.
    WHEN 'INS'.
         IF SELLINE = 'X'.
          GET CURSOR FIELD FLD LINE LINNO OFFSET OFF.
          SET CURSOR FIELD FLD LINE LINNO OFFSET OFF.
          IF FLD CP 'ITAB*' AND SY-SUBRC = 0.
            IF LINNO >= 1.
              LINNO = LINNO + CON_TAB-TOP_LINE - 1.
              CLEAR ITAB.
              INSERT ITAB INDEX LINNO.
              CON_TAB-LINES = CON_TAB-LINES + 1.
            ELSE.
              CLEAR ITAB.
              APPEND ITAB.
              CON_TAB-LINES = CON_TAB-LINES + 1.
            ENDIF.
          ENDIF.
        ENDIF.
    WHEN 'SAV'.
      MODIFY ITAB INDEX CON_TAB-CURRENT_LINE.
      MESSAGE I002(ZYF_DEL).
    ENDCASE.
    ENDMODULE.                 " TAB_UPDATE  INPUT
    “ FLOW LOGIC
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    LOOP AT ITAB WITH CONTROL CON_TAB.
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    MODULE EXT_COMM AT EXIT-COMMAND.
    LOOP AT ITAB.
    MODULE TAB_UPDATE.
    ENDLOOP.     
    REgards,
    Vasanth

Maybe you are looking for

  • Difference between types of plan data

    Hi Friends, BPS 1. Cost Center Planning: Costs and Allocations 2. Cost Center Planning: Activity Type Prices 3. Cost Center Planning: Cost Center/Activity Type Prices 4. Cost Center Planning: Cost Driver For the above types of data, I like to underst

  • Error while applying ESS Leave Request in Portal

    Hi, I configured ESS in EP and i'am trying to apply a leave.I'am using the Workflow "WS12300111",i also assigned Agents to the WF.But when i try to apply a leave from EP it is giving me this error "Unable to send the request" "You are not one of the

  • JOptionPane and JDialog.DO_NOTHING_ON_CLOSE broken?

    Hi there I've created a JDialog from a JOptionPane and I don't want the user to simply dispose of the dialog by clicking on the close button but they are still able and I'm sure that my code is correct. Is it my code that is wrong or is it a java bug

  • Please Help!  Can't install iTunes! Errors 1406, 1402, 1603

    I'm using Windows XP on my home laptop and I get the following error messages when trying to install iTunes: 1) Error 1406. Could not write to value key \Software\Classes\.cdda\OpenWithList\iTunes.exe. Verify that you have sufficient access to that k

  • When will the miniSAP trial version support Vista...?

    More and more pc's are being sold with "Vista only" options; even Dell, the most configurable PC vendor out there, only delivers XP pro on their all-but-obsolete models. In other words, if you want new gear of a decent quality and performance, you're