Form inside user exit

Is it possible to define a form (subprocedure) inside a user exit?  When I try it complains that I'm trying to define a form inside of a function.  Of course I have no choice because the whole user exit is a function.  What's the best way to work around this?

i came to know from one of the posts here in SDN, the options are,
1) create a custom function module and call it
2) write ur subroutine in a report prog. and call that subroutine of that report prog.
3) develop a INCLUDE and add it in MAIN prog.
for more info. pls. search in SDN
thanq

Similar Messages

  • Triggering a smart form from User exit

    Hi Gurus,
    I need to trigger a smart form from a user exit.
    The tcode name is COR1.there is a exit for this tocde.
    This exit should be used to trigger the smart form.
    User exit to be executed upon saving the Process order number.
    Thanks in advance.
    Edited by: vinay raj on Apr 13, 2009 9:38 AM

    Hi,
    You can write a Custom program i.e. the driver program for your smart form.
    And submit that program in the exit. i.e. use the submit statement to run that program.
    I hope this might help you.

  • Include with form in user-exit

    Hello everyone,
    I am trying to put an include which contains a form routine into a user-exit include . My include source activates normally by itself but when i try to activate the user-exit include which contains my custom include i am getting the error " Incorrect nesting: Before the statement "FORM", the structure introduced by "FUNCTION' must be concluded by "ENDFUNCTION"  "
    Any ideas on how i can fix that?
    Regards,
    Huseyin

    Hi Huseyin,
    userexits are done by filling an include which itself is source code of the function module. If you want to do some structurized programming, you should copy the EXIT function to customer name space and to your own function group. Then, in  the include, you call your own function passing exactly the parameters of the EXIT function.
    Then you are free to create includes, forms, data, objects,... whatever you want to achieve structured functionality.
    Sample code:
    *& Include.: ZXTRKU12                                                  *
    * new functionality sourced out to new function module
      call function 'Z_EXIT_SAPLV55K_004'
        importing
          processing_protocol = processing_protocol
        tables
          idoc_data           = idoc_data
        changing
          idoc_control        = idoc_control
        exceptions
          idoc_error          = 1
          do_not_process_idoc = 2
          others              = 3.
      case sy-subrc .
        when 0.
          exit.
        when 1.
          raise idoc_error.
        when others.
    * Can't raise OTHERS -> 2 AND Others handled in common
          raise do_not_process_idoc.
      endcase.
    Here we created a new function group ZXTRK for the exit function group XTRK. We copied function EXIT_SAPLV55K_004 to function z_exit_saplv55k_004. In our case, we created 22 form includes and one top include because our programming guidelines require an include for each form.
    The rest shoud be crystal-clear. If not, feel fre to ask for details.
    Regards,
    Clemens

  • How to make Forms 9i User Exits run on DB server.

    We have a memory resident C programs developed in Oracle EE 7.3.4 and Dev2K (charecter based) on HP OpenVMS. Since the application is character based forms/reports - all the components are configured in one single server. There was no problem for us to write user exits and run C programs on the DB server.
    Now we want to migrate to Oracle 9i and 9iAS.
    My big question is How can we call memory resident C programs running in database server from 9iAS node. 9iAS node is separate Windows 2003 server in the 9i implementation.
    Any suggestions on how we can implement this. We understand that WebUtil runs userexits on the client PC. We need similar functionality to run on the DB server. Any ideas would be appreciated.
    Thanks in advance.

    Whoops, meant to include this:
    OS: All clients on WinXPPro. Forms are hosted in an simple open-access folder on a server running SqlServer 05 (no SharePoint yet). I'm designing the new form in Adobe Acrobat 9.2 Pro based on a Word 2007 document.
    Thanks again!

  • Create new form in user exit ZRGGBR000

    Hi everybody
    I wanted to know if we can add a new form in the user exit ZRGGBR000 or we have to use the existing ones?
    Its the first time im using that user exit and I dont quite know how to proceed
    Thanks

    sorry, may be i wrongly posted this question
    theres a form called get_exit_titles in which all the exits are listed
    I wanted to know if we can add new exits or we have to use the existing ones
    Sorry for the inconvenience

  • TMW: refreshing the employee list inside user exit

    Hi everybody,
    We are using TMW in a project where the employee selection is based on relations in OM.
    Since those relations will change a lot in background the employee list in TMW needs to be refreshed regularly.
    Restarting TMW is not an option.
    How do i give the TMW application a message that the employee selection needs to be reloaded?  I would like to start the message from within the standard user exits (like PT_BLP_TMW_ENR)
    Can anyone give me a code example how to do this?  How do i find the active TMW instance from within the user exit?
    Thanks in advance!
    Kr,
    Jonathan

    Cancelled

  • BDC session -session qid value-inside user exit

    hai,
    when we process a BDC session from SM35,can we know the unique queue id for that particular session..i need that value to update a ztable in a user exit..this user exit is hit during the processing of that session..is their some system like variables storing the session id?
    Edited by: kumar gaurav on Jan 26, 2012 1:13 AM

    Hi Gaurav,
    Check in table APQI .
    with key combination we will get the queue id from this table, and here you will get the info like whether the session is craeted or in process or with error......

  • ISSUE:BDC In user exit

    Hi all,
    I  have used BDC inside user exit.I am getting an error while activating the user exit .
    The error is before the statement 'FORM' the structure included by 'FUNCTION' must be ended by 'ENDFUNCTION'.(Not getting what 'FUNCTION' is mentioned in error message)
      CALL TRANSACTION 'MM02' USING bdcdata MODE v_mode UPDATE 'S'
                                                MESSAGES INTO it_bdcmsg1.
        ENDLOOP.
    FORM bdc_dynpro USING program dynpro.
      CLEAR bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
    ENDFORM.                    "BDC_DYNPRO
           Insert field                                                  *
    FORM bdc_field USING fnam fval.
    IF fval <> nodata.
      CLEAR bdcdata.
      bdcdata-fnam = fnam.
      bdcdata-fval = fval.
      APPEND bdcdata.
    ENDIF.
    ENDFORM.                    "BDC_FIELD

    Hi,
    This is beacuse you are trying to nest  the processing block, more strictly procedures. This is not possible in ABAP.
    "Your customer exit simply lies between  these statements introducing procedure (funtion module)
    FUNCTION....
    INCLUDE some_customer_exit_here. 
    ENDFUNCTION
    You can't put any new procedure nor processing block inside this FUNCTION....ENDFUNCTION block.
    Instead you have two possibilities:
    - check function group of that function module, usually starts with X... for customer exists, add and include inside it, following SAP standard naming conventions for subroutines. It must be like inlcude ...F01 . Go inside there and create your subroutine (forms) here. Now in your cutomer exit simply use that form by calling it.
    - create another program of type S (subroutine pool) and place your forms here. Now call it from customer include using PERFORM YOUR_NEW_PROGRAM_NAME(subroutine_name).
    Regards
    Marcin

  • User Exit Custom Code

    Hi,
    I implemented a user exit and has implemented some codes on a particular form; after activating, the whole user exit has been grayed out from modification. How can I undo?
    Thanks.

    Hi,
    Go to the include inside user exit and switch off modification assistant by navigating following path
    EDIT->MODIFICATION OPERATIONS->SWITCH OFF ASSISTANT.
    Please let me know in case you face any more issues.
    KR Jaideep,

  • Help needed in "V45A0003" User Exit

    Hello All,
    I have one problem doing Userexit "V45A0003" for VA01.
    I want to disable one field in VA01 Screen no. "4900" when order type is "RE". I try mentioned Exit for the same and i am able to disable that field for all order type but i am unable to get order type value and unable to disable field, so i want your valuable help to get the order type value given at very first screen (101) of VA01.
    So, Please i request all of you to help me in this.
    Thanks & Regards,

    Hi,
    If you want to get the Sales order no in your exit you can make use of below code.
    data:wa_vbak type vbak.
    field-symbol <FS> type any.
    ASSIGN (' (SAPMV45A)VBAK') to <FS>.
    If sy-subrc eq 0 and <FS> is assigned.
    wa_vbak = <fs>.
    endif.
    Now in wa_vbak-AUART you will get the sales order type given initial screen of sales order.
    You can also use below form in User exit include MV45AFZZ for your requirement.
    FORM userexit_field_modification.
    ENDFORM.
    Here you will all sales order data and no need to use above field symbol assignment to read vbak data.
    Regards,
    Pawan

  • Changing sales office in sales office using save_document user exit

    Hi,
      My requirement is to change the sales office to 109 based on some conditions.
    Here i am using FORM USEREXIT_SAVE_DOCUMENT   user exit in the sales order to do it.
    but it is not taking this value .
    Can any one suggest me any other place i.e. user exit where we can change sales office depending on some conditions.
    Thanks & regards
    Manjari.

    You have to use userexit 'USEREXIT_SAVE_DOCUMENT_PREPARE' because when exit 'USEREXIT_SAVE_DOCUMENT' is called all the order data has already been submitted into update task. So if you want to change data in the order and have it saved with it you need to use 'USEREXIT_SAVE_DOCUMENT_PREPARE'.
    Regards,
    Michael

  • User exit for Stock transfer order

    Hi,
    My requirement is : i want to create a Stock transport order in which i have to set an error message based on the Document type and receiving plants country name.
    Say for an e.g. if my  doc type is STPO and plant is pl10(which belongs to Germany)then no error will come, but if
    doc type is STPO and plant is pl11 ( which does not belongs to Germany) In that case error has to occur.
    I want to put the logic in the code.
    Kindly provide me program name and user exit where i can implement this.
    Regards
    Utsav

    hi
    Please discuss with ur technical consultant and given ur functional need in Functional spec form for user exit .
    In that u have to mention eaxactly what u need i.e ur requirement regarding the user exit for STO process.
    So it can be done with ABAPer with you as functional consultant.
    Thanks
    SAP_MM

  • User Exit Or Badi for Framework Release

    We have set up Release strategy at PO based on value and Purchase organization. It is working fine for all types of PO except Frame work PO. As per system prospective it is working fine but as per business prospective it is not appropriate.This is beacuse Frame work in our case is created with Invoice plan set up . Ex If PO is created for 5000 USD then with Invoicing plan set up it is assigned for period of 12 months and total invoicing value gets 60000 USD and release strategy gets triggered on the base of header value i.e. 5000 USD.
    So business requirement is that PO release strategy should triggered on the basis of total invoicing plan set up of that PO i.e. 60,000 USD.
    in release procedure they are using CEKKO-GNETW field.
    only for framework PO, i want to calculate the price according to start date and end date and popullate that in CEKKO-KTWRT field so that a new release procedure can be implemented for the same.
    I use M06E0004 user exit, but it is not working.
    as soon as we click check button or save button this user exit is triggering but values of EKKO is comming null inside user exit.
    How to calculate the price since start date and end date is in EKKO table.
    please help in USER EXIT.
    Thanks & Regards,
    Nitin Malhotra

    Hi,
    Check the following PDF .
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9cd334f3-0a01-0010-d884-f56120039915
    May be useful to you.
    Regards
    Sachin

  • User Exits and conversion from 2.3-4.5

    Hi All,
    I am trying to modify the old (2.3)Oracle Ship Confirm screen, basically create a new front end that does not require too much navigation/key strokes by the user, and to accomplish this have converted the 2.3 form to 4.5. However, the form uses USER EXITS, and I am unable to locate them anywhere after the conversion. At runtime I get the error, 'FRM-40800 User Exits FND does not exist'. Does anyone know what happens to User Exits, what trigger they go to, when converting from 2.3 to 4.5? Where are they usually located on the system (ie, Oracle_HOme directory), or even if USER EXITS created by Oracle can be modified. THanks!

    Hi All,
    I am trying to modify the old (2.3)Oracle Ship Confirm screen, basically create a new front end that does not require too much navigation/key strokes by the user, and to accomplish this have converted the 2.3 form to 4.5. However, the form uses USER EXITS, and I am unable to locate them anywhere after the conversion. At runtime I get the error, 'FRM-40800 User Exits FND does not exist'. Does anyone know what happens to User Exits, what trigger they go to, when converting from 2.3 to 4.5? Where are they usually located on the system (ie, Oracle_HOme directory), or even if USER EXITS created by Oracle can be modified. THanks!

  • SYNTAX Problem in User-Exit (Perform/Form)

    Hi,
    i use this User-Exit:
    FUNCTION EXIT_SAPLAD15_010.
    *"*"Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(I_DLISRC) LIKE  AD01DLIA-DLISRC
    *"     VALUE(I_KOKRS) LIKE  TKA01-KOKRS
    *"  TABLES
    *"      T_COVP STRUCTURE  COVP OPTIONAL
    *"      T_COSPA STRUCTURE  COSPA OPTIONAL
    *"      T_COSSA STRUCTURE  COSSA OPTIONAL
    *"      T_COVPR STRUCTURE  COVPR OPTIONAL
    *"      T_COSRA STRUCTURE  COSRA OPTIONAL
    *"      T_V_COFP STRUCTURE  V_COFP OPTIONAL
    *"      T_FMSUA STRUCTURE  FMSUA OPTIONAL
    *"      T_CKF_DIP_CUSTOMER_EXIT STRUCTURE  CKF_DIP_CUSTOMER_EXIT
    *"       OPTIONAL
    *"      IT_OBJECTS STRUCTURE  AD01OBJ OPTIONAL
      INCLUDE ZXAD1U10.
    ENDFUNCTION.
    *   INCLUDE ZXAD1U10                                                   *
    CASE I_DLISRC.
      WHEN '0001'. "Istkosten
        PERFORM DP90.
      WHEN '0021'. "Plankosten
        PERFORM DP80.
    ENDCASE.
    FORM DP80.
    BREAK-POINT.
    ENDFORM.                                                    "DP90
    FORM DP90.
    BREAK-POINT.
    ENDFORM.                                                    "DP90
    I get this syntax-error:
    Incorrect nesting: Before the statement "FORM", the structure
    introduced by "FUNCTION" must be concluded by "ENDFUNCTION
    Isn't it possible to use own Forms in includes of exits?
    Thanks, Regards Dieter

    when you do this:
    function.
      include zx
    endfuncion.
    include ZXAD1U10
    form aaa.
    endform.
    the abap engine see this:
    function.
      form aaa. " this is because the incorrect nesting error apperars
      endform.
    endfuncion.
    so, you can do two things:
    1° put your include sentence in the top of the function group, not inside the exit.
    2° try with dinamyc sencentes include (zx...)  perform (routine).

Maybe you are looking for

  • Can I have the same library on two computers?

    I would like to run iTunes off two computers..work and home with my same library. Can I? How? Thank you much

  • How can I erase old sports schedules

    I have schedules for 5 sports teams. Football, baseball and hockey. I have the settings to remove anything over 60 days, HOWEVER : (1) Last years football and hockey full season games are still showing. (2) The full baseball schedule is showing from

  • Exposing rest services in custom managed server

    Hi everybody, I want to know how can expose the rest sevices for custom managed server which is created from webcenter custom portal template ???? Thanks.

  • New ending for every download?

    Is it possible for the Quicktime server to dynamically edit a Quicktime movie and make it available for download? For example, each time the movie is requested, it has a different ending...the difference being a new closing graphic has been appended

  • Mail crashing during send

    After searching the forums I've seen some posts that are similar to my problem, but none that are close enough to help. When I open mail things appear to work fine, but when I compose a message (via send or reply) mail hangs for a few seconds, I get