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

Similar Messages

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

  • 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

  • How to read data which is not on interface of user-exit

    Hi experts,
    the data which I need is not on interface of user-exit. I can do export table to memory id and than in user-exit import that. Does this work always?
    I have seen that sometimes is possible to see data with
    (include-name)table-name. Can I always use this?
    In detail: in transaction ME51N is new tabstrip created with customer fields.I have to know the purchase order for the selected item which is filled on another tabstrip.
    Can anyone help me?
    Thanks.
    Best regards,
    Danijela

    Hi Danijela,
    To answer your question about the "(module)object" approach:
    Have you been in a user exit function and the data you need wasn't passed on to you? You can easily grab the data from the memory stack using this little trick. Let's say that you need some IDoc information that was created from the function IDOC_INPUT_DELVRY... You can get it directly from the call stack like this.
    The code was written in R/3 4.6C but should work in any SAP version.
    DATA: i_EDIDC like EDIDC,
          i_EDIDD like EDIDD occurs 0 with header line.
    CONSTANTS:
          c_EDIDD(21)  value '(SAPLV55K)IDOC_DATA[]',
          c_EDIDC(21)  value '(SAPLV55K)IDOC_CONTRL',
          c_E1ADRM1(7)      value 'E1ADRM1'
          c_SHPCON(6)  value 'SHPCON'.
    Field-symbols: <FC>, <FD> .
    clear: i_EDIDC, i_EDIDD.
    refresh: i_EDIDD.
    * Get the Control Record from memory
    assign (c_EDIDC) to <FC>.
    if SY-SUBRC = 0.
      i_EDIDC = <FC>.
      IF i_EDIDC-MESTYP = c_SHPCON.
    *   None of the partner information can be passed directly from
    *   the IDOC function, so we'll get it from memory.
    *   Get IDOC data records from memory
        assign (c_EDIDD) to <FD>.
        i_EDIDD[] = <FD>.
    *   Now you have the entire IDOC available to you without making
    *   a DB select.
        read table i_EDIDD with key SEGNAM   = c_E1ADRM1.
    *   Load new value HERE...
      ENDIF.
    ENDIF.
    I found this a long time ago on the web and used it successfully multiple times in the past.
    Hope this helps,
    Guenther

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

  • Code for user-exits

    hey guys i want the code for user-exits for  inclusion of Excise Chapter ID mandatory in PO .....
    regards,
    Naveen

    which user exit u are using ?
    check the BADI for the same .
    SE15->Enhancements->BADI--->definations -
    >search on Package = ME.
    and see BADI definition called Process _cust.
    Regards
    Peram

  • How to Include code in User Exit

    Dear Experts
    I have a requirement where at the time of saving a delivery (SAPMV50A) SAP picks up the number range defined by us in table TVARV . My queries are
    a. Any idea which will be the best user exit for this ?
    b. And second suppose I have found a user exit in the code as follows
    form user_exit_xyz
    *comment
    endform user_exit_xyz.
    can I just go ahead and create an include in this subroutine ? If not what steps do I need to take ?
    Please help !
    rgds
    Sameer
    Moderator message: please search for information and try yourself before asking.
    Edited by: Thomas Zloch on Mar 4, 2012 9:47 PM

    Hi Sameer,
    It is not clear.If it is a sub routine then create a implicit enhancement point and keep your code.This is possible.What is the business requirement.
    Regards,
    Madhu.

  • Include authority check in PM User exit

    Dear all,
    Is there any user exit for adding an authority check object in IW31 transaction program?
    Kindly advise.
    Thanks.

    Hi,
    There is a Function module AUTHORITY-CHECK to check the authrization, here you can give the trnasaction code as well as the user name .. look at the function module in SE37..
    In general different users will be given different authorizations based on their role in the orgn.
    We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.
    USe SUIM and SU21 T codes for this.
    Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.
    If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.
    This means you have to allocate an authorization object in the definition of the transaction.
    For example:
    program an AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT <authorization object>
    ID <authority field 1> FIELD <field value 1>.
    ID <authority field 2> FIELD <field value 2>.
    ID <authority-field n> FIELD <field value n>.
    The OBJECT parameter specifies the authorization object.
    The ID parameter specifies an authorization field (in the authorization object).
    The FIELD parameter specifies a value for the authorization field.
    The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
    http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.
    You program the authorization check using the ABAP statement AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
    ID 'ACTVT' FIELD '02'
    ID 'CUSTTYPE' FIELD 'B'.
    IF SY-SUBRC <> 0.
    MESSAGE E...
    ENDIF.
    'S_TRVL_BKS' is a auth. object
    ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.
    The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
    This Authorization concept is somewhat linked with BASIS people.
    As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a profile and that profile in turn attached to a particular user.
    Take the help of the basis Guy and create and use.
    <b>Reward points if useful</b>
    Regards
    Ashu

  • T code for User exits.

    hai all MM gurus,
    How to find out the user exits for any Tcodes or for any documents?.

    for this there is a user written program called "zuserexit" which will be available. Run the program & give Tcode as input u ll get all exits for that.
    http://www.sap-img.com/ab038.htm
    Finding the user-exits of a SAP transaction code
    Finding the user-exits of a SAP transaction code
    Enter the transaction code in which you are looking for the user-exit
    and it will list you the list of user-exits in the transaction code.
    Also a drill down is possible which will help you to branch to SMOD.
    Written by : SAP Basis, ABAP Programming and Other IMG Stuff
                 http://www.sap-img.com
    report zuserexit no standard page heading.
    tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
             tables : tstct.
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    parameters : p_tcode like tstc-tcode obligatory.
    select single * from tstc where tcode eq p_tcode.
    if sy-subrc eq 0.
       select single * from tadir where pgmid = 'R3TR'
                        and object = 'PROG'
                        and obj_name = tstc-pgmna.
       move : tadir-devclass to v_devclass.
          if sy-subrc ne 0.
             select single * from trdir where name = tstc-pgmna.
             if trdir-subc eq 'F'.
                select single * from tfdir where pname = tstc-pgmna.
                select single * from enlfdir where funcname =
                tfdir-funcname.
                select single * from tadir where pgmid = 'R3TR'
                                   and object = 'FUGR'
                                   and obj_name eq enlfdir-area.
                move : tadir-devclass to v_devclass.
              endif.
           endif.
           select * from tadir into table jtab
                         where pgmid = 'R3TR'
                           and object = 'SMOD'
                           and devclass = v_devclass.
            select single * from tstct where sprsl eq sy-langu and
                                             tcode eq p_tcode.
            format color col_positive intensified off.
            write:/(19) 'Transaction Code - ',
                 20(20) p_tcode,
                 45(50) tstct-ttext.
                        skip.
            if not jtab[] is initial.
               write:/(95) sy-uline.
               format color col_heading intensified on.
               write:/1 sy-vline,
                      2 'Exit Name',
                     21 sy-vline ,
                     22 'Description',
                     95 sy-vline.
               write:/(95) sy-uline.
               loop at jtab.
                  select single * from modsapt
                         where sprsl = sy-langu and
                                name = jtab-obj_name.
                       format color col_normal intensified off.
                       write:/1 sy-vline,
                              2 jtab-obj_name hotspot on,
                             21 sy-vline ,
                             22 modsapt-modtext,
                             95 sy-vline.
               endloop.
               write:/(95) sy-uline.
               describe table jtab.
               skip.
               format color col_total intensified on.
               write:/ 'No of Exits:' , sy-tfill.
            else.
               format color col_negative intensified on.
               write:/(95) 'No User Exit exists'.
            endif.
          else.
              format color col_negative intensified on.
              write:/(95) 'Transaction Code Does Not Exist'.
          endif.
    at line-selection.
       get cursor field field1.
       check field1(4) eq 'JTAB'.
       set parameter id 'MON' field sy-lisel+1(10).
       call transaction 'SMOD' and skip first   screen.
    *---End of Program

  • DESADV outbound. not sure on correct user exit

    Hi,
    I have been asked to extend the DESADV idoc to include a new segment underneath the E1EDP07 area. I have create a new segment (one we are using on an extended ORDERS01) but I am a little confused on the best way of proceeding.
    I used a customer enhancement project MM06E001 (EXIT_SAPLEINM_002) for the ORDERS01 modification and this worked well - but I dont seem to be able to use a similar structure for DESADV from a delivery document.
    I have found out there is a user exit (USEREXIT_E1EDP07 in Program LVED2FZZ) but I am not sure if I can use this. In my enhancement I managed to include the code in the new segment as I basically coded to say - If parent segment was the last segment updated then the next one should be the new segment. The user exit in LVED2FZZ looks like it is specifcally updating when it hits E1EDP07. I would want to populate some entries in E1EDP07 and my new segment in the same loop - although not sure if you can do this.
    I can send more details if it helps - but basically I am looking for the best way to populate a new segment which has E1EDP07 as the parent segment.
    Any ideas???
    Regards
    Paul

    wow this is very close now... it seems like I have been misinformed and the zsegment should actually sit under E1EDP09. The delivery I have has two lines and the output I am getting in the idoc is slightly wrong. I get two Z1PCK1 lines but they both are located under the first E1EDP09. This should only have one entry and the second E1EDP09 should also have an entry.
    I have the following code
    data: lv_index type sy-tabix.
    data: zsegment type Z1PCK1.
    data: wa_edidd type edidd.
    read table int_edidd with key segnam = 'E1EDP09'.
    if sy-subrc eq 0.
    lv_index  = sy-tabix + 1.
    endif.
      zsegment-ZWIDTH = 100.
      zsegment-ZLENGTH = 101.
      zsegment-ZHEIGHT = 102.
      zsegment-ZPACKWIDTH = 103.
      zsegment-ZPACKLENGTH = 104.
      zsegment-ZPACKHEIGHT = 105.
      zsegment-ZPACKSIZE = 106.
    wa_edidd-segnam = 'Z1PCK1'.
    wa_edidd-sdata = zsegment.
    insert wa_edidd into int_edidd index lv_index.
    clear wa_edidd.
    clear int_edidd.
    clear lv_index.
    I am sure this is something to do with the lv_index. When I run this through debugger both times lv_index = 18. I tried to change the value of this to 19 and also 20 but it still didn't work.
    I basically get the following in the structure
    E1EDP07
    ->E1EDP09
    -->Z1PCK1
    -->Z1PCK1
    ->E1EDP09
    ->E1EDPT1
    any ideas on how to fix the index issue to work with multiple lines??
    Regards
    Paul

  • Datasource Enahncement - What is the case when i am not req to do USER Exit

    Experts,
      Can someone explain me what is/are the cases when i do not require to code in the user exit to populate the enhanced field?
    I see for some datasource the enhanced values are populated automatically.
    Appreciate your answers.
    Thanks
    Hari

    Hi Hari,
    In some cases we  do not need to write any code .
    Whenever we need to enhance our datasource we first check in LBWE if the required filed is available in the pool .
    If it is available in pool we simply transfer it to extract structure and in this case we do not write wny code.
    The second case is when we append our extractiion structure because the required field is not abailabl ein the pool.
    In this case we need to write code to populate the field.
    Hope it helps
    Manish Sharma

  • Schedule Line Date Changed By Standard Code After User Exit

    We've implemented USEREXIT_MOVE_FIELD_TO_VBEP to conditionally change the schedule line date (it changes VBEP-EDATU) when sales orders are being created.  This functions correctly when VA01 or EDI is used.  However, when the order is created using BAPI_SALESORDER_CREATEFROMDAT2, standard code executing after the user exit changes the schedule line date to an incorrect value. 
    The user exit correctly changes the schedule line date; then later on in the execution subroutine VBEP_FUELLEN_VBEPKOM in include FV45EFEP_VBEP_FUELLEN_VBEPKOM is executed which changes the date on line 37 using the value in US_VBEPKOM-EDATU.  US_VBEPKOM-EDATU is in scope in the user exit, but earlier in subroutine VBEP_FUELLEN_VBEPKOM (line 12 to be exact) this variable is updated with the value in US_VBEPKOM1-EDATU, which is not in scope during the user exit.  So, USEREXIT_MOVE_FIELD_TO_VBEP doesn't have access to US_VBEPKOM1-EDATU and can not ensure that the correct value is used later on in subroutine VBEP_FUELLEN_VBEPKOM.
    I noticed at the end of subroutine VBEP_FUELLEN_VBEPKOM it calls USEREXIT_MOVE_FIELD_TO_VBEPKOM.  I could update VBEP-EDATU here to correct the error whenever the order is created using the BAPI, but it would be nice to have a solution that could be implemented only in USEREXIT_MOVE_FIELD_TO_VBEP without also having to implement USEREXIT_MOVE_FIELD_TO_VBEPKOM.
    So my question: is there a way to update the schedule line date in USEREXIT_MOVE_FIELD_TO_VBEP where it won't be changed later in subroutine VBEP_FUELLEN_VBEPKOM when the order is created using the BAPI?

    Hi Caetano,
    thanks for your suggestion
    Yes, we use firm zone for few of the vendors. there the system don't change the schedule lines.
    Also for the stock transfer PR's there is no firm zone and the lead time is one day. in this case it changes everyday after the MRP run.
    the stock transfer PR's leads to the creation of Schedule lines from the source plant. Since this PR gets changed everyday. the alerts coming out of MD07 gets changed and we really did not know if this order is delayed or not.  In the source plant we use the firm zone to avoid moving the schedule line. But then the alerts are always not correct.
    is there any setting which helps in not moving the PR everyday without using " start in the past"
    thanks
    Nagendra Kumar

  • How to code the user exit userexit_number_range from mv45afzz

    Hi, i need to modify the user exit userexit_number_range from mv45afzz, this is an standard include so when i try to modify i get the request for the my access code.
    Can someone explain me what is the procedure to modify an user exit.
    Do i need to request an access code to modify this user exit.
    am i complete lost in the proces of coding user exits?
    i have already check many of the message posted.
    thank for advance

    Hi
    MV45AFZZ is a customer user exit to add customer functionality....so when u change first time..you need to provide access key...for the object...
    Take a Print screen of the screen displayed and send it to basis guy..who can provide you with access key for that object..then u can enter that value and modify the user-exit...
    To add your code into this user-exit...u need to place the cursor in the routine u want to change..and press Insert button on the Tool bar... which will open up space for u to enter the code...
    Thanks
    Balu

  • 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

Maybe you are looking for