Re:triggering Idocs when ever a PO is changed

Hi all
My requirement is ...i want to create a purchese order IDoc when ever a PO is changed or created. i have to send several fileds out . So i cannot use standard IDoc type orders05 and standar message code ME10. i am going for a bespoke program.
Now my question is....if i have to create an IDoc when ever a PO is changed ...is there any change date field or flag in the PO table that can tell me that this PO is changed today ....so that i can run the bespoke program to create IDocs with that flag or changed date equals to todays date.
Or only solution is to use standard message control (Nace) and output types?

Hi,
You have two options. 
1 is change pointers.  2 is write a report program to generate idocs with necessary data.
You can check them in CDHDR & CDPOS tables.  Here, you have all the details of what fields you changed.  CDHDR has the time stamps when the fields has been changed and CDPOS will have the field value details.  But make sure, this will be a bit time taking process as each and every change will create a record in this.
YOu may need  to create a custom table as when the report run last time and from there you can pick the records from these tables.
let me know if you need any further help.
shylesh

Similar Messages

  • How to trigger a sales order Idoc ORDERS05 when ever we create or change it

    Hello Experts,
    What are all the configuratons that we need to do on SAP to configure triggering of sales order when ever its created or changed.
    It will be very helpfull if you give in step - step process to do it.
    If any have any documentation please sendme
    Please Help,

    If i understand your message correctly, You want to trigger an ORDERS05 IDOC with message type ORDRSP from the sales order right. You can configure the output type in transaction NACE under application V1 and assign it to you output determination procedure. You need to check the box Multiple issueing if you want the output to be proposed every time you change the order. You also need to create partner profile for the customer in WE20.

  • Trigger IDoc when ever a Sales Order is rejected

    Hello Experts,
    How to trigger an IDoc when ever a sales order is rejected.
    Thanks,
    Srikanth

    you have to define a message type that is triggered when the reason of rejection in not initial.
    You can do it by a standard access sequence. Then issue the message with medium 6.
    Best regards
    Roberto Mazzali

  • Want to triggered IDOC, when PO saved.

    Hello,
           Want to triggered IDOC, when PO get created.
           All configuration has been done, IDOC triggered when PO is released. But, I want to triggered IDOC when PO get create.
           Can any one please tell me the proper steps to configured output type??
       Thanks in advance.

    We can use standard output type 'NEU'  If you want to create new one. Simply copy the standard one 'NEU'  as 'ZNEU' (example) and modify if you need any changes. This is the easiest method creating custom output type. (Generally functional consultanats do create Output types ).
    To do this , Goto tcode 'NACE' , select  Application -'EF' and click on 'Output types' button. Then you can see different Output types for Application 'EF'.   in chnage mode - select 'NEU' and from menu bar - Edit -> Copy As.  new you change the NEU to 'ZNEU'  and on the same screen select a tab 'Default Values'.  
    here you can set
    Dispatch time   -->    '4-Send immediately (When saving the application)  
    Transmission Medium  --> 6 (EDI ) or A (ALE ).
    partner function  - choose from F4.
    and save it.
    (Note: we generally set dispatch to  '4 ', then Idoc will be generated immediately.  If you set '1 ' , you need to run RSNAST00 program after you create PO,then only Idoc will be created status 30.)
    Testing Manually using output type.
    Now test this by creating PO. Goto ME21n , after giving all the inputs b4 saving it, from menubar - GOTO->Messages
    Here you can give  outputtype  either NEU or the custom one 'ZNEU' ,  medium 6 (EDI), patner function, and partner no ,
    and click on  further data select transission medium 4 . go back to main screen and save it.  After creating PO again goto in display mode goto-messages check whether the any green light icon shown on the output. is yes, double click on it , you can see IDOC no also.
    Now do settings in WE20 assign this oytput type . I think this you know it..

  • Triggering workflow when ever sale order netvalue (vbak-netwr) changes .

    Dear all
    I want to trigger a work flow when ever a sale order net value ( vbak-netwr ) changes .how could i do this .
    BOobject bus2032  T.CODE : VA02 .
    Regards
    Rakesh kumar singh

    For this you have to define a field restrictions in SWEC...
    You can have a look at the below link, second half of this link will exactly suffice your needs...
    http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/d06b195f-0eac-2c10-509f-85441b9591f4&overridelayout=true

  • Trigger Idoc when Batch is created or changed

    Hello,
    We have to transfer Batch ID,Status and Batch Characteristics through IDoc to PI when Batch is created or updated. This can be possible by 3 scenarios.
    When Batch is created or updated manually through Tcode MSC1N.
    When Batch is created or updated at the time of Goods Receipt.( Tcode MIGO)
    When Batch is created or updated at process order creation.(After Release of Process order) Tcode COR1.
    For first 2 scenarios we have found user exit 'EXIT_SAPLCLFM_002' from where we can fill the required Idoc data and trigger IDoc to PI system.
    Also for third scenario we have found user exit 'EXIT_SAPLCOBT_001' where we can get Batch Data but not the characteristics data that is created or updated.
    In both the above cases User Exit is fired before Commit to database statement. Therefore my query is whether we can trigger IDoc through Z function modules in these user exits in update mode?
    Can you provide any input on this situation or can you suggest any alternative method or exits to achieve this functionality?

    BATMAS / BATMAS03 -  for Tcode MSC1N.
    And  I  have only information that there is a SAP note is available on this.
    865778 MIGO to post a goods receipt for a purchase order
    Thanks.

  • File2IDoc - new IDoc when client-number in sub-segment of MT is different

    Hi, we have an Message-Type and IDoc with four different Segments. Each of it contains a client-number.
    First segment: Header
    Second-fouth: Childs
    When i read File via FTP in XI it could happen that the Header-Segment is not depending on the child. That is when the client-number in the text-file is different. When this happens, XI should create a new IDoc where no Header-Segment will occur.
    How should i manage this in mapping? i have to read the payload and must compare the client-number of each child in the txt-file.
    Could you give me some help?!
    This is the source-structure:
    <?xml version="1.0" encoding="UTF-8"?>
    <MT_BESTFILE>
       <BestfileRecordSet>
          <BestFileHeader>
             <BDKDNR/> (=client-number)
          </BestFileHeader>
          <BestFilePos>
             <BDKDNR/>(=client-number)
          </BestFilePos>
          <BestFilePos1>
             <BDKDNR/>(=client-number)
          </BestFilePos1>
          <BestFilePos2>
             <BDKDNR/>(=client-number)
          </BestFilePos2>
       </BestfileRecordSet>
    </MT_BESTFILE>

    Hi Carsten,
    Below UDF will solve your problem,
    Here it will take input as BDKDNR from Header, Pos, Pos1 and Pos2, and output should be mapped to IDOC Header so that it will create a new idoc when ever there is a change in child segment.
    as per your query it is clear that BDKDNR from header will match with child segments but some times it will differ at that point we should create a new IDOC.
    in the UDF header BDKDNR will be compared to the child BDKDNR's if it is not matching with  the header then it will create a new idoc.
    Please let me know it the problem still exits.
    public void test(String[] header,String[] pos,String[] pos1,String[] pos2,ResultList result,Container container){
    int i,j,count=0;
    for(i=0;i<header.length;i++)
      result.addValue(header<i>);  
      for(j=0;j<pos.length;j++)
        for(i=0;i<header.length;i++)
         if(!(pos[j].equals(header<i>)))
         count++;
       if(count>0)
       result.addValue(pos[j]);
       count=0;  
      for(j=0;j<pos1.length;j++)
       for(i=0;i<header.length;i++)
        if(!(pos1[j].equals(header<i>)))
         count++;
    if(count>0)
       result.addValue(pos1[j]);
       count=0;  
      for(j=0;j<pos2.length;j++)
       for(i=0;i<header.length;i++)
      if(!(pos2[j].equals(header<i>)))
         count++;
    if(count>0)
       result.addValue(pos2[j]);
       count=0;  
    Regards,
    Karan

  • When ever employee position changed, an alert should send an email

    we have one requirement...
    when ever any employee position changed, it should send an email ..how to do this one? any idea?
    employee positions are recorded in PER_ALL_ASSIGNMENTS_F table, so if we create event alert on this table ( update ). event alert fires if there is any update to the table...but i want, only alert should send mail, when position column got updated in that table...
    is it possible????

    Oracle provides standard API’s to harness the databases SMTP server capabilities in sending emails. All email services are wrapped under package: UTL_SMTP. The protocol consists of a set of commands for an email client to dispatch emails to a SMTP server. The UTL_SMTP package provides interfaces to the SMTP commands. For many of the commands, the package provides both a procedural and a functional interface. The functional form returns the reply from the server for processing by the client. The procedural form checks the reply and will raise an exception if the reply indicates a transient (400-range reply code) or permanent error (500-range reply code). Otherwise, it discards the reply.
    c := UTL_SMTP.OPEN_CONNECTION('<server>.unix.us.ups.com');
    UTL_SMTP.HELO(c, '<server>.unix.us.ups.com');
    UTL_SMTP.MAIL(c, l_recepient);
    UTL_SMTP.RCPT(c, l_recepient);
    UTL_SMTP.OPEN_DATA(c);
    send_header('From', p_from);
    send_header('To', l_recepient);
    send_header('Subject', p_subject);
    UTL_SMTP.WRITE_DATA(c, UTL_TCP.CRLF || p_message);
    UTL_SMTP.CLOSE_DATA(c);
    UTL_SMTP.QUIT(c);

  • Automatic triggering of EDI output on sales order change

    Hi everyone,
    I need to trigger edi output whenever i make changes to sales order and save.
    Can anyone please help...
    Regards,
    Srikar

    Hi,
         Using change pointers you can create an IDOC when ever a specific field in the sales order line item is changed. activate the change pointer for message type ORDERS. Also maintained the entries in BD52
    After this when you change this field at the sales order line item, it inserts entries into change pointer table.
    Use Change Pointers properly so that idoc will trigger automatically.
    <b>Reward points</b>
    Regards

  • TPSDLS idoc to be triggered only when deleting the delivery

    Hi,
    We have a requirement: We should be trigerring the TPSDLS idoc only when deleting the delivery in SAP. Currently, we generate the TPSDLS idoc when creating and deleting the delivery.
    The Changes we tried did not help us in anyway.As we are seeing deliveries created with no-output type linked to them and when deleting them, does not provide any TPSDLS idoc.Not sure, how deliveries are created without any output type assocaited to them and what could solve them.
    Any help would be appreciated.
    Thanking You,
    Anish Asokan

    a

  • Triggering Outbound IDoc, when doing the Goods Receipt in MIGO

    Hi All,
    I want to create an idoc(outbound), when i do the Goods Receipt(MIGO, Movement type 101).
    1. Can we trigger the IDoc through output Determination.(I have configured for VL01n -outbound delivery & VL31n-inbound Delivey.It works... But is there any same way for MIGO)
    2. Is there any other way to trigger the IDoc when document saves in MIGO.
    Please Help On this.
    I m eagerly awaiting for Solution.

    Hi,
    Go through the following link:
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=waytotriggertheIDocwhendocumentsavesin+MIGO&cat=sdn_all
    It might help you.
    Thanks
    Rajesh Kumar

  • F-30 triggering idoc

    hi everyone,
    When i am trying to clear an open invoice using F-30, an idoc is getting triggered. Idoc contains clearing document details.
    Can anyone tell me why this could be happening.
    It is triggering IDOC of type Fidcc1 to PI.
    We have configure message type FIDCC1 to PI in a partner profile for a different program, but when ever we are executing transaction F-30 this IDOC is getting triggered.
    Is it due to any configuration. our company uses an old version of SAP.
    Thanks-Donny

    Hi,
    Please review the note 336394 and 114814 which has good information about this idoc and how it is triggered.
    "When ALE FI is active, an IDoc is created with each posting of an FI document and the ALE distribution is triggered in this way (an exception is message type FIROLL). The distribution of FI data is therefore connected to the FI document and is effected in real time when an FI document is posted in the decentralized system."
    Kind Regards
    Soumya

  • How to use SAP XI to get Inspection Lot IDOC when Insp. lot is created

    I want to create a 3rd party .NET app that gets an Inspection Lot IDOC when an inspection lot is created, gather the inspection results, then push the results back to SAP in an IDOC. How do I use SAP XI to do that? I developed an HTTP listener .NET app and configured a sender communications channel for the SAP System and a receiver connunications channel for the HTTP adapter in the XI integration scenario, but how do I configure the XI integration scenario to send my app an IDOC when an inspection lot is created, and what IDOCs do I use?
    Thanks,

    Hi Ed
    I think you can use
    IDOC TYPES : QALITY01, QALITY02
    in XI you can create
    IDOC to HTTP as a scenario
    IDOC need to be triggered from SAP system and you can import the IDOC metadata into XI from SAP
    Check this thread it will help
    Re: IDOC to HTTP
    Thanks
    Gaurav

  • Problem while triggering IDoc

    hi,
    When i am triggering idoc from R/3 , it is saying idoc transferred to port,
    but when i am checking the idoc in XI system idx5 , i am not able to view the idocs,
    What could be the reason for this?
    Also when i am creating distribution model in BD64 and then saying distribute , it is giving this message:
    <b><b>Model view BANK_CREAT has not been updated
    Reason: Maintenance systems for model view BANK_CREAT are not identical
    ..... Maintenance system in sending system DMYCLNT702
    ..... Maintenance system in receiving system DMYCLNT100</b></b>
    Note:DMYCLNT702 - Testing client
            DMYCLNT100 - Development
    Urgent help needed,
    Thanks,
    Loveena

    Hi,
    Chk the following details which will be helpful:
    A Summary of the Steps to be carried out to enable a SAP R/3 System send Idocs to SAP Exchange Infrastructure.
    First - Maintain the Sender R/3 System:
    SM59 : Create a RFC destination to XI
    WE21 : Create a TRFC Port ->Specify the RFC Destination Created
    BD54 : Create a Logical System for the Idoc Receiver
    WE20 : Create Partner Profile ->Maintain Outbound and the Inbound Parameters
    Second - Log on to XI System:
    SM59 : RFC Destination for Sender System
    IDX1 : Create the port to get Idoc Metadata from Sender System ( The Port Name must match the port name in the idoc header - Usually in format SAP<System ID>. eg. SAPID1 [Optional Step. Not mandatory]
    IDX2 : Maintain the Idoc Metadata. This is needed only by XI, and not by other SAP systems. IDX2 is needed because XI needs to construct IDoc-XML from the IDoc. No other SAP system needs to do that.
    Also chk the following link providing details of pushing idocs:
    /people/swaroopa.vishwanath/blog/2007/01/22/ale-configuration-for-pushing-idocs-from-sap-to-xi

  • Trigger a process(IDOC) when Data in Z-table updated

    Hi All,
    I am working on an interface and the outbound IDOC from R/3 to XI needs to be triggered when a particular field value in a Z*table changes.
    So far I am able to trigger the IDOC from the calling Z*prog which updates this table, but I need some exit, PAI etc which will get triggered only when the data in table is updated.
    Current Flow chart:
    Z-prog starts--->Updates a Z-table--->if sy-subrc=0--->I create an IDOC from the Z-prog itself
    What I need:
    Z-table is updated--->check if particular filed value changed--->Trigger IDOC
    Is it possible to do this.
    Many thanks
    Shirin

    Hi Balu,
    I am triggering my IDOCS from the Z*program itself.
    The trigger point is when I have successfully updated the table (sy-subrc = 0).
    Then I have used the code below to populate my IDOC. I have also maintained a distribution model, so that is the reason I pass only the idoc type in edidc segment and do not pass any port , receiver etc.
    Hope you find the code useful.
    Regards
    Shirin
    Reward points if this was helpful.
    *Local Data Declaration
      DATA:  wa_msg_header TYPE zca_msg_header,
             wa_edidc      TYPE edidc,
             wa_edidd      TYPE edidd,
             i_edidc       TYPE edidc OCCURS 0,
             i_edidd       TYPE edidd OCCURS 0,
             wa_trailer    TYPE zca_gs_trailer,
             wa_count(10)  TYPE n,
             wa_allocation_response TYPE zca_allocation_response.
    *Populate IDOC segments
    * 1. Save the message type and the basic IDoc type* in the control segment
      MOVE 'ZMT_ALLOCATION_RESPONSE' TO wa_edidc-mestyp.
      MOVE 'ZGS_ALLOCATION_RESPONSE' TO wa_edidc-idoctp.
    * 2. Populate the Genius specific Message Header 'ZCA_MSG_HEADER'
      wa_msg_header-source        = 'SOURCE_SYST'.
      wa_msg_header-destination   = 'DESTINATION-LS.
      wa_msg_header-message_id    = ''.  "Populate this in XI
      wa_msg_header-date_time     = ''.  "populate this in xi.
      wa_msg_header-message_typ   = 'I'.
      wa_msg_header-status        = 'S'.
      MOVE 'ZCA_MSG_HEADER' TO wa_edidd-segnam.
      MOVE wa_msg_header    TO wa_edidd-sdata.
      APPEND wa_edidd       TO i_edidd.
      CLEAR wa_edidd.
    * 3 Populate the ALOCATION_RESPONSE segment
      CONCATENATE 'EXAM'
                   sy-datum
                   sy-uzeit
                   INTO
                   wa_allocation_response-uid.
    * wa_allocation_response-uid                 =  i_set_number  .
      wa_allocation_response-set_number          =  i_set_number .
      wa_allocation_response-trigger             =  '1' .              "Always default to Allocation Change   .
      wa_allocation_response-next_a_exam         =  i_next_a_exam .
      wa_allocation_response-miles_to_a          =  i_miles_to_a .
      wa_allocation_response-next_b_exam         =  i_next_b_exam .
      wa_allocation_response-miles_to_b          =  i_miles_to_b.
      wa_allocation_response-next_major_exam     =  i_next_maj_exam  .
      wa_allocation_response-miles_to_major_exam =  i_miles_to_maj_exam .
      MOVE  'ZCA_ALLOCATION_RESPONSE' TO wa_edidd-segnam.
      MOVE   wa_allocation_response   TO wa_edidd-sdata.
      APPEND wa_edidd                 TO i_edidd.
      CLEAR  wa_edidd.
    *4 Populate the Trailer record 'ZCA_TRAILER'
      wa_trailer-data_marker  = 'T'.
      wa_trailer-checksum     = wa_count.
      MOVE 'ZCA_TRAILER' TO wa_edidd-segnam.
      MOVE wa_trailer       TO wa_edidd-sdata.
      APPEND wa_edidd       TO i_edidd.
      CLEAR  wa_edidd.
    * Check for distribution model and create the IDOC
      CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
        EXPORTING
          master_idoc_control            = wa_edidc
        TABLES
          communication_idoc_control     = i_edidc
          master_idoc_data               = i_edidd
        EXCEPTIONS
          error_in_idoc_control          = 1
          error_writing_idoc_status      = 2
          error_in_idoc_data             = 3
          sending_logical_system_unknown = 4
          OTHERS                         = 5.
    * No need for error handling here as the IDOC will be created and ststus record will
    * mention the latest ststus including any error message.

Maybe you are looking for

  • Firefox crash when i open a new window

    Since last pacman -Syu i get this when i'm trying to open the preferences window or when i'm starting a download: *** glibc detected *** /opt/firefox/firefox-bin: free(): invalid pointer: 0x09458f40 *** ======= Backtrace: ========= /lib/libc.so.6[0xb

  • You guys might think im crazy...i deleted mail app. HOW TO GET IT BACK?!!?

    okay. yes, i am an idiot. so when i first got my mac, i had no .mac account, therefore saw no point in having the mail app. i tried making it work for my own email address, but it failed and made my laptop freeze up (remeber? im a moron.) anyway, i j

  • SAP oil&gas - where to start - Any advice on manuals/guides

    Hello Gurus I am new to Oil and gas and intend to pursue this segment for the future. I am an experienced computer professional (10+ years) I am fairly well versed with SAP-MM although experience is limited. I am keen to make a career in SAP Oil and

  • Webcenter content service call in a loop.

    Can you please let me know how i will call a service in loop like 'workflow_approve'. When i call service in loop it thows exception, first document will approved but for other document it throws service exception 'document revision is not latest rev

  • Class for e-mail addresses

    I am looking for a class to validate e-mail addresses. I am quite sure that such a class should exist, but I could not find one. Ewout