Delete Outbound Idoc Segment

Hello Folks,
Problem:
I have extended the sub structure of an idoc for IT0002 with custom field,
E1P0002
     Q1P0002
          Z1P0002
Where Z1P0002 has custom fields.
When the destination system is 'ABCD' - system should allow the idoc
else
When destination is other than 'ABCD' - Z1P0002 segment should be deleted and idoc should be sent.
How can this be achieved, any sample code.

Hi,
    Make use of Segment level filtering in distribution medel (BD64).
Thanks,
Asit Purbey

Similar Messages

  • Delete Outbound Idoc Segment based on target system

    Hello Folks,
    Problem:
    I have extended the sub structure of an idoc for IT0002 with custom field,
    E1P0002
         Q1P0002
              Z1P0002
    Where Z1P0002 has custom fields.
    When the destination system is 'ABCD' - system should allow the idoc
    else
    When destination is other than 'ABCD' - Z1P0002 segment should be deleted and idoc should be sent.
    How can this be achieved, any sample code.

    Use user-exits .
    if edidc-RCVPRN eq 'ABCD'
    process data .
    else
    call FM segment_delete ( use ur parameters )
    endif.
    Edited by: anil sasidharan on Feb 18, 2009 12:40 PM
    Edited by: anil sasidharan on Feb 18, 2009 12:46 PM
    Edited by: anil sasidharan on Feb 18, 2009 12:48 PM

  • Delete Outbound Idoc Segment based on taget system

    Hello Folks,
    Problem:
    I have extended the sub structure of an idoc for IT0002 with custom field,
    E1P0002
         Q1P0002
              Z1P0002
    Where Z1P0002 has custom fields.
    When the destination system is 'ABCD' - system should allow the idoc
    else
    When destination is other than 'ABCD' - Z1P0002 segment should be deleted and idoc should be sent.
    How can this be achieved, any sample code.

    Hi,
        Make use of Segment level filtering in distribution medel (BD64).
    Thanks,
    Asit Purbey

  • Deletion of Idoc Segments

    Hello everyone,
    I would just like to ask on how to delete a specific segment of an Idoc aside from using transaction WE19. I would like to preserve the Idoc that's why I'm looking for another transaction that can be able to perform the deletion.
    Thanks in advance!

    in WE19 you cannot modify an existing IDOC.
    you can open an existing IDOC, but with any change SAP creates a new IDOC which has the current values, the old IDOC is then still as it was before.
    Try it, if you back out after saving your changes,  then you see the new IDOC number in WE19 initial screen

  • Outbound Idoc Segment Creation via BD52 trigger

    hi all,
    i am new to Idocs so please forgive me if i am missing the obvious.   i am using standard the material master Idoc type MATMAS05 to transmit any material master changes to an existing legacy system.   i set up some fields in BD52 to trigger an Idoc when they are changed.   the problem is when i change a field in the MARC segment (ie: MARC-PRCTR - Profic Center) 3 segments are generated (E1MARAM, E1MAKTM, EIMARCM), but when i change something in the MARA segment (ie: MARA-PRDHA - Product Hierarchy) only E1MARAM and E1MAKTM are sent.  
    the receiver is set up for all three Idoc segments so when only 2 are sent it errors out.   how can i force all 3 segments to send every time?
    many thanks.
    James Hinkin

    Hi, I think you must be running the program RBDMIDOC to send an IDoc based on the change pointers.
    SAP has designed such a way that it will create IDocs only with changed data. In other words, E1MARAM is always populated as it is header data. Its obvious that you dont want to send the data that is not changed. Hence if you are changing Product hierarchy, only relevent segments are populated with values.
    If you still want to send all the data irrespective of whether those fields are changed or not, either you may have to code in a user-exit to populate these fields(segments) or, change the program accordingly.
    Hope this helps you and let me know if you need further help
    Vamsi

  • To delete the IDOC Segment in the Inbound i.e.Item Data

    Hi All,
    Idoc is received for orders05 as inbound.
    The IDoc Data contains two levels of item data
    i.e. Segment E1EDP01 - In this we Pass only the quantity.
          in the Sub Segment of item E1EDP19 - Customer Material in the segment IDTNR with qualifier 002.
    The same segment is repeated again but the customer material is different.
    Now need to check the material, if it is different, i need to delete the entire second item segment and put the customer material in the Segment E1EDP19 which has empty field.
    His there any Function Module or so to delete the incoming data of the idoc through inbound?.
    Could you please let me know if there any way to do the same.
    Thank you.
    Regards,
    Dinesh.

    yes here you can access only one segment, if you don't control that here, then the information will be populated to xvbap. or else you can even try to implement the error handling exit EXIT_SAPLVEDA_008 /EXIT_SAPLVEDA_011
    already item information will be populated to xvbap  table . so try to delete the item from xvbap also

  • Deleting an idoc segment in memory

    I am using the user-exit EXIT_SAPLEINM_011 to delete a segment for materials that I do not want to send to the interface. The material is in the E1EDP19 segment. I search for all E1EDP19 segment where material is stored and get the PSGNUM for each materials that needs to be deleted and store the PSGNUM in a table (LT_PSGNUM). Then I loop throught the PSGNUM table to read each PSGNUM and delete all entries in the internal table EDIDD where PSGNUM matched PSGNUM and SEGNUM so that I can delete parent and children. The problem is somehow it deletes more than what I intend to delete. I have total 28 segments and if deleted cofrrectly I should get only 23 segments instead I get only 4 segments.
    Any help is appreciated and thanks in advance.
    - Vijay

    loop at t_edidd into ls_edidd.
        IF ls_edidd-SEGNAM = 'E1EDP19' and ls_edidd-sdata+0(3) = '001'.
          lv_tabix   = sy-tabix.
          lv_psgnum = ls_edidd-psgnum.
          lv_e1edp19 = ls_edidd-sdata.
          ls_matnr-matnr = lv_e1edp19-idtnr.
    *--- Select the maximo relevant material from MARA
          SELECT SINGLE matnr zzmaximo_relvnt INTO ls_matnr FROM mara
            WHERE matnr = ls_matnr-matnr
            and   ( zzmaximo_relvnt = c_mxtrk  OR
                     zzmaximo_relvnt = c_mxvw ).
          if sy-subrc ne 0.
            append lv_psgnum to lt_psgnum.
          endif.
        endif.
      endloop.
      loop at lt_psgnum into lv_psgnum.
        loop at t_edidd into ls_edidd where segnum = lv_psgnum or psgnum = lv_psgnum.
          lv_tabix = sy-index.
          delete t_edidd index lv_tabix.
        endloop.
      endloop.

  • Delete idoc segments

    Hi all,
    I need to delete the idoc segments for some condition based on the table KNVV value. It is basic type is DEBMAS05.
    I have used a wrapper FM ZIDOC_INPUT_DEBITOR as i could not find a user exit in IDOC_INPUT_DEBITOR.
    In test run we19, in debuggin i see the incorrect records/segments are getting deleted from IDOC_DATA which is the way i have coded. However when i see the generated idoc number i can see all the segments and the incorrect segments are not getting deleted. Let me know how to delete idoc segments through code.
    Note : I have tried in BD59 to reduce the idoc segment, but the condition for our requirnment cannot be possible in BD59.
      LOOP AT idoc_data.
        CASE idoc_data-segnam.
          WHEN 'E1KNA1M'.
            gwa_deb_hdr = idoc_data-sdata.
          WHEN 'E1KNVVM'.
            gwa_deb_sale = idoc_data-sdata.
          WHEN 'E1KNMB1'.
            gwa_deb_comp = idoc_data-sdata.
           APPEND gwa_aex_item TO gt_aex_item.
        ENDCASE.
       IF gwa_deb_hdr+0(3) = '004'.
          IF sy-tabix > 1.
        SELECT SINGLE kunnr vkorg vtweg INTO (lv_kunnr, lv_vkorg, lv_vtweg)
                FROM knvv
                WHERE kunnr = gwa_deb_hdr+3(10)
                   AND vkorg = gwa_deb_sale+3(4)
                   AND vtweg = gwa_deb_sale+6(2).
            IF sy-subrc NE 0.
              DELETE idoc_data INDEX sy-tabix.
            ENDIF.
          ENDIF.
       ENDIF.
      ENDLOOP
    Thanks,
    Senthil

    Just want to know.
    If the standard idoc segmets cannot be deleted through code or this doesnot work as i ran in test run we19?

  • FM for Outbound Idoc

    Hi ..
    Actually we are looking for the function module for the Outbound Idoc segment - BOMMAT in Bill of material . we need to know which is the correct FM to be used.Please help me with this.

    Hi,
    Check if you can use FM- MASTER_IDOC_CREATE_BOMMAT.
    Regards,
    Anup

  • EDI Outbound IDOC Remove unused fields from segment

    Hi All,
    I am configuring a outbound idoc scenario for Message type ORDERS. The basic type for this message type is ORDERS05.
    The segment E1EDKA1 has 44 fields, I need only the first field and the last field of this segment.
    How do I remove the unused fields in this segment ?  I Tried BD56 and BD32 But they are for removing the complete segment and so does not serve my purpose.
    Any pointers to this issue is appreciable .
    Regards,

    Hi,
    Segmetns of standard message types can be deleted from BD53. But I don't think deleting fields would be possible from segments of standard idoc type. What you can do is you can create your own custom idoc type with the fields you want and allign it with the standard message type ORDERS. This should solve your purpose.
    BR,
    Atanu Mukherjee

  • How outbound IDoc with Z segment is creating without using a program/FM?

    Hi,
    I am having an outbound IDoc with Z message type and segments.
    I need to find how this IDoc/ IDoc segment is getting created. I tried to find
    it using the segment’s where used list (in SE11- IDoc segment structure). But it
    is showing that the structure and fields are not used anywhere.
    How it is possible to create a Z segment in IDoc without
    using the corresponding structure in some program or function module?
    I have searched in google/scn for a solution, but didn’t find
    anything.
    Any one please helps me to find how this IDoc segment is
    populating?
    Regards,
    Dipin

    Hi Arthur,
    This IDoc is catering as part of a flow (Tcode IW21). I have
    set a break point in the function module ALE_IDOCS_CREATE and processed the transaction
    IW21, but the program didn’t stop in the break point, but the IDoc got created.
    Regards,
    Dipin

  • Outbound IDoc taking wrong segments

    Hi All,
    Outbound Custom IDoc is taking wrong segments when it is created. Message type, IDoc Type, process code and Function Module all are properly set.
    This IDoc sometimes takes correct segments and sometimes wrong. because of this it is going into status 26 with syntax error.
    Since the IDoc does not contain correct segments.
    Can anyone help me please.
    Thanks in Advance
    Pragna

    HI,
    Make your outbound IDOC restricted with for particular PLANT or Storage location in the using filter option in BD60.
    Hope this might be helpful to you

  • ME59 Purchase order outbound idoc header text missing in segment

    Hi All,
    When Purchase Order created via ME59 for third party vendor Outbound Idoc is created but Header Text of PO not copied into IDOC Segment.This Problem occurs when PO has sales order assignment.
    Please Advice..
    Thanks,
    Vinod.

    Hi Ankur,
    I am not an expert in this area but I'm looking on an ORDERS05 iDoc where I have the following data for E1EDK14:
    <u>E1EDK14 014:</u>
    QUALF: 014
    ORGID: [Purchasing organization ID]
    <u>E1EDK14 009:</u>
    QUALF: 009
    ORGID: [Purchasing Group ID]
    <u>E1EDK14 013:</u>
    QUALF: 013
    ORGID: [Purchase Order type, e.g. EC]
    <u>E1EDK14 011:</u>
    QUALF: 011
    ORGID: [Company Code]
    Hope this helps!
    Regards,
    Kristoffer

  • Need to Trigger an outbound Idoc when shipment manually deleted thru VT02N

    Hello All,
    Can anyone help me on this issue. I need to Trigger an outbound Idoc when shipment is manually deleted thru VT02N transaction.
    Please help me, how to do the output detemination or if is there any event trigger mechanism for this.
    Waiting for your response.
    Thank you.
    Sridhar Kanchibotla

    Hi,
    We need to display all the IDOC data on a Smartform layout. But we dont need the IDOC to be used for our requirement. So we want to make sure that IDOC is triggered but will not stay in 02 or other status.
    We have a process to monitor the failed idocs (02 status) and we do not want our idoc to have failed status. So we need the idocs to be tirggered directly with status 31 (thanks for letting me know that i cant use status 68 for outbound idocs).
    Thanks!

  • Generating outbound idoc  - During Oubound delivery deletion using VL02(N).

    Hi All,
    There is a requirement for me to send an outbound idoc from SAP System, when a outbound delivery is deleted in SAP system using transaction VL02N. The functionality is to achieve the same using message control/output control.
    When an item of the delivery is deleted then the idoc is getting generated correctly.
    But when the outbound delivery itself is being deleted no idoc is getting generated in fact the output determination itself is not taking place.
    Could anyone please give me some inputs on this.

    Hi,
    Could anyone please reply to my query. Points will be definitely awarded. Thanks in advance.
    Goutham.

