Making a IDoc fail in a user Exit

Hi all,
I have a user exit in which status record is not coming in. But there is one table DOBJECT like NAST is flowing inside the exit.
I have to make the IDoc fail , can u suggest whether i have to change the VSTAT field to 0 or 2.
Whether this will work or not ?? Please advise.
Thanks in Advance.
Vivek K.

Hi Vivek,
  I guess u are creating the IDoc's in online mode. i.e.. through output types (e.g. PO). However if u want to make the status to error u have to make the status of VSTAT to 2 which will not at all generate the IDoc but the output type will be show in an error mode.
Please correct me if i am wrong.
Thanks and Regards,
Swaroop Patri.

Similar Messages

  • Making a IDoc fail IDoc

    Hi all,
    I have an user exit in an IDoc .
    I need to make the IDoc fail for a particular condition.
    The status record data is not flowing into the user exit, so i cannot change the status record, i suppose
    Plz advise me what to do in this ??
    Thanks and Regards,
    Vivek ..

    Vivek,
    You need to be able to change the STATUS record of the IDOC in the exit, other wise it will not reflect in the IDOC.
    If the status record is not available a work around could be to find out the table for the status record in the memory and assign that to a field symbols and then change the value.
    Here is some information about ALE / IDOC.
    Please check this online document for ALE and IDoc.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf
    Also check this links for additional information.
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    IDOCS
    http://idocs.de/www5/books/IDocBook/IDOCS_CHAP09-11.pdf
    http://idocs.de/cookbooks/idoc/cb12_idoc_20_outbound/idoc_outbound_45_rsnast00/docu.htm
    Regards,
    Ravi
    Note : Please mark all the helpful answers

  • IDoc Extension: Finding out user exit

    Hi,
    Is there any standard way of finding out user exit for the extended IDoc? like documentation...
    Thanks and Regards,
    Madhu

    Hello
    Here are some  documentation link for defining idoc types
    Customer Extensions, SAP and Customer Developments
    Refer to this forum link.
    Ale enhancement
    Program names ZX... are reserved for includes of exit function groups
    http://help.sap.com/saphelp_47x200/helpdata/en/dc/6b7d6243d711d1893e0000e8323c4f/frameset.htm
    Hope it will resolve your problem
    All The Best
    Priyanka
    Do reward Points.

  • Create Idoc in a User Exit

    Hello everyone,
    we have a requirement where we want to create and send an idoc out through a user exit.has anyone done anything like this before?i think it is possible.if anybody has any headup on how to do it please let me know.ok yea i know the function module which is to be used.its idoc_output_inotif.there is a tcode INOT which sends the idoc out but OSS says we cant use it 4.6c onwards and thats the reason this need of creating an idoc in user exit arises.
    i have tried executing the FM independantly and punching in a few values and i saw that it created an idoc in the system.so my guess is, if i can call this FM in one of the user exits for the transaction IW51/52, and pass all the needed values i should get an idoc.
    if anyone has manually created an idoc in a user exit please suggest me some options.
    thanks a lot.

    Hi Sanket ,
    Distribution Model is required when you use message control to send IDOCS . Since you are triggering your IDOC in a uaer exit , a distribution model is not required . Simple create a partner profile in WE20 and assign your message type in outbound parameter. You need not fill the message control parameters in WE20.
    ( If you use message control , the process code links the respective FM like  idoc_output_inotif in your case ).
    But in your case you will have to trigger your IDOC in user exit . You have two options here -
    First Try -  idoc_output_inotif in the user exit to fill the segments , then use  FM MASTER_IDOC_DISTRIBUTE to trigger the send process.
    If this  does not work then use
    L_IDOC_HEADER_CREATE -Once
    L_IDOC_SEGMENT_CREATE ( Once for each segment ).
    ( This will create IDOC on data base )
    L_IDOC_SEND - Once to trigger the IDOC created above.
    Hope this helps .
    Cheers

  • Adding entries to Custom table from IDOC User-Exit

    Hi All,
       I need to add an entry into a Ztable, based on the entries in the IDOC.. The user-exit available to me is EXIT_SAPLVEDF_002.  But it is called a number of times... Is there any way to update the Ztable getting the data from different segments?..
    Please help..
    Regards.
    Asha

    The table INT_EDIDD type EDIDD conatined the interface tables of the FM contain all the segmanent data, you can read that and populate the Z table respectively ...
    Thanks,
    Adi.

  • 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

  • Which option to choose:idoc user exit or copy standard idoc?

    Hi gurus,
    We are using idoc technolody to implement the interface between R3 and 3rd party system.
    Most of idocs are inbound processing, and it seems standard idoc can't meet our all requirements.
    So we are considering the option:i choose doc user exit or create new idoc by copying standard idoc.
    Which way do you like better?What are the advantages and disadvantages of them?
    Any help will be appreciated.
    BTW, our customer will upgrade their R3 4.7 system to ECC6.0 after this project the next year.

    Hi,
    By making changes in the User-Exits, if you can achieve what you are looking for then I would recommend to use user-exits. SAP programs are not bug free and SAP keeps on updating them by releasing hundreds of notes every day. If customer is upgrading to new version in near future then using standard programs are the best option.
    Cheers,

  • Excluding idoc processing from user exit code

    Hi all,
    In a user exit (for VA01 Create Sales Order) we are currently excluding certain order types by hardcoding the document type in the code. This is because some orders are created by IDoc and in this case the IDocs fail if they use the eser exit code (because the code creates pop-up messages intended for online users only). Not the best solution.
    Does anybody know if we can use different code so that this part of the user exit does not get triggered by IDocs?
    Thanks,
    Mike

    I've figured out another solution - you can do a test on the field IDOC_NUMBER. If it is filled, then the sales order is created/changed via an Idoc.

  • 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

  • User Exit to Override ASN IDOC field

    Hello Experts,
    I am looking for an user exit to override ASN IDOC field while sending IDOC to third party tool. Below is the scenario
    Once we do the PGI on outbound delivery SPED output creates ASN and it triggers ZASN output. We use basic type DELVRY03 to send IDOC to third party tool. Now before sending ASN to third party tool we would want to send them a flag so based on that they perform auto receipt process in their system.
    I have selected Export Indicator (EXPKZ) field from IDOC since this hasn't been mapped with third party tool. Once we get an user exit to update the Auto Receipt flag in the Export Indicator field in IDOC we will map it in XI/PI so that it will go to third party tool for further processing.
    I have a logic to identify the ASN which needs to set auto flag but I am struggling where and how to put that logic, what user exit suffice the requirement?
    Thanks in Advance
    Jay

    If my understanding correct Before you send inbound delivery information to third party system you will send one Flag to Third party system to do goods receipt.I have one question if system failed to create /user cancelled Outbound delivery then how will you stop auto goods receipt in Third party system ?.Also After goods receipt GR messages failed in sap as there is no ASN created in system.
    If you want to send the flag before ASN creation then at Speed message level you split the Idoc message into two parts one for flag the message two third party system and another one to create Inbound delivery.

  • How to find the appropriate user exit for invoic02 idoc in idoc_output_invo

    Hi all,
    I am new to this community p
    i have issue regarding  the How to find the appropriate user exit for invoic02 idoc in idoc_output_invoic function module.........
    thanks,

    Hi ,
    welcome to SDN.
    You can select the appropriate Customer exit accrding to the available parameters .
    The list of exits available are 
    EXIT_SAPLVEDF_001
    EXIT_SAPLVEDF_002
    EXIT_SAPLVEDF_003
    EXIT_SAPLVEDF_004
    For Example , if you want  to modify the Idoc data(EDIDD) you have to use the EXIT_SAPLVEDF_002. accodingly you can select the user exit according to the avaialable parametres.Use Table MODSAP fto get the Enhancement name.
    Hope this Helps
    Rgds
    Sree
    Edited by: Sree on Jul 23, 2010 12:11 PM

  • Inbound Delivery IDOC-DELVRY03; Right User Exit? WMTC1D01 IDOC for STOs??

    Hi Experts,
    The scenario is:
    As soon as the user saves the DELIVERY in external_system, flat file is sent to Gentran, where its transfrred to IDOC and then, this IDOC is directed to SAP.
    So, this Inbound_Delivery_IDOC- - DELVRY03 will be received by SAP system and updates the delivery related stuff in SAP system.
    So, here, AT THIS POINT,
    1)I need to capture this IDOC of Inbound_Delivery_IDOC - DELVRY03,
    2) Need to check its(Inbound_Delivery_IDOC) MESSAGE CODE for TOA
    3) If its TOA, I need to UPDATE the associated Stock Transfer Order/STO(record in LTAK, LTAP tables) stuff through IDOC of WMTCID01
    so, let me know that,
    1) Wht is the User Exit, I need to look, Which User Exit is correct? I mean, At Wht point I need to add my code in this whole process?
    2) How to execute the UPDATED WMTC1D01 IDOC of Stock Transfer Order-STO?
    thanq

    no reply

  • PO outbound message control - Condition record / PO IDOC outbound user exit

    Guys,
    I have a system with PO outbound message control sending PO idocs to a unique plant that is set up as a customer in the partner profile. I am using a custom message type and RSEOUT00 to send my idocs with custom message type to this plant. This interface works fine. Now my requirement has changed. I need to send PO's to varying plants (depending on the plant in PO item- all items on my POs belong to same plant).
    I noticed that i cannot create condition tables with PO type and Plant combination. (SAP Note 457497 .Q-34).
    So I have decided to populate all my PO idocs with a generic receiving partner number '9999' and planning to change this somewhere in a user exit. I found an user exit which looks helpful.
    EXIT_SAPLEINM_001 .  FM
    MM06E001 - Enhancement.
    But somehow this exit is not triggered in during PO creation ME21N or change Me22N/Me22.
    Is this because I am using a custom message type instead of standard message type ? (I still use the process codes Me10/Me11). Would this matter ? When should this user exit trigger (during creation of idocs in status 30 or when i run RSEOUT00 to sweep these idocs in status 30 to status 03) ? Any tips will be useful.
    THanks.
    Edited by: Shareen Hegde on Jul 21, 2008 10:13 PM

    I found a OSS note -Note 457497 (Q&A # 34), which talks about the same . This was my assumption too. I was just confused because I saw plant(WERKS) in the field catalag of the access sequence.
    I don't know what header field I can use to map the plant (I agree its a good idea to do this). But I have decided to do it another way. I will change the receiving partner on the control record depending on the plant in an user exit
    -  EXIT_SAPLEINM_001.
    Thanks for your answer , Mahesh.

  • User Exit to call program to create IDocs.

    Hi All,
    For any creation/changes of material master using MM01/MM02 (after save ) one of the user exit will trigger.
    From the user exit, I have to call the custom program to create MATMAS IDOCs.
    if any failures in changes/creation of material master. It has to roll back eveything created by program.
    Please let me know how to achieve this with out calling an event.
    Thanks - Vinay

    There are a number of standard methods to automatically create the IDOC.  You can activate the change pointers and depending on need, use BD64 to create a distribution model, and create the necessary WE20 setups to create the outbound IDOC.
    If you have to process the IDOC using custom logic, you can define that as well - although it's not clear why you need a custom generating program.  You can insert code into one of the IDOC user-exits to manipulate the content if needed.  Also, don't overlook the pre-delivered stuff from SAP that provides filtering out of segments and the like.
    There are a few good SAP PRess books about doing ALE distribution -- if this is an unfamiliar area, it's worth the cost to buy one -- if you spend any time around IDOCS, you'll appreciate it.

  • User Exit available for basic inbound idoc type MBGMCR01 in SAP R/3

    HI,
    We are looking for the User Exit for BsicIdoc MBGMCR01.
    When we create confirmation in EBP, this idoc gets triggered from EBP to R/3 to create goods receipt material document.
    Regards,
    Nikhil.B

    Hi
    <b>Please go through the following links, for all the required details -> </b>
    GRN IDOC Transfer to ERP  - MBGMCR01 ( 2 IDOCS created)
    Re: GR IDOC Number
    Re: Confirmation screen field to be mapped to backend field
    Re: Delete goods confirmation in SRM3.0
    Re: Not able to change confirmation date
    Confirmation against Backend PO for SRM@ERP2005
    Re: SRM Confirmation # in R/3
    Re: Goods Confirmation not transferred to backend!!
    Hope this will definitely help.
    Regards
    - Atul

Maybe you are looking for

  • Getting deadlock detected while waiting for resource error for select Query.....

    Hi all, i am getting a below error whenever executing the below select query.... some times it will show dead lock detected while waiting for resource and terminated... some times it executes and gives result.. but all the time it writes an alert to

  • Additional Search Field on BP in IC

    Hi I have a requirement to add a custom searchable field to the Identify Account view, to facilitate this, I have extended the Business Partner via the EEWB to add a new field. This field is a text field and needs to utilise TREX to provide fuzzy sea

  • Loading 8i Personal Edition on MS 98

    When I get the cd's loaded on my computer. How do I access it to use it. Would an Icon appear on my desktop ???? Help!!

  • Need to repair Rosetta

    In an attempt to free up some hard drive space i was searching the net and came upon this site for a program called Monolingual http://monolingual.sourceforge.net/ The program claimed to remove unnecessary languages from my mac and in turn free up sp

  • Re: Gmail problems

    can any body help me pleaseeeee i tried to setup Gmail on my torch but it seems i have done a mistake. now there is an autofill with my email address & password yet it is not vaild. i tried gmail 2-step verification and i think something went wrong.