‎2008 Mar 21 11:27 AM
Hi all,
I m getting this error in idoc..
Entry in outbound table not found.
I doc number is generated..
also giving Program code ..check and tell me whr can i do change..
Following is program for idoc...
REPORT ZNA_IDOC .
*TABLES: CRMD_ORDERADM_I,CRMD_ORDERADM_H,CRMD_SCHEDLIN.
TABLES : ZNA_ID.
DATA : S_CTRL_REC LIKE EDIDC OCCURS 0 WITH HEADER LINE,"Idoc Control
*Record
KUNNR TYPE ZNA_ID-KUNNR, " SEGMENT ORDER DATA
VBELN TYPE ZNA_ID-VBELN.
*QUANTITY TYPE CRMT_SCHEDLIN_QUAN VALUE '1.000'.
DATA : ZORDER LIKE ZNA_ID OCCURS 0 WITH HEADER LINE.
DATA : T_EDIDD LIKE EDIDD OCCURS 0 WITH HEADER LINE. "Data Records
DATA : T_COMM_IDOC LIKE EDIDC OCCURS 0 WITH HEADER LINE. "Generated
"Communication IDOc
CONSTANTS :
C_ZRZSEG1 LIKE EDIDD-SEGNAM VALUE 'ZNA_I'.
PARAMETERS : ZID LIKE EDIDC-MESTYP DEFAULT 'ZID', "Message Type
C_RCVPRT LIKE EDIDC-RCVPRT DEFAULT 'LS', "Partner type of receiver
C_LOGSYS LIKE EDIDC-RCVPRN DEFAULT 'D11CLNT100',
C_RCVPOR LIKE EDIDC-RCVPOR DEFAULT 'A000000009',
C_SNDPOR LIKE EDIDC-SNDPOR DEFAULT 'A000000008',
C_SNDPRN LIKE EDIDC-SNDPRN DEFAULT 'D11CLNT210',
C_IDOCTP LIKE EDIDC-IDOCTP DEFAULT 'ZNA_IT',
C_SNDPRT LIKE EDIDC-SNDPRT DEFAULT 'LS'. "Destination System
***START-OF-SELECTION
START-OF-SELECTION.
PERFORM GENERATE_CONTROL_RECORD.
PERFORM SEND_IDOC.
*&----
*& Form generate_control_record
*&----
FORM GENERATE_CONTROL_RECORD .
S_CTRL_REC-RCVPOR = C_RCVPOR. "Receiver Port
S_CTRL_REC-MESTYP = ZID. "Message type
S_CTRL_REC-IDOCTP = C_IDOCTP. "Basic IDOC type
S_CTRL_REC-RCVPRT = C_RCVPRT. "Partner type of receiver
S_CTRL_REC-SNDPOR = C_SNDPOR. "SENDER PORT
S_CTRL_REC-RCVPRN = C_LOGSYS. "Partner number of receiver
S_CTRL_REC-SNDPRT = C_SNDPRT. "Sender Partner type
S_CTRL_REC-SNDPRN = C_SNDPRN. "Sender Partner Number
APPEND S_CTRL_REC.
ENDFORM. " generate_control_record
*&----
*& Form send_idoc
*&----
FORM SEND_IDOC.
*SELECT * FROM ZNA_ID INTO TABLE ZORDER.
ZORDER-KUNNR = '1'.
ZORDER-VBELN = '101'.
**ZORDER-QUANTITY = QUANTITY.
APPEND ZORDER.
T_EDIDD-SEGNAM = C_ZRZSEG1.
T_EDIDD-SDATA = ZORDER.
APPEND T_EDIDD.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
MASTER_IDOC_CONTROL = S_CTRL_REC
TABLES
COMMUNICATION_IDOC_CONTROL = T_COMM_IDOC
MASTER_IDOC_DATA = T_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.
COMMIT WORK.
LOOP AT T_COMM_IDOC.
WRITE:/ 'IDoc Generated - ', T_COMM_IDOC-DOCNUM.
ENDLOOP.
ENDIF.
ENDFORM. " send_idoc
thx...
‎2008 Mar 21 8:17 PM
The program is probably correct, however, it seems that you haven't completed the 'customizing' just yet. The parameters entered in S_CTRL_REC contains entries which have not yet been maintained in the settings.
Have a look at the settings. I have no SAP system available right now, so I can't tell you what transaction is needed, but first have look at WE20 (use transaction menu WEDI).