Maybe you are looking for

  • Artist for sorting issues

    Hi, I have more and more Asian artists on my iTunes player and for the accuracy of last fm scrobbling I'm using the Asian alphabets, but as I can't read (and memorize) Asian alphabets I use the romanized equivalents in the "for sorting" ("pour le tri

  • Exporting an iPhoto slideshow

    I have about 500 images that I want to put into a slideshow.  However, an MUST-HAVE is that the show randomizes or shuffles the photos. It would appear that the only way to turn on shuffle is when viewing the photos in an album.. the option does not

  • Insertion / Update of field of type "TIME" using Native SQL

    Hi ABAP gurus, We are trying to perform inserts and updates within an ORACLE table where a TIME field exists without suscess. We are trying to code it using Native SQL. EXEC SQL. INSERT INTO table (field1[name], field2[age], field3[birthday], field4[

  • Camera photos come up blank

    i believe ever since i upgraded to the latest january software upgrade, when i take photos all seems well--the shutter goes off, etc. but then when i go to look at my photos, all i see is an empty frame for each photo. then when i click on one of the

  • UpdateXML more then one node

    I want to prefix every url with http:// . This update fails when there are more urls in the p element. The XML looks something like: <p> bla bla bla <url>www.uva.nl</url> bla bla bla <url>www.otn.com</url> </p> The statement i use is: UPDATE udo.udo_