Edidc-stdmes OUTBOUND  -ORDERS05

I need to update message type (stdmes ) field in control record
can anyone give me the exit or include name where can i update
Can i update the Control records after the data records are generated
my req is after I get an idoc no for a particular so then I will grab the sdata from it i will find whether it is 850 or 875 and i will send to stdmes as 850or 875
please provide me some solns
Thanks

Hi,
Please try this user exit EXIT_SAPLEINM_001 to populate CONTROL_RECORD_OUT-STDMES.
Regards,
Ferry Lianto

Similar Messages

  • Passing values to outbound ORDERS05 idoc.

    Hi,
    I have to do an enhancement wherein whenever a PO is created and sent through EDI an outbound idoc will be created which will contain some additional data in some segemnts.For e.g. I have to fill stras, ort01 and pstlz fields of segment  E1EDPA1 from KNA1 where lifnr value is equal to the lifnr in PO.
    How do I pass the values to the segment and append it to the idoc data?
    Need help urgently!!
    Thanks,
    Sandeep.

    Hi,
    Check the code below:
    FUNCTION ..........
    Checking the Purchase Order types
      PERFORM fill_bsart.
    Selecting the data and putting it into the final internal table.
      PERFORM fill_final.
    Checking the case inorder to populate the data in the new segments
      CASE int_edidd-segnam.
        WHEN gc_e1edk01.
        Populate Header segment
          PERFORM f_populate_header.
        WHEN gc_e1edp01.
        Populate Item segment
          PERFORM f_populate_item.
      ENDCASE.
    ENDFUNCTION.
    FORM f_populate_header .
      CLEAR: gv_e1edk01, gv_hsegment.
      MOVE int_edidd-sdata TO gv_e1edk01.
      MOVE : gv_e1edk01-belnr TO gv_hsegment-purchase_order,
             gv_e1edk01-bsart TO gv_hsegment-order_type.
      CLEAR: gs_final.
    Reading the final internal table with Index 1 and moving the data to int_edidd
      READ TABLE gt_final INTO gs_final INDEX 1.
      IF sy-subrc EQ 0.
        MOVE: gs_final-eknam TO gv_hsegment-eknam.
        MOVE: gs_final-stras TO gv_hsegment-street,
              gs_final-netwr TO gv_hsegment-netwr,
              gs_final-oknam TO gv_hsegment-po_approver.
        MOVE: gv_hsegment TO int_edidd-sdata,
              gc_hseg TO int_edidd-segnam.
        APPEND int_edidd TO int_edidd.
        CLEAR int_edidd.
        CLEAR : gs_final.
      ENDIF.
    ENDFORM.                    " f_populate_header
    FORM f_populate_item .
      CLEAR: gv_isegment,gs_final.
      MOVE int_edidd-sdata TO gv_e1edp01.
    Reading the final internal table with key ebelp and moving the data to int_edidd
      READ TABLE gt_final INTO gs_final WITH KEY ebelp = gv_e1edp01-posex.
      IF sy-subrc EQ 0.
        MOVE: gs_final-bsart TO gv_isegment-order_type,
              gs_final-eindt TO gv_isegment-eeind,
              gs_final-ebelp TO gv_isegment-ebelp,
              gs_final-ean11 TO gv_isegment-ean11,
              gs_final-numtp TO gv_isegment-numtp,
              gs_final-txz01 TO gv_isegment-txz01,
              gs_final-meins TO gv_isegment-meins,
              gs_final-idnlf TO gv_isegment-idnlf.
        MOVE: gv_isegment TO int_edidd-sdata,
              gc_iseg     TO int_edidd-segnam.
        APPEND int_edidd TO int_edidd.
        CLEAR int_edidd.
      ENDIF.
    ENDFORM.                    " f_populate_item
    FORM fill_bsart .
      CONSTANTS: lc_i TYPE c  VALUE 'I',
                 lc_eq TYPE char2 VALUE 'EQ',
                 lc_ylro TYPE char4 VALUE 'ylro',
                 lc_yspo TYPE char4 VALUE 'yspo',
                 lc_ylso TYPE char4 VALUE 'ylso',
                 lc_ysub TYPE char4 VALUE 'ysub',
                 lc_yvwh TYPE char4 VALUE 'yvwh'.
      CLEAR: gt_bsart.
      gt_bsart_line-sign = lc_i.
      gt_bsart_line-option = lc_eq.
      gt_bsart_line-low = lc_ylro.
      APPEND gt_bsart_line TO gt_bsart.
      CLEAR :gt_bsart_line.
      gt_bsart_line-sign = lc_i.
      gt_bsart_line-option = lc_eq.
      gt_bsart_line-low = lc_ylso.
      APPEND gt_bsart_line TO gt_bsart.
      CLEAR :gt_bsart_line.
      gt_bsart_line-sign = lc_i.
      gt_bsart_line-option = lc_eq.
      gt_bsart_line-low = lc_yspo.
      APPEND gt_bsart_line TO gt_bsart.
      CLEAR :gt_bsart_line.
      gt_bsart_line-sign = lc_i.
      gt_bsart_line-option = lc_eq.
      gt_bsart_line-low = lc_ysub.
      APPEND gt_bsart_line TO gt_bsart.
      CLEAR :gt_bsart_line.
      gt_bsart_line-sign = lc_i.
      gt_bsart_line-option = lc_eq.
      gt_bsart_line-low = lc_yvwh.
      APPEND gt_bsart_line TO gt_bsart.
      CLEAR :gt_bsart_line.
      LOOP AT gt_bsart INTO gt_bsart_line.
        IF xekko-bsart NE gt_bsart_line.
          EXIT.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " fill_bsart
    FORM fill_final .
      REFRESH :gt_ekko.
    Getting the data from EKKO table
      SELECT ebeln
             bsart
             ernam
             lifnr
             waers
             bedat
             ekgrp
       FROM  ekko
       INTO CORRESPONDING FIELDS OF TABLE gt_ekko
      WHERE bsart EQ gv_e1edk01-bsart
        AND ebeln EQ gv_e1edk01-belnr.
      IF sy-subrc EQ 0.
        SORT gt_ekko BY ebeln ekgrp.
      ENDIF.
      REFRESH: gt_ekpo, gt_t024, gt_erev, gt_lfa1.
      IF NOT gt_ekko[] IS INITIAL.
      Getting the data from EKPO
        SELECT ebeln
               ebelp
               bstyp
               txz01
               matnr
               idnlf
               menge
               meins
               netpr
               netwr
               ean11
         FROM  ekpo
         INTO CORRESPONDING FIELDS OF TABLE gt_ekpo
          FOR ALL ENTRIES IN gt_ekko
        WHERE ebeln EQ gt_ekko-ebeln.
        IF sy-subrc EQ 0.
          SORT gt_ekpo BY ebeln ebelp matnr.
        ENDIF.
      Getting the data from EREV
        SELECT   bstyp
                 edokn
                 edokp
                 revno
                 oknam
           FROM erev
           INTO CORRESPONDING FIELDS OF TABLE gt_erev
           FOR ALL ENTRIES IN gt_ekko
         WHERE bstyp EQ gt_ekko-bstyp.
        IF sy-subrc EQ 0.
          SORT gt_erev BY bstyp oknam.
        ENDIF.
      Getting the data from LFA1
        SELECT lifnr
               stras
          FROM lfa1
          INTO CORRESPONDING FIELDS OF TABLE gt_lfa1
           FOR ALL ENTRIES IN gt_ekko
            WHERE lifnr EQ gt_ekko-lifnr.
        IF sy-subrc EQ 0.
          SORT gt_lfa1 BY lifnr.
        ENDIF.
      Getting the data from T024
        SELECT ekgrp
               eknam
          FROM t024
          INTO CORRESPONDING FIELDS OF TABLE gt_t024
           FOR ALL ENTRIES IN gt_ekko
         WHERE ekgrp EQ gt_ekko-ekgrp.
        IF sy-subrc EQ 0.
          SORT gt_t024 BY ekgrp eknam.
        ENDIF.
      ENDIF.
      IF NOT gt_ekpo[] IS INITIAL.
      Getting the data from MARA
        SELECT matnr
               ean11
               numtp
          FROM mara
          INTO CORRESPONDING FIELDS OF TABLE gt_mara
           FOR ALL ENTRIES IN gt_ekpo
         WHERE matnr EQ gt_ekpo-matnr.
        IF sy-subrc EQ 0.
          SORT gt_mara BY matnr ean11.
        ENDIF.
      Getting the data from EKET
        SELECT ebeln
               ebelp
               eindt
          FROM eket
          INTO CORRESPONDING FIELDS OF TABLE gt_eket
           FOR ALL ENTRIES IN gt_ekpo
         WHERE ebeln EQ gt_ekpo-ebeln.
        IF sy-subrc EQ 0.
          SORT gt_eket BY ebeln ebelp eindt.
        ENDIF.
      ENDIF.
    Moving the data to the final internal table
      LOOP AT gt_ekpo INTO gs_ekpo.
        gs_final-ebelp = gs_ekpo-ebelp.
        gs_final-matnr = gs_ekpo-matnr.
        CLEAR :gs_ekko.
        READ TABLE gt_ekko INTO gs_ekko
                 WITH KEY ebeln = gs_ekpo-ebeln BINARY SEARCH.
        IF sy-subrc EQ 0.
          gs_final-ebeln = gs_ekko-ebeln.
          gs_final-bsart = gs_ekko-bsart.
          gs_final-lifnr = gs_ekko-lifnr.
          gs_final-ekgrp = gs_ekko-ekgrp.
        ENDIF.
        CLEAR : gs_mara.
        READ TABLE gt_mara INTO gs_mara WITH KEY matnr = gs_ekpo-matnr.
        IF sy-subrc EQ 0.
          gs_final-ean11 = gs_mara-ean11.
          gs_final-numtp = gs_mara-numtp.
        ENDIF.
        CLEAR: gs_t024.
        READ TABLE gt_t024 INTO gs_t024 WITH KEY ekgrp = gs_ekko-ekgrp.
        IF sy-subrc EQ 0.
          gs_final-eknam = gs_t024-eknam.
        ENDIF.
        CLEAR: gs_eket.
        READ TABLE gt_eket INTO gs_eket WITH KEY ebeln = gs_ekko-ebeln.
        IF sy-subrc EQ 0.
          gs_final-eindt = gs_eket-eindt.
        ENDIF.
        CLEAR: gs_erev.
        READ TABLE gt_erev INTO gs_erev WITH KEY bstyp = gs_ekko-bstyp.
        IF sy-subrc EQ 0.
          gs_final-oknam = gs_erev-oknam.
        ENDIF.
        CLEAR:gs_lfa1.
        READ TABLE gt_lfa1 INTO gs_lfa1 WITH KEY lifnr = gs_ekko-lifnr.
        IF sy-subrc EQ 0.
          gs_final-stras = gs_lfa1-stras.
        ENDIF.
        APPEND gs_final TO gt_final.
        CLEAR :gs_final.
      ENDLOOP.
      SORT gt_final BY ebeln ebelp.
    ENDFORM.                    " fill_final
    Regards
    Kannaiah

  • Custom Segment is not appearing in orders05

    Hi ,
    I am trying to extend IDOC type ORDER05.I have followed all the steps But even then segment is not appearing after i generate IDOC and test in we02.
    The two fields has to extended in EKKO and same has to extened in ORDER02 at the time PO creation.
    This is the requirement. Right now iam not passing any data in the custom segment but i have done all the initial configuration..
    Idoc also generated succssfully..but its having my custom segment..Pls advice

    Yes, that include need to be created. By double clicking on it you will get a prompt to create the object (provided you have developer access), choose yes and you should be able to create the include and put a break point on it.
    In IDOC_OUTPUT_ORDERS function module that creates the outbound ORDERS05 IDoc.
    --> EXIT_SAPLEINM_002 will be called repeatedly for each IDoc segment while the IDoc is still building
    --> EXIT_SAPLEINM_011 will be called once for the whole IDoc, once SAP finished building it
    So yes, you can use any of these user exits to manipulate the output IDoc.
    Also, the break point won't get triggered when output type is set to trigger immediately (dispatch time 4) when you issue the output from ME22N / ME23N, because the IDoc will be triggered asynchronously in this mode by the system and not in your session, so your session break points are ineffective.
    What you need to do is go into the ME22N output page (Click Messages on ME22N screen, select the condition type in yellow color (not yet processed), click on "Further data"and set "Dispatch time" to 1 (Send with periodically schedule job). After doing this issue the output (by saving the PO etc). This will mean that the output IDoc is not triggered immediately.
    Now put the break point in the suggested user exit.
    Come to SE38 and execute RSNAST00 program, give "Output application" as "EF", object key as your PO number (format it with leading zeros for full 10 digits) and enter your output type. Run it and then you will see that your break point is hit.

  • User Exit for extended ORDERS05

    Hello,
    We have extended tables VBAK & VBAP, and I have to put these new fields into the outbound ORDERS05 when a sales order is created.
    I have extended the IDOC with some custom segments, but I can't seem to find the USER EXIT or BADI or NAST function module (SAP R/3 Enterprise) - can someone please point me in th right direction?
    Many thanks!

    Hi Samir,
    I have configured output control to trigger the outbound sales order IDoc. In WE20 I have added Message Control as follows:
    Application : V1
    Message Type: ZNOT
    Process code: SD10
    The IDoc does not trigger yet - I need to look into that - but I can add the output manually in the sales order. This way, the IDoc gets created and sent to the receiver system.
    The problem is how to populate the additional segments..?
    Rgds,
    Derek

  • How to split a PO into 2 iDocs ??

    Hello,
    We use EDI to send PO's outbound to suppliers via ORDERS05 iDoc.  Problem is that most of our suppliers cannot accept EDI PO if it contains more than one "Delivery Address".
    I need 2 or more Orders05 iDocs to be created (1 for each Delivery Address) when a PO is created with more than one Delivery address.
    For example ... A User creates an EDI enabled PO that contains 3 Delivery addresses with PO# 111111.  I need 3 iDocs (111111a, 111111b, and 111111c) to be created so that the EDI supplier system receives 3 separate PO's.
    Has anyone heard of a way to accomplish this?  Any help is appreciated.  Thank you.
    Dan Avis

    ELSEIF  WA_DATA-SEGNAM = 'E1EDK17'.
            WA_E1EDK17-QUALF = WA_DATA-SDATA+0(3).
            WA_E1EDK17-LKOND = WA_DATA-SDATA+3(3).
            APPEND WA_E1EDK17 TO IT_E1EDK17.
            IF SY-SUBRC = 0.
              WA_DATA1-MANDT  = WA_DATA-MANDT.
              WA_DATA1-DOCNUM = WA_DATA-DOCNUM.
              WA_DATA1-SEGNUM = WA_DATA-SEGNUM.
              WA_DATA1-SEGNAM = WA_DATA-SEGNAM.
              WA_DATA1-PSGNUM = WA_DATA-PSGNUM.
              WA_DATA1-HLEVEL = WA_DATA-HLEVEL.
              WA_DATA1-DTINT2 = WA_DATA-DTINT2.
              WA_DATA1-SDATA  = WA_E1EDK17.
              APPEND WA_DATA1 TO IT_DATA1.
              CLEAR WA_DATA1.
            ENDIF.
          ELSEIF  WA_DATA-SEGNAM = 'E1EDK18' AND WA_DATA-SEGNUM = '000012'.
            WA_E1EDK181-QUALF = WA_DATA-SDATA+0(3).
            WA_E1EDK181-TAGE  = WA_DATA-SDATA+3(8).
            WA_E1EDK181-PRZNT = WA_DATA-SDATA+11(8).
            APPEND WA_E1EDK181 TO IT_E1EDK181.
            IF SY-SUBRC = 0.
              WA_DATA1-MANDT  = WA_DATA-MANDT.
              WA_DATA1-DOCNUM = WA_DATA-DOCNUM.
              WA_DATA1-SEGNUM = WA_DATA-SEGNUM.
              WA_DATA1-SEGNAM = WA_DATA-SEGNAM.
              WA_DATA1-PSGNUM = WA_DATA-PSGNUM.
              WA_DATA1-HLEVEL = WA_DATA-HLEVEL.
              WA_DATA1-DTINT2 = WA_DATA-DTINT2.
              WA_DATA1-SDATA  = WA_E1EDK181.
              APPEND WA_DATA1 TO IT_DATA1.
              CLEAR WA_DATA1.
            ENDIF.
          ELSEIF  WA_DATA-SEGNAM = 'E1EDK18' AND WA_DATA-SEGNUM = '000013'.
            WA_E1EDK182-QUALF = WA_DATA-SDATA+0(3).
            WA_E1EDK182-TAGE  = WA_DATA-SDATA+3(8).
            WA_E1EDK182-PRZNT = WA_DATA-SDATA+11(8).
            APPEND WA_E1EDK182 TO IT_E1EDK182.
            IF SY-SUBRC = 0.
              WA_DATA1-MANDT  = WA_DATA-MANDT.
              WA_DATA1-DOCNUM = WA_DATA-DOCNUM.
              WA_DATA1-SEGNUM = WA_DATA-SEGNUM.
              WA_DATA1-SEGNAM = WA_DATA-SEGNAM.
              WA_DATA1-PSGNUM = WA_DATA-PSGNUM.
              WA_DATA1-HLEVEL = WA_DATA-HLEVEL.
              WA_DATA1-DTINT2 = WA_DATA-DTINT2.
              WA_DATA1-SDATA  = WA_E1EDK182.
              APPEND WA_DATA1 TO IT_DATA1.
              CLEAR WA_DATA1.
            ENDIF.
          ELSEIF  WA_DATA-SEGNAM = 'E1EDK18' AND WA_DATA-SEGNUM = '000014'.
            WA_E1EDK183-QUALF = WA_DATA-SDATA+0(3).
            WA_E1EDK183-TAGE  = WA_DATA-SDATA+3(8).
            APPEND WA_E1EDK183 TO IT_E1EDK183.
            IF SY-SUBRC = 0.
              WA_DATA1-MANDT  = WA_DATA-MANDT.
              WA_DATA1-DOCNUM = WA_DATA-DOCNUM.
              WA_DATA1-SEGNUM = WA_DATA-SEGNUM.
              WA_DATA1-SEGNAM = WA_DATA-SEGNAM.
              WA_DATA1-PSGNUM = WA_DATA-PSGNUM.
              WA_DATA1-HLEVEL = WA_DATA-HLEVEL.
              WA_DATA1-DTINT2 = WA_DATA-DTINT2.
              WA_DATA1-SDATA  = WA_E1EDK183.
              APPEND WA_DATA1 TO IT_DATA1.
              CLEAR WA_DATA1.
            ENDIF.
          ENDIF.
        ELSEIF SEG = 'E1EDP'.
          IF WA_DATA-SEGNAM = 'E1EDP01'.
            WA_E1EDP01-POSEX   = WA_DATA-SDATA+0(6).
            WA_E1EDP01-ACTION  = WA_DATA-SDATA+6(3).
            WA_E1EDP01-PSTYP   = WA_DATA-SDATA+9(1).
            WA_E1EDP01-KZABS   = WA_DATA-SDATA+10(1).
            WA_E1EDP01-MENGE   = WA_DATA-SDATA+11(15).
            WA_E1EDP01-MENEE   = WA_DATA-SDATA+26(3).
            WA_E1EDP01-BMNG2   = WA_DATA-SDATA+29(15).
            WA_E1EDP01-PMENE   = WA_DATA-SDATA+44(3).
            WA_E1EDP01-VPREI   = WA_DATA-SDATA+54(15).
            WA_E1EDP01-PEINH   = WA_DATA-SDATA+69(9).
            WA_E1EDP01-NETWR   = WA_DATA-SDATA+78(18).
            WA_E1EDP01-NTGEW   = WA_DATA-SDATA+132(18).
            WA_E1EDP01-GEWEI   = WA_DATA-SDATA+150(3).
            WA_E1EDP01-MATKL   = WA_DATA-SDATA+175(9).
            WA_E1EDP01-BPUMN   = WA_DATA-SDATA+200(6).
            WA_E1EDP01-BPUMZ   = WA_DATA-SDATA+206(6).
            WA_E1EDP01-BRGEW   = WA_DATA-SDATA+257(18).
            WA_E1EDP01-WERKS   = WA_DATA-SDATA+311(4).
            WA_E1EDP01-LGORT   = WA_DATA-SDATA+383(4).
            APPEND WA_E1EDP01 TO IT_E1EDP01.
            IF SY-SUBRC = 0.
              WA_DATA1-MANDT  = WA_DATA-MANDT.
              WA_DATA1-DOCNUM = WA_DATA-DOCNUM.
              WA_DATA1-SEGNUM = WA_DATA-SEGNUM.
              WA_DATA1-SEGNAM = WA_DATA-SEGNAM.
              WA_DATA1-PSGNUM = WA_DATA-PSGNUM.
              WA_DATA1-HLEVEL = WA_DATA-HLEVEL.
              WA_DATA1-DTINT2 = WA_DATA-DTINT2.
              WA_DATA1-SDATA  = WA_E1EDP01.
              APPEND WA_DATA1 TO IT_DATA2.
              CLEAR WA_DATA1.
            ENDIF.
          ELSEIF WA_DATA-SEGNAM = 'E1EDP20'.
            WA_E1EDP20-WMENG = WA_DATA-SDATA+0(15).
            WA_E1EDP20-AMENG = WA_DATA-SDATA+15(15).
            WA_E1EDP20-EDATU = WA_DATA-SDATA+30(8).
            APPEND WA_E1EDP20 TO IT_E1EDP20.
            IF SY-SUBRC = 0.
              WA_DATA1-MANDT  = WA_DATA-MANDT.
              WA_DATA1-DOCNUM = WA_DATA-DOCNUM.
              WA_DATA1-SEGNUM = WA_DATA-SEGNUM.
              WA_DATA1-SEGNAM = WA_DATA-SEGNAM.
              WA_DATA1-PSGNUM = WA_DATA-PSGNUM.
              WA_DATA1-HLEVEL = WA_DATA-HLEVEL.
              WA_DATA1-DTINT2 = WA_DATA-DTINT2.
              WA_DATA1-SDATA  = WA_E1EDP20.
              APPEND WA_DATA1 TO IT_DATA2.
              CLEAR WA_DATA1.
            ENDIF.
          ELSEIF WA_DATA-SEGNAM = 'E1EDPA1'.
            WA_E1EDPA1-PARVW = WA_DATA-SDATA+0(3).
            WA_E1EDPA1-LIFNR = WA_DATA-SDATA+20(17).
            WA_E1EDPA1-NAME1 = WA_DATA-SDATA+37(35).
            WA_E1EDPA1-STRAS = WA_DATA-SDATA+177(35).
            WA_E1EDPA1-ORT01 = WA_DATA-SDATA+282(35).
            WA_E1EDPA1-PSTLZ = WA_DATA-SDATA+326(9).
            WA_E1EDPA1-LAND1 = WA_DATA-SDATA+344(3).
            WA_E1EDPA1-TELF1 = WA_DATA-SDATA+442(25).
            WA_E1EDPA1-TELFX = WA_DATA-SDATA+517(25).
            WA_E1EDPA1-SPRAS = WA_DATA-SDATA+592(1).
            WA_E1EDPA1-REGIO = WA_DATA-SDATA+655(3).
            APPEND WA_E1EDPA1 TO IT_E1EDPA1.
            IF SY-SUBRC = 0.
              WA_DATA1-MANDT  = WA_DATA-MANDT.
              WA_DATA1-DOCNUM = WA_DATA-DOCNUM.
              WA_DATA1-SEGNUM = WA_DATA-SEGNUM.
              WA_DATA1-SEGNAM = WA_DATA-SEGNAM.
              WA_DATA1-PSGNUM = WA_DATA-PSGNUM.
              WA_DATA1-HLEVEL = WA_DATA-HLEVEL.
              WA_DATA1-DTINT2 = WA_DATA-DTINT2.
              WA_DATA1-SDATA  = WA_E1EDPA1.
              APPEND WA_DATA1 TO IT_DATA2.
              CLEAR WA_DATA1.
            ENDIF.
          ELSEIF WA_DATA-SEGNAM = 'E1EDP19'.
            WA_E1EDP19-QUALF = WA_DATA-SDATA+0(3).
            WA_E1EDP19-IDTNR = WA_DATA-SDATA+3(35).
            WA_E1EDP19-KTEXT = WA_DATA-SDATA+38(70).
            APPEND WA_E1EDP19 TO IT_E1EDP19.
            IF SY-SUBRC = 0.
              WA_DATA1-MANDT  = WA_DATA-MANDT.
              WA_DATA1-DOCNUM = WA_DATA-DOCNUM.
              WA_DATA1-SEGNUM = WA_DATA-SEGNUM.
              WA_DATA1-SEGNAM = WA_DATA-SEGNAM.
              WA_DATA1-PSGNUM = WA_DATA-PSGNUM.
              WA_DATA1-HLEVEL = WA_DATA-HLEVEL.
              WA_DATA1-DTINT2 = WA_DATA-DTINT2.
              WA_DATA1-SDATA  = WA_E1EDP19.
              APPEND WA_DATA1 TO IT_DATA2.
              CLEAR WA_DATA1.
            ENDIF.
          ENDIF.
        ELSEIF SEG = 'E1EDS'.
          IF WA_DATA-SEGNAM = 'E1EDS01'.
            WA_E1EDS01-SUMID = WA_DATA-SDATA+0(3).
            WA_E1EDS01-SUMME = WA_DATA-SDATA+3(18).
            WA_E1EDS01-SUNIT = WA_DATA-SDATA+21(3).
            APPEND WA_E1EDS01 TO IT_E1EDS01.
            IF SY-SUBRC = 0.
              WA_DATA1-MANDT  = WA_DATA-MANDT.
              WA_DATA1-DOCNUM = WA_DATA-DOCNUM.
              WA_DATA1-SEGNUM = WA_DATA-SEGNUM.
              WA_DATA1-SEGNAM = WA_DATA-SEGNAM.
              WA_DATA1-PSGNUM = WA_DATA-PSGNUM.
              WA_DATA1-HLEVEL = WA_DATA-HLEVEL.
              WA_DATA1-DTINT2 = WA_DATA-DTINT2.
              WA_DATA1-SDATA  = WA_E1EDS01.
              APPEND WA_DATA1 TO IT_DATA3.
              CLEAR WA_DATA1.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.
      IF SY-SUBRC = 0.
        LOOP AT  IT_DATA2 INTO WA_DATA1.
          READ TABLE IT_DATA2 INTO WA_DATA1 INDEX COUNT.
          APPEND WA_DATA1 TO IT_DATA4.
          APPEND LINES OF IT_DATA4 TO IT_DATA1.
          COUNT = COUNT + 1.
          CLEAR:WA_DATA1,IT_DATA4[],IT_DATA4.
          IF COUNT = 5.
            APPEND LINES OF IT_DATA3 TO IT_DATA1.
           IT_DATA1-SEGNUM = SY-TABIX.
           MODIFY IT_DATA1 FROM IT_DATA1 INDEX SY-TABIX TRANSPORTING SEGNUM .
            PERFORM IDOCGENETRATE.
            DELETE IT_DATA1 FROM 15 TO 19.
            DELETE IT_DATA2 FROM 1 TO 4.
            SORT IT_DATA2.
            CLEAR:WA_DATA1.
            count = 1.
          ENDIF.
        ENDLOOP.
      ENDIF.
      LOOP AT T_COMM_IDOC.
        WRITE:/ 'IDoc Generated - ', T_COMM_IDOC-DOCNUM.
      ENDLOOP.
    *&      Form  IDOCGENETRATE
          text
    -->  p1        text
    <--  p2        text
    FORM IDOCGENETRATE .
    DATA: count1 type i VALUE 1.
      DATA : S_CTRL_REC LIKE EDIDC. "Idoc Control Record
    CONSTANTS : C_PO_SEGMENT LIKE EDIDD-SEGNAM VALUE 'PO_SEGMENT'.
      CONSTANTS:  C_IDOCTP LIKE EDIDC-IDOCTP VALUE 'ORDERS05'.
    loop at IT_DATA1 into WA_DATA1.
      it_DATA1-segnum = count1.
      MODIFY IT_DATA1 FROM IT_DATA1 INDEX SY-TABIX TRANSPORTING SEGNUM .
      count1 = count1 + 1.
    endloop.
    Selection Screen
      DATA :  C_MESTYP LIKE EDIDC-MESTYP VALUE 'ORDERS',    "Message Type
                    C_RCVPRT LIKE EDIDC-RCVPRT VALUE 'LS',         "Partner type of receiver
                    C_RCVPRN LIKE EDIDC-RCVPRN VALUE 'DTZ_801',
                    C_RCVPOR LIKE EDIDC-RCVPOR VALUE 'ZEDI',        "'A000000226',
                    C_SNDPRN LIKE EDIDC-SNDPRN VALUE 'DTZ_801',
                    C_SNDPRT LIKE EDIDC-SNDPRT VALUE 'LS'.
      S_CTRL_REC-RCVPOR = C_RCVPOR. "Receiver Port
      S_CTRL_REC-MESTYP = C_MESTYP. "Message type
      S_CTRL_REC-IDOCTP = C_IDOCTP. "Basic IDOC type
      S_CTRL_REC-RCVPRT = C_RCVPRT. "Partner type of receiver
      S_CTRL_REC-RCVPRN = C_RCVPRN. "Partner number of receiver
                                    "Sender Partner type
      S_CTRL_REC-SNDPRN = C_SNDPRN. "
      S_CTRL_REC-SNDPRT = C_SNDPRT ." Sender Partner Number
                    " generate_control_record
      CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
        EXPORTING
          MASTER_IDOC_CONTROL            = S_CTRL_REC
        TABLES
          COMMUNICATION_IDOC_CONTROL     = T_COMM_IDOC
          MASTER_IDOC_DATA               = IT_DATA1
        EXCEPTIONS
          ERROR_IN_IDOC_CONTROL          = 1
          ERROR_WRITING_IDOC_STATUS      = 2
          ERROR_IN_IDOC_DATA             = 3
          SENDING_LOGICAL_SYSTEM_UNKNOWN = 4
          OTHERS                         = 5.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
        COMMIT WORK.
         LOOP AT T_COMM_IDOC.
          WRITE:/ 'IDoc Generated - ', T_COMM_IDOC-DOCNUM.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " send_idoc

  • Avoid Duplicate IDOC :

    Hi All,
    I need to code for avoid duplicate IDOC when my program convert one idoc to another IDOC. The Code is written below..
      LOOP  AT  t_seldoc.
        SELECT SINGLE * FROM  edidc
              WHERE docnum  EQ t_seldoc-idoc.
        REFRESH: t_idocst,
                 t_edidd.
        IF edidc-mestyp = c_msg_type.
          MOVE:  c_new_type     TO  edidc-mestyp,
                 c_st69         TO  edidc-status,
                 c_st69         TO  t_seldoc-status,
                 t_seldoc-idoc  TO  t_idocst-docnum.
        ELSE.
          MOVE:  'Z_NGI_SBT_TICKET'     TO  edidc-mestyp,
                 c_st69         TO  edidc-status,
                 c_377          TO  edidc-stdmes, "Add the stdmes for acks
                 c_st69         TO  t_seldoc-status,
                 t_seldoc-idoc  TO  t_idocst-docnum.
        ENDIF.
        APPEND  t_idocst  TO  t_idocst.
        PERFORM  update_idoc.
        READ TABLE t_output  WITH KEY idoc = t_seldoc-idoc.
        MOVE  sy-tabix  TO  l_tabix.
        MOVE c_upd_idoc TO  t_output-status.
        MODIFY t_output INDEX  l_tabix.
        MODIFY t_seldoc.
      ENDLOOP.
    Line: -
    This is the perform statement.
    CHANGE BY Swati Namdev 28042009
    types : begin of ty_vbak,
          vbeln    type   vbak-vbeln,
    end of ty_vbak.
    Data : LT_dup_check type standard table of Z1NG_SBTTICKETHD,
           it_vbak      type standard table of ty_vbak.
    End Here  Swati Namdev 28042009
      CALL FUNCTION 'EDI_DOCUMENT_OPEN_FOR_EDIT'
        EXPORTING
          document_number                     = t_seldoc-idoc
         ALREADY_OPEN                        = 'N'
       IMPORTING
         IDOC_CONTROL                        =
        TABLES
          idoc_data                           =  t_edidd
        EXCEPTIONS
          document_foreign_lock               = 1
          document_not_exist                  = 2
          document_not_open                   = 3
          status_is_unable_for_changing       = 4
          OTHERS                              = 5.
      IF sy-subrc  NE 0.
        MESSAGE ID     sy-msgid
                TYPE   sy-msgty
                NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        EXIT.
      ENDIF.
      LOOP AT t_edidd  WHERE segnam  EQ  c_tickey_hdr.
        MOVE  t_edidd-sdata  TO  z1tickethd.
        IF  z1tickethd-tkt_type  EQ  '0'.
          MOVE  '3'  TO  z1tickethd-tkt_type.
        ELSEIF
            z1tickethd-tkt_type  EQ  '1'.
          MOVE  '4'  TO  z1tickethd-tkt_type.
        ENDIF.
        MOVE  z1tickethd   TO  t_edidd-sdata.
        MODIFY  t_edidd.
      ENDLOOP.
      DATA: z1ng_sbttickethd LIKE z1ng_sbttickethd,
            z1ng_sbtticketdt LIKE z1ng_sbtticketdt,
            z1ng_ticketdt LIKE z1ng_ticketdt.
      LOOP AT t_edidd  WHERE segnam  EQ  'Z1NG_TICKETDT'.
        MOVE  t_edidd-sdata  TO  z1ng_ticketdt.
        CLEAR: z1ng_sbtticketdt.
        MOVE-CORRESPONDING z1ng_ticketdt TO z1ng_sbtticketdt.
        MOVE  z1ng_sbtticketdt  TO  t_edidd-sdata.
        t_edidd-segnam = 'Z1NG_SBTTICKETDT'.
        MODIFY  t_edidd.
        CALL FUNCTION 'EDI_CHANGE_DATA_SEGMENT'
             EXPORTING
                  idoc_changed_data_record = t_edidd
             EXCEPTIONS
                  idoc_not_open            = 1
                  data_record_not_exist    = 2
                  OTHERS                   = 3.
      ENDLOOP.
      LOOP AT t_edidd  WHERE segnam  EQ  'Z1NG_TICKETHD'.
        MOVE  t_edidd-sdata  TO  z1ng_tickethd.
        CLEAR: z1ng_sbttickethd.
        MOVE-CORRESPONDING z1ng_tickethd TO z1ng_sbttickethd.
        MOVE  z1ng_sbttickethd  TO  t_edidd-sdata.
        t_edidd-segnam = 'Z1NG_SBTTICKETHD'.
        MODIFY  t_edidd.
    CHANGE BY Swati Namdev 28042009
       MOVE-CORRESPONDING z1ng_sbttickethd TO LT_dup_check.
        append  z1ng_sbttickethd to LT_dup_check.
    End here Swati Namdev 28042009
      ENDLOOP.
    CHANGE BY Swati Namdev 28042009
      refresh it_vbak. clear it_vbak.
      if lt_dup_check[] is not initial.
         Select vbeln from vbak into table it_vbak for all entries in
                            lt_dup_check where KUNNR = lt_dup_check-CUST
                            and  ZZTKT_NBR = lt_dup_check-TKT_NBR.
        if it_vbak[] is not initial.
            Message text-002  type 'E'.
        endif.
      endif.
    End here Swati Namdev 28042009
      CALL FUNCTION 'EDI_CHANGE_CONTROL_RECORD'
           EXPORTING
                idoc_changed_control         = edidc
           EXCEPTIONS
                idoc_not_open                = 1
                direction_change_not_allowed = 2
                OTHERS                       = 3.
      IF  sy-subrc NE  0.
        MESSAGE ID     sy-msgid
                TYPE   sy-msgty
                NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        EXIT.
      ENDIF.
      CALL FUNCTION 'EDI_CHANGE_DATA_SEGMENT'
           EXPORTING
                idoc_changed_data_record = t_edidd
           EXCEPTIONS
                idoc_not_open            = 1
                data_record_not_exist    = 2
                OTHERS                   = 3.
      IF sy-subrc <> 0.
        MESSAGE ID     sy-msgid
                TYPE   sy-msgty
                NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        EXIT.
      ENDIF.
      CALL FUNCTION 'EDI_DOCUMENT_CLOSE_EDIT'
         EXPORTING
            document_number        = t_seldoc-idoc
            do_commit              = c_yes
            do_update              = c_yes
               WRITE_ALL_STATUS       = 'X'
         TABLES
                STATUS_RECORDS     =  T_EDI_DS40
         EXCEPTIONS
            idoc_not_open          = 1
            db_error               = 2
            OTHERS                 = 3.
      IF sy-subrc <> 0.
        MESSAGE ID     sy-msgid
                TYPE   sy-msgty
                NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        EXIT.
      ENDIF.
      CALL FUNCTION 'IDOC_STATUS_WRITE_TO_DATABASE'
           EXPORTING
                idoc_number = t_seldoc-idoc
           TABLES
                idoc_status = t_idocst.
      COMMIT WORK.
      CALL FUNCTION 'EDI_DOCUMENT_DEQUEUE_LATER'
           EXPORTING
                docnum = t_seldoc-idoc.
      COMMIT WORK.
    ENDFORM.                    " UPDATE_IDOC
    AT  present I am checking if IDOC is Duplicate giving error message but now I have to set status as 51 and for duplicate idoc and run for remaining.
    Please provide the solution.
    regards
    Swati
    Edited by: Swati Namdev on May 5, 2009 11:26 AM
    Edited by: Swati Namdev on May 5, 2009 11:28 AM
    Edited by: Swati Namdev on May 5, 2009 11:28 AM
    Edited by: Swati Namdev on May 5, 2009 11:29 AM
    Edited by: Swati Namdev on May 5, 2009 11:32 AM

    Hi all
      any inputs on this pl...?
      Q: If the same idoc is received second time then how to stop the processing
           the duplicate idoc ?
           (I understood the question this way )
    regards

  • Edi message

    How and where to create this EDI message type.
    Field name :   edidc-stdmes   “EDI message type

    Hi,
    Create Message Type -->  WE81
    Regards
    Sudheer

  • Create Sales Order using IDoc

    Hi All,
    Based upon customer's input file which contains header and line item details I have to create sales order in our system. We would like to use IDoc for this. Customer will send us file once a day by email or FTP.
    For this I have created a port and partner profile but I am not sure how the process will get initiated?
    Can someone please let me know how can I do this? There is now outbound process involved, I just need to create sales order based upon input file using IDoc.
    Regards,
    Sanjay

    HI,
    You cannot directly call the function modules that process the idoc, because these functions are called dynamically by the ALE layer and the function expects data in a certian format (IDoc format ).
    BAPI would be the best way to go for your scenario.
    However there is a workaround if you want to use IDoc only. You can follow this approach :
    1. Populate an outbound ORDERS05 IDoc from the file data.
    2. Distribute it to the same system, i.e sender system and receiver system is same.
    3. On the Inbound side the Idoc that you created on the outbound side will be received and processed.
    "R3  File----->Outound ORDRES05  -----
    ______________________________________|
    |
    '------> " Inbound ORDERS05 ( in the same R3 system)
    The tricky part is sending an Idoc and receiving in the same system, but you can find how to do this on the wiki pages.
    regards,
    Advait

  • About Orders05 outbound Idoc.

    Hi,
    I am using an outbound idoc of basic type Orders05 with an extension of the idoc header segment.This outbound idoc will get triggered once a PO is saved and sent through EDI.
    I have to do an enhancement wherein I have to populate the mode of transport field(EXPVZ) and place of loading(LADEL) in the fields of the extended segment selecting them from EIKP depending upon the BELNR value in the header of the idoc(E1EDK01-BELNR).
    I am unable to understand how do I populate the fields.
    Could you please help me.
    Thanks,
    Sandeep.

    HI,
    see the below steps you will completely understand the processing outbound..
    2.1 Outbound Interface
    PROCESS DIAGRAM
    Outbound Interface
    1. Analyse Hierarchy Levels
    2. Create New segment
    3. Create New IDoc Type
    4. Create New Message Type
    5. Link Message with IDoc Type
    6.  Create an entry in EDP13 via transactions WE20 and BD64
    7. Populate the Custom IDoc via ABAP Program
    7b Error Handling
    7c. Send Status Email
    8. Test the Population of the Custom IDoc
    <b>Step 1 – Analyse Hierarchy Levels:</b>
    Analyse the data relationships being processed in the interface.  Define the appropriate hierarchical Parent-to-Child relationships. 
    Navigate to transaction code WEDI
    Transaction WEDI displays the IDOC main menu.  This allows navigation around the various development and control areas to create a customised IDOC.
    <b>Step 2 – Create a new segment:</b>
    via wedi : Development - IDOC Segments or Transaction code WE31.
    •     Enter segment name and click on Create.
    &#61662;     The name of the segment type must start with Z1 , and have a maximum of eight characters.
    •     Enter description and enter the relevant field names and data elements.
    &#61662;     The segment should represent a structure in the program so for each field in the segment a field name and a data element must be defined.
    •     Save the segment and enter Person Responsible and Processing Person .
    •     Go to Edit and Set Release.
    •     Repeat this procedure for each new Segment in the IDOC.
    <b>Step 3 – Create a new IDOC Type</b>
    via wedi Development - IDOC Types or Transaction WE30.
    •     Enter segment name (starting with Z), click on Basic Type and then Create. 
    •     Create as new, enter Person Responsible and Processing Person  and enter description.
    •     On ‘Create Basic Type’ screen decide where segments should be inserted and go to Edit/Create Segment.
    •     Complete relevant fields in the Maintain Attributes screen:
    •     From the relevant segments created in Step 2 enter the Segment type and if mandatory segment.
    •     The Minimum and Maximum number of segments to be allowed in the sequence. (One minimum and one maximum if segment is mandatory).
    •     The Parent Segment and Hierarchy Level will be automatically created depending on where in the IDOC tree you decided to create that particular segment.
    •     Repeat this process for each segment needed in the IDOC type, deciding whether to add the next segments at the same level or as a ‘Child’.
    •     When IDOC created return to initial screen.  Go to Edit and Set Release.
    •     Go to Transaction WE60 to view the IDoc Type you have created.
    <b>Step 4 – Create new Message Type</b>
    via wedi Development - Message Types or Transaction WE81.
    •     Display/Change and click on New Entries
    •     Create a new Message Type and Save.
    Step <b>5 – Link Message Type to IDOC Type</b>
    via wedi Development - IDOC Type/Message or Transaction WE82.
    •     Display/Change and then click on New Entries.
    •     Enter Message Type, Basic Type (IDOC Type) and Release (46C) and Save.
    <b>Step 6 – Create an entry in EDP13 via transactions WE20 and BD64.</b>
    The partner profile for the Idoc must be set up and generated in the transaction BD64 and transaction WE20.
    •     WE20 – Add Message Type to appropriate Partner Type, Enter Message Type, Receiver Port and Idoc Type and Save.
    •     BD64 – Create a Model View, Enter Sender and Receiver Ports, Attach Message Type.  Go to ‘Environment’ on Menu and click on Generate Partner Profiles and generate (not save) profile.
    <b>Step 7 – Populate the custom IDOC via ABAP Program</b>
    See Test Program ZOUTBD_IDOC_TEMPLATE, Appendix IV.
    •     Create an Internal Table for each segment type, this should be exactly the same structure as the segment type.
    •     The control record is filled into a structure like EDIDC.  The message type and the Idoc type for the Idoc must be populated into the eddic structure.
    - PERFORM populate_Control_structure USING  c_mestyp
                                                c_SEGMENT_type1.
    •     The data segments are filled into a structure like edidd-sdata; sdata and the segment name are populated into the edidd structure.
    - PERFORM transfer_Parent_data_to_seg.
    •     The standard SAP function module MASTER_IDOC_DISTRIBUTE is called to pass the populated IDOC to the ALE Layer.
    - PERFORM master_idoc_distribute.
    •     NOTE:  This function module is only called for stand alone programs and Shared Master Data programs (SMD).   It is not called when using extensions or output determination.
    •     The ALE Layer handles the sending of the IDOC to the receiving system.
    •     Error Handling (see  Step 7b).
    •     Commit work.
    Project Specific
    <b>Step 7b – Error Handling</b>•     Analyse which fields in the interface are mandatory for the receiving system and who needs to receive error notification.
    •     Declare a structure of type ‘MCMAILOBJ’ for sending instructions.
    •     Enter values for the internal table based on structure ‘MCMAILOBJ’
    •     For selection processes, on SY-SUBRC checks and where fields are mandatory for the receiving system; insert Function Module  ‘MC_SEND_MAIL’.
    •     Enter values in the following parameters: -
    MS_MAIL_SENDMODE         =  ‘B’ (Batch Mode)
    MS_MAIL_TITLE                    =  'Mail Title'
    MS_MAIL_DESCRIPTION     =  ‘Error description’ (e.g. MATNR not given)
    MS_MAIL_RECEIVER           =  ‘Name of Receiver’ (To be determined)
    MS_MAIL_EXPRESS             =  ‘E’ (Express Delivery)
    MS_MAIL_DLINAME            = Leave Blank
    MS_MAIL_LANGU                =  'E'  (Language)
    MS_MAIL_FUNKOBJ_NAME  = Leave Blank
    TABLES
               MS_MAIL_CONT           =  I_MCMAILOBJ
    Note:
    It has to be determined separately for each interface how these errors and mail notifications are to be grouped – dependant upon the number of errors that are potentially likely. One possible approach is to send an email for each reason for rejection and include all the records that failed for that reason in the mail notification. Another possible approach is to send an email for every failure.
    When error checking for mandatory fields it is common SAP practice to reject a record on its first failure (irrespective of subsequent errors in that record)
    <b>Step 7c – Send status mail</b>
    •     Append to table I_MCMAILOBJ details of the time the interface was processed, how many Idocs were created and how many of these produced a status of 03.
    •     Select the user to receive the mail from ZINT_RECEIVER, using the name of the program as a key (SY-CPROG).
    •     Use function Module ‘MC_SEND_MAIL’ to send a mail to the user containing the contents of I_MCMAILOBJ at the end of the interface processing.
    <b>Step 8 – Test the population of the custom IDOC</b>
    via wedi IDoc - Display IDoc or Transaction WE02.
    •     Enter your message type and execute.
    •     Status should be green, double click on one of the Idocs you have created to view its contents.
    •     If a problem has occurred click on Status which will give you a description of the error.
    •     Drop down Data Records arrow and this should list the data in the IDoc in the correct hierarchical structure.
    •     Click on each individual segment and view the content to check that the correct data has been read.
    •     If you have UNIX access by using AL11 you can view the file that you have created.
    Note:
    For some interfaces it may be valid to send an empty file to SAP.  This empty file is converted to the custom IDOC format expected by SAP.  This custom IDOC will contain dummy information.  In the inbound processing code, if the dummy information is identified then the processing of the IDOC is considered to be complete and the IDOC should then be assigned a successfully processed status of 53, even though it has not been processed at all.
    rewards if useful
    regards,
    nazeer

  • Problem in message mapping (outbound IDOC ORDERS05 from SAP R/3)

    Hi to all,
    I have an outbound interface from sap r3
    sap r3 --> XI --> ftp server
    idoc --> XI --> text file
    Using IDOC orders05
    The problem is in segment E1EDP01/E1EDP19
    Segment E1EDP01 is unbounded and i map it well. If it contains E1EDP19, works fine. But in some cases, E1EDP19 not appears at E1EDP01segments. So then XI fails at mapping:
    IDOC OUTPUT (OK)
    1-E1EDP01/E1EDP19
    2-E1EDP01
    3-E1EDP01/E1EDP19
    4-E1EDP01
    XI WRITES (FAILURE)
    1-E1EDP01/E1EDP19
    2-E1EDP01/E1EDP19 (INFORMATION FROM LINE 3)
    3-E1EDP01 (WRONG)
    4-E1EDP01 (WRONG)
    You can take a look of Mapping mode here:
    <a href="http://img505.imageshack.us/my.php?image=orders05mappingcj8.jpg">[IMG]http://img505.imageshack.us/img505/1536/orders05mappingcj8.th.jpg[/IMG]</a>
    We don't use BPM and wanna use a solution without it.
    Pls ask me for more information if necessary.
    Thanks a lot for your help; Regards

    Hi all,
    The mapping function includes an exists and a mapwithdefault.
    Now the creation of the segment is handled ok, but not as well its fields. Its unable to determine the write of the second E1EDP19 segment and it does:
    1- OK
    2- OK
    3- Writes E1EDP20 but not the 19
    4- OK
    Thanks for your interesting

  • FM for ORDERS05 Outbound Idoc.

    Hi,
    I have to post an idoc of basic type ORDERS05 from a custom program.
    I have populated the fields for control header and the data section of the idoc.I tried using the FM IDOC_OUTPUT_ORDERS to post the idoc,but when I went and checked in WE05,there were no idoc created.I don't understand why the idoc's are not been created.Could you help me in knowing how to use the FM IDOC_OUTPUT_ORDERS or if there are any other FM's to post an outbound idoc.
    Please reply asap.
    Thanks,
    Sandeep.

    Hi,
    There is a exit in the FM IDOC_OUTPUT_ORDERS line no 50... double click on the '001' it will take u to the Function Module EXIT_SAPLEINM_001... there click on the Zprogram ...
    The FM has EKKO table fields has a Impirting parameter .
    u write a code in that Z include program
    u have to call the FM MASTER_IDOC_DISTRIBUTE in the program
    which creates the IDOC
    Thanks,
    Manjunath MS

  • Idoc ORDERS05 for PO Outbound for the Output type ZSUS.

    I have a standard Idoc ORDERS05 for the PO.
    I have Extended this Idoc and Created a Z- Segment below E1EDKA1 which is ZE1EDKA1.
    There are Four Fields in it. i.e. ZZFNAME, ZZLMAE, ZZEMAIL & ZZADDRESS.
    When I create the PO using ME21N OR Change using ME22N and use the MEssage type ZSUS which is Configured in the NACE T-Code.
    The Idoc Just does not get triggered . I tried to do the same through the test tool. WE19 but yet the Idocs gets Created but the Z-segment does not get populted nor is seen.
    I have writtem my code in the Exit 'EXIT_SAPLEINM_002' and have poulated the above mentioned four fields.
    But the Idocs just does not reach the user Exit and hence these four fields do not get populated.
    I have done the neccessary configuration in WE82 and also in WE57.
    Can u please provide me with the Solution.
    Regards,
    Deepak.

    Hi,
    Use table NAST

  • Outbound Idoc: ORDERS05 from VA02

    Hi Friends,
    Can you please tell me which user exit will trigger if I execute VA02 so that the outbound Idoc will generate ?
    Regards,
    Hari

    Hi all,
    The mapping function includes an exists and a mapwithdefault.
    Now the creation of the segment is handled ok, but not as well its fields. Its unable to determine the write of the second E1EDP19 segment and it does:
    1- OK
    2- OK
    3- Writes E1EDP20 but not the 19
    4- OK
    Thanks for your interesting

  • Outbound IDOC for PO - ORDERS05

    Hi all,
    I want to populate Vendor number and vendor name at the header level, So what should be done to get all the data for all partnner function.
    In the user exit EXIT_SAPLEINM_002 i have tried to modify the standard segment but i am not getting vandor name & number in the IDOc.
    Regards,
    Nilesh

    I believe ABAP forums would be a right place for this question..
    VJ

  • Populate PR number for PO outbound

    Hi All,
    we have a requirement to  send  PR number to legacy system.
    while creating IDOC ORDERS05(outbound i.e. PO details), we need one field value EKPO-BANFN to be sent in the IDOC...std ALE doesn't send this info
    While creating IDOC orders05 (outbound) E1EDP01 segment is populated for each line item of PO.
    there is another segment called E1EDP02,  
    1. QUALIF = 011
    2. BELNR = EKPO-BANFN.
    but where to add this code in for IDOC_OUTPUT_ORDERS,
    is there any exit or Enhancement spot is there?
    Regards,
    DSK

    Hi!
    Yes of course there are many exits in the code. If you check out the FM with sE37 transaction, you'll see the user-exits.
    Here's one, I think this will be good for you:
    FUNCTION EXIT_SAPLEINM_011.
    *"*"Lokale Schnittstelle:
    *"       IMPORTING
    *"             VALUE(DEKKO) LIKE  EKKO STRUCTURE  EKKO OPTIONAL
    *"             VALUE(DPEKKO) LIKE  PEKKO STRUCTURE  PEKKO OPTIONAL
    *"             VALUE(CONTROL_RECORD_OUT) LIKE  EDIDC STRUCTURE  EDIDC
    *"                             OPTIONAL
    *"             VALUE(DOBJECT) LIKE  NAST STRUCTURE  NAST OPTIONAL
    *"       TABLES
    *"              DEKPO STRUCTURE  UEKPO OPTIONAL
    *"              DPEKPO STRUCTURE  PEKPO OPTIONAL
    *"              DEKET STRUCTURE  UEKET OPTIONAL
    *"              DESLL STRUCTURE  ML_ESLL OPTIONAL
    *"              DINT_EDIDD STRUCTURE  EDIDD
    *"       EXCEPTIONS
    *"              ERROR_MESSAGE_RECEIVED
    *"              DATA_NOT_RELEVANT_FOR_SENDING
    INCLUDE ZXM06U33 .
    ENDFUNCTION.
    Regards
    Tamá

Maybe you are looking for

  • Scheduling error. ABC said Castle but horid "Scandal" aired instead

    EIther there was an error in scheduling or Verizon and ABC are lying! Expecting to see Castle Monday evening, we could only view disgusting new show Scandal. Is there a FAQ for setting the set to box to skip ABC?

  • IMovie8 crashes every time I open it after Mavericks install

    I've booted to the restore disk partition, and verified my boot sector (OSX Root?) and the full hard drive. I've repaired permissions. I've deleted the iMovie preferences file Please help... Console Log: 7/24/14 5:06:08.064 PM mDNSResponder[47]: ERRO

  • Mountain Lion not opening pdf files in Mail

    Since installing ML I cannot open pdf files in Mail. I have updated Adobe Reader to the latest version, but no joy. I desperately need to open these files. Should I just give up and forward them to my wheezy old Sony running Windows XP?

  • E3200 Kill my Internet speed. Help neede

    I got 1Ggbit Intrenet. When i plug in PC i got 700+\300+ on speedtest, if i plug in E3200 i got 90\40. **bleep**? I play with all settings  nothing helps... In status he show 1 ggbit internet and 1 ggbit Ethernet but he gives less than 100 mbit.... A

  • Shared Services 11.1.2 Unable to remove assigned user from a security group

    In Shared Services 11.1.2 - trying to remove a user from the assigned users list of a security group. Initially, I am able to remove the user and the assigned users total decreases by one - but when I relaunch the group properties - this user is stil