<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: IDoc outbount Function Module fail in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-outbount-function-module-fail/m-p/5270819#M1216849</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a new segment without any warning, i released it. I created a new IDoc too, released it.&lt;/P&gt;&lt;P&gt;And I still have the same error when i test my Function Module.&lt;/P&gt;&lt;P&gt;I checked everything about configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anea Maaref&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Mar 2009 08:21:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-17T08:21:43Z</dc:date>
    <item>
      <title>IDoc outbount Function Module fail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-outbount-function-module-fail/m-p/5270815#M1216845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For our company needs, i created a table to regroup all users authorizations. &lt;/P&gt;&lt;P&gt;And then i created an IDoc to send this data to a Java interface program.&lt;/P&gt;&lt;P&gt;Connection is OK. &lt;/P&gt;&lt;P&gt;I created a message type, logical system and so on .. &lt;/P&gt;&lt;P&gt;When i use WE19 my Java application receive an empty IDoc containing only header data (EDIDC).&lt;/P&gt;&lt;P&gt;Then i coded a Function Module to fulfill the IDoc.&lt;/P&gt;&lt;P&gt;The data is retrieved, the internal tables are fulfilled but no IDoc generation!&lt;/P&gt;&lt;P&gt;Here is my FM : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FUNCTION ZKO_ZLSF_IDOC_FCT.
*"----------------------------------------------------------------------
*"*"Local interface:
*"  IMPORTING
*"     REFERENCE(OBJECT) LIKE  NAST STRUCTURE  NAST
*"     REFERENCE(CONTROL_RECORD_IN) LIKE  EDIDC STRUCTURE  EDIDC
*"  EXPORTING
*"     REFERENCE(CONTROL_RECORD_OUT) LIKE  EDIDC STRUCTURE  EDIDC
*"     REFERENCE(OBJECT_TYPE) LIKE  WFAS1-ASGTP
*"  TABLES
*"      ITAB_EDIDD STRUCTURE  EDIDD
*"      ITAB_EDIDC STRUCTURE  EDIDC
*"----------------------------------------------------------------------

********************************************
**  Constantes                            **
********************************************
DATA :
* Segments names
  C_HEADER_SEGMENT      LIKE EDIDD-SEGNAM  VALUE  'ZKO_ZLSFHDR',
  C_USERS_DETAILS       LIKE EDIDD-SEGNAM  VALUE  'ZKO_ZLSFALRT',
* IDoc Type
  C_ZLSF_IDOC           LIKE EDIDC-IDOCTP  VALUE  'ZKO_ZLSFIDOC',
* Message Type
  C_ZLSF_MESSAGE        LIKE EDIDC-MESTYP   VALUE  'ZKO_ZLSFMSG'.
*********************************************
** Data declarations                       **
*********************************************
* Field string for data record
DATA: FS_INT_EDIDD LIKE EDIDD.
* Report header data
DATA: FS_ZLSFHDR_DATA LIKE ZKO_ZLSFHDR.
* Users / LSR Roles details
DATA: FS_ZLSFALRT_DATA LIKE ZKO_ZLSFALRT.
* List key
DATA: P_BLOCK  LIKE  ZLSF-DBLOCKFLAG.
**********************************************
** Internal tables                          **
**********************************************
DATA: wt_zlsf LIKE ZLSF occurs 0 with header line.

********** Select application data ************
P_BLOCK = OBJECT-OBJKY.
select single * from ZLSF where DBLOCKFLAG = P_BLOCK.
select * from ZLSF into table wt_zlsf where DBLOCKFLAG = P_BLOCK.

************ Build Control Record *************

clear CONTROL_RECORD_OUT.
move CONTROL_RECORD_IN to CONTROL_RECORD_OUT.
CONTROL_RECORD_OUT-DIRECT = '1'.
CONTROL_RECORD_OUT-MESTYP = C_ZLSF_IDOC.
control_record_out-idoctp = C_ZLSF_MESSAGE.
control_record_out-rcvprt = 'LS'.
control_record_out-rcvprn = 'ZKO_LSFREP'.
CONTROL_RECORD_OUT-SERIAL = SY-DATUM.
CONTROL_RECORD_OUT-SERIAL+8 = SY-UZEIT.

CONTROL_RECORD_OUT-SNDPRN = EDIDC-SNDPRN.
CONTROL_RECORD_OUT-SNDPRT = EDIDC-SNDPRT.

