Idoc with message type

i need an example how to use the message type in IDOC

Hi Manohar,
This is custom IDoc prgm.Award points if useful
IDocs Standalone program
This Prgm will upload data in flat file into internal table and sends that data to inbound system
REPORT  ZMMMC9403_UPLOAD_MATERIAL_IDOC.
*1.Create parameters/select-options for input data. i.e., empno, message type, logical system.
parameters :    p_mestyp like edmsg-msgtyp default 'zmsgkk',
                      p_logsys like tbdlst-logsys obligatory.
*2.Create Data objects for control record, data record and database table.
data : c_segment like edidd-segnam value 'ZKSEGTYPE',        "Data record (IDoc)-Segment type
         c_idoctp like edidc-idoctp value 'ZKIDOC'.        "Control record (IDoc)-Basic type
data : begin of itab occurs 0,
          zsno   like zkiran-zsno,
          zsname like zkiran-zsname,
       end of itab.
data : w_itab like itab.
data : s_segment like zksegtype.
data : i_edidd like edidd occurs 0 with header line.
data : i_control_record like edidc.
data : i_comm_idoc like edidc occurs 0 with header line.
*3.     Select the data from flatfile/corresponding tables into internal table for a defined condition.
*select single zsno zsname from zemp into corresponding fields of it_zemp where empno = p_empno.
call function 'GUI_UPLOAD'               "since the data is coming from flatfile, GUI_UPLOAD is used
  exporting
    filename                      = 'C:\DATA.TXT'
    FILETYPE                      = 'ASC'
    HAS_FIELD_SEPARATOR           = 'X'
  tables
    data_tab                      = itab.
*4.     create control record into internal table.
i_control_record-mestyp = p_mestyp.         "Message Type
i_control_record-idoctp = c_idoctp.         "Basic type
i_control_record-rcvprt = 'LS'.             "Partner Type of Receiver
i_control_record-rcvprn = p_logsys.         "Partner Number of Recipient
*5.     create data record into internal table.
*i_edidd-segnam =   c_segment.
loop at itab into w_itab.
s_segment-zsno =    w_itab-zsno.                     "Application Data
s_segment-zsname =    w_itab-zsname.
i_edidd-sdata = s_segment.
i_edidd-segnam = c_segment.
append i_edidd.
endloop.
*6.     Process ALE Service Layer using the function module  MASTER_IDOC_DISTRIBUTE.  It returns the corresponding IDoc No.s.
call function 'MASTER_IDOC_DISTRIBUTE'
  exporting
    master_idoc_control            = i_control_record
  tables
    communication_idoc_control     = i_comm_idoc
    master_idoc_data               = i_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.
*7.     Display Communication IDocs.
loop at i_comm_idoc.
  write : / 'Communication IDoc No. is : ', i_comm_idoc-docnum.
endloop.
*8.     Commit Work.
commit work.

