IDoc outbound

REPORT ZPGI_IDOC_CREATE MESSAGE-ID ZERR.
SELECTION-SCREEN BEGIN OF BLOCK BL1  WITH FRAME TITLE TEXT-BL1
NO INTERVALS.
PARAMETERS: SLSORDER LIKE LIKP-VBELN.
PARAMETERS: P_MESTYP LIKE EDMSG-MSGTYP OBLIGATORY.
PARAMETERS: P_LOGSYS   LIKE TBDLST-LOGSYS.
PERFORM ARE_YOU_SURE.
SELECTION-SCREEN END OF BLOCK BL1.
*AT SELECTION-SCREEN.
*SET PF-STATUS'JOY'.
*DECLARE CONSTANTS
DATA:
*variables
REACTION TYPE C,
*segment names
C_SALESORDERNUMBER   LIKE EDIDD-SEGNAM VALUE 'Z1VBELN',
C_LFART              LIKE EDIDD-SEGNAM VALUE 'Z1LFART',
C_WADAT_IST          LIKE EDIDD-SEGNAM VALUE 'Z1WADAT_IST',
C_VSTEL              LIKE EDIDD-SEGNAM VALUE 'Z1VSTEL',
C_LSTEL              LIKE EDIDD-SEGNAM VALUE 'Z1LSTEL',
C_ROUTE              LIKE EDIDD-SEGNAM VALUE 'Z1ROUTE',
C_KODAT              LIKE EDIDD-SEGNAM VALUE 'Z1KODAT',
C_KUNNR              LIKE EDIDD-SEGNAM VALUE 'Z1KUNNR',
C_STDAT              LIKE EDIDD-SEGNAM VALUE 'Z1STDAT',
C_WBSTK              LIKE EDIDD-SEGNAM VALUE 'Z1WBSTK',
C_PGI_IDOC_TYPE LIKE EDIDC-IDOCTP VALUE 'ZIPGI_IDOC_TYPE'.
*data declaration
*idoc control record
data : control_record_out like edidc.
*other data declaration
DATA: SALES_ORDER_NUM             LIKE Z1VBELN.
DATA: DEL_TYPE                    LIKE Z1LFART.
DATA: ACTUAL_GOODS_MOVEMENT_DATE  LIKE Z1WADAT_IST.
DATA: SHIPPING_POINT              LIKE Z1VSTEL.
DATA: LOADING_POINT               LIKE Z1LSTEL.
DATA: ROUTE_PGI                   LIKE Z1ROUTE.
DATA: PICK_DATA                   LIKE Z1KODAT.
DATA: CUST_NO                     LIKE Z1KUNNR.
DATA: LOCAL_DATE                  LIKE Z1STDAT.
DATA: TOTAL_GOOD_MOV              LIKE Z1WBSTK.
*Database tables
TABLES:LIKP,VBUK,VBAP.
DATA:
INT_EDIDD LIKE EDIDD OCCURS 0 WITH HEADER LINE,
IT_COMM_IDOCS LIKE EDIDC OCCURS 0 WITH HEADER LINE,
IT_LIKP LIKE LIKP OCCURS 0 WITH HEADER LINE,
IT_VBUK LIKE VBUK OCCURS 0 WITH HEADER LINE,
IT_VBAP LIKE VBAP OCCURS 0 WITH HEADER LINE.
PROGRAM LOGIC
*SELECT APPLICATION DATA
  SELECT * FROM LIKP WHERE VBELN = SLSORDER.
  IF SY-SUBRC <> 0.
   MESSAGE E001 WITH SLSORDER.
   EXIT.
  ENDIF.
ENDSELECT.
  SELECT * FROM VBUK  WHERE  VBELN = SLSORDER.
  IF SY-SUBRC <> 0.
   MESSAGE E001 WITH SLSORDER.
   EXIT.
  ENDIF.
  ENDSELECT.
  SELECT * FROM VBAP  WHERE  VBELN = SLSORDER.
  IF SY-SUBRC <> 0.
   MESSAGE E001 WITH SLSORDER.
   EXIT.
  ENDIF.
  ENDSELECT.
