Idoc processing - determine Basic Type in Program

Hi Forums,
I would like to determine the Basic type that is being processed by at the time of my Idoc creation.
the function module I am using is being called by shipping document as well as delivery documents.
I would like my code only to be executed when it is a basic type of DELVRY05

Hi,
1) Goto Tcode - we57:
Assign function module to IDoc type
Module: Function module
Basic type: 
Message type:
Direction: 2 (inbound)
This will differentiate between Shipping and Delivery.
2) Creating Inbound process code - we42
    For Outbound Process Code -- WE41.
For further plz refer following link.
https://wiki.sdn.sap.com/wiki/display/ABAP/ALE%2CIDOC
Thanks and Regards,
ShreeMohan

Similar Messages

  • IDOC error 639 IDoc & and determined transport type & do not match

    Hello,
    can you help me with this issue?
    An idoc is stuck beacuase of this error:
    IDoc & and determined transport type & do not match
    Message no. IHC_IDOC639
    What does it mean? how can I fix thiss issue in order to re-process the idoc?
    Thank You

    Hi,
    is SAPNET note 784881 implemented? If no, implement it and try again.
    BR Christian

  • Outbound IDOC process - Using standard  or Custom Program

    Hi all,
    i'm having some doubts regarding IDOC's outbound processing.
    I'm trying to understand 2 scenarios:
    1- Trigger Standard Outbound IDOC without writting any Z program ou IDOC FM.
    It's possible to trigger a outbound idoc for exemple, whenever a sales order is created. To do this is, i suposed i don't need to write any code at all, correct?
    What i need to do is create a logical system (SALE), define Transmission protocol (WE20, in here i associate the partner, and the outbound message type? After this point is the idoc automatic triggered?
    If not, what is the correct procedure?
    2 Trigger Ountbound IDOC using Z program.
    Whats is diferent from the point 1 to this situation?
    Best regards,
    Pedro

    Kali,
    1. You can search in SE37 using IDOC_OUTPUT* for finding out corresponding function modules. It is based on message types.
    2. You can search user exit in above mentioned function module. So first get the correct populating FM & then you can search for Call Customer Function inside the code for user exit.
    3.Again ans is same as in point 1.

  • IDOC: Process order: Message type LOIPRO

    Hi
    I would like to know here no other way to download LOIPRO idocs as soon as the process order or production order are created/changed.
    Currently i'm using program rcclord and rccltran to create idocs. The problem I see here is that during every execution ALL orders, disregarding of the status (i.e. closed orders as well), will be exported.
    G.
    Message was edited by: Giovanni Baumann

    Hi Baumann,
    You can use the BADI WORKORDER_UPDATE
    I am using this for releasing Process Orders. I hope this will help you..
    *Appending the Selection Screen fields.
    *Process Order
      s_rspar-selname = c_selnam1.
      s_rspar-kind    = c_kind.
      s_rspar-sign    = c_sign.
      s_rspar-option  = c_option.
      s_rspar-low     = im_ord_header-aufnr.
      APPEND s_rspar TO t_rspar_tab.
    *Material Number
      s_rspar-selname = c_selnam2.
      s_rspar-kind    = c_kind.
      s_rspar-sign    = c_sign.
      s_rspar-option  = c_option.
      s_rspar-low     = im_ord_header-matnr.
      APPEND s_rspar TO t_rspar_tab.
    *Planning plant
      s_rspar-selname = c_selnam3.
      s_rspar-kind    = c_kind.
      s_rspar-sign    = c_sign.
      s_rspar-option  = c_option.
      s_rspar-low     = im_ord_header-werks.
      APPEND s_rspar TO t_rspar_tab.
    *Order category
      s_rspar-selname = c_selnam4.
      s_rspar-kind    = c_kindp.
      s_rspar-low     = im_ord_header-autyp.
      APPEND s_rspar TO t_rspar_tab.
    *MRP controller
      s_rspar-selname = c_selnam5.
      s_rspar-kind    = c_kind.
      s_rspar-sign    = c_sign.
      s_rspar-option  = c_option.
      s_rspar-low     = im_ord_header-dispo.
      APPEND s_rspar TO t_rspar_tab.
    *Logical System
      SELECT  SINGLE rcvprn INTO v_opt_sys FROM edp13 "#EC *
       WHERE  rcvprt = c_rcvtype AND mestyp = c_messageid.
      s_rspar-selname = c_selnam6.
      s_rspar-kind    = c_kindp.
      s_rspar-low     = v_opt_sys.
      APPEND s_rspar TO t_rspar_tab.
    *Message Type
      s_rspar-selname = c_selnam7.
      s_rspar-kind    = c_kindp.
      s_rspar-low     = c_mesageid.
      APPEND s_rspar TO t_rspar_tab.
    *This statement will submit the programme RCCLORD using the table RSPARMS
    *which holds the fields to be filled in the selection screen for RCCLORD and return
      SUBMIT rcclord USING SELECTION-SCREEN 1000
                     WITH SELECTION-TABLE t_rspar_tab
                     AND RETURN.
    Cheers
    Prasad

  • IDOC Exit for Basic Type  PORDCR101

    I had extended the idoc type PORDCR101( Create Purchase Order ) and added the new segment under E1BPMEPOITEM .
    Now i want to find the exit which will help me in populating the added segment fields when the IDOC is posted .
    Any sort of help is appreciated .
    Regards,
    Praveen.

    Hello,
    The message PORDCR will use FM IDOC_INPUT_PORDCR and further processing is done using a BAPI: BAPI_PO_CREATE.
    Enhancement SAPLMEWP deals with the Exits related to the BAPI.
    Hope the above point helps you.
    Best Regards, Murugesh AS

  • Begin date in idoc segment E1BEN07 basic type BENEFIT3 health plan IDOC

    I run tcode HRBEN0052, Idoc Data Transfer, for my health plans.  If my new health plan record (IT0167) does not have a change in the General plan data (plan type, benefit plan, health plan option, dependent coverage) the begin date value on segment E1BEN07 is not the begin date for the current IT0167 record but of the previous record where the general plan data is the same.  This causes a problem because the additional provider field (PROVI) value in the idoc is from the previous IT0167 record and not the current IT0167 record. 
    Does anyone know why the current IT0167 begin date value is not included in the idoc when there are past IT0167 with the same general plan data?

    Per SAP
    +The current functionality is to combine multiple continuous records if
    there is no difference in the records except the dates. If you want the
    functionality to be different, you can try the following.
    Inside the function module HR_BEN_IDOC_SEND, there is a call to
    subroutine "fill_idoc_for_period"
    Kindly change the call inside the subroutine "fill_idoc_for_period"
    From
    1. Read Plan Data
    IF idoc_categ-healt = true.
    PERFORM read_infty_health TABLES it0167
    error_tab
    USING subscriber
    begda
    endda
    true
    reaction
    CHANGING subrc.
    To
    1. Read Plan Data
    IF idoc_categ-healt = true.
    PERFORM read_infty_health TABLES it0167
    error_tab
    USING subscriber
    begda
    endda
    false
    reaction
    CHANGING subrc.
    Please note however that this is a change in the standard and thus will
    be considered consulting if an error occurs, which is not supported
    by our services.+

  • Duplicate IDOC created for basic type PEXR2002

    Hi,
    We are using PEXR2002 idoc for some document postings in FI. For a segment EIEDP02, when trying to write a BELNR field value which exceeds its size of CHAR 35. Its creating a duplicate segment with same key value. Because of this, the idoc not getting created and ends up in error.
    Could you please anyone help me in this regard?
    Thanks and Regards,
    Vimala P

    Hi,
    In our process, the EIEDP02-BELNR value is actually filled with document text field value which is of length more than 35. What is happening right now is, if the length of document text having more than 35 characters and then with first 35 character of BELNR value one segment is created. And it again create one more segment EIEDP02 with BELNR value having the rest of the fields value(>35 characters). Thus creates duplicate segments which results in IDOC creation failure
    Thanks and Regards,
    Vimala P

  • Fill IDOC segment, E1IDBW1. For PEXR2002 Basic Type

    Hello Team.
    We send the IDOC for the Basic Type PEXR2002, Message Type PAYEXT.
    This IDOC doesn't fill the Segment E1IDBW1 (IDoc header - special instructions (INP) )
    I'm review some notes(1164524) and said to fill this segment it's neccesarie config the IHC.
    But doesn't have this functionality.
    It's possible fill the segment E1IDBW1 in a user exit or any other enhacement at creation idoc moment?
    My idea is used the FM
      CALL FUNCTION 'GET_SEGMENT_POS_FOR_INSERT'
        EXPORTING
          I_BASIS_TYPE            = ch_edidc-idoctp
          I_EXT_TYPE              = ch_edidc-cimtyp
          I_SEGMENT_TYPE          = 'E1IDBW1'
        IMPORTING
          E_INDEX                 = li_tabix
        TABLES
          IT_EDIDD                = t_edidd
        EXCEPTIONS
          BASIS_TYPE_NOT_FOUND    = 1
          EXTENSION_NOT_FOUND     = 2
          EXTENSION_ERROR         = 3
          INVALID_IDOC_DEFINITION = 4
          IDOC_ERROR              = 5
          INVALID_SEGMENT_TYPE    = 6
          INVALID_START_INDEX     = 7
          NO_MORE_POSITION        = 8
          TOO_MANY_SEGMENTS       = 9
          OTHERS                  = 10.
    To Fill 2 constants in this segment.
    Do you have any other idea?
    Thanks
    Edited by: David Lezama Gonzalez on Sep 1, 2011 2:51 PM

    Hi,
    Basically the segment E1IDBW1 will always be filled via user exit.
    If you work with the IHC (In-House-Cash) application you have to fill
    the E1IDBW1 segment as described in note 626577.
    If you don't work in an IHC environment the following conditions must
    be fulfilled:
    1. The payment program has to fill certain fields (e. g. REGUH-DTAWS,
    REGUH-DTWS1 - REGUH-DTWS4).
    2. If this is fulfilled the payment data (REGUH, REGUP tables) will
    be filled. The instruction keys will be moved to IDOC segment
    E1IDKU3.
    3. In user exit EXIT_SAPLIEDP_002 you can take over the instruction
    keys from segment E1IDKU3 into E1IDBW1.
    You may also read note 496663, this note explains about user exit
    EXIT_SAPLIEDP_002 to populate this field in the idoc.
    Also, you can check the note:
    580321 - RFFOEDI1: BTE process 00002441 (Change IDoc)
    REgards,
    Cristiano

  • Error in idoc of basic type artmas05 - status 51 with Message no. MG537

    Hi all,
         I tried to upload the material master table through idoc creation of basic type artmas05. But when i'm trying to do that i'm getting status 51 with Message no. MG537. then I analysed the application log which displays the following
    *The field MARA-MEINS/BAPIE1MARART-BASE_UOM(_ISO) is defined as a required
    field; it does not contain an entry
    *The field MARA-TAKLV/BAPIE1MARART-TAX_CLASS is defined as a required field; it does not contain an entry        
    *The field MARA-TRAGR/BAPIE1MARART-TRANS_GRP is defined as a required field; it does not contain an entry
    *You have not fully maintained the tax classifications
    *The field MAW1-WLADG/BAPIE1MAW1RT-LOADINGGRP is defined as a required field; it does not contain an entry
    But i hv given values for all the above fields in their respective segments.So can any1 suggest me how to proceed further.
    It would be helpful if someone could tel me the required fields in idoc to upload material master table through idoc.
    Thanks in advance,
    Revathi.

    Hi,
    Anybody please tell me the reason for the following error, despite giving all the field values mentioned there. The same error occurs even if I run the BAPI (which the ARTMAS iDoc uses) directly by passing values.
    The field MARA-MEINS/BAPIE1MARART-BASE_UOM(_ISO) is defined as a required field; it does not contain an entry
    The field MARA-TAKLV/BAPIE1MARART-TAX_CLASS is defined as a required field; it does not contain an entry
    The field MARA-TRAGR/BAPIE1MARART-TRANS_GRP is defined as a required field; it does not contain an entry
    The field MAW1-WLADG/BAPIE1MAW1RT-LOADINGGRP is defined as a required field; it does not contain an entry
    Regards,
    Gowri.S

  • IDoc processing for same message type but diff extensions

    Hi
    I want to send idoc when a material is changed. Everything is in place and have also done a test scenario. In partner profile i had the message type linked to basic type and tested which is fine. Now i wanted to have one more idoc created for another extension having the same basic type and linked to the same message type. Have maintained the same in WE20 but when i executed BD10 i could only see one idoc been generated but i need to see two idoc (one for basic type and another for the extended) not sure where i'm missing. any pointers on it pls?

    Hi ,
    if you want to trigger the idoc  two times for basic type& Extension..
    1 ) you need to maintain  WE20 Partner Profiles (This is good already you did)
              --> But the Output type for Bsic type & extension type is same so output type is triggered Once so idoc is created One.
    2) try to create another Output type in T-code NACE for extension then two Idocs is created one for Basic and another for Extension.
    Regards,
    Prabhudas

  • Release? while assigning Z Message Type to a Standard  SAP IDOC Basic type

    Hi Experts,
    Am trying to assign a custom Message Type to a Standard SAP IDOC Basic type in WE82 transaction, but am not sure How to find the Release(last column of WE82 Tx)? Pls. let me know.
    Thank you

    Hello,
    In case of IDOC, Go to Transaction WE30, type your IDOC name & select basic type & extension.
    After that select Go to -> Header data (Shift+F7), you will Idoc header info. In the same pop-up you will find IDOC release for which version.
    Regards,
    Sameer

  • Function module creation for IDOC processing...

    hi Experts,
                 i want to create a function module for idoc processing..
    message type: zashpmnt
    idoc type : shpmnt05
    plz tell me which standard FM is used... and tell me what changes i want to do in it....
    Tnx in Advance..

    Hello,
             If you are trying to process an Outbound IDoc for the SHIPMNT05 IDoc Type with an Extension, you can use the IDOC_OUTPUT_SHPMNT Function Module which is assigned to SHPM Process Code.
           In Addition, since you have an IDoc Extension, you are required to populate the Custom Segment / Fields. For this, there is a Customer Function / Exit called EXIT_SAPLV56K_002 which you can use it for adding your Custom Segments to the IDoc ZSHPMNT05.
           If you are writing code in this exit, make sure to create a Project in CMOD.
           Also, ensure that you've made the assignment in WE82 with the Message Type , IDoc Type & the Extension.
           For Inbound, if you would like to Create a Custom Function Module, you can follow the Naming Convention Z_IDOC_INPUT_SHPMNT for which you are required follow the below Steps.
    1. Register the FM as Inbound FM in BD51 T-Code.
    2. Assign the FM to IDoc Type & Extension in WE57.
    3. You'll need to Create a Custom Process Code in WE42 in which you are required to make add your FM.
    4. Maintain Partner Profiles in WE20.
    5. Have the Process Code Migrated to the Testing Environment as creation of Custom Process Code is a Customizing Activity and it requires a Customizing Request to be created / Migrated.
    6. Define the Parameters as defined in the Standard Inbound Function Modules such as IDOC_INPUT_ORDERS , IDOC_INPUT_DELVRY etc.
    Thanks and Regards,
    Venkat Phani Prasad K

  • Basic type not found

    Hi Experts,
                      I used name for basictype 'ZMDOSTATUS' In R/3 system , now after upgrade to ECC6,while runing report to send Idoc message displayed "Basic type 'ZMDOSTAT' NOT FOUND" Last two charcher is beein truncated. How we can solve this problem without changing the name of basic type. please suggest some approch. Waiting for  your reply.
    Thanks :-
    Ravinder Singh

    hi ravendra,
    can you let us know what the  exact problem recently i have worked on upgradation project but i have not faced the problem what your telling . basic type 'ZMDOSTATUS' are you able to display in we31 code. if you able to do what exactly the problem .
    when the upgradation every basic type will be copied to new server .
    let us know the exact problem.
    ~linganna

  • Processing IDOC Basic type ORDERS05 in CRM...

    I'm processing (via WE19) an IDOC (Basic type ORDERS05) to create a Sales order withing CRM. I'm getting there in that a sales order is being raised, although there is no item level details so far. I know that config of the system plays a big hand in what fields within the IDOC need to be populated but has anyone actually posted/raised a Sales order in this way and can you tell me what fields within the IDOC are mandatory. Or perhaps suggest how I might derive this.
    Ideally I wanted to extract a sales order and produce an outbound IDOC and then compare the contents, but I can't (don't know how) do this.
    Any help would be greatly appreciated.

    Hi Garry,
    Here is an order from WE19, which works…
            E1EDK01     
         ACTION:  [QUAL] - suggesting 000 - no changes
            E1EDK14
         QUALF:  [QUAL]  - suggesting 008 - sales org
         ORGID: [ORGANIZATION] - anything you have defined /your side/
            E1EDK03                    
         IDDAT: [QUAL]  - suggesting 002 - delivery date
         DATUM: [DATE] - any date
            E1EDKA1                    
         PARVW:  [QUAL]  - may use AG as 'sold to' here
         PARTN: [PARTNER#] - any partner defined
            E1EDKA1      - not necessary              
         PARVW: [QUAL] - may have different 'sold to' and 'ship to' or 'bill to'
         PARTN: [PARTNER#]
            E1EDP01                   
         POSEX  [ITEM#] - for example '1'
                MENEE [Unit of measure] - PCE for peaces
                     E1EDP02                   
                   QUALF:  [QUAL]  - suggesting 001 - customer order
                   BELNR: [document number] - document #. any
                     E1EDP20                         
                    WMENG: [Scheduled quantity] - any - quantity
                   EDATU: [Date] - any - when to deliver
                     E1EDP19  
                   QUALF:  [QUAL]  - for example 001 - used by customer, 004 - used by manufactured…
                   IDTNR: [material ID] - material ID
            E1EDS01                       
         SUMME: [Total value of sum segment] - check for the number of lines in PO1.
    Hope this helps and do not forget to allot points.
    Regards,
    Martin

  • Functiopn module associated with basic type of idoc without process code

    can i know the function module assciated with basic type of idoc if i do not know the process code for the same

    hi saurabh,
    download.oracle.com/docs/cd/B10464_05/integrate.904/b10299/intro.htm
        CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
          EXPORTING
            master_idoc_control                  = wa_edidc
          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.
      ENDIF.
    ENDIF.
    ENDMETHOD.
    i think this will help u
    regards,
    sindhu.

Maybe you are looking for