Similar Messages

  • Creation of IDOC with message type INVOIC01

    Hi All,
    I am trying to create a new IDOC with message type INVOIC01.
    When I see transaction WE81, I observe that the required message type INVOIC is available. Also in WE82 the basic types INVOIC01, INVOIC02 and INV_ID01 are attached to the message type INVOIC.
    However, while trying to create an IDOC in WE19 using a message type, I get options to create against INVOIC02 or INV_ID01. The basic type INVOIC01 is not getting populated because of which all the IDOC that I create are of basic type INVOIC02.
    The client wants me to create IDOCs with basic type INVOIC01.
    Can anyone please help?
    Thanks in advance.
    regards
    Nagarajan

    Hi Nagaraj!
    I've looked at the documentation and did not find information, which would help me. Should I use in my case z-segment to put extra lines or there is some qualifier in segment E1EDP02 (Document Item Reference Data), which triggers to another referencing (not PO or delivery note)?
    Thank You,
    Natalija

  • RFC error "No authorization to send IDOCs with message type ..."

    Hi all,
    I have now tried just about everything I could think of, applied all the notes mentioned on this forum but still no luck. Can anyone please help ...
    I have got a file to idoc scenario, the status in the sxmb_moni is successful, but the outbound processing logs an error. When I go to transaction SM58 I get an error for the user XIAFUSER with the message "No authorization to send IDOCs with message type WPUUMS".
    I have tried giving this user SA_ALL access and still got the same error thus concluding that this is not an authorisation error.
    Any suggestions?
    Regards,
    Liesel

    Hi Liesel,
    The RFC destination that you have put in IDoc communication channel must be present in your SAP XI system, transaction SM59 also.
    Please check if the user id/Password that you have given has all the authorization.
    Also check the User ID and passwrord in SM59 in R3 and see if a Remote Login is possible.
    There is also some configuration by which the clients are allowed / blocked from receiving Idocs from XI. Basis guys can do it for you. Please approach your basis consultant. Hopefully that helps..
    Regards,
    Abhy Thomas

  • Error : No authorization to send IDocs with message type MATMAS

    Hi All,
    My scenario is FILE-XI-IDOC.
    I am getting chequered flag in SXMB_MONI,but in that under outbound status I am getting red flag.
    When I check in SM58 I am getting message as "No authorization to send IDocs with message type MATMAS".
    Do I need to give any authorizations on XI side or on R/3 side?
    If so, what is the authorization required?
    I could not find the note :837595.

    <i>You use the IDoc Adapter in the Exchange Infrastructure and you try to use the IDocs to receive or send data. For these IDocs, an attempt is made to load the IDoc metadata from an R/3 reference system with an SAP NetWeaver Release lower than 6.20.
    This occurs either at runtime, whereby the relevant messages run into 'System error' status, or when you use transaction IDX2 during manual loading of the metadata. In this case, the reference ystem is called by RFC and the logon user of the RFC destination does not have the necessary authorizations for determining the metadata.
    Solution
    In transaction PFCG, extend the role of the logon user by adding the following authorizations:
    Authorization object S_RFC
          Field name RFC_TYPE value FUGR
          Field name RFC_NAME value EDIMEXT, SDTX
          Field name ACTVT    value 16
    Authorization object S_IDOCDEFT
          Field name ACTVT  value 03
          Field name EDI_CIM value ' '
          Field name EDI_DOC value TXTRAW01
          Field name EDI_TCD value WE30
    Authorization object S_CTS_ADMI
          Field name CTS_ADMFCT  value TABL
    Authorization object S_TABU_DIS
          Field name ACTVT      value 03
          Field name DICBERCLS  value</i>
    from the note mentioned above.
    Regards
    Bhavesh

  • Workflow Ends in Error " No auth to send IDocs with message type ORDRSP"

    Hello All,
    I have created an RFC user with limited Authoprizations including WE* tciodes and a few ME* transactons for an ALE Set up. I want to make sure i would not be giving more authorizations (extensive) to this RFC user and assign Just required authorizations. So i started testing testing and the inbound IDOC ended in error with a message " No auth to send IDocs with message type ORDRSP" Message no. SR053. Is there any way to find out what is the missing authorization object for the User. Any inputs would be really apprecaited.
    Br,
    Sri

    Hi !
    Becaus alle this happens in beckgound, things are a bit difficult but solvable....
    What you should do is a "Authority trace" ... as follows....:
      - Go to the ST01
      - Mark "Authorisation Check"
      - Swich the trace on for your Workflow user
      - Execute the Workflow until the error uccurs
      - Go back to the ST01
      - Press the "Analyze" button and see what error occurs
    Dont forget to swicht the trace off... otherwise the tracefiles become realle BIG !
    Regards
    rainer
    Some Reward poins would be nice if that helped....

  • Issue: "No Authorization to send Idocs with message type Orders" - IDX5

    Hi All,
       I am working on a File to IDoc(Orders.Orders05) scenario. The sender is PI Server and the receiver is the SAP ISR system. A technical system has been created in PI SLD for the ISR system and a Business system is added to that. The logical system created in ISR system using Tcode BD54 is added to the business system in PI. A new RFC destination is created in PI system to connect to the ISR system.
      On the ISR system Partner profile is created using TCode we20 with the same logical system name already created using Tcode BD54.
    When sxi_monitor is executed on the PI system, It shows checked flag on the Inbound side and Red flag on the Outbound side. And when idx5 is executed, it shows the new Idoc number and when it is double clicked, it shows the Status Text as
    "No Authorization to send IDocs with message type Orders".
    All authorizations have been provided on the Sender side.
    Please let me know if any authorization need to be provided on the ISR system or Is this an error on any settings.
    Thanks in Advance.
    Stalin S.

    Hi,
    Check this Thread which deals with the Authorization Issue
    RFC Adapter
    And also check this how to check whether u have sufficient authorization to send the Idocs or not
    To test the Authorization check
    Double click the RFC Destination that u have created in XI towards R/3 in SM59
    Select UtilitiesTestAuthorization test
    By this you can come to know whether your user is having the propper authorization or not
    REgards
    Seshagiri

  • No authorization to send IDocs with message type R

    I'm in the process of installing some business content for a 3.5 prototype.  When trying to load some master data I get the following error in the transactional RFC in the source system.
    "No authorization to send IDocs with message type R"
    Any clues to what may be causing this?
    Any help appreciated.
    thanks
    Mike

    Hi Michael,
    the suggestion for SAP_ALL was just for testing purposes in order to see whether it works then. If security is an issue you should reduce the authorization to the ones really needed (see note).
    Another security option is to make the background user a system user and not a dialog user.
    Regards, Klaus

  • Wrong Partner Type in IDoc with message type REMADV

    Dear all,
       We have created 2 IDocs, one for outbound (first in one company code) and one for inbound (receiving company code) with transaction F110 (message type REMADV, Idoc basic type PEXR2001). However, for the first outbound IDoc we have created, we have the wrong Partner type (we would like it to get type KU (customer)) LS (Logic system).
    Does anyone know how to change the partner type from the Idoc generationg?
    Many thanks,
    Ronny

    Hi,
    Welcome to SDN.
    Please delete the exisiting outbound partner profile (WE20) for message type REMADV which under partner type LS (Logical System) and setup new outbound partner profile for partner type KU (Customer).
    Regards,
    Ferry Lianto

  • Error monitoring through workflow for idoc with message type ORDRSP

    Hi All,
    Through WE19 I am trying to post a failed idoc ie idoc in 51 status for message type ORDRSP to check whether the event IDOCORDRSP-INPUTERROROCCURED event is triggering or not. Though the idoc is going into 51 status and partner profile is maintained I cannot find this event in SWEL. I checked in fm IDOC_INPUT_ORDRSP fm and found that workflow_result is 99999.
    Can anybody tell me why the event is not getting triggered for the message type ORDRSP or where do I debug to find out what is going wrong. IDOC_INPUT_ORDRSP  fm is getting called from BUS2012 'S method confirmfromORDRSP which is very strange.So I am not getting where do I debug.
    Regards
    Suchandra

    Hi All,
    Solved it by my self.. To trigger the event we need to populate the EDIDC control record in WE19 and press standard inbound button 'not test by inbound fm) and then the inputerroroccured event will trigger...
    Regards
    Suchandra

  • Outbound delivery with Inbound IDOC DELVRY06 with Message type SHPCON

    Hi Friends
    I am trying to pack outbound delivery with Inbound IDOC DELVRY06 with Message type SHPCON.
    But IDOC has error Specification of destination HU missing.
    Could you please help us to resolve the issue to Pack the outbound delivery with the  IDOC.
    Thanks
    SR

    HI Ian Kehoe
    Sorry for delay in reply
    Thanks you very much
    I solved that problem .
    Could you please advice  test data for IDOC  DELVRY06 packing hierarchy (multi level packing) to pack SAP outbound delivery.
    Thanks
    Ravi

  • How do I execute IDOC for message type LOIPRO

    How is it possible to execute IDOC using message type LOIPRO which I have configured with change pointers?   Change pointers are using object ORDER.
    I am looking to only generate IDOC for production order changes / updates that meets the criteria set by the change pointers.  If something in the order changes, but that field is not being looked at by change pointers, I don't need IDOC to pick up that order.
    I don't want to have to run RCCLTRAN or RCCLORD on a scheduled job. Only need to have activity if change pointers are activated. Am I going down the wrong road using LOIPRO ?

    Hi Bob,
    Could you please guide me through the process of creating/triggering a change pointer based LOIPRO? Your help much appreciated.
    Tabraiz

  • Problem In IDOCS of Message Type ORDERS05

    I am Trying to place Sales Order as soon as i recieve an idoc of Message Type <b>ORDERS05</b>. But It gives following error when it recieves the idoc of a Purchase Order.
    <b>VKORG, VTWEG, SPART cannot be determined for customer 0000003000, vend 0000005595.</b>
    I am not Getting This Problem.
    Please Help.

    Hi,
      Please see the link below for some information.
    ABAP Development
    If you find the info useful please reward with points.
    regards
    Aveek

  • Error while trying to post inbound idoc of message type COND_A

    Hi,
    I am getting error while trying to post inbound idoc of message type COND_A.
    If I left Usage & Condition field of segment E1KOMG then 'Table not available' idoc message is coming
    and if providing value in above fields then dump is coming.
    How to solve ?
    Plz do reply
    Thanks
    Mohit

    I do not see any reason why you would need to use COND_A04  if COND_A01 is working.
    What if you could get COND_A04 to post and you would face the same result as in COND_A01?
    If SAP does not check wrong values, then you have to do it yourself, or you report an incident at SAP (after you have searched for OSS notes that may have fixed this error already)
    For example OSS Note 1169998 - IDoc: KONP-LIFNR values not checked
    fixed a situation where the vendor number was not validated.

  • Creation of Custom IDoc with Message control for sales Order

    Hi all,
    I am trying to create custom Outbound IDoc with message control.
    I wrote the code in a function module and i want to register that function module. (as in inbound registration of function module as in BD51).I am not knowing if that registration is necessary for outbound Idoc, if so in which transacition?
    Please list me the steps to create a custom IDoc for Message control.
    Thanks in advance,
    Regards,
    John.

    Hi,
    You need to use FM : MASTER_IDOC_DISTRIBUTE to create outbound idoc.fill the data in the tables EDIDC,EDIDD and generate the IDOC.
    check this link:
    Re: Master_IDoc_Distribute
    and use transaction : WEDI for IDOC configurations.
    here you will have all the transactions(step by step) to set the outbound IDOC configurations.
    Regards
    Appana

  • Diff bet IDOC and Message Types.

    What are the difference between IDOC and Message types.
    Diff between MATMAS01 ,MATMAS02 and MATMAS03

    IDOCs:
    - IDOC is an Intermediate Document. It is simply a data container used to exchange information between any two processes  that can understand the syntax and semantics of the data.
    An IDOC is created as a result of executing an Outbound ALE or EDI process.
    In an inbound ALE or EDI process, an IDOC serves as input to create an application document. When an IDOC is created in the system , an unique number(16 Digits) is assigned to it.IDOC will wait until the Remote System is Active.
    Basic Idoc Type: Basic Idoc type defines the structure and format of the business document
    that is to be exchanged between  two systems. Basic Idoc type can refer to an SAP provided
    basic IDOC type or a customer developed basic IDOC type.
    - A basic IDOC type has the following characteristics:
    Name : A basic Idoc type can be assigned upto a thirty character name.
    List of permitted segments: The segments make up the IDOC structure.
    Hierarchy of segments : The hierarchy of segments specifies the physical sequence and any parent - child relationship in the segments.
    Mandatory Vs Optional Segments : When used in the IDOC type, each segment has an attribute that defines whether the segment  is option or mandatory. Minimum/Maximum range for each segment: It defines the maximum and minimum number of timesa data record corresponding to a segment cn exist in an IDOC.
    -Segments : A segment defines the format and structure of a data record. Segments are reusable componets. A segment consists of various fields that represent data in data record.
    IDOC Record Types:
    1. Control Record : The control record contains all of the control information about an IDOC, this information basically includes the IDOC number, sender and receiver information, and information such as the message type it represents and the IDOC type. 
    - there is only one control record per IDOC.
    - The stucture of the control record is the same for all the IDOCs and is defined by SAP.
    - The structure of the control record is defined by the data dictionary structure EDI_DC40. The control record is stored in the EDIDC table.
    2. Data Record : Data records contain the application data. A data record has two sections
    Administrative Section and a Data section.
    - The Administrative section cotain the segment name, client, IDOC number, segment number, hierarchy level information.
    - The Data section of a data record is a stram of 1000 bytes where the actual data resides.
    - The data record is defined by the data dictionary structure EDI_DD40.
    - Data records for IDOCs stored in the EDID4 table.
    3. Status Record : Status records are attaced to an IDOC throughout the process as the IDOC achieves different milestones or encounters an error. At every milestone a statu code, date and time are assigned.
    - Status codes 01 to 49 are reserved for OUtbound process, 50 and above are reserved for inbound processes.
    <u><b>IDOC TYPE IS AN INSTANCE OF IDOC</b></u>
    Message Type: Identifies what type of information transformed between logical systems or partners.Message type is not   a   local object type , it is transportable.
    For different applicatons we have different MESSAGETYPE.
    example:
    <u>APPLICATION</u>                <u>  MESSAGETYPE</u>
    MATERIAL MASTER                       MATMAS
    VENDOR MASTER                          CREMAS
    CUSTOMER MASTER                      DEBMAS
    MATMAS01, MATMAS02, MATMAS03, MATMAS04, MATMAS05 are all MESSAGETYPES  ... FOR NEW VERSIONS LIKE SAP 4.7EE, SAP ECC5.0....we have to use MATMAS05 message type. for older versions like SAP R/3 we have to use MATMAS01.
    REWARD ME IF THIS IS HELPFUL