*Fill the control record Information.
control_record_out-MESTYP  = P_MESTYP.
control_record_out-IDOCTP  = c_pgi_idoc_type.
control_record_out-RCVPRT  = 'LS'.
control_record_out-RCVPRN  = P_LOGSYS.
FILL THE DATA RECORD
SALES_ORDER_NUM-VBELN                 = LIKP-VBELN.
INT_EDIDD-SEGNAM                      = C_SALESORDERNUMBER.
INT_EDIDD-SDATA                       = SALES_ORDER_NUM.
APPEND INT_EDIDD.
DEL_TYPE-LFART                        = LIKP-LFART.
INT_EDIDD-SEGNAM                      = C_LFART.
INT_EDIDD-SDATA                       = DEL_TYPE.
APPEND INT_EDIDD.
ACTUAL_GOODS_MOVEMENT_DATE-WADAT_IST  = LIKP-WADAT_IST.
INT_EDIDD-SEGNAM                      = C_WADAT_IST.
INT_EDIDD-SDATA                       = ACTUAL_GOODS_MOVEMENT_DATE.
APPEND INT_EDIDD.
SHIPPING_POINT-VSTEL                  = LIKP-VSTEL.
INT_EDIDD-SEGNAM                      = C_VSTEL.
INT_EDIDD-SDATA                       = SHIPPING_POINT.
APPEND INT_EDIDD.
LOADING_POINT-LSTEL                   = LIKP-LSTEL.
INT_EDIDD-SEGNAM                      = C_LSTEL.
INT_EDIDD-SDATA                       = LOADING_POINT.
APPEND INT_EDIDD.
ROUTE_PGI-ROUTE                       = LIKP-ROUTE.
INT_EDIDD-SEGNAM                      = C_ROUTE.
INT_EDIDD-SDATA                       = ROUTE_PGI-ROUTE.
APPEND INT_EDIDD.
PICK_DATA-KODAT                       = LIKP-KODAT.
INT_EDIDD-SEGNAM                      = C_KODAT.
INT_EDIDD-SDATA                       = PICK_DATA-KODAT.
APPEND INT_EDIDD.
CUST_NO-KUNNR                         = LIKP-KUNNR.
INT_EDIDD-SEGNAM                      = C_KUNNR.
INT_EDIDD-SDATA                       = CUST_NO-KUNNR .
APPEND INT_EDIDD.
local_date-stdat                      = VBAP-STDAT.
INT_EDIDD-SEGNAM                      = C_STDAT.
INT_EDIDD-SDATA                       = local_date-stdat.
APPEND INT_EDIDD.
TOTAL_GOOD_MOV-WBSTK                  = VBUK-WBSTK .
INT_EDIDD-SEGNAM                      = C_WBSTK.
INT_EDIDD-SDATA                       = TOTAL_GOOD_MOV-WBSTK.
APPEND INT_EDIDD.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
   EXPORTING
     MASTER_IDOC_CONTROL                  = CONTROL_RECORD_OUT
   OBJ_TYPE                             = ''
   CHNUM                                = ''
   TABLES
     COMMUNICATION_IDOC_CONTROL           = IT_COMM_IDOCS
     MASTER_IDOC_DATA                     = INT_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 E002 WITH SLSORDER.
ELSE.
  LOOP AT it_comm_idocs.
   WRITE: / 'IDOC GENERATED',IT_COMM_IDOCS-DOCNUM.
  ENDLOOP.
  COMMIT WORK.
ENDIF.
FORM ARE_YOU_SURE.
  CLEAR REACTION.
  CALL FUNCTION 'POPUP_TO_DECIDE_INFO'
       EXPORTING
            DEFAULTOPTION = 'N'
            TEXTLINE1     = TEXT-010
            TITEL         = TEXT-012
            START_COLUMN  = 25
            START_ROW     = 6
       IMPORTING
            ANSWER        = REACTION
       EXCEPTIONS
            OTHERS        = 1.
ENDFORM.
in the above program the IDOC IS GENERATED BUT..when I am viewing it in  WE02....its not showing sny fields in the segments or any values.......please tell me places where I will correct it.
                                                     thnks

Hi
Can you please check whether the segments under ''ZIPGI_IDOC_TYPE'' is released
Regards
MD