**************** Build data records ***************
FS_ZLSFHDR_DATA-MANDT = ZLSF-MANDT.
FS_ZLSFHDR_DATA-LSFDATE = ZLSF-LSFDATE.

FS_INT_EDIDD-SEGNAM = C_HEADER_SEGMENT.
FS_INT_EDIDD-SDATA = FS_ZLSFHDR_DATA.

APPEND FS_INT_EDIDD TO ITAB_EDIDD.

*----------- Report details ------------*
LOOP AT wt_zlsf.
   
*
*
* Populating internal table FS_ZLSFALRT_DATA
*
*
    FS_INT_EDIDD-SEGNAM = C_USERS_DETAILS.
    FS_INT_EDIDD-SDATA = FS_ZLSFALRT_DATA.

    APPEND FS_INT_EDIDD TO ITAB_EDIDD.
ENDLOOP.
************** Pass control to the ALE layer ******************
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
  EXPORTING
    MASTER_IDOC_CONTROL  = CONTROL_RECORD_OUT
  TABLES
    COMMUNICATION_IDOC_CONTROL    = ITAB_EDIDC
    MASTER_IDOC_DATA              = ITAB_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 NE 0.
  WRITE: / 'IDoc NOT generated',SY-SUBRC.
ELSE.
  LOOP AT ITAB_EDIDC.
    WRITE: / 'IDoc generated', ITAB_EDIDC-DOCNUM.
  ENDLOOP.
  COMMIT WORK.
ENDIF.


ENDFUNCTION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the testing header : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MANDT     135 
DOCREL    46C
DIRECT    1
RCVPOR    A000000018
RCVPRT    LS
RCVPRN    ZKO_LSFREP
STDMES    ZKO_ZL
OUTMOD    2
SNDPOR    SAPVRI
SNDPRT    US
SNDPRN    VRICLNT135
MESTYP    ZKO_ZLSFMSG
IDOCTP    ZKO_ZLSFIDOC&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i test i have Exception code 5!&lt;/P&gt;&lt;P&gt;Did i miss something ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2009 08:05:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-outbount-function-module-fail/m-p/5270815#M1216845</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-16T08:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: IDoc outbount Function Module fail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-outbount-function-module-fail/m-p/5270816#M1216846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you checked whether the segments / IDoc type are in 'Released' state? Is the syntax check of the IDoc Type Successful?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Murugesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2009 09:24:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-outbount-function-module-fail/m-p/5270816#M1216846</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-16T09:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: IDoc outbount Function Module fail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-outbount-function-module-fail/m-p/5270817#M1216847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Murugesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answer.&lt;/P&gt;&lt;P&gt;My segments/IDoc are in Release state.&lt;/P&gt;&lt;P&gt;I found a warning when i check the IDoc :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Field DBLOCKFLAG: External length 000003 larger than 000001 for appl. data element FLAG&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am a beginner and this was my first attempt with the IDocs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will create a new segment tomorrow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anes Maaref&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sami BEN JAMAA on Mar 16, 2009 10:49 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2009 09:48:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-outbount-function-module-fail/m-p/5270817#M1216847</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-16T09:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: IDoc outbount Function Module fail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-outbount-function-module-fail/m-p/5270818#M1216848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    Have you made entries in WE81 and WE82 of your message type, extension type...........?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Asit Purbey.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2009 03:45:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-outbount-function-module-fail/m-p/5270818#M1216848</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-17T03:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: IDoc outbount Function Module fail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-outbount-function-module-fail/m-p/5270819#M1216849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a new segment without any warning, i released it. I created a new IDoc too, released it.&lt;/P&gt;&lt;P&gt;And I still have the same error when i test my Function Module.&lt;/P&gt;&lt;P&gt;I checked everything about configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anea Maaref&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2009 08:21:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-outbount-function-module-fail/m-p/5270819#M1216849</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-17T08:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: IDoc outbount Function Module fail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-outbount-function-module-fail/m-p/5270820#M1216850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not able to understand DBLOCKFLAG, Can you tell me what is this field, its data element?&lt;/P&gt;&lt;P&gt;And please try to Blank out this field before you use DISTRIBUTE Function Module.&lt;/P&gt;&lt;P&gt;There is something wrong with particular field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shital&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2009 11:44:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-outbount-function-module-fail/m-p/5270820#M1216850</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-17T11:44:30Z</dc:date>
    </item>
  </channel>
</rss>