Maybe you are looking for

  • My imac has problem with HP Photosmart 210a.

    Hello I have an I MAc with lion. And i Buyed an HP Photosmart 210a but the software on the CD id not completly with lion only with snow leopard. Since this time i put the CD in the MAc my mac has Problems When i Startet Itunes he is running slowly an

  • Getting FRM-40105 in the sales order form when applying sales credits

    Hi, i'm trying to apply sales credits at the line level. 1.I get FRM-40105 unable to resolve reference to item SALES_CREDITS while trying to save the data in the sales credits window of the sales order form-OEXOEORD(this happens only if i say save an

  • Front Row versus iTunes

    Upgraded my G5 dual 1.8 tower to Leopard. Couldn't wait to use Front Row on the 30" Apple Cinema Display. Heart-broken to discover that all my movies and tv shows from my iTunes library are practically unwatchable when played through Front Row. The v

  • HT1688 download a movie of a concert film    how do i get it to my phone to play?

    download a movie of a concert film    how do i get it to my phone to play?

  • Mail 3.6 Crashing Constantly

    Mail.app is behaving horribly. Sometimes it will work like it should, other days it crashes repeatedly. Open it, fails immediately, re-open, fail, repeat...repeat...repeat. I have run disk utiility and cleaned things up. Hard drive is not even half f