Incorrect nesting error in user exit include

Hi,
In one of my requirement I had to add an additional screen using EXIT_SAPMM06E_016, this Function module exists in XM06 Function group, this exit holds an include ZXM06U41.
This function group holds screens, so when I implement a screen and create the PBO module in this particular include, it by default includes
MODULE STATUS_XXX OUTPUT.
ENDMODULE.
When i check this include it says:
Incorrect nesting: Before the statement "MODULE", the structure introduced by "FUNCTION" must be concluded with "ENDFUNCTION".
I have no clue where the open function is?
Your help will be very much appreciated.
Please help.
Thanks,
-Sandeep

You cannot define a screen module in a function module code.
Refer to available documentation how to properly implement enhancements of this kind. Enhancement name is MM06E005 (in SMOD). Screen definitions and the corresponding modules will happen in function group XM06, not in the exit function module.
Edit: To elaborate, your PBO module will go into include ZXM06ZZZ, or better yet, into new include ZXM06O01 which should be part of ZXM06ZZZ (just to keep the usual naming convention).
Edited by: Tamas Hoznek on Feb 28, 2012 2:51 PM

Similar Messages

  • ATC not checking code in user exit includes

    Dear Friends,
    I'm not sure if you have faced this issue, but I have not found anyone or any post or any document or any OSS note talking about it.
    I've recently have realized than when using ATC for checking the custom code of an Z include it was finding cero errors when it was actually full of them.
    In fact using code inspector, the errors where found. It was not an issue of using a different variant, this was checked, CI and ATC are using the same,
    The issue itself was clear: When the ATC checks a parent object its checks the code of its includes. If you try to check an include directly with ATC, it is ignored with message "No checks are available for the objects types", giving the chance to "add master program" so it will be checked when the master program is checked with all its includes. Last, ATC neither Code Inspector checks custom code.
    The end result is that when trying to check the code in a user exit include with ATC it does not find any error.
    I can think about encapsulating the code found in a user exits but this is a titanic task.
    The main problem is that the jobs for getting in CCLM the quality required massive ATC runs that will not catch the errors in these kind of objects.
    Have you face this issue? do you have any recommendation?
    I would like your opinion before raising this as customer message, as from my point of this this may require a SAP correction.
    Thanks
    Aubin

    Hello Aubin,
    to be perfectely honest I have not started with the indeep analysis yet. One reason is that the behaviour regarding exit techniques has got improoved recently so it is important to do the analysis on a SP level close / identical to yours.
    If I am not mistaken CMOD function exits yield into 2 TADIR keys:
    - 'R3TR' 'FUGX' .... - referring to the definition of the function group - typically provided by SAP - residing in a SAP package
    - 'R3TR' 'FUGS' .... - referring to the implementation - typically custom code - residing in a Z-Package
    My initial assumpution was that mapping partobjects always return FUGX but shall return FUGS. And also I was assuming the custom package shall contain the 'FUGS' implementation which shall enable checking out of the box.
    But it seems these assumptions are not valid. I am not sure wether I would be able to analyse this issue this week. In any case I will update this thread as soon as the analysis has been done.
    Best Regards
      Klaus

  • Trouble hitting breakpoint in User Exit Include

    Greetings,
    I am having a problem where I cannot get a transaction to stop at a breakpoint that I have set in a user exit include program (<b>ZXEDFU02</b> starting from transaction <b>VF04</b>) and I cannot figure out why.  I am sure that the exit code is being executed because of the results, and if I put a syntax error in this include and activate and execute, i receive a short dump at the syntax error - evidence that the program is in the include code. 
    I have even tried switching on system and update debugging just to be sure, but no matter what I cannot hit this exit.  The exit for those unfamiliar allows the addition of additional data to segments of the INVOICE02 IDOC in SD.
    Thank you in advance for any help you can provide.
    Geoff

    Hi Geoff,
    The problem most probably lies with the fact that in default mode VF04 does not perform the update logic synchronously (for performance reasons).  The only thing that is performed synchronously is the selection of the data, the bundling of the data into work packets, and the submission of these work packets for execution. 
    Thus, you do not hit your break point for debugging (the actual code gets executed either in a background or update work process).  You will, however, get short dumps if the synchronous section of the program uses any function module in the function group in which you have introduced syntax errors (hence how you can get short dumps but still not stop at the break point).
    The way to solve this is right down the bottom of the VF04 transaction you have an option for Update:
    Asynchronous
    Synchronous via VB log
    Synchronous w/o VB log
    By default it is set to the first option.  If you choose either option 2 or 3, you should then run the update logic synchronously and stop at your breakpoint.
    If this still doesn't work, you have still another thing to try.  Before hitting execute, put in /H at the okcode.  When you hit execute it will throw you into debug mode.  Hit the settings button (far right) and flag the option 'In background task: do not process', and then continue.  Any background processes started will be thrown up into another session in debug mode.  Go to this other session and hit continue.  You SHOULD stop at your breakpoint if it is being processed as a background job.
    If this still doesn't work then you have some options for update debugging.  Let me know and I'll see if I can help.
    Cheers,
    Brad

  • User Exit - Include for delivery document?

    Can anyone please tell me the user exit / include details that control creation / mofiication of outbound delivery document
    I need to figure out a solution to create a split delivery if the country of origin of material is different in the stock
    Say, if the SD order line item requires 76 units, and the stock has 50 units from one country and 26 from another, then it should result in split deliveries - each with line item of a unique country of origin

    SM,
    If the origin country is different (say US for line item 1 for Qty 75, and GB for line item 2, qty 25 wouldn't you have different plants & shipping points for each line item?
    Scenario: At the time the sales order is created, there are 100 on a single line all for the same country (because as you say, it is not known during Order create). Then, when it comes time to create the delivery, you know that 75 come from US and 25 from GB. So, reduce qty on line item to 75 (US plant & Shipping Point), and create a new line item for 25 (GB Plant & shipping point). Then, your copy routines from Sales Order to Delivery would force you to split between different deliveries.
    A sales order can have different shipping points - one for each line, but the delivery holds the shipping point at the header, so you cannot mix them.

  • User-exit include

    Hi
    when i double click on user-exit include following message is coming but not able to go inside the include
    message "Program names ZX... are reserved for includes of exit function groups"
    thanks,
    Anji

    The idea is, in the FM, when you double-click on the include....
    if it exists, it will directly navigate into the include.
    If the include doesnt exist, it throws up the warning-message you mentioned, and then proceeds to ask if you want to create the include.

  • Message error on user-exit MV50AFZ1

    Hi!
    I need to send a message error on user-exit MV50AFZ1 (VL01N), but I can't, because when I use BAPI_DELIVERYPROCESSING_EXEC for create deliveries, it will abort my program.
    My program try to create many deliveries together, when occurs a message error, I don't know what order is the problem!!
    Thanks,
    Tatiana

    Hello.
    In the exit, use a condition like:
    IF sy-tcode EQ 'VL01N'.
      MESSAGE E000(...)
    ENDIF.
    This will avoid the error in BAPI execution.
    Regards,
    Valter Oliveira.

  • User Exit---Include problem

    Hi all
    am creating a user exit ZFF67 and in the the enhancement assignment am giving as F40K0001.But when i go back and after saving and activating am going to the function module and there in the source code am double clicking on   INCLUDE ZXF40U01 but am getting a warning meessage
    Program names ZX... are reserved for includes of exit function group.Am getting the same error even if am trying to create some other user exit.If its a BASIS issue and if you know the solution.Please do help me
    with regards
    Vijay.

    Hi
    Press ENTER..
    That should be only warning: the system are saying to you you're creating an abap object reserved for enhancement, but it's what you have to do.
    The system can't know you want to create an include for an exit, because you're in abap editor while doing the doubleclick.
    So you can go on.
    Regards
    Kiran Sure
    *P.S--Close the Duplicate Postings..

  • How to find all the user exits includes ,

    Hi All ,
    I need to find all the includes which are created for purpose of implementing user exits , I know they all start with ZX* but where to get the list .
    THank you all
    Vinay Kolla

    Hi Vinay....
    Just excute following program in your ABAP Edter....
    ( Input parameters: T'CODE and User exit type.)
    >TABLES: MODSAP, MODACT, TSTC.
    >
    >PARAMETERS: INPUT1 LIKE TSTC-TCODE DEFAULT ' ',
    >           INPUT2 LIKE MODSAP-TYP DEFAULT ' '.
    >
    >DATA: SEARCH1(6),
    >      SEARCH2(3),
    >      SEARCH3 LIKE MODSAP-MEMBER.
    >DATA : FIRST_ROW VALUE 'Y'.
    >
    >CONCATENATE: '%' INPUT1 '%' INTO SEARCH1,
    >             '%' INPUT2     INTO SEARCH2.
    >
    >SELECT * FROM TSTC WHERE TCODE LIKE SEARCH1.
    >  FIRST_ROW = 'Y'.
    >  CHECK TSTC-PGMNA NE SPACE.
    >  CONCATENATE '%' TSTC-PGMNA '%' INTO SEARCH3.
    >  SELECT * FROM MODSAP WHERE TYP LIKE SEARCH2
    >                       AND MEMBER LIKE SEARCH3.
    >    SELECT SINGLE * FROM MODACT WHERE MEMBER = MODSAP-NAME.
    >    IF FIRST_ROW EQ 'Y'.
    >      WRITE: /0 TSTC-TCODE, 6 TSTC-PGMNA, 16 MODSAP-NAME, 32 MODSAP-TYP,
    >                                       45 MODSAP-MEMBER, 70 MODACT-NAME.
    >      FIRST_ROW = 'N'.
    >    ELSE.
    >WRITE: /16 MODSAP-NAME, 32 MODSAP-TYP, 45 MODSAP-MEMBER, 70 MODACT-NAME.
    >    ENDIF.
    >    CLEAR : MODSAP, MODACT.
    >  ENDSELECT.
    >  IF SY-SUBRC NE 0.
    >    WRITE : /0 TSTC-TCODE, 6 TSTC-PGMNA, 30 'No exits found'.
    >  ENDIF.
    >  CLEAR TSTC.
    >ENDSELECT.
    >
    >END-OF-SELECTION.
    >  CLEAR: SEARCH1, SEARCH2, SEARCH3.
    Thanks,
    Naveen Inuganti.

  • Error in user exit for System menu

    Hi,
    I was working on the user exit for the System menu.
    There was some error in the menu exit I added and then logged off.
    Now when I am tryin to log in the system again and error is given without allowing me to login because the initial log on screen loads the system menu.
    Can anyoone help me resolve this issue.
    Edited by: Ashutosh Tripathi on Mar 26, 2008 11:16 AM

    Michael,
           Thanks for the quick response,
    I did check in IMG, an entry is already there, the 'primary field' is checked,
    USD is assigned to the iso code USD.
    Regards,
    Disney.

  • Error Message, user exits, and editing disabled problem.

    HEllo I recently had an assignment where I have to create a user exit with an error message. I had no problems with the error message but after an error occurs, with this line:
    <b>  MESSAGE ID 'ZSD' TYPE 'W' NUMBER '002'.</b>
    the fields have become disabled and there seems to be no way to enable the fields for changing. Is there a way to fix this. Thanks people and take care!

    Oh, TYPE E,  when issuing an error message, all fields are disabled unless you tie it to a field or group of fields.  This is commonly done by using the CHAIN...ENDCHAIN statements in the PAI of the screen.  Do you have access to this?  I assume that you are issueing the message from within a MODULE, right?  You are probably calling this module in the PAI flow logic of the screen.  You will need to do something like this.
    Here P_BUKRS is the screen field and CHECK_BUKRS is the module where you are checking the value and issuing the error message.  Using the CHAIN, you can tie other fields to the check so that they are also enabled when the error message is issued.
    CHAIN.
    field p_bukrs module check_bukrs.
    ENDCHAIN.
    Regards,
    Rich Heilman

  • F110 User Exit: Include ZXTDAU01

    Before a refresh I added code to the Include mentioned.However, I cannot find the User Exit in SMOD to activate the code in CMOD. I know to run the Find User exit utility for F110, but I do not see this user Exit listed. Is there a way, table?, I can find the User Exit I re-coded EXIT_SAPMFDTA_001(ZXTDAU01), in a table that would link me to the SMOD or other data so I can activate the User Exit?
       Thank-You.

    go to t-code Se15-->expand the enhacement tab-->enter userexit                
                                 (EXIT_SAPMFDTA_001) or Include ZXTDAU01 ..under exit name and
                               execute you will get the list of Implementataions...
    All the User exits are stored in Table MODSAP..
    Prabhudas

  • IS_U_METER_READING_DOWNLOAD  --- User Exit Include

    Hi,
    i have copied the IS_U_METER_READING_DOWNLOAD into ZIS_U_METER_READING_DOWNLOAD.
    Here i want to write some logic on User Exit. But How to find User Exit in IS_U_METER_READING_DOWNLOAD?
    Please give me way how to find the User Exit for any application form in EFRM Transaction.
    Regards
    Balu

    Hi,
    You can add user exit to any of the nodes in Hierarchy.
    There are maximum of three user exit, that you can add to any node.
    1. Before Exit
    2. During Exit
    3. After Exit
    Just double click on any node in hierarchy in which you want to add the user exit. For the window, you will be provided with the option to add the user exit.
    Define the exit you want to add and save it. Automatically, the exit will be added for the code logic, in the main include defined in the Attributes of the application form. (If not defined, please create the include and add it in the attribute).
    Use of User Exit -
    1. Exit Before Loop is called only once per entire execution, before processing of form level.  It can be used for making additional selection and pre sorting arrangement.
    2. Exit During loop is called once for each line item. (It is called in loop).
    3. Exit After Loop is also called only once at the end of processiong of form level.

  • ABAP program error for user EXIT

    Hi, I wrote code in  EXIT_SAPLRSAP_001
    When check and active it there were no syntax errors but when go rsa3 and check it gives an error at the follwing line
      it_mcekpo[] = c_t_data[].
    Runtime error: The internal talbles are neither compitable nor convertable.
    I have defined it_mcekpo as below:
    DATA  BEGIN OF IT_MCEKPO OCCURS 1.
            include structure mcekpo.
    DATA  END   OF IT_MCEKPO.
    But when I double click on 'c_t_data[]' , I get a message "object not defined, do you want do define".
    Can some one tell me how should I define this, what aption I should choose and what is the strcture.
    I am trying to add afnam, banfn and bednr from ekpo table to MC02M_0ITM (2LIS_02_ITM).
    And is there any naming convention for 'it_mcekpo' and 'c_t_data'?
    Any help is appreciated.
    (This is my first userexit)
    data: begin of it_ekpo occurs 0,
          ebeln like ekpo-ebeln,
          ebelp like ekpo-ebelp,
          afnam like ekpo-afnam,
          banfn like ekpo-banfn,
          bednr like ekpo-bednr,
         bukrs like ekpo-bukrs,
      end of it_ekpo.
    when '2LIS_02_ITM'.
      it_mcekpo[] = c_t_data[].
      select ebeln ebelp afnam banfn bednr bukrs
      from ekpo  into table it_ekpo
        for all entries in it_mcekpo
        where ebeln = it_mcekpo-ebeln and
              ebelp = it_mcekpo-ebelp.
    performance imprv.
      if not it_ekpo is initial.
         sort it_ekpo by ebeln ebelp.
      endif.
      loop at it_mcekpo.
        read table it_ekpo with key ebeln = it_mcekpo-ebeln
                                    ebelp = it_mcekpo-ebelp
                                    binary search.
        if sy-subrc = 0.
          it_mcekpo-zzafnam = it_ekpo-afnam.
          it_mcekpo-zzbanfn = it_ekpo-banfn.
          it_mcekpo-zzbednr = it_ekpo-bednr.
         it_mcekpo-zzabukrs = it_ekpo-bukrs.
       endif.
       modify it_mcekpo.
    endloop.

    Hi,
    TRY the below code :
    TYPES BEGIN OF TYPE_02ITM.
         INCLUDE STRUCTURE MC02M_0ITM.
    TYPES END OF TYPE_02ITM.
    TYPES:  BEGIN OF TYPE__ekpo,
    ebeln like ekpo-ebeln,
    ebelp like ekpo-ebelp,
    afnam like ekpo-afnam,
    banfn like ekpo-banfn,
    bednr like ekpo-bednr,
    bukrs like ekpo-bukrs,
    end of type_ekpo.
    CASE I_DATASOURCE.
    when '2LIS_02_ITM'.
    WHEN '2LIS_02_ITM'.
    DATA:
      ITAB_EKPO TYPE STANDARD TABLE OF TYPE_EKPO
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    DATA:
      ITAB_02ITM TYPE STANDARD TABLE OF TYPE_02ITM
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    ITAB_02ITM[] = C_T_DATA[] .
    select ebeln ebelp afnam banfn bednr bukrs
    from ekpo into table itab_ekpo
    for all entries in ITAB_02ITM
    where ebeln = ITAB_02ITM-ebeln and
    ebelp = ITAB_02ITM-ebelp.
    performance imprv.
    if not itab_ekpo is initial.
    sort itab_ekpo by ebeln ebelp.
    endif.
    loop at ITAB_02ITM.
    read table itab_ekpo with key ebeln = ITAB_02ITM-ebeln
    ebelp = ITAB_02ITM-ebelp
    binary search.
    if sy-subrc = 0.
    ITAB_02ITM-zzafnam = itab_ekpo-afnam.
    ITAB_02ITM-zzbanfn = itab_ekpo-banfn.
    ITAB_02ITM-zzbednr = itab_ekpo-bednr.
    ITAB_02ITM-zzabukrs = itab_ekpo-bukrs.
    endif.
    modify ITAB_02ITM.
    endloop.
    c_t_data[] = ITAB_02ITM[].
    With rgds,
    Anil Kumar Sharma .P

  • System Error in User exit.

    Hi Guys,
    I am working on a PO exit(Enhancement: MM06E005 and Component: EXIT_SAPMM06E_013), the problem I am facing is if i throw an error message, it gets displayed as information message and then pop ups a system error message (error in method PO_CHECK).
    I tried using BADI and got the same message.
    If I use a different component EXIT_SAPMM06E_013, I am getting the error message.
    Any thoughts on this.
    Regards,
    Madhu C

    I'm doing two-step picking.
    First step is creating wave pick (delivery grouping) based on shipment (transaction VL35_S) and then transfer order for group (transaction LT0E).
    In that moment, it is possible that I transfer on the bin less materials then needed (variable weight, etc.) .
    When doing collective picking (VL06P) for the deliveries from the bin, it could happen shortage on the bin end I get the message 'System cannot find source storage bin' which is OK but I don't want to klick on the screen for every item shortage.
    Hope you got the picture ...
    Ante

  • How to work with user-exit include?

    Hi,
    I want to change the field 'No of packages' (LIKP-ANZPK) in VL02N.
    I have a func module EXIT_SAPLV50R_001 with an include ZXV50U08, when I double click it's not creating but it says 'Program names ZX... are reserved for includes of exit function groups'.
    What should I do?
    Thanks!
    Tarick.

    Hi,
    Its just a warning message. Just click enter. It will go inside the FM
    Cheers,
    Kothand

Maybe you are looking for