Restricting user exit ZXEDFU02 to one customer in WE20

I'm new to SAP. I've just written a code in user exit 002 (include zxedfu02) for the bill-to party invoice IDOC generation (FUNCTION IDOC_OUTPUT_INVOIC). My code is working perfectly. The only problem is I would like to restrict the use of this user exit to only one of my customers. From my understanding once I've programmed the user exit, every IDOC that is generated using IDOC_OUTPUT_INVOIC will perform my user exit, however I would like to be only executed for one partner. How do I do this?
If possible, please post a step by step solution to my problem, I would really appreciate your help.
Thanks in advance.
Edited by: mrisad on Jul 29, 2010 4:21 PM

Hello Mrisad,
As per your input, your exit function module EXIT_SAPLVEDF_002 contains CONTROL_RECORD_OUT as the import parameter.
Within your include please check the value of the following(which are the reciver related values) in the debugging mode.On top of your current code you can add this check, and include ur current code within this check.
RCVPOR
RCVPRT
RCVPRN
RCVSAD
RCVSMN
RCVSNA
RCVSCA
RCVSDF
RCVSLF
RCVLAD
Hope this will help you..
Regards,
Antony Thomas

Similar Messages

  • Extend Idoc IINVOIC - User exit ZXEDFU02

    Hi All,
    I am trying to extend a standard IDocs – IINVOIC with custom segment. I am using User Exit ZXEDFU02 populating segment data for FI Document posting  .
    Every thing is ok but I am facing problem when I am trying to multiple delivery assignments in FI Documents.
    Right now FI Document is generating through IDocs and assignment is only one delivery but I want multiple assignment in FI Documents if invoice have multiple Delivery.
    Could anybody help me.
    Thanx in advance.
    Regards,
    Vijay Maurya

    solved by changing user exit.

  • Adding lines to segment of Idoc in User Exit ZXEDFU02

    Hi!
    do I need to maintain Idoc in WE30 if I need to add some lines to one segment in User Exit ZXEDFU02?
    Here is my sample code placed in ZXEDFU02 for adding a line, but it is not making an effect:
    WHEN 'E1EDP01'.
        CLEAR E1EDP26.
        E1EDP26-QUALF = '003'.
        E1EDP26-BETRG = 777.
    or maybe it depends on Idoc that I use in We19?
    For example, if Idoc that I use in WE19 for testing my User Exit does not has qualifier 003 in segment E1EDP26... could it be a reason?
    Will reward,
    Mindaugas.

    Hi,
           Saple Code:
    INCLUDE ZXEDFU02 *
    data: ls_ka1 like e1edka1,
    ls_edidd like edidd,
    l_lines type i.
    describe table int_edidd lines l_lines.
    check l_lines ne 0.
    read table int_edidd into ls_edidd index l_lines.
    check ls_edidd-segnam eq 'E1EDKA1' and
    ls_edidd-sdata(2) eq 'RS'.
    ls_ka1-parvw = 'ZC'.
    case xvbdkr-bukrs.
    when '1000'.
    ls_ka1-lifnr = '41010005823845840'.
    when others.
    exit.
    endcase.
    ls_edidd-sdata = ls_ka1.
    append ls_edidd to int_edidd.
    Regards

  • Testing User Exit ZXEDFU02

    Hi!
    I have made some modifications in User Exit ZXEDFU02, if to be more precise I have populated some more lines in segments of Idoc of Invoice List.
    And now I want to test it.
    The thing is that I do not know SAP SD, because I'm ABAP programmer and do not know how to check if my Invoice List changed after changing User Exit ZXEDFU02... any ideas?
    Help will be rewarded,
    Mindaugas

    Hi,
    Please go to transaction WE02/WE05 and search an IDoc number with the following criteria search and execute.
    Created on     --> 01.01.2007 to 11.06.2007
    Direction      --> 1 (Outbound)
    Current Status --> 03
    Basic Type     --> INVOIC02
    The system will show list of IDoc(s). Then you select one IDoc and go to transaction WE19 and enter existing IDoc with the above selected IDoc and click on execute button. Next enter '/h' in command field, press enter and click on standard outbound processing. System will take you to ABAP debug mode. Then go to menu: Breakpoints -> Breakpoint at -> Function Module -> EXIT_SAPLVEDF_002. Then click on Run button (F8) ... and system will stop at the above user exits. From here you can debug through your codes.
    Regards,
    Ferry Lianto

  • User Exit ZXEDFU02 skipped in Inbound function module (WE19)

    Hi!
    when I choose Inbound function module in WE19, User Exit ZXEDFU02 is beeing skipped... or al least it seems so (not stopping at breakpoint in Exit).
    But I need to add some lines to a segment, so need this Exit.
    PS: I try to add some lines to Invoice List Idoc segment, Idoc type INVOICE02.
    Any ideas?
    Will reward,
    Mindaugas.

    If is outbound try following
    For outbound you have to use following way.
    1) Cllick header-->output
    2) Repeat output type
    3) Select output type and click Further data and select dispatch time to 1(Send with periodic schedule job).
    4) Save.
    5) Go to Transaction WE15 or execute RSNAST00 program
    6) Select your output type..input object key-->nothing but document number(eg..sales order number).
    select output type and transmission medium.
    7) Now breakpoint stop at your user exit.
    Let me know still if you have problem.
    Thanks,
    Narayan

  • User exit for VD01 - Create Customer

    I am finding user exit for VD01 - Create Customer.
    I need a newly created Customer number - KNA1-KUNNR.
    I found user exit EXIT_SAPMF02D_001, but if field Customer left blank on screen in VD01, the parameter I_KNA1-KUNNR is blank. Because program genereates KUNNR further.
    Edited by: S S on Dec 23, 2008 7:56 AM

    Dear SS,
    What I understood is system is generating internal number range for customer in your case.
    You want to know the number of customer number.
    I think with this exit EXIT_SAPMF02D_001 you don't get customer number.
    Try with this BADI    CUSTOMER_ADD_DATA  
    Method MODIFY_ACCOUNT_NUMBER. use break point here.
    Then create a customer in VD01 (internal number range). maintain necessary information and save.
    system will take you to debugging mode. here you can see internal number of customer.
    Regards,
    Chandra

  • Do we have a user exit to write some custom code at the R3 Logoff event

    Hi Colleagues,
    is it possible to have some custom code at the Log Off event. I mean when the user logs off from the R/3 system, do we have a user exit to write some custom code at that time?
    Thanks,
    Gaurav

    Hi Venkat,
    I suppose you are aware of the fact that for custom infotype, you need to create custom segment and custom message type. This process can be found at- **************** - Step-by-step guide to ALE and IDOCs
    You need to also know about the change pointer and job scheduling concept for the same. You can refer to this link- Resource Configuration Notes (Sun Identity Manager 8.1 Resources Reference)
    I hope studying these links will make you achieve your goal. All the best
    Tip- Try out each step that has been mentioned these links
    Regards,
    Ajinkya

  • Object Restriction / User exit in Plant Maintenance Module

    Dear experts,
    Can anyone guide me if i want to put certain restrictions like :
    1. other Department will not be able to create Order using other dptt. Maintenance work center, equipment etc.
    2. user should not be able to cancel TECO status of order, or not allowed to to put deletion flag on order or notification.
    3. Order Release retriction.
    4. Should not be able to release/operate other dptt order.
    How can i find Object where i can restrict or user exits related to all this.
    Thanks
    DM

    Hi,
    1--You can use field exit for checking and validate the workcenter and equipment, but abaper only can do that.
    This user exit also u can use "IWO10009 Maintenance order: Customer check for "Saving""
    2--please test below user exit can use "IWO10026 User check when setting status "Do not perform""
    3-- Use below user exit for validate before release order.
    IWO10002 Maintenance order: Customer check for order release
    Regards
    Sen.

  • User exit upon saving the customer

    Hi
    can any one tell me what user exit is triggered upon saving the customer in XD01,XD02,VD01 & VD02 Tcodes.
    Thanks
    Sonali

    Hi sonali
    Check these user exits which are used at partner determination level. May be this inputs  will help you
    EXIT_SAPLV09A_001
    You can use this user exit to control whether an address that was entered manually and has already been used in other documents (referenced), should be referenced again if it changes or whether a new address should be created (duplicated).
    EXIT_SAPLV09A_002
    Call up this user exit if a customer has not been maintained in the current sales area.
    EXIT_SAPLV09A_003
    Use this user exit to control the origin of partners in the partner determination procedure (origin X, Y or Z). If X, Y, or Z has been entered in the Origin field, this user exit is automatically called up during partner determination.
    EXIT_SAPLV09A_004
    Use this user exit to integrate your own check in a program that runs before the partner is saved in the document.
    For more detailed information, see the program documentation for each of the user exits
    Regards
    Srinath

  • User exit/BADI for updating custom table in MB1B transaction-

    Dear All,
    When performing a material to material conversion in MB1B transaction for  batch managed materials,system is creating a new batch by copying the characteristics of issuing material/batch.The details of the new batch created are updated in standard batch tables(MCH1,MCHA,MCHA).
    The requirement is when the new batch is created,the batch details and characteristics has to be stamped in a custom table.
    Kindly suggest a user exit/BAIi available for updating the same in the custom table.
    Regards,
    Deepak

    Deepak, Exits for MB1B are
    MBCF0002            Customer function exit: Segment text in material doc. item
    MBCF0005            Material document item for goods receipt/issue slip
    MBCF0006            Customer function for WBS element
    MBCF0007            Customer function exit: Updating a reservation
    MBCF0009            Filling the storage location field
    MBCF0010            Customer exit: Create reservation BAPI_RESERVATION_CREATE1
    MBCF0011            Read from RESB and RKPF for print list in  MB26
    MB_CF001            Customer Function Exit in the Case of Updating a Mat. Doc.

  • Accessing address in user exit EXIT_SAPMF02D_001 (create/change customer)

    Hi,
    I'm trying to access the address given for a new customer in user exit  EXIT_SAPMF02D_001. I need Street4, which is not available on the i_kna1 object, and therefore I'm trying to play with the i_addrhandle parameter.
    Can this be used with function module GET_ADDR to read addresses before the customer is saved, the following code gives me exception 1.
    ls_addr1-addrhandle = i_addrhandle.
    CALL FUNCTION 'ADDR_GET'
      EXPORTING
        address_selection             = ls_addr1
    IMPORTING
        address_value                 = ls_addr1_val
    EXCEPTIONS
       parameter_error               = 1
       address_not_exist             = 2
       version_not_exist             = 3
       internal_error                = 4
       OTHERS                        = 5
    Regards
    Mattias

    Hello,
    Address handle is used for internal communication in standard program..for the customer creation let's say it would store value like "KNA1                          ADRNR" and for vendor "LFA1                          ADRNR"
    Please use address number in ADDR_GET function module
    Thanks
    Krish

  • User exit: sales order  VA01: Customer number

    Hi friends,
    While creating Sales order, before saving the document, I need to check the Customer (Sold to pary?) details in KNEX table. KNEX-KUNNR KNEX-TDOCO KNEX-DHRCO. if condition fails, I need to display an error message V1525,
    which should contain
    1)customer(sold-to -party?KNEX-KUNNR)
    2)partner function PARVW (VBPA-PARVW?)
    3)country LNDEX KNEX-LNDEX
    Functional spec says, 1)V45A0002
    2)V45A0003
    3)V45S0001
    4)V50EPROP User exits can be levaraged.
    1)triggers before we enter customer (sold-to-party) in VA01. so may not be used.
    2)V45A0003: i am able to fetch KUNNR, LNDEX(land1), and able to validate KNEX Fields.
    But I need to fetch partner function (PARVW), which exist in VBPA , KONP etc tables. But I am not able to write the query, which sould have all the primary keys of the table.
    Please help me the way.
    i) the above user exits can be used?if not, help me with user exit name.
    ii)if yes, how to fetch PARVW ..as all the primary keys must be used in the select query.
    Please help me ASAP.

    You can try with the form USEREXIT_SAVE_DOCUMENT or USEREXIT_SAVE_DOCUMENT_PREPARE in the program MV45AFZZ (this program contains the userexits for SD).
    You can access work aread VBAK and internal tables XVBAP, XVBPA with latest data for that transaction.
    Regards,
    Naimesh Patel

  • User Exit or BADI For Customer Hierarchy Maintainence- VDH1N

    Hi All,
    I need User Exit or BADI for the Customer Hierarchy Maintainence VDH1N Tansaction.
    I need to Capture all the Changes done to the Customer Hierarchy by the User in ECC.
    Thanxs.
    Swathi

    Hi,
    Follow these steps to find BADI...
    1. Go to the TCode SE24 and enter CL_EXITHANDLER as object type.
    2. In 'Display' mode, go to 'Methods' tab.
    3. Double click the method 'Get Instance' to display it source code.
    4. Set a breakpoint on 'CALL METHOD cl_exithandler => get_class_name_by_interface'.
    5. Then run your transaction.
    6. The screen will stop at this method.
    7. Check the value of parameter 'EXIT_NAME'. It will show you the BADI for that transaction.

  • User exit needed for KDMAT (customer-material number )

    Hi! I need to find a user exit for filling in the customer-material number (KDMAT) in the Sales order. If there is not a cutomer material info record, the filed should be filled in with the Old material number from the Material master (MARA-BISMT). Does anyone knows such a user-exit.
    Thanks

    You can try with any of the following sale order user exits
    -  User exits in the program MV45AFZZ - USEREXIT_READ_DOCUMENT
    -  User-Exits in program MV45AFZB - USEREXIT_CHECK_VBAP
    -  User-Exits in program MV45AFZB - USEREXIT_CUST_MATERIAL_READ
    thanks
    G. Lakshmipathi

  • MC94 - How to use the User exit EXIT_SAPMMCP6_002 to develop custom macros

    We’re implementing macros with the user exit EXIT_SAPMMCP6_002, but we see that the parameter table T_TAB doesn’t contain all lines and columns viewed in the grid of transaction MC94 (Change Plan – Consistent Planning).
    Nevertheless, files and columns that are contained, aren’t shown in the order that they are visualized in the screen (MC94 - program SAPLMCPA – screen 707).
    Does somebody know how to update the grid visualized in that screen?
    Thanks in advance for any help!

    Hi,
    Have you any luck with this yet. I am actually looking to do something similar but on the planning level.
    To get the detailed level, you can try the following:
    get the lines for this macro
      CLEAR I_LINES. REFRESH I_LINES.
      LOOP AT T_LINES WHERE KRIT1 = I_STRAT-AKT_PLOBJ  
                        AND FLGIS IS INITIAL
                        AND STRUL = 'X'.
        I_LINES = T_LINES.
        APPEND I_LINES.
      ENDLOOP.
    get columns for this macro
      LOOP AT T_COLS.
        LOOP AT I_LINES.
          READ TABLE T_TAB WITH KEY Z = I_LINES-LINE
                                    C = T_COLS-COLUMN
                                    BINARY SEARCH.
          IF SY-SUBRC EQ 0.
            I_COLS = T_COLS.
            APPEND I_COLS.
          ENDIF.
        ENDLOOP.
      ENDLOOP.
      SORT I_COLS.
      DELETE ADJACENT DUPLICATES FROM I_COLS.
    this should pull the values that are visually seen on the screen. 
    What i need is the values for ALL levels?  I cant seem to figure this out. 
    Anyways, lemme know if the above was helpful.

Maybe you are looking for