Similar Messages

  • IDoc outbound errors - mail send step in WF to send info-mail to enduser

    Hello specialists
    I searched quite a lot in the forums now. I found lot of info but nothing regarding my issue.
    I need to send an info-mail to the end user creating purchase orders. But only if the idoc (outbound ORDERS) could not be sent (failing for some reason, i.e. if rfc connection fails). This is what I've done to achieve this:
    - in WE40 I linked my WF to process code EDIO
    - the WF-BATCH user has an email address assigned to it (in SU01)
    - the mail sending step in my WF is configured like this:
    recipient type = G (organizational object)
    Expression = &_WORKITEM.CREATEDBYUSER.ID& (this contains the enduser id)
    subject = Test for &WORKITEM.CREATEDBYUSER.ID&
    When testing the mail can not be delivered (error SO23).
    When setting recipient type to U (E-Mail address) and giving a valid e-mail address, then it works fine (SCOT, etc. is configured and mailing to external systems works). But setting the e-mail address hard coded style in the mail send step is not an option here!
    It seems that the send mail step (SELFITEM.SENDTASKDESCRIPTION) always requires a valid e-mail address. Is it not able to handle SAP user id's ?
    Thanks in advance for some guideance on this one.
    Renaud
    Edited by: Renaud Desarzens on Feb 11, 2010 3:00 PM

    Hello and thanks for your help.
    I was able to solve it like this:
    - don't use mail send step
    - instead, add new activity with a new task (SELFITEM.SENDTASKDESCRIPTION)
    - in the bindings (workflow -> step) set:
         B --> &TYPEID&
         &_WORKITEM.CREATEDBYUSER.ID& --> &ADDRESSSTRINGS&
    Seems that the mail send step doesn't allow TYPEID to be "B" because each time I tried to tweak the generated bindings that way it messed up the recipient type and expression I set before.
    Regards
    Renaud

  • RFC For IDoc outbound processing

    I am creating an RFC for BDC for call transaction we19
    input as : idoc number
    and output:-.. iDoc Outbound processing done
    so:-
    I go to we19> give iDoc Number (say, some number for ALEREQ01), and execute> click on Outbound processing-->click enter -->enter
    in this way, I can process any iDoc from SAP system to outbound.
    I want  to create RFC for the same.
    Problem:-
    when i am executing that RFC, and when I check the iDoc status in we05, that iDoc shows status as Idoc ready to dispatch( its in yellow color).. Its not showing green color and not saying that IDoc passed OK
    when I try manually ,I see the status green..OK..successfully
    Any idea why I am getting this problem??
    Is there any problem in my BDC recording?..but when I run that recording for Process, i dont see any problem,it executes successfully.. but when I copy the Code from BDC and make a RFC using that code, its giving problem as mentioned.

    Hi Ankit,
    Theorotically it should work.... but I'll suggest not to use BDC here. What you can do is,
    1. You have Idoc number..Right?
    2. Read control record from EDIDC and data record from EDID4.
    3. Then call Master_idoc_distribute.
    4. This will again distribute the same IDoc with same control and data record as a new one. It will be same as WE19 , but without WE19.
    Please check and confirm.
    Regards,
    Audy.

  • IDOC Outbound processing using SAP BC

    Hello Experts,
    I am trying to develop a simple IDOC outbound processing scenario using SAP BC. In this an IDOC from SAP ECC server will be sent to an external webserver via SAP BC, for this i have done all the setup i.e Establishing connection between SAP BC & SAP ECC,  ALE settings, creating a new Routing rule, but when i try to run this scenario, i am getting the following error 'IDocMetaDataUnavailableException: (3) IDOC_ERROR_METADATA_UNAVAILABLE' , is there any way to import the IDOC metadata, just like how we do in SAP XI using IDX2. Please Help...
    Thanks & Regards,
    Amit Naik

    Hi Michal,
    Following is the error which i am getting :-
    2009-03-12 21:56:59 IST com.sap.conn.idoc.IDocMetaDataUnavailableException: (3) IDOC_ERROR_METADATA_UNAVAILABLE: The meta data for the IDoc type "" is unavailable.
         at com.sap.conn.idoc.rt.DefaultIDocDocument.<init>(DefaultIDocDocument.java:132)
         at com.sap.conn.idoc.jco.JCoIDocDocument.<init>(JCoIDocDocument.java:74)
         at com.sap.conn.idoc.jco.JCoIDocDocument.createIDocDocument(JCoIDocDocument.java:117)
         at com.sap.conn.idoc.jco.JCoIDocRuntime.createIDocDocumentList(JCoIDocRuntime.java:83)
         at com.sap.conn.idoc.jco.DefaultJCoIDocServerWorker$IDocDispatcher.handleRequest(DefaultJCoIDocServerWorker.java:88)
         at com.sap.conn.jco.rt.DefaultServerWorker.dispatchRequest(DefaultServerWorker.java:141)
         at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.dispatchRequest(MiddlewareJavaRfc.java:2621)
         at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.executePlayback(MiddlewareJavaRfc.java:2298)
         at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.playbackTRfc(MiddlewareJavaRfc.java:2130)
         at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.handletRfcRequest(MiddlewareJavaRfc.java:2012)
         at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.listen(MiddlewareJavaRfc.java:1903)
         at com.sap.conn.jco.rt.DefaultServerWorker.dispatch(DefaultServerWorker.java:258)
         at com.sap.conn.jco.rt.DefaultServerWorker.loop(DefaultServerWorker.java:320)
         at com.sap.conn.jco.rt.DefaultServerWorker.run(DefaultServerWorker.java:219)
         at com.wm.util.TimeWrappingProvider$TimeMesuredTask.run(TimeWrappingProvider.java:40)
         at com.wm.pkg.sap.rfc.ListenerThread.run(ListenerThread.java:70)
    Thanks & Regards,
    Amit

  • AES filing error - Idoc Outbound Processing: EDI number cannot be compiled

    Hi Gurus,
    We are configuring the AES filing.
    we've done the EDI  configI and initally we got the error that EDI partner is not maintained. As per the suggestions from this Forum we've added the cusoms office details in geography tab.
    Now when we are trying to process the same, we are getting the error "Idoc Outbound Processing: EDI number cannot be compiled"
    All suggestions are welcome.........
    Thanks in Advance.

    Hi Shiva,
    Here goes the solution: you need to maintain the Number of the Number Ranges starting with "10" and this applies only to GTS system as this is HARD-CODED in the Program, apart from 10 any number of the number range will result in an "EDI Number Range compilation" error.
    Cheers
    Harsha

  • 26 Error during syntax check of IDoc (outbound)

    Hi Experts
    I am using TPSDLS - Idoc(outbound).
    When we view in WE02 : for few of the deliveries it is working fine , but for some it is giving the following error
    26     Error during syntax check of IDoc (outbound)
    Please any one help me out for the same
    Thanks & Regards
    Shaveta

    Please check the segments for the idocs in error status in WE02. The segments in the idoc should be in the same sequence as defined while creating idoc in WE30.
    For eg. taking the case of invoic02 idoc.
    Segment E1EDP01 cannot come prior to segment E1EDK01.
    As in WE30 it is defined to come after E1EDK01\
    Please reward the points if this information is useful.

  • Convert IDoc outbound to IDoc Abstarct

    Hello Friends,
    Can any please tell me how to convert IDoc outbound to IDoc Abstarct type so that it can be used in BPM.
    Thanks
    Sam

    Hi Woj,
    Below is the xml message displayed.It says No Interface found .But I have all the objects at the right place.
    <Trace level="1" type="T">Version 000</Trace>
      <Trace level="1" type="T">Message status 000</Trace>
      <Trace level="1" type="T">Interface action INIT</Trace>
      <Trace level="1" type="T">(must be INIT for a new determination)</Trace>
      <Trace level="1" type="T">start CHECK_INTERFACE</Trace>
      <Trace level="1" type="T">--start sender interface action determination</Trace>
      <Trace level="1" type="T">select interface MATMAS.MATMAS04*</Trace>
      <Trace level="1" type="T">select interface namespace urn:sap-com:document:sap:idoc:messages</Trace>
      <Trace level="1" type="T">no interface found</Trace>
      <Trace level="1" type="T">end CHECK_INTERFACE</Trace>
      <Trace level="1" type="T">Set interface action INIT into MAST</Trace>
      </Trace>
    - <Trace level="1" type="B" name="interface activity determination">
      <Trace level="1" type="T">Version 000</Trace>
      <Trace level="1" type="T">Message status 000</Trace>
      <Trace level="1" type="T">Interface action INIT</Trace>
      <Trace level="1" type="T">(must be INIT for a new determination)</Trace>
      <Trace level="1" type="T">start CHECK_INTERFACE</Trace>
      <Trace level="1" type="T">--start sender interface action determination</Trace>
      <Trace level="1" type="T">select interface MATMAS.MATMAS04*</Trace>
      <Trace level="1" type="T">select interface namespace urn:sap-com:document:sap:idoc:messages</Trace>
      <Trace level="1" type="T">no interface found</Trace>
      <Trace level="1" type="T">--start receiver interface action determination</Trace>
      <Trace level="1" type="T">Loop 0000000001</Trace>
      <Trace level="1" type="T">select interface MIAbA_MATMAS_Req*</Trace>
      <Trace level="1" type="T">no interface found</Trace>
      <Trace level="1" type="T">--no sender or receiver interface definition found</Trace>
      <Trace level="1" type="T">Hence set action to DEL</Trace>
      <Trace level="1" type="T">end CHECK_INTERFACE</Trace>
      <Trace level="1" type="T">Set interface action DEL into MAST</Trace>
      </Trace>
    Also I have mapped IDoc_original_outbound to IDoc_asy_Abs _ED in my message mapping 1:1.I have selected original IDoc (not ED) in the receiver determination.
    I don't think we need to explicitly maintain IDoc outbound asy in the MI..? should I..?
    Kindly suggest me if you find any solution for this happening.
    Please send me if you have any scenario of similar type else please mention the steps to be carried out for this scenario so that I can cross check with your steps.
    Thanks alot for your valuable time.
    Regards
    Sam
    Message was edited by: Sam
            Guest

  • PO outbound message control - Condition record / PO IDOC outbound user exit

    Guys,
    I have a system with PO outbound message control sending PO idocs to a unique plant that is set up as a customer in the partner profile. I am using a custom message type and RSEOUT00 to send my idocs with custom message type to this plant. This interface works fine. Now my requirement has changed. I need to send PO's to varying plants (depending on the plant in PO item- all items on my POs belong to same plant).
    I noticed that i cannot create condition tables with PO type and Plant combination. (SAP Note 457497 .Q-34).
    So I have decided to populate all my PO idocs with a generic receiving partner number '9999' and planning to change this somewhere in a user exit. I found an user exit which looks helpful.
    EXIT_SAPLEINM_001 .  FM
    MM06E001 - Enhancement.
    But somehow this exit is not triggered in during PO creation ME21N or change Me22N/Me22.
    Is this because I am using a custom message type instead of standard message type ? (I still use the process codes Me10/Me11). Would this matter ? When should this user exit trigger (during creation of idocs in status 30 or when i run RSEOUT00 to sweep these idocs in status 30 to status 03) ? Any tips will be useful.
    THanks.
    Edited by: Shareen Hegde on Jul 21, 2008 10:13 PM

    I found a OSS note -Note 457497 (Q&A # 34), which talks about the same . This was my assumption too. I was just confused because I saw plant(WERKS) in the field catalag of the access sequence.
    I don't know what header field I can use to map the plant (I agree its a good idea to do this). But I have decided to do it another way. I will change the receiving partner on the control record depending on the plant in an user exit
    -  EXIT_SAPLEINM_001.
    Thanks for your answer , Mahesh.

  • Issue in IDOC : Outbound

    Hi All,
    I am trying to send an outbound IDOC, the data is filled successfully and IDOC is generated...But the status is set to 30: and not 53(successfully)....
    I checked the log: Below is the IDOC log:
    Receiver exists , No filters , No conversion , No version change
    Message no. B1006
    IDoc successfully processed in ALE outbox
    The IDoc has passed through the ALE layer successfully and can be sent. It can either be sent online or as a batch job, depending on the settings in the partner profile.
    If there are no further status records then the IDoc waits for the next dispatch report run.
    Success/failure of transmission is documented in subsequent status records.
    ALE layer actions
    The 'Receiver exists' parameter specifies whether the recipient of the IDoc has already been entered by the calling application or by the ALE layer. In the latter case the settings of the distribution model are used for the receiver determination.
    The 'No filters' parameter specifies whether the processing in the ALE layer has led to segments of the IDoc created by the application being left out. The settings in the segment filter and in the distribution model for this recipient are decisive here.
    The 'No conversion' parameter specifies whether field values have been converted in the ALE layer. This is the case if the IDoc contains organizational units to be converted or if the ALE conversion tool has been activated for this recipient.
    The 'No version change' parameter specifies whether the IDoc has been converted into an earlier version of the IDoc type. This happens if the IDoc type in the outbound partner profile for this recipient differs from the IDoc type which was created.
    Regards
    Shiva

    Hi ,
    You trigger transmission of the IDoc using report RSEOUT00. To start the report manually, choose Tools &#61614; Business Communication &#61614; IDoc Basis &#61614; Test &#61614; Outbound Processing from IDoc (/nWE14), or schedule a regular job in background processing for this report.
    Check the outbound processing mode for the IDoc in the partner profile.
    •     Outbound processing mode 2: The system sends the IDoc immediately
    •     Outbound processing mode 4: The system collects IDocs that have been created and sends them in packets of a predefined size.
    IDocs are not intended to be sent directly.
    Status 30 in the IDoc can normally only occur if outbound mode is set to 4.
    Please  let me know if u have any Queries.
    Rgds
    Sree M
    Edited by: sree m on Mar 12, 2008 9:01 AM

  • File to Idoc - Outbound Error

    Hi,
       I am doing File to IDOC scenario. I got error
    in "Message has error status at outbound status" .. When
    I opend that messeage then i got this ...
    <SAP:IDOCTYP>ZIDOCIN</SAP:IDOCTYP>
      <SAP:CIMTYP />
      <SAP:MESTYP>ZMTIDOCIN</SAP:MESTYP>
      <SAP:MESCOD />
      <SAP:MESFCT />
      <SAP:SNDPOR>SAPX11</SAP:SNDPOR>
      <SAP:SNDPRN>Logi_01</SAP:SNDPRN>
      <SAP:SNDPRT>LS</SAP:SNDPRT>
      <SAP:SNDPFC />
      <SAP:RCVPOR>SAPA11</SAP:RCVPOR>
      <SAP:RCVPRN>A11CLNT200</SAP:RCVPRN>
      <SAP:RCVPRT>LS</SAP:RCVPRT>
      <SAP:RCVPFC />
      <SAP:TEST />
      Can any one tell me what to do to solve this.
    thx,
    Ansar.

    Hi,
    There is somethig worng with your Partner Function while defining the the Partner Profile, please check it. The Partner function is optionla and see if you need it
    Go thru the link,
    http://help.sap.com/saphelp_nw04/helpdata/en/dc/6b80b543d711d1893e0000e8323c4f/content.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cdded790-0201-0010-6db8-beb9bb2b2660
    Thanks,
    Prakash
    Thanks,
    Prakash

  • IDOC OutBound Error 29: Entry in outbound table not found?

    Dear All,
            I configed the customized IDOC,and used BD64,WE20 Generate Partner Profile.the partner type is u2018LSu2019,In We20,I clicked the check button .There is no error in check.Other config also correct.
    My outbound program main code is :
      WA_IDOC_CONTROL_RECORD-MESTYP = 'ZMSGTYPE_WE81'.              
      WA_IDOC_CONTROL_RECORD-IDOCTP = 'ZIDOCTYPE_WE30'.
    Receiver
      WA_IDOC_CONTROL_RECORD-RCVPOR = 'A000000003'.           "Port
      WA_IDOC_CONTROL_RECORD-RCVPRN = 'target100'.        "Partner number
      WA_IDOC_CONTROL_RECORD-RCVPRT = 'LS'."Partner type
      WA_IDOC_CONTROL_RECORD-RCVPFC = 'LS'."Partner function
    Sender
      wa_idoc_control_record-sndpor = 'A000000001'.           "Port
      wa_idoc_control_record-sndprn = 'source500'.           "Partner number
      wa_idoc_control_record-sndprt = 'LS'.             "Partner type
      WA_IDOC_CONTROL_RECORD-SNDPFC = 'LS'."Partner function
      DATA L_ITEM TYPE I.
      LOOP AT GT_IDOC.
        L_ITEM = L_ITEM + 1.
        WA_EDIDD-SEGNAM = 'ZSEG_WE31'.
        WA_EDIDD-SEGNUM = L_ITEM.
        WA_EDIDD-SDATA = GT_IDOC.
        APPEND WA_EDIDD TO IT_EDIDD.
      ENDLOOP.
      CLEAR L_ITEM.
      SORT IT_EDIDD BY SEGNUM.
      CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
           EXPORTING
                MASTER_IDOC_CONTROL            = WA_IDOC_CONTROL_RECORD
              OBJ_TYPE                       = ''
              CHNUM                          = ''
           TABLES
              COMMUNICATION_IDOC_CONTROL     = IT_COMMUNICATION_IDOC_CONTROL
                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.
      ELSE.

    hi Sun,
    The value 'X' means ABAP_TRUE, which means the outbound ALE settings for your message type are OK.
    Did you check the sy-subrc value after the FM 'MASTER_IDOC_DISTRIBUTE' is called ? and if yes what is the value ?
    Also did u check the IT_EDIDD table, whether is contains any values ?
    If all of the above is fine then call the FM 'EDI_DOCUMENT_DEQUEUE_LATER' by passing the document number of the outbound IDoc created, this number you will from the 'communication_idoc_control' table which you need to pass to your FM MASTER_IDOC_DISTRIBUTE.
    for your reference attached is code for it
        CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
          EXPORTING
            master_idoc_control            = wf_edidc
          TABLES
            communication_idoc_control     = int_comm_cntl
            master_idoc_data               = int_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.
      APPEND LINES OF lt_idoc_comm_control TO g_idoc_comm_control.
    endif.
      LOOP AT g_idoc_comm_control.
        CALL FUNCTION 'EDI_DOCUMENT_DEQUEUE_LATER'
          EXPORTING
            docnum = g_idoc_comm_control-docnum.
      ENDLOOP.
    {/code}
    hope this will solve your problem
    Edited by: Ashwinee on Dec 26, 2008 12:09 PM

  • XI Idoc outbound record mapping

    Hi,
    I created proxy to IDoc interface.
    All the data are being converted into IDoc format through IDoc adapter.
    Now, I am considering another interface which is for data monitoring.
    The interface flow is like below.
    1. send data to XI (proxy)
    2. mapping proxy to IDoc (IDoc adapter)
    3. send a IDoc to R/3 1 (IDoc)
    4. mapping IDoc to rfc 
    5. send a rfc data to R/3 2 (rfc)
    In the step 4, I need to map IDoc's control records, created automatically by IDoc adapter, to fields in rfc.
    But I have no idea how to use outbound record for mapping.
    Please help me to resolve the issue.
    Thanks in advance.
    Regards,
    Andrew

    <i>In the step 4, I need to map IDoc's control records, created automatically by IDoc adapter, to fields in rfc.
    But I have no idea how to use outbound record for mapping.</i>
    >>>>>
    I am not sure if you can map the control records created automatically by the IDoc adapter to the RFC. You will have to hardcode them in your mapping (IDOC -> RFC).

  • IDoc Outbound processing

    Hi All,
    I am doing IDoc to File scenario. I have my IDocs in AXI system and XI in ZXI system.I want to send idocs from AXI to ZXI. I have configured the following in AXI :
    RFC dest to ZXI (Dest4ZXI)
    Transaction Port to ZXI having RFC dest as Dest4ZXI
    Logical system for receiver file system
    Partner profile for receiver file system with outbound parameter
    and the following configuration in ZXI:
    RFC dest to AXI (AXICLNT100)
    Port to get IDoc's metadata from AXI (SAPAXI) having RFC dest as AXICLNT100
    In SLD, i created a tech sys and business sys for sender system AXI and then i created a scenario in ZXI for IDoc to File. In IR, imported the idoc and created all other objects till interface mapping. In ID, assigned the business system, created a service for file receiver and created rec det,int det and rec agreement.
    Using Idoc test tool i started the outbound processing after giving the data and control record and got the IDoc sent successfully message.
    Control record values:
    Receiver: port = (port created in AXI), partner no = (LS File receiver sys created in AXI)
    sender  : port = (SAPAXI - port creted in zXI), partner no = (AXICLNT100 - LS created in sld - which is same name as RFC detination created in ZXI)
    If i check in we05, its green flag. But in sm58, error status message for the idoc is showing as "No service for the system SAPAXI for client 100 in Integration Directory.
    Note: I am using a custom IDoc with 8 fields.
    Kindly reply if my descriptions are not clear!
    Appreciating all help.
    Thanks in advance,
    Uma

    Hi Uma,
    <b>Have u imported the Business System as Service or not?create u r cc in the service for that bs only</b>
    If not just try with it..
    If the sender system is maintained as the business service then we have to edit adapter specific identifiers and give the appropriate logical system name in the integration directory...
    In ID goto Service Adapter-Specific Identifiers and mention the Logicalsystem and Client and ID...
    Check this blog
    /people/ravikumar.allampallam/blog/2005/02/23/configuration-steps-required-for-posting-idocsxi
    and also
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    for refernece...
    Regards,
    Sridhar

  • Working on IDOC OUTBOUND FOR Vendor Master and Customer Master

    Hi Group,
    I need to create IDOC's for Vendor master and customer master using ALE. Whenever they create vendor/customer or changes to vendor/customer should create IDOC's.
    Can anyone please help me out how to proceed? I know that we can use CREMAS/DEBMAS and CREMAS04/CREMAS...But I would like to know how to use those.
    Thank-You,
    Venky

    Hi Sai,
    Welcome to group.
    Related to CREMAS/DEBMAS, for your situation, you can use the change pointers.  With this, when ever there is an change/create, it will create an entry in CDHDR & CDPOS and based on that it will create the IDOCs for these.
    Activate the change pointers for these message types and run the application RBDMIDOC periodically (whenever you want).  This application will create the IDOCs based on your entries.
    To activate the change pointers, the TCODEs are
    BD50 Checking change pointer is activated for Message Type
    BD52 Checking which fields are configured change pointer to create.  (please make sure, an entry will exist in BDCP table)
    I hope you know the remaining configuration related to partner profile entries (WE20) i.e. to which system you want to send the idocs and Inbound or Outbound etc.
    Let me know if you need further info.
    shylesh

  • A Uncanny Problem with IDoc Outbound:

    Hi,
    I meet a problem When outbounding a Z idoc: a field in a segment has no value (While according the trigerred FM logic, should not space):  segment structure: matnr lorvm sprat1 ... vkorg
       the data source is from table MVKE. Some times the field 'VKORG' is space in IDoc created using FM 'MASTER_IDOC...'.
    It is uncanny one as 'VKORG' is a key field in a record, it's value always is not space!
    Why the issue occurs?

    Hi Nitzan,
    ALE does not do these checks! Maybe you can do some coding in ALE-Userexits do achieve this with your own ABAP (i.e EXIT_SAPLRHA0_005).
    Where does wrong data come from? Can't it be checked before sending to targetsystem.
    What shall ALE do with data, which it cannot insert? Shall it stay there in ALE-input without ever been worked up?
    Regards
    Herbert

  • IDoc (Outbound & Inbound) PO to ECC (2 clients)

    Hi
    As part of testing
    I need to send outbound idocs from 2 separate clients in ECC to PO
    Also I need to send inbound idocs to 2 separate clients of ECC from PO
    With one client everything is working fine.
    What extra steps need to be done for 2 clients, should we add entry in inboundRA ? Multirepository ?
    Thanks in advance

    Hi Mark,
    Well if that is the case then I will suggest you to go with custom development.
    Create Z tables for storing Inbound IDoc data  in POS DM.
    Write FM to process your inbound IDocs in POS DM Z tables.
    Write FM to generate your outbound IDocs from POS DM Z tables.
    Thanks,
    Vikrant.

Maybe you are looking for

  • Flash in left column

    I would like to insert a Flash file directly below a Nav bar in the left column.  It works on the template preview but when I preview the actual pages that use the template I only get a white box.  Is there some reason a swf file won't work in that l

  • Java Verify and PAC Files

    We are have started using a PAC files to control how our Browsers connect to the Internet. What we have found out is Java won't use the PAC files when version Java version. Java installs just fine but fails on the "Verify Java Version". Here is the m

  • MAPI.Session for Office 2010

    Hi all, This code works fine in office 2003 but not in office 2010  (Raise NO_MAPI). Do you have an idea ? CREATE OBJECT SESSION 'MAPI.Session'.     IF SY-SUBRC NE 0.       RAISE NO_MAPI.   ENDIF. Now log into the session with the given profile   CAL

  • How to see an EHD attached to Time Capsule

    I want to store all my music on an EHD and point my iTunes to it so I can save space on my computer. I've been told that this is easy to do. So I hooked up my LaCie backup to my new Time Capsule. The question is, I don't know how to see the LaCie so

  • Can iOS.6 be downloaded to first generation ipad

    Is iOS.6 compatible for iPad 1st generation?