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

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

    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

  • 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

  • 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

  • Data elements for IDoc Segments to non-SAP system

    Hi,
    I need to create IDocs for transferring data to non-SAP system. When I create segmet fields should I create new data elements for all the fields with attributes specific to receiving system? Because there are many fields where the field attributes of SAP system do not match the corresponding fields of receiving non-SAP system.
    Thanks in advance!!
    Regards,
    Sriram

    Hi Sriram,
    When I create segmet fields should I create new data elements for all the fields with attributes specific to receiving system
    Is it custom  segments .
    Regards,
    Madhu.

  • 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

  • Filter Idoc segment based on date in XSLT map

    Hi,
    In a Idoc to flat file XSLT mapping, I have a requirment to filter segment out of multiple segment occurance in HRMD_A idoc. Idoc has two date fields(actually string data, containing date in YYYYMMDD format) in the segment(end date and start date). I need to filter only one segment from multiple segments where current date falles within start and end dates (end date >= current date >= start date). Then map output fields from the filtered segment.
    Its easy doing it in graphical mapping, but its difficult to use graphical mapping here as the message structure are enormous. I dont have much hands on in XSLT but think many of you have been through this kind of requirement using XSLT. So holding my hope high :). Please suggest a logic for this, will be highly appretiated.
    Regards
    Suman.

    This functions will give you the current date:
    fn:current-dateTime()     => Returns the current dateTime (with timezone)
    fn:current-date()                 => Returns the current date (with timezone)
    fn:current-time()                 => Returns the current time (with timezone)
    To compare:
    fn:compare(comp1,comp2)
    fn:compare(comp1,comp2,collation)
    => Returns -1 if comp1 is less than comp2, 0 if comp1 is equal to comp2, or 1 if comp1 is greater than comp2 (according to the rules of the collation that is used)
    Example: compare('ghi', 'ghi')
    Result: 0
    Also I suggest working with an IF condition like this:
    <xsl:if test="price &gt; 10">
            <tr>
              <td><xsl:value-of select="title"/></td>
              <td><xsl:value-of select="artist"/></td>
            </tr>
          </xsl:if>
    Edited by: Kai Lerch-Baier on Apr 14, 2009 10:21 AM

  • 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

  • How to send Outbound IDocs through an RFC-enabled FM

    Good day to all;
    A partner system (AS/400) wants to use a Java Connection to execute a RFC Function Module, in SAP, that will then return a collection of IDocs.
    Currently, the Function Module builds the IDocs, but I'm not exactly sure how to simply send those IDocs back to the AS/400.
    If anyone can help in this regard, that would be great.
    My current thoughts are to use Master_IDoc_Distribute, but then I imagine that requires a port configuration for the AS/400.  And if this is the case, does that mean that SAP will send the IDocs back itself instead of using the RFC interface?

    Hi Tavares,
    If you want to send outbound IDoc to AS/400 (external system), you need to setup file port (t/code WE21).
    For RFC interface, you need to setup RFC file port with RFC Destination (t/code SM59). In this case, SAP will send IDoc (individually or batch) to receiver system (AS/400). Perhaps you need a middleware for data transformation, if AS/400 does not perform data mapping for outbound IDoc. 
    For FTP interface, you need to setup flat/XML file port for outbound. then you can FTP the file to AS/400 later on.
    In addition to file port configuration, you also need to setup partner profile for outbound parameter (t/code WE20) and the distribution model (t/code BD64).
    Hope this will help.
    Regards,
    Ferry Lianto

  • Outbound Idoc error handling through workflow

    Hi,
    I am trying to set up the workflow for outbound error handling. I found that there is a task TS00007989 which need to set up.
    How this task can be triggered when outbound idoc error occurs in the system?
    Kr,
    Vithalprasad
    Edited by: Vittalprasad on Jun 9, 2010 11:52 AM

    Hi,
          Have a look
    Outbound IDoc Error Handling via Workflow
    Outbound idoc error handling through workflow

  • Generate multiple Idoc segments

    Hi all,
    I have a Flat file to Idoc Scenario.
    I need to generate no. of multiple Idoc Segments based on the source field value.
    For Eg: if Field1 starts with 5 or 6 then E1 segment should be created 5 times,
    similarly if Field1 starts with 4 then E1 segment is created 6 times
    And as many times E1 is created that many times the corresponding other E2,E3 segments are created
    i.e E2 E3 has 1-1 relationship with E1
    Can this be done graphically ?
    Working on PI 7.0 Environment
    I would appreciate your Inputs.
    Regards,
    Varun
    Edited by: Varun Reddy on Oct 5, 2010 8:21 AM

    Im pretty sure that if you duplicate the target segment the max number of times (6) but you only map to 4 of them, only 4 will be created in the target structure. Let the Mapping/Data drive how many segments actually get created in your target structure.
    I could be wrong but Im pretty sure thats how Ive handled repeating segments before.

  • Mapping Inbound-Outbound IDocs

    Hy everybody,
    Is there a table in the receiving system where inbound IDocs numbers are linked to outbound IDocs numbers from the sending system ?
    Regards,
    Christian Baldari

    Hi,
    there is no link from inbound idoc to outbound idoc.
    We will only come to know by looking document flow.
    Sales order - Docuemnt flow  
    Delivery - Docuemtn flow.
    You will come to know all the things by looking docuemnt flow.
    ramesh

Maybe you are looking for

  • How do I change my default to open LR5 instead of LR3?

    How can I get LR5, which is my most current upgrade, to open by default instead of LR3 which was the first version that I bought? My default option is only LR 64 bit no version given

  • Apartment front gate won't open with iPhone 6.

    Hey Everybody, Currently, I am having an issue with my iPhone 6 where dialing '9' will not open the front gate to the apartment complex. I've never had this issue with any of the previous iPhones that I've owned. I have to tell my visitors to dial my

  • SQL and Oracle

    Where do I find any documentation about SQL sintaxe in Oracle? What does the signal (+) mean into a SQL clause? For example: SELECT t1.a, t1.b, t2.a FROM table1 t1, table2 t2 WHERE t1.a = t2.a (+) Thanks.

  • Formatting Parameter value

    how can I format the size and font of the parameter when using the htp.p('Org:'||get_value(parameter_name) Sincerely CJ

  • Goods Issue for Movement Type 281

    Hi, Can anyone suggest me how to use MB_CREATE_GOODS_MOVEMENT to post goods for Mvmt Type 281. Please give me Sample data as i'm getting errors with data. Thanks in Advance, Anjani.