Function module for OUtbound DESADV01

Hi,
Can anyone tell me which function module to be used for OUtbound DESADV01 which i will be using for ASN. In addition to this, please let me know which procesisng code will be used.
Can anyone please share the code for writting a funciion module in case I have to write custom FM.
Regards
Rinku
Message was edited by:
        Rinku Malik

Hi,
Create a new function group from se37.
From the menu Goto --> Function group --> create group
Copy the function module IDOC_OUTPUT_DESADV01 into ZIDOC_OUTPUT_DESADV01 function module. Add your code in the function module.
create a new Z Process code ZSD05 in we41 tcode and attach the function module
ZIDOC_OUTPUT_DESADV01 to the process code.
In tcode we57 attach the function module to the idoc type and message type.
Regards
Arun

Similar Messages

  • Function module for Outbound Delivery

    Dear ABAPers,
    Can anyone tell me the Function module for Out bound Delivery.
    Thanks & Regards,
    Ashok.

    Hi,
    Check this BAPI:
    BAPI_OUTB_DELIVERY_CREATE_SLS.
    Hope it is helps.
    Regards,
    T.D.M.

  • Function Module for Outbound process code

    Hi,
    I have a scenario in which i have to send MBGMCR02 Idoc from SAP to XI.
    I created a new Outbound process code and now I have to code the function module that populates data into the segments.
    Does anyone have sample code for this, i.e code to put in the finction module of an outbound process code?

    hi...
    please find the below code.
    *& Report  ZPROGRAM11
    REPORT  ZPROGRAM11.
    tables : likp,vbuk,vbfa,ibin,vbap,vbak,kna1.
    types : begin of iy_tab,
             vbeln type vbfa-vbeln,
            vbelv type vbfa-vbelv,
           posnv type vbfa-posnv,
           end of iy_tab.
    types : begin of iy_tab1,
    vbeln type vbuk-vbeln,
    wbstk type vbuk-wbstk,
    end of iy_tab1.
    types : begin of iy_tab2,
    vbeln type vbak-vbeln,
    kunnr type vbak-kunnr,
    vkorg type vbak-vkorg,
    vtweg type vbak-vtweg,
    spart type vbak-spart,
    end of iy_tab2.
    data : i_ibase type ib_ibase.
    data : i_kunnr type vbak-kunnr.
    data : it_tab type table of iy_tab with header line,
      it_tab1 type standard table of iy_tab1 ,
      wa_tab1 type iy_tab1,
      it_tab2 type standard table of iy_tab2 ,
      wa_tab2 type iy_tab2.
    data : t_edidd type standard table of edidd .
    data : t_edidc type  edidc.
    data : t_edidc1 type standard table of edidc .
    data : wa type edidd.
    data : wa1 type e1edl20.
    data : wa2 type zibase.
    data : wa3 type e1edl32.
    data : wa4 type e1edl44.
    data : wa5 type e1edl37.
    data : wa6 type e1edl28.
    data : wa7 type e1edl30.
    data : wa8 type e1edl24.
    data : wa9 type e1adrm1.
    data : begin of it_tab3 occurs 10,
           vbeln type iy_tab-vbelv,
           posnr type iy_tab-posnv,
           i_ibase type ib_ibase,
           end of it_tab3.
      types :    begin of iy_tab4 ,
            valfr type ibin-valfr,
            ibase type ibin-ibase,
           amount type ibin-amount,
           unit type ibin-unit,
           end of iy_tab4.
           data : it_tab4 type standard table of iy_tab4,
                  wa_tab4 type iy_tab4.
      data : begin of it_tab5 occurs 10,
             vbeln type vbfa-vbelv,
             posnr type vbfa-posnv,
             ibase type ibib-ibase,
             valfr type ibin-valfr,
             amount type ibin-amount,
             unit type ibin-unit,
             matnr type vbap-matnr,
             kunnr type vbak-kunnr,
             vkorg type vbak-vkorg,
             vtweg type vbak-vtweg,
             spart type vbak-spart,
             name1 type kna1-name1,
             end of it_tab5.
          types : begin of iy_tab6,
                 vbeln type vbap-vbeln,
                 posnr type vbap-posnr,
                 matnr type vbap-matnr,
                end of iy_tab6.
          data : it_tab6 type standard table of iy_tab6,
                 wa_tab6 type iy_tab6.
    types : begin of iy_tab7,
            kunnr type kna1-kunnr,
            name1 type kna1-name1,
            end of iy_tab7.
    data: it_tab7 type standard table of iy_tab7,
          wa_tab7 type iy_tab7.
          data : wa_table type ytable1.
    selection-screen: begin of block b1 with frame title text-t00.
    parameters: p_vbeln type vbfa-vbeln.
    selection-screen: end of block b1.
    start-of-selection.
      select vbeln vbelv posnv  from vbfa into table it_tab
      where vbeln = p_vbeln.
      if sy-subrc eq 0.
            loop at it_tab.
        select vbeln wbstk from vbuk into table it_tab1
          for all entries in it_tab
        where vbeln = it_tab-vbeln.
            endloop.
      endif.
      loop at it_tab1 into wa_tab1.
        if wa_tab1-wbstk = 'C'.
          loop at it_tab.
            call function 'IBSD_CREATE_IBASE'
              exporting
                i_vbeln                     = it_tab-vbelv
                i_posnr                     = it_tab-posnv
                i_as_sold                   = '0'
                i_as_build                  = '0'
                i_capid                     = '0'
              I_CHANGE                    = ' '
               i_commit                    = 'X'
              I_COMMIT_WAIT               = ' '
             importing
               e_ibase                     = i_ibase
             exceptions
               order_not_found             = 1
               position_not_found          = 2
               nothing_to_do               = 3
               too_much_to_do              = 4
               missing_authorization       = 5
               foreign_lock                = 6
               others                      = 7
            if sy-subrc <> 0.
              message id sy-msgid type sy-msgty number sy-msgno
                      with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            else.
              move it_tab-vbelv to it_tab3-vbeln.
              move it_tab-posnv to it_tab3-posnr.
              move i_ibase to it_tab3-i_ibase.
              append it_tab3.
              if sy-subrc eq 0.
               select valfr ibase  amount unit from ibin into table it_tab4
                  for all entries in it_tab3
                  where ibase = it_tab3-i_ibase.
                 if sy-subrc eq 0.
                   select vbeln posnr matnr from vbap into table it_tab6
                     for all entries in it_tab3
                     where vbeln = it_tab3-vbeln and posnr = it_tab3-posnr .
                     if sy-subrc eq 0.
              select vbeln  kunnr vkorg vtweg spart from vbak into table it_tab2
                for all entries in it_tab
                  where vbeln = it_tab-vbelv.
              sort it_tab2 by vbeln.
              delete adjacent duplicates from it_tab2 comparing all fields.
             if sy-subrc <> 0.
               select kunnr name1 from kna1 into table it_tab7
                 for all ENTRIES IN it_tab2
                 where kunnr = it_tab2-kunnr.
                 endif.
               endif.
               endif.
               endif.
               endif.
          endloop.
        else.
          exit.
       if sy-subrc eq 0.
       endif.
        endif.
      endloop.
      loop at it_tab3.
        move it_tab3-vbeln to it_tab5-vbeln.
        move it_tab3-posnr to it_tab5-posnr.
        move it_tab3-i_ibase to it_tab5-ibase.
        if sy-subrc eq 0.
          read table it_tab4 into wa_tab4 with key ibase = it_tab3-i_ibase.
          move wa_tab4-valfr to it_tab5-valfr.
          move wa_tab4-amount to it_tab5-amount.
          move wa_tab4-unit to it_tab5-unit.
          if sy-subrc eq 0.
            read table it_tab6 into wa_tab6 with key  vbeln = it_tab3-vbeln posnr = it_tab3-posnr.
            move wa_tab6-matnr to it_tab5-matnr.
            if sy-subrc eq 0.
              read table it_tab2 into wa_tab2 with key vbeln = it_tab3-vbeln.
              move wa_tab2-kunnr to it_tab5-kunnr.
              move wa_tab2-vkorg to it_tab5-vkorg.
              move wa_tab2-vtweg to it_tab5-vtweg.
              move wa_tab2-spart to it_tab5-spart.
              if sy-subrc eq 0.
                read table it_tab7 into wa_tab7 with key kunnr = wa_tab2-kunnr.
                move wa_tab7-name1 to it_tab5-name1.
                append it_tab5.
                endif.
              endif.
          endif.
          endif.
         append it_tab5.
          endloop.
        loop at it_tab5.
          move it_tab5-vbeln to wa_table-vbeln.
           move it_tab5-kunnr to wa_table-kunnr.
            move it_tab5-vbeln to wa_table-vbeln.
             move it_tab5-ibase to wa_table-ibase.
              move it_tab5-matnr to wa_table-matnr.
               move it_tab5-valfr to wa_table-valfr.
                move it_tab5-unit to wa_table-unit.
                 move it_tab5-amount to wa_table-amount.
                  move it_tab5-vkorg to wa_table-vkorg.
                   move it_tab5-vtweg to wa_table-vtweg.
                    move it_tab5-spart to wa_table-spart.
                    move it_tab5-name1 to wa_table-name1.
                    insert ytable1 from wa_table.
                    endloop.
    *INSERT ytable1 FROM TABLE it_tab5.
        loop at it_tab5.
        wa1-vbeln = it_tab-vbeln.
        wa1-vkorg = it_tab5-vkorg.
        wa-segnam = 'E1EDL20'.
        wa-sdata = wa1.
        wa-hlevel = 2.
        append wa to t_edidd.
      loop at it_tab3.
        wa2-i_ibase = it_tab5-ibase.
        wa2-i_qty = it_tab5-amount.
        wa2-i_dat = it_tab5-valfr.
        wa-segnam = 'ZIBASE'.
        wa-sdata = wa2.
        wa-hlevel = 3.
        append wa to t_edidd.
               endloop.
    wa9-name1 = it_tab5-name1.
    wa-segnam = 'E1ADRM1'.
    wa-sdata = wa9.
    wa-hlevel = 3.
    append wa to t_edidd.
        wa-segnam = 'E1EDL28'.
        wa-sdata = wa6.
        wa-hlevel = 3.
        append wa to t_edidd.
        wa-segnam = 'E1EDL30'.
        wa-sdata = wa7.
        wa-hlevel = 4.
        append wa to t_edidd.
        wa3-kunnr = it_tab5-kunnr.
        wa-segnam = 'E1EDL32'.
        wa-sdata = wa3.
        wa-hlevel = 5.
        append wa to t_edidd.
        wa8-meins = it_tab5-unit.
        wa8-vtweg = it_tab5-vtweg.
        wa8-spart = it_tab5-spart.
        wa-segnam = 'E1EDL24'.
        wa-sdata = wa8.
        wa-hlevel = 3.
       append wa to t_edidd.
        wa-segnam = 'E1EDL37'.
        wa-sdata = wa5.
        wa-hlevel = 3.
        append wa to t_edidd.
        wa4-vbeln  = it_tab5-vbeln.
        wa4-posnr = it_tab5-posnr.
        wa4-matnr = it_tab5-matnr.
        wa-segnam = 'E1EDL44'.
        wa-sdata = wa4.
        wa-hlevel = 4.
        append wa to t_edidd.
        endloop.
        t_edidc-mandt = sy-mandt.
        t_edidc-direct = '1'.
        t_edidc-rcvpor = 'A000000062'.
        t_edidc-rcvprt = 'LS'.
        t_edidc-rcvprn = 'O2C_ASSET'.
    t_edidc-rcvpfc = 'LS'.
        t_edidc-sndpor = 'SAPSIT'.
        t_edidc-sndprt = 'LS'.
        t_edidc-sndprn = 'T90CLNT090'.
    t_edidc-sndpfc = 'LS'.
        t_edidc-mestyp = 'DELVRY'.
        t_edidc-idoctp = 'DELVRY03'.
    *t_edidc-rcvpfc = 'LS'.
    t_edidc-sndpfc = 'LS'.
        t_edidc-cimtyp = 'ZDELVRY03'.
        append t_edidc to t_edidc1.
        call function 'MASTER_IDOC_DISTRIBUTE'
                                   exporting
                                     master_idoc_control                  = t_edidc
                                 OBJ_TYPE                             = ''
                                 CHNUM                                = ''
                                   tables
                                     communication_idoc_control           = t_edidc1
                                     master_idoc_data                     = t_edidd
                                  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.
          CALL FUNCTION 'DB_COMMIT'
          CALL FUNCTION 'DEQUEUE_ALL'
          EXPORTING
            _SYNCHRON       = ' '
          COMMIT WORK.
        endif.
         endloop.

  • What is outbound function module for IDoc type INFRECMASS01

    Hi,
    What is outbound function module for IDoc type INFRECMASS01? This is for purchasing info record.
    Thanks
    Kamal

    Hi Kamal,
    Have you looked standard program <b>RBDSEINF</b> or transaction code <b>ME18</b>?
    This program will call function module <b>MASTERIDOC_CREATE_REQ_INFREC</b> to generate purchasing info record IDoc.
    Hope this will help.
    Regards,
    Ferry Lianto
    Please reward points if helpful.

  • Outbound function module for IDOC WMMBID02

    Hi,
    Do we have any outbound function module for basic IDOC type WMMBID02 (Stock movements from ext. systems) which has message type WMMBXY.
    I searched with hot keys OUTBOUND_WMMBXY in SE37 but unable to find a standard FM. My task is to extend that FM by a user-exit so as to populate my extended IDOC which is of basic type WMMBID02.
    Any help would be greatly appreciated.
    Regards,
    Harsh

    Hi Kamal,
    Have you looked standard program <b>RBDSEINF</b> or transaction code <b>ME18</b>?
    This program will call function module <b>MASTERIDOC_CREATE_REQ_INFREC</b> to generate purchasing info record IDoc.
    Hope this will help.
    Regards,
    Ferry Lianto
    Please reward points if helpful.

  • Sample Outbound Function Module for IDocs

    Hello All,
    Does anyone have sample code for an outbound function module for an IDoc - they created themselves. Custom or extended? Weblogs, sample code will be useful
    ty, dd
    Message was edited by:
            Demi Douglas

    Hi,
      Check this program:
    REPORT  zmatmas_idoc.
    INCLUDE zmatmas_idoc_top.
    INCLUDE zmatmas_idoc_selscreen.
    INCLUDE zmatmas_idoc_formroutine.
    START OF SELECTION
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM create_idoc.
      PERFORM distribute_idoc.
    TABLES
    TABLES: mara.
    Structures
    *Header
    TYPES: BEGIN OF gs_h_mara,
           matnr TYPE mara-matnr,
           ersda TYPE mara-ersda,
           ernam TYPE mara-ernam,
           laeda TYPE mara-laeda,
           aenam TYPE mara-aenam,
           pstat TYPE mara-pstat,
           END OF gs_h_mara.
    *Item
    TYPES: BEGIN OF gs_i_makt,
           spras TYPE makt-spras,
           maktx TYPE makt-maktx,
           maktg TYPE makt-maktg,
           matnr TYPE makt-matnr,
           END OF gs_i_makt.
    TYPES: BEGIN OF gs_i_mbew,
           lvorm TYPE mbew-lvorm,
           lbkum TYPE mbew-lbkum,
           salk3 TYPE mbew-salk3,
           vprsv TYPE mbew-vprsv,
           verpr TYPE mbew-verpr,
           stprs TYPE mbew-stprs,
           peinh TYPE mbew-peinh,
           matnr TYPE mbew-matnr,
           END OF gs_i_mbew.
    TYPES: BEGIN OF gs_i_mvke,
           vkorg TYPE mvke-vkorg,
           vtweg TYPE mvke-vtweg,
           lvorm TYPE mvke-lvorm,
           versg TYPE mvke-versg,
           bonus TYPE mvke-bonus,
           provg TYPE mvke-provg,
           matnr TYPE mvke-matnr,
           END OF gs_i_mvke.
    TYPES: BEGIN OF gs_i_mlan,
           aland TYPE mlan-aland,
           taxm1 TYPE mlan-taxm1,
           taxm2 TYPE mlan-taxm2,
           taxm3 TYPE mlan-taxm3,
           taxm4 TYPE mlan-taxm4,
           matnr TYPE mlan-matnr,
           END OF gs_i_mlan.
    *Segment & control record
    DATA:  gs_segment_h  LIKE zmara_h,
           gs_segment_i1 LIKE zmakt_i,
           gs_segment_i2 LIKE zmbew_i,
           gs_segment_i3 LIKE zmvke_i,
           gs_segment_i4 LIKE zmlan_i,
           gs_control_rec LIKE edidc.
    Internal Table and work area
    *Header & Item
    DATA: gt_h_mara TYPE STANDARD TABLE OF gs_h_mara,
          gt_i_makt TYPE STANDARD TABLE OF gs_i_makt,
          gt_i_mbew TYPE STANDARD TABLE OF gs_i_mbew,
          gt_i_mvke TYPE STANDARD TABLE OF gs_i_mvke,
          gt_i_mlan TYPE STANDARD TABLE OF gs_i_mlan.
    DATA: gw_h_mara TYPE gs_h_mara,
          gw_i_makt TYPE gs_i_makt,
          gw_i_mbew TYPE gs_i_mbew,
          gw_i_mvke TYPE gs_i_mvke,
          gw_i_mlan TYPE gs_i_mlan.
    *EDIDD & EDIDC
    DATA: gt_edidc LIKE TABLE OF edidc WITH HEADER LINE,
          gt_edidd LIKE TABLE OF edidd WITH HEADER LINE.
    SELECTION SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    SELECT-OPTIONS: s_matnr FOR mara-matnr OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    *&  Include           ZMATMAS_IDOC_FORMROUTINE
    *&      Form  get_data
    FORM get_data .
      SELECT matnr ersda ernam laeda aenam pstat
      FROM mara
      INTO TABLE gt_h_mara
      WHERE matnr IN s_matnr.
      IF sy-subrc <> 0.
        MESSAGE e003(zkaren_msgclass).
      No data found according to the selection criteria
      ENDIF.
      IF gt_h_mara IS NOT INITIAL.
        SELECT spras maktx maktg matnr
        INTO TABLE gt_i_makt
        FROM makt
        FOR ALL ENTRIES IN gt_h_mara WHERE matnr = gt_h_mara-matnr.
        SELECT lvorm lbkum salk3 vprsv verpr stprs peinh matnr
        INTO TABLE gt_i_mbew
        FROM mbew
        FOR ALL ENTRIES IN gt_h_mara WHERE matnr = gt_h_mara-matnr.
        SELECT vkorg vtweg lvorm versg bonus provg matnr
        INTO TABLE gt_i_mvke
        FROM mvke
        FOR ALL ENTRIES IN gt_h_mara WHERE matnr = gt_h_mara-matnr.
        SELECT aland taxm1 taxm2 taxm3 taxm4 matnr
        INTO TABLE gt_i_mlan
        FROM mlan
        FOR ALL ENTRIES IN gt_h_mara WHERE matnr = gt_h_mara-matnr.
      ENDIF.
    ENDFORM.                    " get_data
    *&      Form  create_idoc
    FORM create_idoc .
    *Control data
      gs_control_rec-mestyp = 'ZKAR_MATMAS_MSG_TYPE'.       "Message type
      gs_control_rec-idoctp = 'ZKAR_MATMAS'.                "IDoc
      gs_control_rec-rcvprt = 'LS'.                         "Partner type of receiver
      gs_control_rec-rcvprn = 'T90CLNT810'.                 "Partner number of receiver
      LOOP AT gt_h_mara INTO gw_h_mara .
    *Header data.
        gs_segment_h-matnr = gw_h_mara-matnr.
        gs_segment_h-ersda = gw_h_mara-ersda.
        gs_segment_h-ernam = gw_h_mara-ernam.
        gs_segment_h-laeda = gw_h_mara-laeda.
        gs_segment_h-aenam = gw_h_mara-aenam.
        gs_segment_h-pstat = gw_h_mara-pstat.
    *Header segment
        gt_edidd-segnam = 'ZMARA_H'.
        gt_edidd-sdata = gs_segment_h.
        MOVE gt_edidd-sdata TO gs_segment_h.
        APPEND gt_edidd.
        WRITE:/ gs_segment_h-matnr, gs_segment_h-ersda, gs_segment_h-ernam,
                gs_segment_h-laeda, gs_segment_h-aenam, gs_segment_h-pstat.
    *ITEM 1
        LOOP AT gt_i_makt INTO gw_i_makt.
          IF gw_i_makt-matnr = gw_h_mara-matnr.
    *Item data
            gs_segment_i1-spras = gw_i_makt-spras.
            gs_segment_i1-maktx = gw_i_makt-maktx.
            gs_segment_i1-maktg = gw_i_makt-maktg.
    *Item segment
            gt_edidd-segnam = 'ZMAKT_I'.
            gt_edidd-sdata = gs_segment_i1.
            APPEND gt_edidd.
          ENDIF.
        ENDLOOP.                                            "at gt_i_vbak
    *ITEM2
        LOOP AT gt_i_mbew INTO gw_i_mbew.
          IF gw_i_mbew-matnr = gw_h_mara-matnr.
    *Item data
            gs_segment_i2-lvorm = gw_i_mbew-lvorm.
            gs_segment_i2-lbkum = gw_i_mbew-lbkum.
            gs_segment_i2-salk3 = gw_i_mbew-salk3.
            gs_segment_i2-vprsv = gw_i_mbew-vprsv.
            gs_segment_i2-verpr = gw_i_mbew-verpr.
            gs_segment_i2-stprs = gw_i_mbew-stprs.
            gs_segment_i2-peinh = gw_i_mbew-peinh.
    *Item segment
            gt_edidd-segnam = 'ZMBEW_I'.
            gt_edidd-sdata = gs_segment_i2.
            APPEND gt_edidd.
          ENDIF.
        ENDLOOP.
    *ITEM3
        LOOP AT gt_i_mvke INTO gw_i_mvke.
          IF gw_i_mvke-matnr = gw_h_mara-matnr.
    *Item data
            gs_segment_i3-vkorg = gw_i_mvke-vkorg.
            gs_segment_i3-vtweg = gw_i_mvke-vtweg.
            gs_segment_i3-lvorm = gw_i_mvke-lvorm.
            gs_segment_i3-versg = gw_i_mvke-versg.
            gs_segment_i3-bonus = gw_i_mvke-bonus.
            gs_segment_i3-provg = gw_i_mvke-provg.
    *Item segment
            gt_edidd-segnam = 'ZMVKE_I'.
            gt_edidd-sdata = gs_segment_i3.
            APPEND gt_edidd.
          ENDIF.
        ENDLOOP.
    *ITEM4
        LOOP AT gt_i_mlan INTO gw_i_mlan.
          IF gw_i_mlan-matnr = gw_h_mara-matnr.
    *Item data
            gs_segment_i4-aland = gw_i_mlan-aland.
            gs_segment_i4-taxm1 = gw_i_mlan-taxm1.
            gs_segment_i4-taxm2 = gw_i_mlan-taxm2.
            gs_segment_i4-taxm3 = gw_i_mlan-taxm3.
            gs_segment_i4-taxm4 = gw_i_mlan-taxm4.
    *Item segment
            gt_edidd-segnam = 'ZMLAN_I'.
            gt_edidd-sdata = gs_segment_i4.
            APPEND gt_edidd.
          ENDIF.
        ENDLOOP.
      ENDLOOP.                                              "at gt_h_kna1
    ENDFORM.                    " create_idoc
    *&      Form  distribute_idoc
    FORM distribute_idoc .
      CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
        EXPORTING
          master_idoc_control            = gs_control_rec
        TABLES
          communication_idoc_control     = gt_edidc
          master_idoc_data               = gt_edidd
        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.
        WRITE:/ 'Error'.
      ELSE.
        LOOP AT gt_edidc.
          WRITE:/ gt_edidc-docnum.
        ENDLOOP.                                            "at gt_edidc
      ENDIF.
    ENDFORM.                    " distribute_idoc

  • Function Module for message "MBGMCR" in outbound process

    Hi all,
    I want to create an IDoc via EDI when I post a material document. I use messgae type MBGMCR and IDoc type MBGMCR02 and I already configured in partner profile and all about output determination in SAP-IM.
    And now I need a function module to process outbound IDoc of posting material document but I couldn't find a function module for processing.
    Pls let me know about that.
    Thanks for your time.

    Hi,
    You need to Code your own Z Function Module for this. Copy any standard outbound FM to create your own Z FM, so as to ensure that Interfaces are correct.  
    Refer to given below threads:
    Re: Standard IDOC for Goods Receipt
    Re: Idoc type for Goods Receipt
    Goods Receipt MIGO IDOC

  • Out Bound Function Module For IDoc Types CODCMT01

    Hi Experts,
        Can you please tell me the Out Bound Function Module For IDoc Types CODCMT01,CODCAGN01,PRCDOC01.
    Thanks..
    Debi.

    Hi Debi,
    You can use FM MASTER_IDOC_DISTRIBUTE to distribute outbound IDoc CODCMT01, CODCAGN01 and PRCDOC01.
    Regards,
    Ferry Lianto

  • Custom Function Module for the New Process Codes

    I want to distribute the custom table data . For that i have written the program using MASTER_IDOC_DISTRIBUTE. I have created the custom message & idoc types along with their assignments.
    I got struck up at the process code. I have to assign the function module for that process code. Can anyone kindly help me in writting the code at that function module ?

    Hi Friends,
    My requirement is , i need to transfer the table records. For that i have created the Message/Idoc Types and also created the Partner profile and the Distribution model view .....all alll i have done.
    My doubt is , in the we20, at the outbound parameters , i can give the Message/Idoc types that i have created. Ok thats fine
    But at the inbound parameters, i have to give the inbound process code. So i have created the Inbound process code. As we know that for every process code a function module is attached, now i have to create the function module which posts the records in receiver side.
    so 1. Does the Function module need to be RFC Enabled ?
         2. Do we need to create Object type in SWO1 once i
                  create and release the function module ?

  • Functional module for automatic creation of pur requisition & pur order

    hello,
    what is the functional module for automatic creation of puchase requisition and automatic creation of purchase order which we will assign in action box in service order processing management.
    please let me know as early as possible
    regards,
    rajesh kumar raju

    Hi,
             Please check with following.
    IDOC_INPUT_ACC_PURCHASE_REQUI
    IDOC_INPUT_ACC_PURCHASE_ORDER
    /ISDFPS/OR_PURCHASE_ORDER_CR
    BS01_PURCHASE_DOCUMENT_CREATE
    CO_MP_CREATE_PURCHASE_ORDER
    Thanks & Regards
    Sadhu Kishore

  • Function module for calculating planned and actual cost of production order

    Hi ,
    Do we have any standard function module for calculating planned and actual cost for production order?
    i need to implement this in a Z-report.
    Thanks
    Srini

    Hi,
    try below function module
    CRMCO_GET_PLAN_ACTUAL_COSTS
    CO_IH_GET_PLANNED_COSTS_TOTAL
    Regards,
    Sankaran

  • How to create the INBOUND Function Module for INBOUND IDOCs

    Hi Friends,
    Can any Suggest me How to proceed to Create an INBOUND Function Module for Processing the INBOUND IDOCS
    which are recieved from XI Server ?
    I am working in SAP-ISU
    Here i will recieve the INBOUND IDOCs for the Meter Reading Orders.
    We have a Standard INBOUND FUNCTION MODULE
    IDOC_INPUT_ISU_MR_UPLOAD
    which Uploads the Meter Reading Results.
    I copied the Same function Module into ZIDOC_INPUT_
    and working on it.
    Can any one suggest me, whether i am going in correct way or not.
    In IDOC_INPUT_ISU_MR_UPLOAD Inbound fun module,
    BAPI_MTRREADDOC_UPLOAD is used to Update or Insert the Meter Reading Results,
    My requirment is to Insert and Update the Meter Reading Orders which are Inbounded from XI.
    Can I Use the Same BAPI
    BAPI_MTRREADDOC_UPLOAD
    to Update the below fields,
    EABL-SERNR
    EABL-ZWNUMMER
    EABLG-ABLESGR
    EABL-V_ZWSTAND
    EABL-N_ZWSTAND
    EABL-ABLHINW
    EABL-ZSKIPC
    EABL-ADAT
    EABL-ATIMTATS
    EABL-ADATTATS
    EABL-ATIM
    EABL-ZMESSAGE
    EABL-ABLESER(Meter reader number)
    Kindly Suggest me,
    Thanks in Advance,
    Ganesh

    Hello Ganesh
    I think you are going completely astray with you z-function module for IDoc processing.
    If you look at TABLES parameter METERREADINGRESULTS (type BAPIEABLU ) of BAPI_MTRREADDOC_UPLOAD you will find many of the requested fields already:
    EABL-SERNR => BAPIEABLU-SERIALNO
    EABL-ZWNUMMER =>REGISTER
    EABLG-ABLESGR
    EABL-V_ZWSTAND
    EABL-N_ZWSTAND
    EABL-ABLHINW
    EABL-ZSKIPC
    EABL-ADAT
    EABL-ATIMTATS => ACTUALMRTIME
    EABL-ADATTATS => ACTUALMRDATE
    EABL-ATIM
    EABL-ZMESSAGE
    EABL-ABLESER(Meter reader number)
    Field EABL-ZMESSAGE appears to be custom field (at least I cannot find it on ECC 6.0). If this field was added using include CI_EABL then you probably can get these values into the BAPI using the EXTENSIONIN parameter.
    Check routine CHECK_UPLOADRECORDS in the BAPI which allows two extension structures:
    - BAPI_TE_EABL
    - BAPI_TE_EOSB
    Not surprisingly BAPI_TE_EABL contains the include CI_EABL.
    Regards
      Uwe

  • How to config Check Digits function module for Student Number Validation

    Hi SLCM Experts,
    In the SAP-SLCM, How to use check digits function module for validate student number.  Just only config it or need to customizing program.
    *Any idea to student number validation in SLCM?*
    Best Regards,
    Suvatchai K.

    Hi ,
    Can you expalin it further ?
    You configure the St. no in piq_matr . And set it  as external or internal no. range which suits your business .
    What is the validation you are looking for ?
    Regards
    Gajalakshmi

  • Function Module  for FB01 Vendor line items postings in 3.1 Version

    Hello all,
    Is there any Function Module  for FB01 Vendor line items postings in 3.1 Version. I do not want to go for BDC. Please suggest.
    Thanks,
    Subba

    Hi,
    search for function module ACCPOSTING* or get development class of transaction FB01 and goto SE80, enter development class - and search in function group's function module.
    Cheers.
    ...Reward if useful.

  • Function Modules for uploading the file

    Hi experts ,
                      I have a requirement to download a file (csv) from my local sytem (say desktop) into an internal table first and then update the contents of the same internal table into the database table.
    Can anybody provide me with a sample program for doing the same or at least the name of function modules for the same.
    Prompt replies will be rewarded.
    TIA
    Abhishek

    Hi Abhishek,
    How to use INSERT Statement..
    Check this Sample Program..
    TABLES:MARA.
    DATA:ITAB LIKE MARA OCCURS 0 WITH HEADER LINE.
    START-OF-SELECTION.
    ITAB-MATNR = '123ABCDA'. .
    ITAB-MBRSH = 'C'.
    ITAB-MTART = 'FERT' .
    ITAB-MEINS = 'KG' .
    APPEND ITAB.
    ITAB-MATNR = '123ABCDB'. .
    ITAB-MBRSH = 'C'.
    ITAB-MTART = 'FERT' .
    ITAB-MEINS = 'KG' .
    APPEND ITAB.
    LOOP AT ITAB.
    INSERT MARA FROM ITAB.
    MODIFY MARA .
    ENDLOOP.

