Program to populate idoc WP_PLU02

Hi,
Do you know which is the program to populate the standard idoc WP_PLU02.
Thanks.
Sónia

Hi Sonia,
Have you looked at this FM <b>IDOC_INPUT_WP_PLU</b>?
There are custom exits within FM <b>IDOC_SCAN_AND_CREATE_AV</b> that you can use to modify IDoc data record.
Hope this will help.
Regards,
Ferry Lianto

Similar Messages

  • How to populate IDOC segments...

    Hello Experts,
    I was just tasked to add new fields in an IDOC segment. My question is, how do I populate
    those newly created fields? The data will be coming from a purchase order.
    Thank you guys and take care!

    Hi,
    U cannot edit the existing segment u have to create a zsegment with the fields and then under the main segment u have to add this new segment..also u have create a extended idoc in ur case...then only u can add this new segment..also once u  create  a segment u have to release it...
    u have to write the code in the userexit only...
    check the sample code which i have done for my requirement for sales order..
    *&  Include           ZXVEDU02
    Program:        Function Module:EXIT_SAPLVEDC_002     Creation Date: 12-04-2006          *
    Program Type  : Outbound IDOC Enhancement                                                *
    Program Description:OutBound IDOC Enhancement                                            *
    Modification ID:001                                                                      *
    Date         : 25-05-2006                                                                *
    Description  : 1.The sales organization master data needs to be sent as supplier party
                     details.New segment ZZSALORG is created and attached to the parent
                     segment E1EDK01
                   2.Data required to be sent are:
                      1.NAME1- Sales organization name
                      2.STRAS- Address
                      3.TELFX- Fax number
                      4.TELF1- phone number.
                   3.ZZSALORG is filled with the above information.
    Modification ID:002                                                                      *
    Date         : 09-06-2006                                                                *
    Description  : A new field zstceg added to the segment zzdochdr and it was populated     *
                    by selecting stceg field from Kna1 table                                 *
    Modification ID:001                                                                      *
    Date         : 15-06-2006                                                                *
    Description  : 1.New segment ZZE1EDP01 is created and attached to the parent segment E1EDP01
                   2.Data required to be sent are:
                      1.POSEX- Item number
                      2.UEBTO- Overdelivery tolerance
                      3.UNTTO- Underdelivery tolerance
                   3.ZZE1EDP01 is filled with the above information.
    *-- Data Declaration--
    *-- Constant Declaration--
    CONSTANTS: c_1(1)          TYPE c VALUE '1',
               c_langu         LIKE t005t-spras VALUE 'E',
               c_parvw         LIKE vbpa-parvw VALUE 'RG',
               c_e1edk01(7)    TYPE c VALUE 'E1EDK01',
               c_e1edk02(7)    TYPE c VALUE 'E1EDK02',
               c_e1edk17(7)    TYPE c VALUE 'E1EDK17',
               c_e1edka1(7)    TYPE c VALUE 'E1EDKA1',
               c_e1edk14(7)    TYPE c VALUE 'E1EDK14',
               c_004(3)        TYPE c VALUE '004',
               c_001(3)        TYPE c VALUE '001',
               c_002(3)        TYPE c VALUE '002',
               c_re(2)         TYPE c VALUE 'RE',
               c_we(2)         TYPE c VALUE 'WE',
               c_ag(2)         TYPE c VALUE 'AG',
               c_0010(4)       TYPE c VALUE '0010',
               c_zzdochdr(8)   TYPE c VALUE 'ZZDOCHDR',
               c_ze1edk02(8)   TYPE c VALUE 'ZE1EDK02',
               c_zze1edk17(9)  TYPE c VALUE 'ZZE1EDK17',
               c_zze1edka1(9)  TYPE c VALUE 'ZZE1EDKA1',
               c_pe(2)         TYPE c VALUE 'PE',
               c_y(1)          TYPE c VALUE 'Y',
               c_zze1email(9)  TYPE c VALUE 'ZZE1EMAIL',
               c_zzsalorg(8)   TYPE c VALUE 'ZZSALORG',
               c_zze1edp01(9)  TYPE c VALUE 'ZZE1EDP01',
               c_e1edp01(7)   TYPE c VALUE 'E1EDP01'.
    *-- Variables Declaration--
    DATA: lv_vbeln   LIKE vbak-vbeln,
          lv_country LIKE t005t-landx,
          lv_text1   LIKE t042z-text1,
          lv_vzskz   LIKE knb1-vzskz,
          lv_inco    LIKE tinct-bezei,
          lv_cadnr   LIKE akkp-cadnr,
          lv_pernr   LIKE pa0105-pernr,
          lv_parvw   LIKE tpar-parvw,
          lv_adrnr   LIKE tvko-adrnr,
          lv_zinso   LIKE t056z-zinso,
    Begin of Mod-002
          lv_stceg   TYPE stceg.
    End of Mod-002
    Begin of MOD-003
         lv_min_tol TYPE KWMENG,
         lv_max_tol TYPE KWMENG.
    End Of MOD-003
    TYPES:BEGIN OF t_vbfa,
            vbelv LIKE vbfa-vbeln,
            erdat TYPE erdat,
          END OF t_vbfa.
    DATA: i_akkp TYPE akkp.
    *-- WorkArea Declaration--
    DATA : wa_zdochdr   TYPE  zzdochdr,
           wa_ze1edk02  TYPE  zze1edk02,
           wa_ze1edk17  TYPE  zze1edk17,
           wa_zze1email TYPE  zze1email,
           wa_zzsalorg  TYPE  zzsalorg,
           wa_zze1edp01 TYPE  zze1edp01,
           wa_e1edk02   TYPE  e1edk02,
           wa_e1edk17   TYPE  e1edk17,
           wa_e1edka1   TYPE  e1edka1,
           wa_e1edk01   TYPE  e1edk01,
           wa_e1edp01   TYPE  e1edp01,
           wa_adrc      TYPE  adrc,
           wa_pa0105    TYPE  pa0105,
           wa_zze1edka1 TYPE  zze1edka1,
           wa_zzdochdr  TYPE  zzdochdr,
           wa_vbfa      TYPE  t_vbfa,
           wa_vbpa      TYPE  vbpa.
    *-- Move data to ZZDOCHDR Segment--
    CASE int_edidd-segnam.
      WHEN c_e1edk01.
        MOVE int_edidd-sdata TO wa_e1edk01.
    *--Begin of MOD001+(Modification ID 001)--
    *-- Filling of ZZSALORG segment--
        SELECT SINGLE adrnr
        FROM tvko
        INTO lv_adrnr
       WHERE vkorg EQ dxvbak-vkorg.
        IF sy-subrc EQ 0.
          SELECT SINGLE *
                   FROM adrc
                   INTO wa_adrc
                  WHERE addrnumber EQ lv_adrnr.
          wa_zzsalorg-salorg  = dxvbak-vkorg.
          wa_zzsalorg-name1   = wa_adrc-name1.
          wa_zzsalorg-name2   = wa_adrc-name2.
          wa_zzsalorg-stras   = wa_adrc-street.
          wa_zzsalorg-telf1   = wa_adrc-tel_number.
          wa_zzsalorg-telfx   = wa_adrc-fax_number.
          wa_zzsalorg-land1   = wa_adrc-country.
          wa_zzsalorg-strs2   = wa_adrc-str_suppl1.
          wa_zzsalorg-street2 = wa_adrc-str_suppl2.
          wa_zzsalorg-street3 = wa_adrc-str_suppl3.
          wa_zzsalorg-ort01   = wa_adrc-city1.
          wa_zzsalorg-pstlz   = wa_adrc-post_code1.
          wa_zzsalorg-regio   = wa_adrc-region.
          int_edidd-segnam = c_zzsalorg.
          CLEAR int_edidd-sdata.
          MOVE wa_zzsalorg TO int_edidd-sdata.
          APPEND int_edidd.
          CLEAR: wa_adrc,
                 wa_zzsalorg.
        ENDIF.
    *--End of MOD001+(Modification ID 001)--
        SELECT SINGLE text1
                 FROM t042z
                 INTO lv_text1
                 WHERE land1 EQ dxvbpa-land1
                   AND zlsch EQ dxvbkd-zlsch.
        READ TABLE dxvbpa INTO wa_vbpa WITH KEY vbeln = dxvbpa-vbeln
                                          parvw = c_parvw.
        IF sy-subrc EQ 0.
    Begin of Mod-002
          SELECT SINGLE stceg
          FROM kna1
          INTO lv_stceg
           WHERE kunnr = wa_vbpa-kunnr.
    End of Mod-002
          SELECT SINGLE vzskz
                   FROM knb1
                   INTO lv_vzskz
                   WHERE kunnr EQ wa_vbpa-kunnr
                     AND bukrs EQ dxvbak-bukrs_vf.
          IF sy-subrc EQ 0.
            SELECT SINGLE zinso
                     FROM t056z
                     INTO lv_zinso
                     WHERE vzskz EQ lv_vzskz
                       AND waers EQ wa_e1edk01-curcy.
            wa_zzdochdr-zdoctitle  = dobject-objky.
            wa_zzdochdr-zdate      = dobject-erdat.
            wa_zzdochdr-zmestyp    = dobject-kschl.
            wa_zzdochdr-zmedium    = dobject-nacha.
            wa_zzdochdr-zlang      = dobject-spras.
            wa_zzdochdr-zttype     = dxvbkd-kdkg1.
            wa_zzdochdr-zpaymethod = dxvbkd-zlsch.
            wa_zzdochdr-zpaytext   = lv_text1.
            wa_zzdochdr-zintonpymt = lv_zinso.
    Begin of Mod-002
            wa_zzdochdr-zstceg     = lv_stceg.
    End of Mod-002
            int_edidd-segnam = c_zzdochdr.
            CLEAR int_edidd-sdata.
            MOVE wa_zzdochdr TO int_edidd-sdata.
            APPEND int_edidd.
            CLEAR : wa_zzdochdr.
          ENDIF.
        ENDIF.
    *-- Move data to ZZE1EDK02 Segment--
      WHEN c_e1edk02.
        MOVE int_edidd-sdata TO wa_e1edk02.
        IF wa_e1edk02-qualf EQ c_004.
          SELECT SINGLE vbelv FROM vbfa INTO wa_vbfa
                             WHERE vbeln EQ lv_vbeln
                             AND   vbtyp_v EQ 'B'.
          IF sy-subrc EQ 0.
            SELECT SINGLE erdat FROM vbak INTO wa_vbfa
            WHERE vbeln EQ wa_vbfa-vbelv.
            int_edidd-segnam = c_ze1edk02.
            CLEAR int_edidd-sdata.
            MOVE wa_vbfa TO int_edidd-sdata.
            APPEND int_edidd.
            CLEAR wa_vbfa.
          ENDIF.
        ENDIF.                                  " IF ended for "IF wa_e1edk02-qualf = '004'" condition.
    **-- Move data to ZZE1EDK17 Segment--
      WHEN c_e1edk17.
        MOVE int_edidd-sdata TO wa_e1edk17.
        IF NOT dxvbkd-lcnum IS INITIAL.
          SELECT SINGLE inco1
                        inco2
                   FROM akkp
                   INTO i_akkp
                  WHERE lcnum EQ dxvbkd-lcnum.
          IF sy-subrc EQ 0.
            IF wa_e1edk17-qualf EQ c_001.
              wa_ze1edk17-lkond = i_akkp-inco1.
              wa_ze1edk17-qualf = wa_e1edk17-qualf.
              SELECT SINGLE bezei
                       FROM tinct
                       INTO lv_inco
                      WHERE spras EQ 'E'
                        AND inco1 EQ i_akkp-inco1.
              IF sy-subrc EQ 0.
                wa_ze1edk17-lktext = lv_inco.
              ENDIF.
            ELSEIF wa_e1edk17-qualf EQ c_002.
              wa_ze1edk17-qualf = wa_e1edk17-qualf.
              wa_ze1edk17-lktext = i_akkp-inco2.
            ELSE.
            ENDIF.
            int_edidd-segnam = c_zze1edk17.
            CLEAR int_edidd-sdata.
            MOVE wa_ze1edk17 TO int_edidd-sdata.
            APPEND int_edidd.
            CLEAR wa_ze1edk17.
          ENDIF.
        ENDIF.                                       " IF ended for not initial condition.
    *--Move data to zze1edka1 Segment--
      WHEN c_e1edka1.
        MOVE int_edidd-sdata TO wa_e1edka1.
    *--Checking the wa_e1edka1-parvw field for 'RE'--
        IF wa_e1edka1-parvw EQ c_re.
          IF NOT dxvbkd-lcnum IS INITIAL.
            SELECT SINGLE cadnr
             FROM akkp
             INTO lv_cadnr
            WHERE lcnum EQ dxvbkd-lcnum.
            IF sy-subrc EQ 0.
              SELECT SINGLE *
                       FROM adrc
                       INTO wa_adrc
                      WHERE addrnumber EQ lv_cadnr.
              wa_zze1edka1-parvw = wa_e1edka1-parvw.
              wa_zze1edka1-partn = wa_e1edka1-partn.
              wa_zze1edka1-land1 = wa_adrc-country.
              wa_zze1edka1-name1 = wa_adrc-name1.
              wa_zze1edka1-name2 = wa_adrc-name2.
              wa_zze1edka1-stras = wa_adrc-street.
              wa_zze1edka1-strs2 = wa_adrc-str_suppl1.
              wa_zze1edka1-ort01 = wa_adrc-city1.
              wa_zze1edka1-pstlz = wa_adrc-post_code1.
              wa_zze1edka1-regio = wa_adrc-region.
              int_edidd-segnam = c_zze1edka1.
              CLEAR int_edidd-sdata.
              MOVE wa_zze1edka1 TO int_edidd-sdata.
              APPEND int_edidd.
              CLEAR: wa_adrc,
                     wa_zze1edka1.
            ENDIF.
          ENDIF.
        ENDIF.                                               " IF ended for "IF wa_e1edka1-parvw EQ 'RE'" condition.
    *--Checking the wa_e1edka1-parvw field for 'WE'--
        IF wa_e1edka1-parvw EQ c_we.
          IF NOT dxvbkd-lcnum IS INITIAL.
            SELECT SINGLE cadnr
              FROM akkp
              INTO lv_cadnr
             WHERE lcnum EQ dxvbkd-lcnum.
            IF sy-subrc EQ 0.
              SELECT SINGLE *
                       FROM adrc
                       INTO wa_adrc
                      WHERE addrnumber EQ lv_cadnr.
              wa_zze1edka1-parvw = wa_e1edka1-parvw.
              wa_zze1edka1-partn = wa_e1edka1-partn.
              wa_zze1edka1-land1 = wa_adrc-country.
              wa_zze1edka1-name1 = wa_adrc-name1.
              wa_zze1edka1-name2 = wa_adrc-name2.
              wa_zze1edka1-stras = wa_adrc-street.
              wa_zze1edka1-strs2 = wa_adrc-str_suppl1.
              wa_zze1edka1-ort01 = wa_adrc-city1.
              wa_zze1edka1-pstlz = wa_adrc-post_code1.
              wa_zze1edka1-regio = wa_adrc-region.
              int_edidd-segnam = c_zze1edka1.
              CLEAR int_edidd-sdata.
              MOVE wa_zze1edka1 TO int_edidd-sdata.
              APPEND int_edidd.
              CLEAR: wa_adrc,
                     wa_zze1edka1.
            ENDIF.
          ENDIF.
        ENDIF.                                             " IF ended for "IF wa_e1edka1-parvw EQ 'WE'" condition.
    *--Checking the wa_e1edka1-parvw field for 'AG'--
        IF wa_e1edka1-parvw EQ c_ag.
          IF NOT dxvbkd-lcnum IS INITIAL.
            SELECT SINGLE cadnr
              FROM akkp
              INTO lv_cadnr
             WHERE lcnum EQ dxvbkd-lcnum.
            IF sy-subrc EQ 0.
              SELECT SINGLE *
                       FROM adrc
                       INTO wa_adrc
                      WHERE addrnumber EQ lv_cadnr.
              wa_zze1edka1-parvw = wa_e1edka1-parvw.
              wa_zze1edka1-partn = wa_e1edka1-partn.
              wa_zze1edka1-land1 = wa_adrc-country.
              wa_zze1edka1-name1 = wa_adrc-name1.
              wa_zze1edka1-name2 = wa_adrc-name2.
              wa_zze1edka1-stras = wa_adrc-street.
              wa_zze1edka1-strs2 = wa_adrc-str_suppl1.
              wa_zze1edka1-ort01 = wa_adrc-city1.
              wa_zze1edka1-pstlz = wa_adrc-post_code1.
              wa_zze1edka1-regio = wa_adrc-region.
              int_edidd-segnam = c_zze1edka1.
              CLEAR int_edidd-sdata.
              MOVE wa_zze1edka1 TO int_edidd-sdata.
              APPEND int_edidd.
              CLEAR: wa_adrc,
                     wa_zze1edka1.
            ENDIF.
          ENDIF.                                       " IF ended for "IF NOT dxvbkd-lcnum IS INITIAL" condition.
        ENDIF.                                         " IF ended for "IF wa_e1edka1-parvw EQ c_ag" condition.
    *--Checking the wa_e1edka1-parvw field for 'Y'--
        IF wa_e1edka1-parvw+0(1) EQ c_y.
          SELECT SINGLE parvw
                  FROM  tpar
                  INTO  lv_parvw
                  WHERE parvw EQ wa_e1edka1-parvw
                    AND nrart EQ c_pe.
          IF sy-subrc EQ 0.
            SELECT SINGLE pernr
              FROM vbpa
              INTO lv_pernr
              WHERE vbeln EQ dxvbpa-vbeln
              AND   parvw EQ lv_parvw.
            IF sy-subrc EQ 0.
              SELECT SINGLE usrid_long
               FROM pa0105
               INTO wa_pa0105-usrid_long
               WHERE  pernr EQ lv_pernr
                 AND usrty EQ c_0010.    " communication type email
              wa_zze1email-zparvw  = wa_e1edka1-parvw.
              wa_zze1email-zname   = wa_e1edka1-name1.
              wa_zze1email-zemail  = wa_pa0105-usrid_long.
              int_edidd-segnam = c_zze1email.
              CLEAR int_edidd-sdata.
              MOVE wa_zze1email TO int_edidd-sdata.
              APPEND int_edidd.
              CLEAR: wa_adrc,
                     wa_zze1email,
                     wa_pa0105.
            ENDIF.
          ENDIF.
        ENDIF.                              " IF ended for "IF wa_e1edka1-parvw EQ 'Y'" condition.
    *--Begin of MOD003 (Modification ID 003)--
    *-- Move data to ZZE1EDP01 Segment--
      WHEN c_e1edp01.
        MOVE int_edidd-sdata TO wa_e1edp01.
        wa_zze1edp01-posex = wa_e1edp01-posex.
         wa_zze1edp01-uebto = dxvbap-kwmeng + ( dxvbap-kwmeng * dxvbap-uebto / 100 ).
         wa_zze1edp01-untto = dxvbap-kwmeng - ( dxvbap-kwmeng  * dxvbap-untto / 100 ).
        wa_zze1edp01-uebto = dxvbap-uebto.
        wa_zze1edp01-untto = dxvbap-untto.
        int_edidd-segnam = c_zze1edp01.
        CLEAR int_edidd-sdata.
        MOVE wa_zze1edp01 TO int_edidd-sdata.
        APPEND int_edidd.
        CLEAR: wa_zze1edp01.
    *--End of MOD003 (Modification ID 003)--
      WHEN OTHERS.
    ENDCASE.
    Regards,
    Nagaraj

  • Program that generates idoc in ale/edi

    friends can  you please tell  which  program creates an idoc or  how  are idocs generated  while  customizing ale and edi ., in which step?

    Hi
    The following code is used to create and populate IDOC
    REPORT ZALE_USR.
    CONSTANTS: C_DOCTYP TYPE EDIDC-IDOCTP VALUE 'ZUSRDET01',Idoctype
    C_SEGNAM TYPE EDIDD-SEGNAM VALUE 'Z1USRDET01', segmenttype
    C_MESTYP TYPE EDIDC-MESTYP VALUE 'ZUSRDET'. message type
    DATA: IT_ZUSR02 TYPE USR02 OCCURS 10,
    IT_EDIDC TYPE EDIDC OCCURS 0,
    IT_EDIDD TYPE EDIDD OCCURS 0,
    WA_ZUSR02 TYPE USR02,
    WA_EDIDC TYPE EDIDC,
    WA_EDIDD TYPE EDIDD,
    WA_Z1USRDET01 TYPE Z1USRDET01,
    V_OCCMAX TYPE IDOCSYN-OCCMAX,
    V_NBSEG TYPE I.
    CLEAR WA_ZUSR02.
    CLEAR WA_EDIDC.
    Save the message type and the basic IDoc type in the control segment.
    MOVE C_MESTYP TO WA_EDIDC-MESTYP.
    MOVE C_DOCTYP TO WA_EDIDC-IDOCTP.
    Retrieve the maximum number of segments in the basic IDoc type.
    SELECT MIN( OCCMAX ) FROM IDOCSYN INTO V_OCCMAX WHERE IDOCTYP EQ C_DOCTYP AND SEGTYP EQ C_SEGNAM.
    Save the whole USR02 table content in the IT_ZUSR02 internal table.
    SELECT * FROM USR02 INTO CORRESPONDING FIELDS OF TABLE IT_ZUSR02.
    Create a data segment for each line of IT_ZUSR02.
    LOOP AT IT_ZUSR02 INTO WA_ZUSR02 .
    MOVE-CORRESPONDING WA_ZUSR02 TO WA_Z1USRDET01.
    CLEAR WA_EDIDD.
    MOVE C_SEGNAM TO WA_EDIDD-SEGNAM.
    MOVE WA_Z1USRDET01 TO WA_EDIDD-SDATA.
    APPEND WA_EDIDD TO IT_EDIDD.
    CLEAR WA_ZUSR02.
    CLEAR WA_Z1USRDET01.
    ENDLOOP.
    Count the number of data segments.
    DESCRIBE TABLE IT_EDIDD LINES V_NBSEG.
    If the number of data segments exceeds the maximum allowed number,then display an error message.
    IF V_NBSEG GT V_OCCMAX.
    WRITE:/ 'ERROR'.
    ENDIF.
    CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
    EXPORTING
    master_idoc_control = WA_EDIDC
    OBJ_TYPE = ''
    CHNUM = ''
    tables
    communication_idoc_control = IT_EDIDC
    master_idoc_data = IT_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.
    ENDIF.
    Reward points for helpful ans
    Regards
    Aarti

  • How to find out the Trigeering program of an IDOC

    How to find out the Trigeering program of an IDOC ?
    Thank U

    sse the FUnction module ..MASTER_IDOC_DISTRIBUTE..if it is used zreport or program
    that means the message type used in the program are manually triggered.
    Prabhudas

  • RSETESTD program to purge IDoc entries won't delete certain IDoc records

    Hello experts,
    I am in the mist of purging the IDoc entries in my system by using RSETESTD (WE11) program to delete the IDoc entries.
    As far as I know, this program will delete the IDoc entries regardless of the status.
    While doing the testing, I find out that when I filter the program to delete IDoc entries from certain date range (which results in WE02 shows there is an IDoc entries with the status 51 and 53 in the range that I selected), the program only select and will run the deletion for IDoc with status 51, but not 53.
    It will show that "No IDoc is selected" when I tried to delete IDoc with status 53. I double check and I found out that in that date range that I selected from WE02 transaction, there is around 17 of IDoc records with status 53, which is not deleted/detected when I want to delete it using RSETESTD.
    Can someone help to enlighten me on why this behaviour is happening please? Are there certain type of IDoc records that this program can't delete? I find out in other system, I have no problem to delete IDoc with status 53 records.
    Thanks and Regards,
    Shakir

    check if the change date is outside your entered date range

  • Is there any standard program to parse idocs into horizontal structure

    Could anybody please let me know if there is any SAP program to parse IDOCS into horizontal structures. We need to generate a flat file within SAP using IDOCS.
    Your earlier response is much appreciated.
    Regards
    Kasi

    Hi Kasi,
    Please check this FM EDI_IDOC_PARSER.
    Hope this will help.
    Regards,
    Ferry Lianto

  • Find program for an IDOC type

    Hello Gurus,
    I need to identify what program or transaction does a Particular IDOC type is associated to.
    How do I find Program related to IDOC type?
    How many ways to find such link?
    Regards,
    Abhishek.

    Hello Gurus,
    My scenario is to find the easiest way to search for the Link between and IDOC type (Outbound idoc) to a program.
    I have list of all the IDOC type now I need to find from where these IDOC´s are triggering from?
    Regards,
    Abhishek...

  • Do we any SAP Standard program to Send IDOC of Type CODCMT01

    Do we any SAP Standard program for outbound processing for IDOC Type CODCMT01
    Message was edited by: Vipin Nagpal

    - If it is for test purpose only, you could use transaction WE19 (Test Tool).
    - As well you could write your own program and user MASTER_IDOC_DISTRIBUTE function module... but in this case you need to fill yourself the fields of the IDOC
    - as well you can have a look at function group KALE...
    E.g. function module K_DOCUMENT_SEND

  • User Exit to call program to create IDocs.

    Hi All,
    For any creation/changes of material master using MM01/MM02 (after save ) one of the user exit will trigger.
    From the user exit, I have to call the custom program to create MATMAS IDOCs.
    if any failures in changes/creation of material master. It has to roll back eveything created by program.
    Please let me know how to achieve this with out calling an event.
    Thanks - Vinay

    There are a number of standard methods to automatically create the IDOC.  You can activate the change pointers and depending on need, use BD64 to create a distribution model, and create the necessary WE20 setups to create the outbound IDOC.
    If you have to process the IDOC using custom logic, you can define that as well - although it's not clear why you need a custom generating program.  You can insert code into one of the IDOC user-exits to manipulate the content if needed.  Also, don't overlook the pre-delivered stuff from SAP that provides filtering out of segments and the like.
    There are a few good SAP PRess books about doing ALE distribution -- if this is an unfamiliar area, it's worth the cost to buy one -- if you spend any time around IDOCS, you'll appreciate it.

  • Program logic for IDoc

    hi everyone,
    I am new to IDoc. Through some forums i came to know that we need to create
    segment in we30
    idoctype in we31
    i understand the above two
    msgtype in we80
    attaching msgtype to idoctype in we81
    i didnt understand how to do the above two, and also i want to know what to do next..like how to do the program
    my mailID is [email protected](for any materials if u have)
    Regards,
    Venkata
    Points will be rewarded to answers given
    Message was edited by:
            venkata k

    One very simple code:
    ==============================
    *abap program to generate a customized idoc and send it to the target *system.
    REPORT z_b8_ale .
    TABLES : ekko,ekpo.
    ***Data Declaration for IDOC Begin
    DATA : v_master_control LIKE edidc.
    DATA : BEGIN OF int_idoc_data OCCURS 0.
            INCLUDE STRUCTURE edidd.
    DATA : END OF int_idoc_data.
    DATA : BEGIN OF int_comm_control OCCURS 0.
            INCLUDE STRUCTURE edidd.
    DATA : END OF int_comm_control.
    DATA : BEGIN OF itab OCCURS 10,
           lifnr LIKE ekko-lifnr,
           ekorg LIKE ekko-ekorg,
           ekgrp LIKE ekko-ekgrp,
           kdate LIKE ekko-kdate,
           ematn LIKE ekpo-ematn,
           ktmng LIKE ekpo-ktmng,
           meins LIKE ekpo-meins,
           netpr LIKE ekpo-netpr,
           werks LIKE ekpo-werks,
           peinh LIKE ekpo-peinh,
           END OF itab.
    DATA : str LIKE edidd-sdata,
           sagrnum(10) TYPE c VALUE '5500000019'.
    DATA:itab1 LIKE ekko OCCURS 0 WITH HEADER LINE,
         itab2 LIKE ekpo OCCURS 0 WITH HEADER LINE.
    ***Data Declaration for IDOC End
    ****FILL_MASTER_CONTROL
    CLEAR v_master_control.
    v_master_control-rcvpor = 'ZPORTB8'.
    v_master_control-rcvprt = 'LS'.
    v_master_control-rcvprn = 'D12503'.
    v_master_control-mestyp = 'ZSCHB5'.
    v_master_control-idoctp = 'ZSCHIDOC'.
    ****FILL_IDOC_DATA
    CLEAR int_idoc_data.
    REFRESH int_idoc_data.
    int_idoc_data-segnam = 'ZSCHDLAGR'.
    SELECT single * INTO itab1 from ekko WHERE ebeln = sagrnum.
    SELECT single * INTO itab2 from ekpo WHERE ebeln = sagrnum.
      MOVE itab1-lifnr TO str+0(10).
      MOVE itab1-ekorg TO str+10(4).
      MOVE itab1-ekgrp TO str+14(3).
      MOVE itab1-kdate TO str+17(8).
      MOVE itab2-ematn TO str+25(18).
      MOVE itab2-ktmng TO str+43(16).
      MOVE itab2-meins TO str+59(3).
      MOVE itab2-netpr TO str+62(13).
      MOVE itab2-werks TO str+74(5).
      MOVE itab2-peinh TO str+80(5).
    int_idoc_data-sdata = str.
    APPEND int_idoc_data.
    write : / str.
    CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
         EXPORTING
              master_idoc_control            = v_master_control
         TABLES
              communication_idoc_control     = int_comm_control
              master_idoc_data               = int_idoc_data
         EXCEPTIONS
              error_in_idoc_control          = 1
              error_writing_idoc_status      = 2
              error_in_idoc_data             = 3
              sending_logical_system_unknown = 4
              OTHERS                         = 5.
    COMMIT WORK.
    WRITE : / 'IDOC Number created : ', int_comm_control-docnum.
    Regards,
    Gajendra.

  • RC1_IDOC_SET_STATUS Program - Message Type & Idoc Number

    Hi All,
    Good Morning.
    We use the SAP Standard Program RC1_IDOC_SET_STATUS to convert the status of Idocs. Recently, we had encountered a behavior which we havent come across before.
    The selection screen has the IDOC number, the message type, the current status and the new status. There is an additional trial run checkbox as well.
    (1) If the IDOC number alone is given then the status of that idoc alone will be changed. (And that works successfully)
    (2) If the message type alone is given then the status of the Idocs for that message type are converted (And that works successfully)
    (3) If the message type and the Idoc number is given, then the program converts the status of the all the idocs associated with the message type irrespective of the specification of IDOC numbers in the selection screen. (Now, this is where we faced the problem, the system converted all the Idocs with the mentioned message type ignoring the list of Idocs to be changed).
    This resulted in change of the status of all Idocs of a particular message type.
    Is there a way, we could track the Idocs which got changed and reverse them back to the old status? Is there an SAP note which addresses this issue?
    Your Inputs on this would be highly appreciated.
    Spandana

    Hi,
    With this report , specifying range won't work  because the program loops at the select option and only takes the LOW variable of each record. So it is necessary that you pass all the idoc numbers for which you want to change the status for.
    The solution is to give exact idoc numbers in the single values or copy this program to a 'Z' program and tweak it as per your requirement.
    Br,
    Advait

  • Outbound program s for idoc in ale

    hi to all abap gurus
    I have doubt regarding idocs
    we know that outbound programs are message specific  ie for each message type there is one outbound program .
    we know that orders 05  idoc transfers both purchse and sales orders data by using two
    message types .
    now my question is orders 05 is having two outbound program s ?
    pls clarify it ? thanks in advance

    hi
    we can write no. of programs for each message type that is depending on using the message type.
    we can change in the version of the programs ... which the requirements we can fullfill
    for each message type contain minimum 1 outbound program to work.....
    which is latest version that we will follows .............................................

  • Program for inbound idoc processing

    Hi,
    Can anyone provide a sample program structure to process inbound idocs to create delivery and change BOM? Appreciate any help
    Thanks,
    Michael

    Hi gaurav,
    thanks for you reply.
    Can you give an example
    thanks & regards

  • Program to populate variable values in BPS thru file

    Hi All,
    I've layouts in BPS. In my layout my super user has to change Version/ Actual period/forecast period/previous version everymonth. For all the above we are using varibles.
    My requirement is that i need to write code to populate Version from a flat file and in that program only basing on version I need to calculate Actual period/forecast period/previous version. Version is coming from a variable based on 0version and Actual period/forecast period values are based on variable of 0fiscper.
    If anyone has already encountered with such situation pls help me.
    Your help will be highly appreciated.
    Thnaks in advance.
    Isha

    Hello Isha,
    please have a look at the how-to papers "Variable Upload" for loading the version variable and "Variables of Type Exit" for deriving the periods and previous version. http://service.sap.com/bw > SAP BW-BPS > How-to
    Regards,
    Marc
    SAP NetWeaver RIG

  • ALE triggering ABAP program instead of iDoc

    Is it possible to have ALE trigger an ABAP program instead of an iDoc?
    We need to send changes in Master Data to a system that can't handle iDoc, but does know what to do with SOAP.

    We're talking about an All-in-One system on NetWeaver 700 and ECC 6.0. My company has developed an Add-On for Business One and now they want to develop a similar Add-On for All-in-One. That Add-On should integrate an Open Source system into an SAP system, or at least make the flow of data seem seamless.
    I should be very careful with my comments, as I'm not really understanding enough about your requirements. I must admit key words changes in master data and ALE triggered my initial comment.
    On second thought it might actually be worthwhile to think about other alternatives. E.g. you could look at the technique SAP uses for BW extractors, which might also be suitable.
    I might just be able to hook into the Change Doc system by defining new Change Doc and Change Pointer Types.
    Well, per my comment above, maybe you don't even need change pointers. However, if you do, you can mostly rely on existing change documents unless you're dealing with some odd or custom object.
    Am I right if I think that IDocs handle those Change Pointers from some kind of scheduled background job?
    Part of the setup for change pointers for a specific message type is to define which function module is used for evaluating the change pointers. All change pointers are then evaluated via transaction BD21, program RBDMIDOC, which can also be scheduled in the background.
    but we only need less than 5% of the information contained in an iDoc
    Well, in theory SAP offers some options: You can filter segments via ALE, use reduced message types or define IDoc views. However, depending on the technique this sometimes requires that the actual application (function module creating the IDocs) has to support it (because it's additional API calls that have to be present).
    Defining new IDoc types isn't that attractive to us.
    Though I do understand such statement in specific cases, it's hard to relate to it on a general level. I.e. in the latter case it's often more driven by strange company policies than by good design choices.
    Anyhow, in the end I'm tempted to think that change pointers with IDocs are one option among many. In your specific case however it sounds as if there's possibly other techniques that might be more suitable. So I'll stop for now before I tell you too much crap pushing you in a wrong direction...

Maybe you are looking for