"EXIT" in function module

Hi frnds,
  Im creating a function module.. in this i have a sub routine... from the sub-routine at a certain point i want to come out of the fun. module itself completely.
will the "EXIT" command suffice.. but i beliv it just terminates the processing from the routine only. i tried "LEAVE PROGRAM", but it exits the program calling the function module also... any other method ??
points assured !
rgds,
Madan.

perform ABC.
if flag = 'X'.
exit.
endif.
FORM ABC.
if a = 2.
*do some thing
else.
flag = 'X'.
exit.
endif.
ENDFORM.
please reward for helpful answers
Message was edited by: Vijay Babu Dudla

Similar Messages

  • Difference between User Exit & a Functional Module

    Dear all,
    Please help me in understanding ,what's an User Exit & a Functional Module in
    standard SAP.How do we define both of them.
    1.When  can/cannot I use an user exit?How to check for which T codes in PP
    Module an User Exit can be used or present.
    2.Can I use only a Functional Modules for Z developments or also an user Exit for
    Z developments?
    Please explain it in a simple way.
    It will be a great help for me,Expecting for your help.
    Regards
    Mangal

    user exit is a customised code used to extend or change normal SAP functionality.FM is a piece of reusable code uesed as a part of modularisation technique in SAP so that you can use this code again & again.
    1. you create FM through se37. First create function group which in return will contain your FM. you creates user exits through SMOD and CMOD. In case of some standard programs there are special includes where you can add u r own code to extend standard functionality. ( in pro sapmv45a include sapmvfzz used).
    to find an exit go to se80 or se84 give the package name and find exit corresponding to it ( ex for sales exits give package VA then search for exit )
    for second point i didnt get get what u want to know?
    for any z development u dont need at all to use exits u can do it thru SE38.USER-EXIT is add on functionality to customise u r standard transaction.
    i hope this will clear u r doubt.reward points if helpful.
    Rushikesh

  • How to find Exits in Function Module & BAPI

    Hi,
      How to find exits in Function Module & BAPI.
    Thanks In advance

    Hi,
       i ve  a standard FM IDOC_INPUT_SALESORDER_CREATEFR which creates sales order using BAPI (inbound process).
      Now my requirement is to check for some custom segment field if its not initial i ve to change item category field in line item for sales order.
    could u pls help me in this.
    Thanks in advance.

  • User exit or functional module for multiple GR of Production order.

    Hi All,
           I have done a enhancement in CO11N so that batches can get created in production order  confirmation.
    Now When I go to MIGO to do GR I have option to enter the nulitple batches against the production order.
    But what I am looking for is there any exit or functional module which reads the production order and fecth batches which were created from CO11N.
    Regards.

    Hi,
    A few options:
    1. User Exit - MBCF0002
    2. BADi - MB_MIGO_BADI, MB_DOCUMENT_BADI
    3. A Z program by calling BAPI_GOODSMVT_CREATE
    Regards,
    Vivek

  • User exit for Function Module

    Hi,
    I have a Exit function module  EXIT_SAPLCVV1_003. i wrote my code in the include and i dont know how to activate it in CMOD. i dont have the user exit name. can anyone tell me how to find user exit for function module.
    Regards

    hi
    you should find the enhancement name for your function module exit.
    go to CMOD Utilities->SAP Enhancement->extended selection->
    give the program name(SAPLCVV1) in Component name field and execute.
    it will display the enhancement name.Afterwards u should create the enhancement project.
    Steps to create enhancement Project:
    1.Goto CMOD.
    2.Give project name.->Create
    3.Assign the enhancement using the option.
    4.select Components and choose change.go to ur code and activate.
    5.activate the exit
    6.activate the enhancement.
    Cheers,
    Abdul Hakim
    mark all useful answers..

  • Determining active package in exit variable function module

    Hi all.
    I'm writing an exit variable function module that will return different values for different packages in a level, based on a custom table to map the area / level / package to a key, then look up the variable values for that key in another table. 
    The idea is to get around the BPS constraint of choosing the variable in levels rather than in packages.  I'm trying to reduce the number of levels needed.
    Function module 'UPC_FW_GET_ACTIVE_OBJECTS' works to show the active package when the variable is being resolved in BPS0 (e.g. click on package then click on layout or other parameter group), but it does not work for executing global planning sequences.  In that case the active object is the global sequence.
    Any other ideas about how to determine the package that is active when the variable code is run? 
    Or any ideas about how to tell which global sequence step is being run so that the package can be determined from UPF_BSTEPS?
    Any ideas would be appreciated.
    Thanks!  Aron
    Message was edited by:
            Aron Weaver

    There seems not to be any available standard code providing package ID to call the exit variable function module, so it looks like either a code modification or a custom copy of UPC_BUNDLE_EXECUTE and several function modules will be necessary.  The objective of either approach would be to pass the package ID along to the plan level read and variable resolution portion of the code, then include package as an imported parameter for the exit variable function module.
    SAP development and support declined to assist, giving us the infamous standard "consulting required" response.  I've seen something like this done previously, but that client was matching the packages up with layouts in folders, and used a custom method in a standard class reading folder information to identify the package.  There doesn't seem to be anything equivalent for global planning sequences.

  • Customer Exit with Function Module

    Hi BW Gurus,
    I have written customer exit to get the total number of days of the month. But it is executing the function module at all...
    Below is the code
          slppmm TYPE t009b-bumon,
           slppyy TYPE t009b-bdatj,
           totnod TYPE t009b-butag.
    When 'VPF_0CALDAY'.
        IF I_STEP = 2.
          loop at i_t_var_range INTO loc_var_range WHERE vnam = 'VPS_SYS_DATE'.
            CLEAR : slppyy,slppmm,totnod.
            slppyy = loc_var_range-low(4).
            slppmm = loc_var_range-low+4(2).
            CALL FUNCTION '/SDF/RBE_GET_DAYS_PER_MONTH'
              EXPORTING
                par_month = slppyy
                par_year  = slppmm
              IMPORTING
                par_days  = totnod.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            l_s_range-low = totnod.
            append l_s_range to e_t_range.
          endloop.
        endif.
    Please assist me any error code.
    Thanks
    Ganesh Reddy.

    Hi Problem is resolved my self.
    par_month = slppyy
    par_year = slppmm
    I made above change i.e yy to yy and month to month
    Thanks for all your help.
    Thanks
    Ganesh Reddy.
    Edited by: Ganesh Reddy on Sep 16, 2010 4:38 AM

  • User exit or Function Module for determining route in PO

    Hi all,
    We want to determine a new route in the stock transport order based on certain conditions. Can somebody help us with the appropriate user exit or a function modue.
    Kind Regards
    Chakradhar

    Hi Alpesh,
    We have checked this one,but it is not of much of help.
    Kind Regards
    Chakradhar

  • Function Module for search help Exit

    How to create a function Module for search help exits?
    please explain in details with step by step process.

    Hi,
    How to create a function Module for search help exits?
    function module for search help F4IF_SHLP_EXIT_EXAMPLE
    dynamic search help use 'F4IF_INT_TABLE_VALUE_REQUEST'
    please check out the link below it will help you
    A repository object maintained in the ABAP Dictionary. It supplies input fields on Dynpros with single- or multi-column input helps. Search helps can be linked in the Dictionary with components from structures, data elements, and check tables. A search help enables you to search for entry values with assigned data, without you having to know the exact spelling of the value.
    http://help.sap.com/saphelp_46c/helpdata/EN/cf/21ee52446011d189700000e8322d00/content.htm
    please explain in details with step by step process.
    create a search help exit:
    1. create an fm with this interface:
    *" TABLES
    *" SHLP_TAB TYPE SHLP_DESCR_TAB_T
    *" RECORD_TAB STRUCTURE SEAHLPRES
    *" CHANGING
    *" VALUE(SHLP) TYPE SHLP_DESCR_T
    *" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
    put this logic in it:
    Delete duplicate filter logic.
    This logic only needs to apply at the 'DISP' event - which is just
    before the hit list is displayed
    if callcontrol-step = 'DISP'.
    delete adjacent duplicates from record_tab.
    endif.
    2. edit your search help in se11 and enter the name of the above search help exit fm
    check this sample code..for dynamic search help
    REPORT  ZTEST_F4HELP                              .
    *---Report with selection screen and to display the list of
    possible entries for field 'B' as per the value in field 'A'.
    parameters: p_vbeln type vbak-vbeln,
                p_posnr type vbap-posnr.
    at selection-screen on value-request for p_posnr.
      data: begin of help_item occurs 0,
              posnr type vbap-posnr,
              matnr type vbap-matnr,
              arktx type vbap-arktx,
            end of help_item.
      data: dynfields type table of dynpread with header line.
      dynfields-fieldname = 'P_VBELN'.
      append dynfields.
      call function 'DYNP_VALUES_READ'
           exporting
                dyname               = sy-cprog
                dynumb               = sy-dynnr
                translate_to_upper   = 'X'
           tables
                dynpfields           = dynfields
           exceptions
                invalid_abapworkarea = 1
                invalid_dynprofield  = 2
                invalid_dynproname   = 3
                invalid_dynpronummer = 4
                invalid_request      = 5
                no_fielddescription  = 6
                invalid_parameter    = 7
                undefind_error       = 8
                double_conversion    = 9
                stepl_not_found      = 10
                others               = 11.
      read table dynfields with key fieldname = 'P_VBELN'.
      p_vbeln = dynfields-fieldvalue.
      call function 'CONVERSION_EXIT_ALPHA_INPUT'
           exporting
                input  = p_vbeln
           importing
                output = p_vbeln.
      select posnr matnr arktx into table help_item
                     from vbap
                          where vbeln = p_vbeln.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
           exporting
                retfield    = 'POSNR'
                dynprofield = 'P_POSNR'
                dynpprog    = sy-cprog
                dynpnr      = sy-dynnr
                value_org   = 'S'
           tables
                value_tab   = help_item.
    also check this link it will help you
    /message/3854825#3854825 [original link is broken]
    *********please reward points if the information is helpful to you*************

  • How to find function module exit name when i know the Include

    As per my requirement i should change the existing exit. I know the include name but i want to
    know exit name. How to find out exit name based on include name. I tried Where-used list but it
    is not giving the exit and function module name.Please let me know.
    Regards
    Rajitha

    Hello Rajitha,
    1. You can do a "where-used" for the include & get the corresponding name of the exit function module.
    2. Goto table MODSAP & in the field MEMBER pass the name of the function module & you will get the Exit Name in the NAME.
    Hope this helps.
    BR,
    Suhas
    Edited by: Suhas Saha on Mar 16, 2009 3:08 PM

  • Function Module to pull in variables based on a source variable

    Hi,
    I am new to user exits and function modules and don't know any ABAP, but I need to make use of a user exit to pull in 4 cost center values (0COSTCENTER) based on a single profit center (0PROFIT_CTR) value.  For example, in the planning layout users will select a profit center from the variable screen.  Based on that profit center selection, I want to populate 4 cost centers values that correspond to the following:
    - a "Pproduction" cost center value
    - a "Level 2 R&D" cost center value
    - a "Level 2 Selling" cost center value
    - a "Level 2 Admin" cost center value
    I know I need to create a mapper table that shows what production and level 2 cost centers are to be associated with what profit centers, but I'm not sure how, or where to do that (obviously I have the mapper data already, I just don't know how to set it up in a table that can be read by a function module).  And then I think I need to make use of a user exit (function module) to look up the values in that table so the correct cost center values are pulled in based on the profit center selection. 
    Can anyone offer any advice, and/or provide sample code where I could easily replace the values that are relevant to my situation.  Again, I don't know any ABAP, but clearly I need to learn, so I'm not sure if this is even feasible for me to do. 
    Any advice is appreciated.
    //HC

    Hi,
    You need to create BPS variable of type exit. You can learn it easily. See the following document and you can also search this forum for relevant threads.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/650ee690-0201-0010-4bb7-83c3e2a74039

  • Function module to update Moving Average price for Material?

    Hi guys,
    is there a function module or BAPI to update the moving average price in a material master?
    i have tried UPDATE_MATERIAL_PRICE but guess it does not work. I have also tried MB_UPDATE_MATERIAL_PRICE and it seems to not work. Any pointers?

    We have a need to update the moving average price using movement type 531 for a custom solution we have built for other business requirements.  We have not found a way to update the moving average price yet using any of the information provided here.  Can any offer any other suggestions.  Looking for a BAPI, user exit, or function module that we could tap into in order to updat the moving average price.  Here is what we found...
    We believe that the following suggestions doNOT apply...
    BAPI_MATERIAL_SAVEREPLICA is basically for updating material master records in general.  It does not address the offset to the alternate accounts.
    BAPI_COSTESTIMATE_UPDATE_PRICE does not adjust the moving average price.
    CIML_UPDATE_MATERIAL_PRICE updates Project Stock.
    Any help would be greatly appreciated.

  • FORM EXITS Vs FUNCTION EXITS

    Hi folks
    I am a little confused on FORM EXITS& FUNCTION EXITS...can anyone provide me what exactly is the differnce between these two. How we go about using these two in various scenarioes.
    Thanks in advance.
    Regards
    Ram

    Hi
    There are 4 types of exits
    like FUNCTIOn MODULE, MENU,FIELD and SCREEN exits
    What is this form exits?
    see the doc
    User exits (Function module exits) are exits developed by SAP. The exit is implementerd as a call to a function module. The code for the function module is written by the developer. You are not writing the code directly in the function module, but in the include that is implemented in the function module.
    The naming standard of function modules for functionmodule exits is:
    EXIT_<program name><3 digit suffix>
    The call to a functionmodule exit is implemented as:
    CALL CUSTOMER.-FUNCTION <3 digit suffix>
    To find a Exit.
    Goto Transaction -- Find The Package
    SMOD >f4>Use the Package here to Find the Exits In the Package.
    Else if you Want to search by Application Area wise ,
    There is one more tab to find the Exits in the Respective Application Area.
    Implementing the Exit-- CMOD Create ProjectsAssgn your Component .
    Now Run ur Transaction to Check if it Triggers.
    Thats it..
    Suppose you need to find out all the user exits related to a tcode.
    1. Execute the Tcode.
    2. Open the SAP program.
    3. Get the Development Class.
    4. Execute Tcode SE84.
    5. Open the Node 'Envir. -> Exit Techniques -> 'Customer Exits -> Enhancements'
    6. Enter the Development class and execute.
    Check out this thread..
    The specified item was not found.
    1. Type the transaction : system->status-> <PROG. NAME>
    2 open SE37 , type EXIT<PROG NAME> and press F4 to get the list of function exits available.
    3. Open CMOD utilities->SAP enhancements
    EDIT->All selections
    4.type the function module name obtained in step 2, in fields 'component name' in 'additional selections' block. and execute.
    5. The displayed list contains the enhancements names for the transaction You were looking for.
    6. Create a project in CMOD and the code in default include->activate.
    http://www.erpgenie.com/sap/abap/code/abap26.htm
    which gives the list of exits for a tcode
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec079f5db911d295ae0000e82de14a/frameset.htm
    For information on Exits, check these links
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.planetsap.com/userexit_main_page.htm
    User-Exits
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/ab038.htm
    http://www.planetsap.com/userexit_main_page.htm
    http://www.sap-basis-abap.com/sapab013.htm
    http://sap.ittoolbox.com/documents/popular-q-and-a/user-exits-for-the-transaction-code-migo-3283
    These links will help you to learn more on user exits.
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htm
    http://www.planetsap.com/userexit_main_page.htm
    http://www.allsaplinks.com/user_exit.html
    www.sap-img.com/abap/what-is-user-exits.htm
    Also please check these threads for more details about user exits.
    Re: Screen exit
    user exit and customer exit
    user exit
    1. Document on UserExits in FI/CO
    http://www.ficoexpertonline.com/downloads/User%20ExitsWPedit.doc
    2. Finding User Exits...
    http://sap.ionelburlacu.ro/abap/sap2/Other_Useful_Tips.html#Finding_User_Exits
    3. List of all User Exits...
    http://www.planetsap.com/userexit_main_page.htm
    How to implement screen exit for a SAP standard transaction HOT
    Introduction
    SAP provides standard transactions to enter data into database. But a client may want to maintain some additional information in SAP other than what is provided.
    To make provisions for this, additional screens have to be provided and additional fields must be added into appropriate database table.
    To pave way for this, SAP has provided the option for screen exits. Usually, SAP provides the following:
    An append structure in the database table with the new fields.
    A subscreen area into the standard screen – where the programmer can attach his subscreen of his own program with the new fields.
    A function group under which the new subscreen has to be created with the new fields.
    Function exits to synchronize the PBO and PAI of the standard SAP program with the PBO and PAI of the subscreen – so that data can flow back and forth between the standard SAP program and the program written by the developer for the subscreen. These function modules also exist in the same function group under which the subscreen will have to be developed.
    Finally, a linkage has to be done between the subscreen area of standard SAP screen with the custom subscreen constructed by the developer.
    Typically, SAP provides an enhancement in which the developer can create an append structure, use the function exits to synchronize the PBO and PAI of the standard SAP program and the custom subscreen program, and make the necessary linking( as mentioned above in step 4. But, again, this is not a hard and fast rule. Linking in some case, is also done by configurations.) SAP also usually provides the name of the function group under which the subscreen has to be developed.
    Necessary guidance about implementing a screen exit development is usually available in the Documentation section of the enhancement ( can be availed by transaction SMOD).
    Pre-Requisites
    The developer to work on screen exit should have essential knowledge on the following:
    DDIC concepts, including the knowledge of append structure.
    Concept of SAP Enhancements and implementing them using Projects.
    Concept of function exits.
    Knowledge on Module Pool – including subscreens, Tabstrip controls etc.
    Steps
    Guidelines
    So, a developer can follow the guidelines mentioned below to implement a screen exit to a standard SAP transaction, as and when required:
    Find out the Required Enhancements
    Go to SMOD. Press F4 in the Enhancement field. In the next popup window, click pushbutton ‘SAP Applications’. A list will appear that contains information on all the enhancements, categorized under functional areas. Developer must search for the enhancements relevant to his functional area of interest – for e.g., Purchasing, Asset Accounting, etc.
    Note down the enhancements. Then, come to the initial screen of SMOD and view the documentation of each enhancement to find out which one is required for your development.
    Utilize the Enhancement in a Project
    After you have found one, do as directed in the documentation. Generally, the steps are as follows:
    Create a project using CMOD including your enhancement.
    Create the append structure with new fields.
    Go to the desired function group and create a subscreen with the new fields. Write PBO and PAI for the subscreen, if required.
    Use the function exits in the enhancement to link the PBO and PAI of the subscreen with that of the main SAP program supporting the SAP transaction.
    Maintain necessary linkage between the subscreen area of standard SAP program with the custom subscreen developed along with the custom program name. This can be done in the project (developed by CMOD including the enhancement) or outside as a part of configuration.
    Activate the project.
    Test to ensure that required functionality are met.
    Case Study 1
    Add three new custom fields for Asset master and maintain information for them
    Requirement
    Three fields in the legacy system have to be maintained in Asset master. These fields are:
    Original Asset number – 20 characters
    Location 2 – 15 Characters.
    Model no – 20 characters
    Location 2 should start with ‘L’.
    Pre-Analysis
    Finding out the Enhancement
    As described above, the enhancement is determined. It was found, that enhancement AIST0002 will serve the purpose. It contains the following components (can be viewed by transaction SMOD):
    Exit Type Description EXIT_SAPL1022_001 Function Exit Check of User-Defined Fields when Using Create and Change BAPI EXIT_SAPLAIST_002 Function Exit Transfer Data for User Subscreens in PBO. EXIT_SAPLAIST_003 Function Exit Transfer of User-Defined Fields to SAP Master Data Transactions CI_ANLU Customizing Include Include structure to add new fields
    Studying the Function Exits
    The function module level documentation for the function exits are then viewed from transaction SE37. The documentation clearly laid out for the purpose for their use:
    EXIT_SAPLAIST_002
    Function module Level Documentation
    This function module is called by asset master data maintenance at the start of the dialog. (When changing, it is called after reading of the data from the database; when creating it is called after the transfer of the default values from the asset class and reference asset.) The purpose of the function module is to enable this function group to recognize the master data. For interpreting or controlling master data fields that are important for user fields, it is possible to transfer to global variables at this point, so that they can be recognized when the user subscreens are processed.
    Import Parameters
    Understanding
    This function module is called at the PBO to pass the information retrieved from the database to pass them to the custom subscreen and its underlying program. Import parameter : I_ANLU will be populated with the values for user-defined fields which will be passed to the subscreen program. So, there must be some sort of variable assignment from I_ANLU.
    EXIT_SAPLAIST_003
    Function module Documentation: This function module is called by SAP asset master data maintenance after the screens are processed, but before saving. The purpose of the function module is to transfer fields entered on user sub-screens of SAP asset data maintenance to the database for updating. The export parameter for this function module is:
    Understanding
    This function module will be used to transfer the user entered data in the subscreen fields to the main SAP program, which will then be saved into the database.
    Studying the Documentation of the Enhancement
    The enhancement documentation (as is viewed from the initial screen of SMOD] also supports the idea. Moreover, it informs that we need to develop a subscreen under function group XAIS. This is the function group under which the two function exit modules also exist. So, if the custom subscreen refers to the global data of the function group XAIS, then those values will also be available to these function exits as well.
    Going to SE80 and viewing the function group XAIS helps us to inform that there are three DDIC tables declared for it:
    Deciding the Final course of Action
    After making all the investigations, the final course of action was determined.
    SrlNo Step Justification
    A project has to be created using transaction CMOD where the enhancement AIST0002 will be included.
    Customizing include CI_ANLU has to be created with the custom fields demanded When CI_ANLU will be developed, the custom fields will get appended to the database table ANLU. Also, these fields will be used to create screen fields in the new subscreen.
    A custom subscreen, say, 9000 will be developed under function group XAIS. The screen group for the screen will be ‘CUST’ (or any name). The three custom fields added to table ANLU (by creating CI_ANLU) will be used to create new fields in the screen.
    In the PAI of the subscreen, validation for Location to start with ‘L’ will be added. The subscreen with three new fields has to be developed so that it can be attached to a subscreen area of the asset master screens.
    In the custom include of the function exit module ‘EXIT_SAPLAIST_002’, the following code will be written:-
    ANLU = I_ANLU. I_ANLU is the import parameter of this FM. The value is assigned to the global variable ANLU, referring which the three new subscreen fields are developed. So, data retrieved from database table ANLU will be passed to this FM as I_ANLU by the standard SAP main program. The value will be taken and passed to the global variable of the function group XAIS, so that the three custom fields (referring to ANLU of XAIS) get populated.
    In the custom include of the function exit module ‘EXIT_SAPLAIST_003’, the following code will be written:-
    E_ANLU = ANLU. The changed values in the subscreen fields exist in global variable ANLU for the function group XAIS. This function exit module will pass the data back to the SAP main program as E_ANLU.
    Proper linkage/configuration has to be done so that the new subscreens get linked to the appropriate subscreen area of the Asset master screen. This has to be done – otherwise, the new custom subscreen will not be displayed in the Asset master screens.
    Development
    Creating a Project to include the enhancement
    Go to transaction CMOD and create a project.
    Enter a description for the project. Then, click on the pushbutton ‘Enhancement Assignments’ in the Application Toolbar.
    Enter the name of the enhancement and Save.
    Go to ‘Components’.
    Creating Custom Include for ANLU
    The screen shown below will appear, showing all the enhancement components under the assignment AIST0002. Double-click on the name of the Include Structure to create it.
    Create the include structure with three new fields, as required. Then, save and activate it.
    Develop the subscreen and the program
    Go to transaction SE80. For the function group XAIS, create a new subscreen 9000.
    Create it as subscreen.
    Then, go to the Layout of the screen and create three new fields from Database table ANLU.
    Drag the fields in the screen body and place them.
    Then, save and activate the screen and come back to screen flow editor.
    Create the PAI module to add validation for field “Location 2”, as required .
    Activate the whole function group and come out.
    Write code in the Function Exits to synchronize the programs
    Now, code has to be written in the function modules EXIT_SAPLAIST_002 and EXIT_SAPLAIST_003 so that data flows to and fro between the main SAP program and custom subscreen program. For that, go back to transaction CMOD and change the function exits.
    Write code in the function module EXIT_SAPLAIST_002 called once at the beginning of the transaction:
    Write code in EXIT_SAPLAIST_003 to pass the data from the subscreen to SAP main program.
    Then, activate everything – the whole project and come out.
    Complete the configuration to link the subscreen
    The development portion is complete. Now, linking of the subscreen has to be done with the subscreen area of the main program. In most of the cases, this linking can be done in the enhancement itself. But, here, requirement is a bit different. It is done by configuration using SPRO.
    Assets are created under Asset class. And for each asset class, there is a layout assigned to it. For a layout, there are multiple tab pages assigned to it. And, for each tab page, there are multiple screen groups/field groups assigned.
    Here, the requirement is to create these three custom fields in the tab page ‘General’ of asset master screen ( AS01/AS02/AS03/AS91).
    Determine the Layout
    To achieve this, first of all, we need to find out which layout is assigned to asset class 1000.For that, go to transaction AOLK( information has to be obtained from functional consultant).Select the Asset Class ‘1000’ and click on folder ‘General Assignment of Layout’.
    Here, for Asset class 1000, for all the user groups, tab layout SAP is assigned. Since layout ‘SAP’ cannot be changed, it has to be copied and manipulated to include our screen group. Later, the new layout has to be assigned over here.
    Create new tab layout
    Go to transaction AOLA. Copy the tab layout ‘SAP’ to create another layout, say, YSUB.
    System will copy all the settings and will inform you about that.
    Select your newly created layout and double-click on the folder ‘Tab page titles’.
    You want to put your custom fields in the tab page “General”. So, select this tab page entry and double-click on the folder "Position of Groups".
    Here, all the field groups currently residing in the tab-page “General” are shown. Add an entry for your newly created fields.
    Select the group box from the list. An entry will come with “U” padded with the custom subscreen prepared by you.
    Then, save and come out.
    Assign the new Layout to Asset Class
    Now, go to tcode AOLK and assign tab layout YSUB for asset class 1000.
    Save and come out.
    Test the Exit
    Everything is over. Now, go to transaction code AS01/02/03 or AS91 to deal with an asset of asset class 1000. You will see your new fields added to the screen. Add values to them…save. Then, enter into the tcodes again to see whether the values entered by you are being displayed or not.
    Original Source: ittoolbox.com
    Reward points for useful Answers
    Regards
    Anji

  • IPC Pricing with AP 7.00 Database Access/Call function module user-exit

    Hi experts,
    we are running SAP ECO on SAP ECC 6.0 with IPC Pricing AP 7.00 running in the VMC.
    I'm facing a new requirement. In an user-exit for requirements the access to the ABAP database is needed.
    (I know that the SAP recommendation is, don't have access to database. But we need this functionality)
    In ABAP it looks like:
    select single * from  a590
          into     LH_674_a590
          where    kappl  = 'V'
          and      kschl  = 'ZSPR'
          and      kunnr  = komk-kunnr
          and      matnr  = komp-matnr
          and      datbi  >= komk-prsdt
          and      datab  =< komk-prsdt.
    Is there a possibility to implement the same SELECT in the Java-User-Exit?
    Is there maybe the alternative to call a function module instead?
    The database exits on the same application server on which the VMC runs.
    If there is a possiblity can anyone provide me with sample coding or give an advice where to find samle coding?
    I would prefer to call a functions module.
    Thanks in adcance
    Karl-Wilhelm

    Hi Shanto & Sumit,
    Thanks for the inputs.
    as per my understanding of the log
    java.lang.IncompatibleClassChangeError: com.sap.leasing.pricing.tools.LeasingPricingTools: method getPricingConditionByConditionTypeName(Lcom/sap/spe/pricing/transactiondata/userexit/IPricingItemUserExit;Ljava/lang/String;)Lcom/sap/spe/pricing/transa ctiondata/IPricingCondition; used to be stati
    error is thrown by the SAP standard user exit and because of which execution is failing in customer user exits and surprisingly we have not made any changes in both of them.
    this was working earlier before upload.could this be because of the jar packaging.
    how i can download the standard user exit com.sap.leasing.pricing.tools.LeasingPricingTools from crm
    for further investigation.
    Thanks,
    Siddharth

  • User Exit for Variable which calls to a Function Module is NOT working ???

    Hi all,
        I have a created a variable 'ZNBUSDAY' with Processing Type 'Customer Exit' on 0SCL_DELDAT  (Date). The query is on 0PUR_C04 and passing 0SCL_DELDAT  to Function Module  Z_WORKDAY to get the Next Business Day by using the company Calendar(30). The following code is NOT working and what is WRONG with it, PLEASE? The FM is working FINE.
    DATA: wa_calendar(2) TYPE c value '30',
          wa_znbusday    like sy-datum,
          0scl_deldat    like sy-datum,
          p_days         TYPE i value 1.
    case i_vnam.
       when 'ZNBUSDAY'.
       CLEAR wa_znbusday.
       CALL FUNCTION 'Z_WORKDAY'
         EXPORTING
         CURR_DATE        = 0scl_deldat
         NUMBER_DAYS      = p_days
         CALENDAR         = wa_calendar
       IMPORTING
         WORK_DAY         = wa_znbusday
         l_s_range-low  = wa_znbusday.
         l_s_range-opt  = 'EQ'.
         l_s_range-sign = 'I'.
         append l_s_range to e_t_range.
    endcase.
    Thanks,
    Venkat.

    Hi Venkat,
    Looks like you're only assigning type sy-datum to 0scl_deldat but not the actual value. Try the following:
    DATA: wa_calendar(2) TYPE c value '30',
          wa_znbusday    like sy-datum,
          0scl_deldat    like sy-datum,
          p_days         TYPE i value 1.
    case i_vnam.
       when 'ZNBUSDAY'.
       CLEAR wa_znbusday.
       0scl_deldat = sy-datum.
       CALL FUNCTION 'Z_WORKDAY'
         EXPORTING
         CURR_DATE        = 0scl_deldat
         NUMBER_DAYS      = p_days
         CALENDAR         = wa_calendar
       IMPORTING
         WORK_DAY         = wa_znbusday
         l_s_range-low  = wa_znbusday.
         l_s_range-opt  = 'EQ'.
         l_s_range-sign = 'I'.
         append l_s_range to e_t_range.
    endcase.
    Kind regards,
    Alex

Maybe you are looking for

  • Proxy to SOAP Scenario

    Hi, I have a requirement where the scenario is Proxy to SOAP (synchronous) from SAP CRM to the third party system. On XI we have a web service which will be invoked to create a SOAP request and receive SOAP Response. Can someone please tell the Step

  • Problem in maintaining service user for CCM srm_cse

    Hello all, We are implementing SRM 4.0 (EBP 5.5) SSP scenario. To support shopping of EBP we are also implementing CCM 2.0 as an add on. Please note CCM and EBP are on same client and CAT & CSE are also on the same client. No XI is involved as the ca

  • Thai mail subject is =?TIS-620?Q?=E0=A2=D2=BE=A1=E1=BB=C3?=

    Hello, I am using Java Mail API to read email from IMAP server. In case the subject of the email sent contains thai characters, the subject received through Java Mail API is =?TIS-620?Q?=E0=A2=D2=BE=A1=E1=BB=C3?=. Which encoding is this? How do I get

  • Question about bapi BAPI_MTRREADDOC_UPLOAD

    Hi! In transaction EL29,  I can modify the consumption field for a meter reading result. Is it possible to do the same using BAPI_MTRREADDOC_UPLOAD? I don't see the consumption field in the structures. If it is possible, could you give me an example

  • Capturing VCR Video

    I am interested in digitizing video from a VCR. Does anyone know what equipment (apart from the G5) would be required to do this?