Maybe you are looking for

  • Problem with remote control and Windows 7 - HP Pavilion 6301eu

    I installed Windows 7 32-bit and my remote control does not work. I have tried all possible drivers and still nothing ... Photo driver attached. Does anyone have a link to the current drivers for the remote control and Windows 7? thank you

  • G DRIVE won't mount! is Yosemite the issue?

    Hi all. So I'm trying to mount my 2TB thunderbolt g drive on my iMac 5k (OS X Yosemite), and it just won't mount. It doesn't even show up in disk utility. I know the drive probably is not the issue, because I tried it out on my macbook pro (OS X Mave

  • Installation of test version of indesign cc failed, says it can't extract

    Hi, I've tried to install the test version of Indesign CC. It downloads but when it's done and starts to "extract" (it says extrahera in Swedish) it fails and says I should contact support. Does it sound familiar to anyone and does anyone know what t

  • IPod playlist missing

    I have a new computer.  Just this week purchased a few tunes and discovered the rest of my playlist is missing.  I've looked in all the iTunes files and none of it is there.  So, I have a few just purchased but not downloaded, and I have the original

  • How can I move everything up on the first page ?

    Have tried lots of things but nothing has worked so far. Due to my lack of knowledge ;-) This is the PDF file - http://tinyurl.com/8faupr6 Thanks