Different message type received. How?

Hi Experts,
Its sap to sap integration through xi.The message type send from sender sap is hrmd_a but at receiver side it is received as  hrmd_b as a result idoc failed with 51 status (error-> there are no entries available in the distribution model for the message type hrmd_a )in receiver sap system.
I have checked in control record in XI and its hrmd_a only.
Please help !!!
Regards,
Suresh.

hi,
>>>I have checked in control record in XI and its hrmd_a only.
as control record has very little do to with it in XI
check out the target IDOC (in the mapping) and it's name - probably it will be hrmd_B.something
is it? or in the ID you've selected IDOC hrmd_B.something
if you correct it there it will work for 100%
Regards,
Michal Krawczyk
Edited by: Michal Krawczyk on Jul 16, 2009 12:32 PM

Similar Messages

  • How to assign different Message Type to different Doc. Types

    Hi,
    Can anyone tell me how can I assign different Message Type to different Doc. Types e.g. in ME21N. So that whenever the Doc Type is selected the respective Message Type is automatically assigned.
    Lucky

    hi there
    follow this path
    spro - materials management - purchasing - messages - output cntrol - message types - define message types for p/o
    then
    spro - materials management - purchasing - messages - output cntrol - message determination schemas - define message determination schemas for purchase order
    then
    go to
    mn04
    give doc type  - enter
    enter partner role & other parametrs

  • IDOC - IDOC scenario with different message types

    Dear Experts
    I will like to have your expert opinion in the following question:
    I have an IDOC -> IDOC scenario. Wherein at the destination system I have a message type which does not exist at the source system.
    Also the IDOC type at destination system does not exist at the source system.
    Let say, I will be creating custom message type at source system (Z****) and will also be creating the custom IDOC type (z****) with the same structure, definition as the destination.
    Now my question is, even if there will be different message types and different IDOC types but with the same structure (the segment level definition
    and field attribute remains the same at both the system). The difference lies with the names. And I have proper mapping though process code.
    Will I be able to receive the IDOC correctly at destination?
    Thanks & Best Regards

    Hi All
    I figured out the answer myself now.
    You got to have same name for message type. All of you said this and this is rite.
    Coming to IDOC type, I did not really got clear idea on this from this discussion.
    But after working on a scenario, I learnt that, you can have different names for IDOCs, but provided that, whichever IDOC type the source system is sending, the same type must exist in your destination as well. Otherwise, system wont process your IDOC. But from mapping point of view, its upto individual how do thay handle mapping inside inbound process code for different idoc types / strucutes.
    Lesson learnt by me, ideally try to keep same name for both logical message and idoc type at both source and destination. If possible try to keep the structure level also the same. This is my view, learnt it the hard way.
    Cheers
    Shane

  • Can we assign same  basic type to  different message type in ALE

    Hi Expert
       can we assign same idoc type to different message type?

    Hi,
    Yes you can assign the one idoc type to multiple message type. Message type nothing but it represents the kind of data we transfer.But idoc type is the format in which we transfer data. As an example in Messager types "ORDERS" and "ORDRSP"  both indicates the order related data, and in both case idoc type can be ORDERS01, ORDERS02.............
    Thanks,
    Asit Purbey.
    Edited by: Asit Purbey on Oct 12, 2009 3:07 PM

  • How to handle different message types of EDIFACT in single input file.

    Hi All,
    Currently we have a requirement like we will be receiving the input with different messages in the same input file (eg: ORDERS and ORDRSP in the same file).
    We have configured both the message types in the document definitions. One more thing is the versions of the messages are different.
    When we pass the input we are getting the error.
    The input looks like below,
    UNB
    UNG
    UNH*ORDERS
    UNT
    UNE
    UNG
    UNH*ORDRSP
    UNT
    UNE
    UNZ
    Please assist us to overcome the error.
    Thanks,
    Ravindra.

    Hi Prasanna,
    Thanks for your reply.
    I have created the agreements for both the messages still i'm getting the below error,
    B2B-50037
    B2B inbound message processing error
    If i give the input as separate messages (i mean 2 input files). Its working fine.
    Also let me know is there any configuration settings to handle multiple messages in a single input file.
    Thanks,
    Ravindra.

  • How to send different message types to different partners in purchase orde?

    Hi Folks,
    I have been searching the forum for my question and have not found a solution yet. Maybe there is one out there that can give the solution.
    The situation is as follows.
    PO is created and output is determined for the Vendor and medium is correctly set to 5 (External Message, PDF).
    The requirement is the be able to either manualle add a partner and enter a email address or get it via automatically determination from buyer (Pur.Grp.)
    I have made a new Message type as a copy of neu and only allowed partner BU (Buyer). However that does not seem to work
    Anyone out there that could help?
    Thanks in advance,
    Thomas

    Hi Craig,
    In the print program we call the form z_get_mail_address
        when '5'.
          data:  lvs_comm_type     type   ad_comm,
                 lvs_comm_values   type   szadr_comm_values.
      ... use stratagy to get communication type
    enhancement-section lmedruckf1o_01 spots es_saplmedruck .
          call function 'ADDR_GET_NEXT_COMM_TYPE'
            exporting
              strategy           = nast-tcode
              address_number     = lfa1-adrnr
            importing
              comm_type          = lvs_comm_type
              comm_values        = lvs_comm_values
            exceptions
              address_not_exist  = 1
              person_not_exist   = 2
              no_comm_type_found = 3
              internal_error     = 4
              parameter_error    = 5
              others             = 6.
    end-enhancement-section.
          if sy-subrc <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          endif.
    *Begin 27-09-2011
          perform z_get_mail_address changing lvs_comm_type lvs_comm_values.
    End 27-09-2011 xkgu
    convert communication data
          move-corresponding nast to intnast.
          move sy-repid           to xprogramm.
          call function 'CONVERT_COMM_TYPE_DATA'
            exporting
              pi_comm_type              = lvs_comm_type
              pi_comm_values            = lvs_comm_values
              pi_country                = lfa1-land1
              pi_repid                  = xprogramm
              pi_snast                  = intnast
            importing
              pe_itcpo               
    we added the following code:
    form z_get_mail_address changing lvs_comm_type type ad_comm lvs_comm_values type szadr_comm_values.
      data: c_recipient(2) type c value $R
            c_buyer(2)      type c value 'ZC',
            l_mail              like lvs_comm_values-adsmtp-smtp_addr.
      tables: pa0105.
        case nast-parvw.
          when c_indkoeber.
    Get mail address in infotype PA0150 subtype 0009.
    nast-parnr must be personal number from HR.
            select single * from pa0105 where
                  pernr = nast-parnr
              and subty = '0010'
              and begda <= nast-erdat
              and endda >= nast-erdat.
            if sy-subrc = 0.
              l_mail = pa0105-usrid_long.
              perform z_get_mail using l_mail. " some logic here
              lvs_comm_values-adsmtp-smtp_addr = l_mail.
              translate l_mail to upper case.
              lvs_comm_values-adsmtp-smtp_srch  = l_mail.
              lvs_comm_values-adsmtp-consnumber = '001'.
              lvs_comm_values-adsmtp-flgdefault = 'X'.
              lvs_comm_values-adsmtp-home_flag  = 'X'.
              lvs_comm_type = 'INT'.
            endif.
          when c_recipient
    Get mail address in PO item (EKPO-AFNAM)
            l_mail = ekpo-afnam.
            perform z_get_mail changing l_mail.
            lvs_comm_values-adsmtp-smtp_addr = l_mail.
            translate l_mail to upper case.
            lvs_comm_values-adsmtp-smtp_srch  = l_mail.
            lvs_comm_values-adsmtp-consnumber = '001'.
            lvs_comm_values-adsmtp-flgdefault = 'X'.
            lvs_comm_values-adsmtp-home_flag  = 'X'.
            lvs_comm_type = 'INT'.
        endcase.
    endform.                    " Z_GET_MAIL_ADDRESS

  • Different Message Type, Different Namespace, same structure

    Hi,
    we have the scenario:
    We have a message type (with our namespace) in a regular file-tofile scenario.
    The sender is sending us an xml-file from his PI that  has exactly the same structure and same xsd.
    Except, that his message type name and namespace are different.
    What is the scenario to get his message type and namespace mapped to my message type and namespace in a regular file-to-file scenario?
    Thanks
    hs

    Hi, you could also remove namespaces with XMLAnonymizerBean, then you only need to adapt the message type.
    Alternatively you can import the external definition of the message and create a mapping for that. You can reuse your existing message mapping, just do a copy and change the message type in the signature. Then you can correct structural inconsistencies automatically in order to adjust the mapping to the changed namespace and message type. Or even better, create a mapping template for the structure which you use in both message mappings. Like this, you have a separate interface and mapping for the file and thus a clear separation of message flow.
    Regards, Martin

  • Idoc creation - Different Message types

    Hi All,
    Is there an efficient way of  to create both DEBMAS and ORDERS message type idocs within the same same ABAP program?
    Please advise.
    Regards,
    Meghna

    Thanks for your reply.
    We have lot of custom development and we have to go with an ABAP program to create these Idocs.
    Here's what I am planning to do:
    fill DEBMAS05 idoc type.
    append EDIDD.
    fill ORDERS05 idoc type.
    append EDIDD.
    I'm planning to use INBOUND IDOC Process function module to create these idocs.
    For performance reasons do you want me to call this FM twice or only once for both ( by appending EDIDD both debmas and orders records ).
    Please advise.
    Meghna

  • Need to createchange pointer with a different Message type

    Hii
    Existing Scenario :
    when i do some changes to the material characteristics through a z- transaction change pointers are created in the tables BDCP and BDCPS with message type ZVCRUMAT
    Required Scenarion :
    Now when i change the material characteristics i need change pointers to be created with message type ZMATCHG .
    Where should i do the changes to get this done .Please help .
    Thanks and regards
    Ramakanth Akunury

    Hello,
    First activate change pointers for message type ZMATCHG using BD50. Then identify the fields for creating change pointers using BD52.
    Thanks,
    Venu

  • Uploading data in MM01 for different material types

    Hi,
    I have a doubt regarding uploading the data in MM01 for different material types.
    Generally in MM01, we have different views for different material types. The number of views will vary depending upon the material type that we select.
    I have a scenario, where in to upload the data, I have a flat file that consists of data for different message types. So, how to upload the data in such case.
    Can anyone help me on the same by providing explanation or sample code...? What would be the possible ways to upload data in such scenario.
    That would be of great help.
    Thanks & Regards,
    Pradeep.

    See the below code and use FM SELECTION_VIEWS_FIND..
    REPORT zjpmuim306 NO STANDARD PAGE HEADING LINE-SIZE 250 MESSAGE-ID
    zjpm001.
    *&   I N B O U N D  V I A   A B A P : Batch input Session method     *
    *&   Development ID: IM_DD_306_LJP                                   *
    *&   Report        : ZJPMUIM306                                      *
    *&   The Purpose of the Object is to interface Create Input Record   *
    *&   for SAP Migration from the Material master of BPCS All the      *
    *&   information received at BPCS is collected into a single record. *
    *&   By using session method upload data from file ,one item is
    *&   created for one record                                          *
    *&   Change Log:                                                     *
    *&   Init       Who              Date         Text                   *
    *&  MALIKDH1   Seshu Reddy    26-07-2003   Initial Version           *
                             Constants                                   *
    CONSTANTS:c_vkorg(4) type c value 'JP20',        " Sales Organization
              c_vtweg(2) type c value 'TR' ,         " Distribution Channel
              c_werks(4) Type c value 'JP01' ,       " Plant
              c_viewlist(15) VALUE 'KDEALBSZXVPCFQG'," View list
              c_scm_view TYPE msichtausw-dytxt VALUE 'SCM View',
              c_sd_view TYPE msichtausw-dytxt VALUE 'SD View',
              c_seq_code(2) VALUE 'Z1',              " Sequential Code
              c_keep(1) TYPE c VALUE  'X',           " Keep
              c_group LIKE apqi-groupid VALUE 'IM306', " Session Name
              c_tcode  LIKE tstc-tcode VALUE 'MM02',  " Transaction Code
              c_blank(1) VALUE ' ',                   " Blank
              c_intls(1) VALUE 'N'.                  " Logistic Status
                  Variables                                      *
    DATA: g_flag1(1),  " Variable to hold
          g_flag(1),   " Variable to hold
          g_file LIKE rlgrap-filename VALUE
         'C:\Documents and Settings\seshur\Desktop\HCLT123.CSV'. " File name
           Internal tables/ Work area                           *
    Internal Table for Delimter
    DATA : BEGIN OF t_delim OCCURS 0,
           text(1000),
           END OF t_delim.
    Internal table for BDC processing
    DATA : t_bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
    Internal table for holding the data which has to be uploaded.
    DATA: BEGIN OF t_bpcs OCCURS 0,
          matnr(15) TYPE c,  " material no
          dosage(40) TYPE c, " Dosage form(Local)
          appearance(40) TYPE c, " Appearance
          idcode(6) TYPE c,     " Identification Code
          prostformno(10) TYPE c, "SOP
          weitab(7) TYPE c,    " Weight/tablet
          uom1(2) TYPE c,     " UOM of Carton
          uom2(2) TYPE c,     " UOM of Case
          carsize(14) TYPE c, " Carton size
          cassize(14) TYPE c, " Case size
          rupqty(11) TYPE c,  " Round up
          abvname(3) TYPE c,  " Product short name
          END OF t_bpcs.
    *Internal table for t_bpcs
    DATA: BEGIN OF t_mdata OCCURS 0,
          matnr  LIKE marc-matnr, " Material number
          zzjp_dos_frm LIKE marc-zzjp_dos_frm, " Dosage form(Local)
          zzjp_aprn LIKE marc-zzjp_aprn, " Appearance
          zzjp_con_id LIKE marc-zzjp_con_id," Identification Code
          zzjp_nyu_sop LIKE marc-zzjp_nyu_sop,"SOP
          zzjp_wei_tab(10) type c , " Weight/tablet
          zzjp_bio  LIKE marc-zzjp_bio,"Biologics Indicator
          zzjp_itf LIKE marc-zzjp_itf, " ITF code
          zzjp_car(2) type c, " UOM of Carton
          zzjp_cas(2) type c, " UOM of Case
          zzjp_car_size(11) type c," Carton size
          zzjp_cas_size(11) type c, " Case size
          zzjp_rupqty(11) type c,  " Round up
          zzjp_init_ls LIKE marc-zzjp_init_ls, " Logistic Status
          zzjp_re1 LIKE marc-zzjp_re1, "Document type(Local)
          zzjp_re2 LIKE marc-zzjp_re2, "Report type
          zzjp_re3 LIKE marc-zzjp_re3, "Shipping report type
          zzjp_pro_id LIKE mvke-zzjp_pro_id," Product output sequence
          zzjp_bu_id LIKE mvke-zzjp_bu_id, " Business unit indicator
          zzjp_abv_name LIKE mvke-zzjp_abv_name," Product short name
          zzjp_abv_id1 LIKE mvke-zzjp_abv_id1," Product short name output
          zzjp_abv_id2 LIKE mvke-zzjp_abv_id2," Product short name internal
          zzjp_spl_id LIKE mvke-zzjp_spl_id,  " Sample internal order
          END OF t_mdata.
    Internal table for Mara Table
    DATA: BEGIN OF t_mara OCCURS 0,
          matnr LIKE mara-matnr,  " material Number
          vpsta LIKE mara-vpsta,  " Maintenance status of complete material
          pstat like mara-pstat,  " Maintenance status
          END OF t_mara.
    Internal table for Material Master View Selection Screens
    DATA: BEGIN OF t_bildtab OCCURS 0.
            INCLUDE STRUCTURE mbildtab.
    DATA: END OF t_bildtab.
    internal table for T_bildtab
    DATA: t_bildtab_dup LIKE t_bildtab OCCURS 0 WITH HEADER LINE.
    *Work area for T_bildtab internal table(Views Selection)
    DATA: BEGIN OF w_data,
          flag1 type c,
          anzd70 TYPE i,
          field1(20) type c,
          field2(20) type c,
          field3(20) type c,
          field4(20) type c,
          count(2) TYPE c,
          END OF w_data.
                Main Processing                           *
    START-OF-SELECTION.
    Store data from file into internal table
      PERFORM f_uplaod_data.
    Transfer the uploaded data into t_mdata internal Table
      PERFORM f_process_data.
    Selecting The views based on Material number
      PERFORM f_view_list.
    Open a BDC Session
      PERFORM f_bdc_open.
    *Selecting the fields from mara table
      SELECT matnr
             vpsta
             pstat
        FROM mara
      INTO TABLE t_mara
      FOR ALL ENTRIES IN t_mdata
      WHERE matnr = t_mdata-matnr.
      SORT t_mara BY matnr.
      SORT t_mdata BY matnr.
    Transfer the uploaded data into BDCDATA structure
      PERFORM f_process_bdc.
    Close The BDC Session
      PERFORM f_close_group.
    *&      Form  F_VIEW_LIST                                             *
             Routine to used for Calling the function module            *
              Selection_views_find                                      *
    FORM f_view_list.
      CALL FUNCTION 'SELECTION_VIEWS_FIND'
           EXPORTING
                bildsequenz     = c_seq_code
                pflegestatus    = c_viewlist
           TABLES
                bildtab         = t_bildtab
           EXCEPTIONS
                call_wrong      = 1
                empty_selection = 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.
      ENDIF.
    ENDFORM.                    " F_VIEW_LIST
    *&      Form  f612_view_sort                                          *
      Routine to used for Selecting The views based on Material Number  *
    FORM f612_view_sort.
      t_bildtab_dup[] = t_bildtab[].
    Reading the Internal table t_mara
      READ TABLE t_mara WITH KEY matnr = t_mdata-matnr.
      TRANSLATE t_mara-pstat USING ' $'.
      CLEAR: w_data-flag1, w_data-anzd70.
      LOOP AT t_bildtab_dup.
        IF t_bildtab_dup-pstat CA t_mara-pstat.
          w_data-anzd70 = w_data-anzd70 + 1.
          IF t_bildtab_dup-kzanz IS INITIAL.
            t_bildtab_dup-kzanz = 'X'.
            w_data-flag1 = 'X'.
            MODIFY t_bildtab_dup.
          ENDIF.
        ELSE.
          IF NOT t_bildtab_dup-kzanz IS INITIAL.
            CLEAR t_bildtab_dup-kzanz.
            w_data-flag1 = 'X'.
            MODIFY t_bildtab_dup.
          ENDIF.
        ENDIF.
      ENDLOOP.
      TRANSLATE t_mara-pstat USING '$ '.
      IF NOT w_data-flag1 IS INITIAL.
        SORT t_bildtab_dup BY kzanz DESCENDING idxbd ASCENDING.
      ENDIF.
    *Reading The internal table for T_bildtab_dup
      READ TABLE t_bildtab_dup WITH KEY dytxt = c_scm_view.
      IF t_bildtab_dup-kzanz = 'X'.
        WRITE sy-tabix TO w_data-count.
        w_data-count = w_data-count + 2.
        IF w_data-anzd70 > 18.
          w_data-count = w_data-count - 18.
        ENDIF.
        CONCATENATE 'MSICHTAUSW-DYTXT(' w_data-count ')' INTO w_data-field1.
        CONCATENATE 'MSICHTAUSW-KZSEL(' w_data-count ')' INTO w_data-field2.
      ENDIF.
      READ TABLE t_bildtab_dup WITH KEY dytxt = c_sd_view.
      IF t_bildtab_dup-kzanz = 'X'.
        WRITE sy-tabix TO w_data-count.
        IF w_data-anzd70 > 18.
              w_data-count = w_data-count + 2.
          w_data-count = w_data-count - 18.
        ENDIF.
        CONCATENATE 'MSICHTAUSW-DYTXT(' w_data-count ')' INTO w_data-field3.
        CONCATENATE 'MSICHTAUSW-KZSEL(' w_data-count ')' INTO w_data-field4.
      ENDIF.
    ENDFORM.                    " f612_view_sort
    *&      Form  f_uplaod_data                                           *
    Routine to used for Uploading the data from file to Internal table *
    FORM f_uplaod_data.
      CALL FUNCTION 'WS_UPLOAD'
           EXPORTING
                filename                = g_file
                filetype                = 'DAT'
           TABLES
                data_tab                = t_delim
           EXCEPTIONS
                conversion_error        = 1
                file_open_error         = 2
                file_read_error         = 3
                invalid_type            = 4
                no_batch                = 5
                unknown_error           = 6
                invalid_table_width     = 7
                gui_refuse_filetransfer = 8
                customer_error          = 9
                OTHERS                  = 10.
      IF sy-subrc <> 0.
             MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF t_bpcs IS INITIAL.
        LOOP AT t_delim.
          SPLIT t_delim-text AT ',' INTO t_bpcs-matnr
                                         t_bpcs-dosage
                                         t_bpcs-appearance
                                         t_bpcs-idcode
                                         t_bpcs-prostformno
                                         t_bpcs-weitab
                                         t_bpcs-uom1
                                         t_bpcs-uom2
                                         t_bpcs-carsize
                                         t_bpcs-cassize
                                         t_bpcs-rupqty
                                         t_bpcs-abvname.
          APPEND t_bpcs.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " f_uplaod_data
    *&      Form  F_BDC_OPEN
          Routine  to create BDC Session to be processed
    FORM f_bdc_open.
      CALL FUNCTION 'BDC_OPEN_GROUP'
           EXPORTING
                client              = sy-mandt
                group               = c_group
                keep                = c_keep
                user                = sy-uname
           EXCEPTIONS
                client_invalid      = 1
                destination_invalid = 2
                group_invalid       = 3
                group_is_locked     = 4
                holddate_invalid    = 5
                internal_error      = 6
                queue_error         = 7
                running             = 8
                system_lock_error   = 9
                user_invalid        = 10
                OTHERS              = 11.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
      MESSAGE S000 WITH 'Batch input session is created successfully'(T02).
      ENDIF.
    ENDFORM.                    " F_BDC_OPEN
    *&      Form  F_PROCESS_BDC
          Processing of BDCDATA Structure
    FORM f_process_bdc.
      LOOP AT t_mdata.
        PERFORM f612_view_sort.
        PERFORM f_bdc_dynpro USING 'SAPLMGMM' '0060'.
        PERFORM f_bdc_field USING 'BDC_CURSOR'
                                      'RMMG1-MATNR'.
        PERFORM f_bdc_field USING 'BDC_OKCODE'
                                      '=AUSW'.
        PERFORM f_bdc_field USING 'RMMG1-MATNR'
                                      t_mdata-matnr.
        PERFORM f_bdc_dynpro USING 'SAPLMGMM' '0070'.
        PERFORM f_bdc_field USING 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(01)'.
        IF w_data-anzd70 > 18.
          PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                      '=P+'.
          PERFORM f_bdc_dynpro      USING 'SAPLMGMM' '0070'.
          PERFORM f_bdc_field  USING 'BDC_OKCODE' '/00'.
        ENDIF.
    reading the t_bildtab internal table
        READ TABLE t_bildtab_dup WITH KEY dytxt = c_scm_view.
        IF t_bildtab_dup-kzanz = 'X'.
          PERFORM f_bdc_field       USING 'BDC_CURSOR'
                                        w_data-field1.
          PERFORM f_bdc_field       USING w_data-field2 'X'.
          g_flag = 'X'.
        ENDIF.
    reading the t_bildtab internal table
        READ TABLE t_bildtab_dup WITH KEY dytxt = c_sd_view.
        IF sy-subrc EQ 0.
          g_flag = 'X'.
        ENDIF.
        IF t_bildtab_dup-kzanz = 'X'.
          PERFORM f_bdc_field       USING 'BDC_CURSOR'
                                        w_data-field3.
          PERFORM f_bdc_field       USING w_data-field4 'X'.
          g_flag1 = 'X'.
        ENDIF.
        IF g_flag = 'X' AND g_flag1 = 'X'.
          PERFORM f_bdc_dynpro      USING 'SAPLMGMM' '0080'.
          PERFORM f_bdc_field       USING 'BDC_CURSOR'
                                        'RMMG1-VTWEG'.
          PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                        '=ENTR'.
          PERFORM f_bdc_field       USING 'RMMG1-WERKS'
                                        c_werks.
          PERFORM f_bdc_field       USING 'RMMG1-VKORG'
                                        c_vkorg.
          PERFORM f_bdc_field       USING 'RMMG1-VTWEG'
                                        c_vtweg.
          CLEAR g_flag.
          CLEAR g_flag1.
        ELSE.
          IF g_flag = 'X'.
            PERFORM f_bdc_dynpro      USING 'SAPLMGMM' '0080'.
            PERFORM f_bdc_field       USING 'RMMG1-WERKS'
                                        c_werks.
            PERFORM f_bdc_field      USING 'BDC_OKCODE' '/00'.
          ELSE.
            IF g_flag1 = 'X'.
              PERFORM f_bdc_dynpro      USING 'SAPLMGMM' '0080'.
              PERFORM f_bdc_field       USING 'BDC_CURSOR'
                                            'RMMG1-VTWEG'.
              PERFORM f_bdc_field       USING 'RMMG1-WERKS'
                                          c_werks.
              PERFORM f_bdc_field       USING 'RMMG1-VKORG'
                                            c_vkorg.
              PERFORM f_bdc_field       USING 'RMMG1-VTWEG'
                                            c_vtweg.
              PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                             '=ENTR'.
            ENDIF.
          ENDIF.
        ENDIF.
    *Processing of SCM View
        PERFORM f_bdc_dynpro      USING 'SAPLMGMM' '4000'.
        PERFORM f_bdc_field       USING 'BDC_CURSOR' 'MARC-ZZJP_DOS_FRM'.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_DOS_FRM'
                                      t_mdata-zzjp_dos_frm.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_APRN'
                                      t_mdata-zzjp_aprn.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_CON_ID'
                                      t_mdata-zzjp_con_id.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_NYU_SOP'
                                      t_mdata-zzjp_nyu_sop.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_WEI_TAB'
                                      t_mdata-zzjp_wei_tab.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_CAR'
                                      t_mdata-zzjp_car.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_CAS'
                                      t_mdata-zzjp_cas.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_CAR_SIZE'
                                      t_mdata-ZZJP_CAR_SIZE.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_CAS_SIZE'
                                      t_mdata-ZZJP_CAS_SIZE.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_RUPQTY'
                                       t_mdata-ZZJP_RUPQTY.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_BIO'
                                      t_mdata-zzjp_bio.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_ITF'
                                      t_mdata-zzjp_itf.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_INIT_LS'
                                      t_mdata-zzjp_init_ls.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_RE1'
                                      t_mdata-zzjp_re1.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_RE2'
                                      t_mdata-zzjp_re2.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_RE3'
                                      t_mdata-zzjp_re3.
        PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
    *Processing of SD View
        PERFORM f_bdc_dynpro      USING 'SAPLMGMM' '4000'.
        PERFORM f_bdc_field       USING 'BDC_CURSOR' 'MVKE-ZZJP_PRO_ID'.
        PERFORM f_bdc_field       USING 'MVKE-ZZJP_PRO_ID'
                                      t_mdata-zzjp_pro_id.
        PERFORM f_bdc_field       USING 'MVKE-ZZJP_BU_ID'
                                      t_mdata-zzjp_bu_id.
        PERFORM f_bdc_field       USING 'MVKE-ZZJP_ABV_NAME'
                                      t_mdata-zzjp_abv_name.
        PERFORM f_bdc_field       USING 'MVKE-ZZJP_ABV_ID1'
                                      t_mdata-zzjp_abv_id1.
        PERFORM f_bdc_field       USING 'MVKE-ZZJP_ABV_ID2'
                                      t_mdata-zzjp_abv_id2.
        PERFORM f_bdc_field       USING 'MVKE-ZZJP_SPL_ID'
                                      t_mdata-zzjp_spl_id.
        PERFORM f_bdc_field      USING 'BDC_OKCODE' '/00'.
        PERFORM f_bdc_dynpro      USING 'SAPLSPO1' '0300'.
        PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                      '=YES'.
    perform f_bdc_insert.
    REFRESH T_BDCDATA.
      ENDLOOP.
    ENDFORM.                    " F_PROCESS_BDC
    *&      Form  f_bdc_dynpro
      p_prog is the program name to which data is passed                *
      p_dyno is the screen number to which the data is passed
        Routine for populating the BDCDATA structure with the
        Screen related information
    FORM f_bdc_dynpro USING    p_prog
                               p_dyno.
      t_bdcdata-program  = p_prog.
      t_bdcdata-dynpro   = p_dyno.
      t_bdcdata-dynbegin = 'X'.
      APPEND t_bdcdata.
      CLEAR t_bdcdata.
    ENDFORM.                    " F_bdc_dynpro
    *&      Form  F_BDC_FIELD
          p_fnam is the field name to which value is passed
          p_fval is the field value which is passed
       p_fnam is the field name to which value is passed
       p_fval is the field value which is passed
    FORM f_bdc_field USING    p_fnam
                              p_fval.
      t_bdcdata-fnam = p_fnam.
      t_bdcdata-fval = p_fval.
      APPEND t_bdcdata.
      CLEAR t_bdcdata.
    ENDFORM.                    " F_bdc_field
    *&      Form  F_PROCESS_DATA                                          *
         Routine to used for moving data from T_bpcs internal table to  *
         t_mdata Internal Table                                         *
    FORM f_process_data.
      LOOP AT t_bpcs.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
                  input  = t_bpcs-matnr
             IMPORTING
                  output = t_mdata-matnr.
        MOVE t_bpcs-dosage TO t_mdata-zzjp_dos_frm.
        MOVE t_bpcs-appearance TO t_mdata-zzjp_aprn.
        MOVE t_bpcs-idcode  TO t_mdata-zzjp_con_id.
        MOVE t_bpcs-prostformno TO t_mdata-zzjp_nyu_sop.
        MOVE t_bpcs-weitab TO t_mdata-zzjp_wei_tab.
        MOVE c_blank TO t_mdata-zzjp_bio.
        MOVE c_blank TO t_mdata-zzjp_itf.
        MOVE t_bpcs-uom1 TO t_mdata-zzjp_car.
        MOVE t_bpcs-uom2 TO t_mdata-zzjp_cas.
        MOVE t_bpcs-carsize TO t_mdata-zzjp_car_size.
        MOVE t_bpcs-cassize TO t_mdata-zzjp_cas_size.
        MOVE t_bpcs-rupqty TO t_mdata-zzjp_rupqty.
        MOVE c_intls TO t_mdata-zzjp_init_ls.
        MOVE c_blank TO t_mdata-zzjp_re1.
        MOVE c_blank TO t_mdata-zzjp_re2.
        MOVE c_blank TO t_mdata-zzjp_re3.
        MOVE c_blank TO t_mdata-zzjp_pro_id.
        MOVE c_blank TO t_mdata-zzjp_bu_id.
        MOVE t_bpcs-abvname TO t_mdata-zzjp_abv_name.
        MOVE c_blank TO t_mdata-zzjp_abv_id1.
        MOVE c_blank TO t_mdata-zzjp_abv_id2.
        MOVE c_blank TO t_mdata-zzjp_spl_id.
        APPEND t_mdata.
      ENDLOOP.
    ENDFORM.                    " F_PROCESS_DATA
    *&      Form  f_bdc_close
          Routine to close the BDC Session
    FORM f_close_group.
      CALL FUNCTION 'BDC_CLOSE_GROUP'
           EXCEPTIONS
                not_open    = 1
                queue_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.
      ENDIF.
    ENDFORM.                    " f_close_group
    *&      Form  f_bdc_insert
         routine to input batch data into the Transaction MM02 from the
         session created
    FORM f_bdc_insert.
    CALL FUNCTION 'BDC_INSERT'
             EXPORTING
                  tcode            = c_tcode
             TABLES
                  dynprotab        = t_bdcdata
             EXCEPTIONS
                  internal_error   = 1
                  not_open         = 2
                  queue_error      = 3
                  tcode_invalid    = 4
                  printing_invalid = 5
                  posting_invalid  = 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.
        ENDIF.
    ENDFORM.                    " f_bdc_insert
    Reward Points if it is useful
    Thanks
    Seshu

  • Doubt on technical systems and fault message types

    Hi,
            I had still doubt & i'm not clear to answers i got yesterday , plz clarify my doubts
             1.what are fault message types and   how  do we catch any exceptions  in file to  proxy scenario , can any one give simple example ?
             2.How do we register a non-sap system(FTP SERVER) in SLD  ? what steps  should we follow? Does any one have blogs regarding this?
               Plz answer to this questions, good answers will be rewarded.

    Hi Smitha,
    <i>1. what are fault message types and how do we catch any exceptions in file to proxy scenario , can any one give simple example</i>
    Fault Message are Msg type that provided whenever u create a namespace..they are usually used to get the exception or error mapped which has occured while execution of Application at the sender/receiver end....
    One scenario where i had used it from Soap to RFC where i defined the exception in rfc source code at r/3 end...I mapped that exception to Fault msg type that i created of my own type(didnt used the default)..
    Refer this for Fault msg usage in Asynch scenarios.
    /people/shabarish.vijayakumar/blog/2006/11/02/fault-message-types--a-demo-part-1
    Refer this for Fault msg usage in Synch scenarios.
    /people/sap.user72/blog/2006/01/16/xi-propagation-of-meaningful-error-information-to-soap-client
    Refer this for Handling Exceptions
    http://help.sap.com/saphelp_nw04/helpdata/en/33/4a773f12f14a18e10000000a114084/content.htm
    <i>2.How do we register a non-sap system(FTP SERVER) in SLD ? what steps should we follow? Does any one have blogs regarding this?</i>
    For this you have to define the 3rd Party TS & BS in sld.
    Have a look at the following links...
    http://help.sap.com/saphelp_nw04s/helpdata/en/fa/0aad3efa11b300e10000000a114084/frameset.htm
    Cheers...
    Vasu
    <b>** REward POints if found useful **</b>

  • Message Types for respective Modules

    Hello All,
    Could you please let me know how we can determine the message type and idoc types for respective Modules based ont the description. Example FICO i.e. Invoice or etc.
    Thank you.
    Regards,
    Dinesh

    Hi,
    Thanks for ur reply. But i have descriptions stating "SAP Inbound Inventory Transfer" and required specification to be implemented is "Plan to Fulfill.Inventory transfer with in the plant". In this case, which idoc must be used. I have checked in the tables earlier different message types.
    Regards,
    dinesh

  • One source File should be sent to Receivers based on Message type

    Hi All,
    I am facing with a problem, the scenario is File to IDOC...
    The file which comes has different message types if Message type is VERIFY then IDOC <b>_-AFS_-DELVRY03</b> has to be triggered and if Message type is MIGO101 then IDOC <b>_-AFS_-WMMBID02</b> has to be triggered,
    Source message is same for both the idocs and mapping is different...
    SO please any one can suggest how to proceed in Integration Directory configuration...
    Thanks and Regards,
    sridhar

    Hi,
    Your query is a little ambiguous.
    You say, that the message type can be either VERIFY or MIGO101.
    You also say that the source message is same for both the idocs. This is not very clear.
    In case, you have the same message type, and VERIFY and MIGO101 are two fields/segments in this message type, then all you need to do is check if these segments exist, in interface determination.
    Click the + symbol in the inbound interfaces section.Enter the following:
    Condition: MT/VERIFY ex   If so, call IMapping which maps message to idoc AFS_-DELVRY03. Inbound interface for this would be idoc AFS_-DELVRY03
    Condition: MT/MIGO101 ex If so, call IMapping which maps message to idoc -AFS-WMMBID02. Inbound interface for this would be idoc. -AFS-WMMBID02.
    In case you have two different message types(which means you have two different source messages), you could create two different scenarios.
    Regards,
    Smitha.

  • PI IDOC Message Type Correlation for Customers & Addresses

    Hello
    We are struggling with an interface from MDM through PI and into ECC.  For example, PI grabs customer/vendor records from MDM and then sends them on to ECC.  In the process it creates IDOCS of two different message types (ADRMAS u2013 addresses, and DEBMAS u2013 for customer/vendor records)
    What is happening is that the Addresses and Customer/Vendor records are not being processed as logical units of work (LUW).  This is causing data synchronization issues in ECC where addresses are updated but customer master records are not.
    We are in desperate need of having two different IDOCS (ADRMAS and CREMAS) having related records between them be treated as logical units of work so that the related records are updated together.  If one portion fails it all should fail. 
    So far the team has not found good documentation on how to accomplish this in PI so that ECC can see that the IDOC records are related and to be treated as related LUWs. 
    Any help or references would be appreciated.

    hi,
    >>Getting idoc errors in production is a regular occurence in any system including production due to trouble with the data (bad zip codes, bad foreign keys, failures due to data validation routines, configuration changes that impact data structures).
    I know - that's when we can use WE02 and correct the wrong data
    >>There is SAP documentation that suggests that correlations/relationships can be established between idocs in PI and ECC (serialization), but we just don't quite understand it yet, and we are not confident that it will do for us what we need.
    no serialization will not do what you need as if the first one will be ok
    and second one not - serialization will not rollback the second one - sorry
    Regards,
    Michal Krawczyk
    http://mypigenie.com XI/PI FAQ

  • IDOC Message type 'ORDCHG' - Sales Order Delete funcanility

    Dear Guru's,
    I have a requirement for a client where client is sending a EDI message to change & Delete a Sales order. I have mapped change option with IDOC message type 'ORDCHG' and basic message type 'ORDERS05'. Change option for the sales order is working fine.
    Can any one tell me with message type 'ORDCHG'. how to delete a Sales Order. In EDI, client is passing only Header segments with Summary details.
    Your reply will of greate help to me.
    With Best Regards,
    M. Rajendran.

    Hi Ram,
    Thanks a lot for sharing the link, but this dint solve my purpose. I have a different case all to geather.
    My client is passing only Header segment and summary segment in the EDI. Thru ORDCHG i need to cancle/Delete entire sales order.
    But i found that in standard IDOC Message type 'ORDCHG' only line item deletion/Cancle is availble but i wanted to delete/cancle entire sales document.
    Any possibilites available in ORDCHG. Your reply will be much appreciated.
    Thanks in Advance.
    With Best Regards,
    M. Rajendran.

Maybe you are looking for