<?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 IDOC in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2508211#M567111</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;   I have extended a basic IDOC type to a Z type. The problem i am facing is i am not able to see all the fields in WE02 , even if the basic IDOC type has a number of fields in the segments.&lt;/P&gt;&lt;P&gt;Is there some setting in the system to choose the fields which we want to transmit ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Nitin Khurana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Jul 2007 13:22:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-16T13:22:34Z</dc:date>
    <item>
      <title>IDOC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2508211#M567111</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;   I have extended a basic IDOC type to a Z type. The problem i am facing is i am not able to see all the fields in WE02 , even if the basic IDOC type has a number of fields in the segments.&lt;/P&gt;&lt;P&gt;Is there some setting in the system to choose the fields which we want to transmit ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Nitin Khurana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2007 13:22:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2508211#M567111</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-16T13:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: IDOC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2508212#M567112</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;if u have created ur own segment  have u associated extended idoc type to it???&lt;/P&gt;&lt;P&gt;if yes, where are u populating ur idoc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u will have to create a zfunction module in we20 and write the code for populating ur idoc there.&lt;/P&gt;&lt;P&gt;on;y then u will be able to see all the fields. here is the sample code for outbound processing of the idoc. just refer to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

Creation of an IDoc generation program
The following code extract contains everything needed to generate an IDoc from data contained in a table.
FORM F_110_SEND_IDOC.
CONSTANTS:
  C_MESTYP TYPE EDIDC-MESTYP VALUE 'ZVISTAPM',
  C_DOCTYP TYPE EDIDC-IDOCTP VALUE 'ZVISTAPM01',
  C_SEGNAM TYPE EDIDD-SEGNAM VALUE 'Z1VISTAPM'.
DATA:
  I_ZVISTA_PM TYPE ZVISTA_PM_T OCCURS 6000,
  I_EDIDC TYPE EDIDC OCCURS 0,
  I_EDIDD TYPE EDIDD OCCURS 0,
  WA_ZVISTA_PM TYPE ZVISTA_PM_T,
  WA_EDIDC TYPE EDIDC,
  WA_EDIDD TYPE EDIDD,
  WA_Z1VISTAPM TYPE Z1VISTAPM,
  V_OCCMAX TYPE IDOCSYN-OCCMAX,
  V_NBSEG TYPE I.
CLEAR WA_ZVISTA_PM.
CLEAR WA_EDIDC.
* Save the message type and the basic IDoc type
* in the control segment
MOVE C_MESTYP TO WA_EDIDC-MESTYP.
MOVE C_DOCTYP TO WA_EDIDC-IDOCTP.
* Retrieve the maximum number of segments in the basic IDoc
* type
SELECT MIN( OCCMAX )
  FROM IDOCSYN
  INTO V_OCCMAX
  WHERE IDOCTYP EQ C_DOCTYP AND SEGTYP EQ C_SEGNAM.
* Save the whole ZVISTA_PM_T table content
* in the I_ZVISTA_PM internal table.
SELECT *
FROM ZVISTA_PM_T
INTO CORRESPONDING FIELDS OF TABLE I_ZVISTA_PM.
* Create a data segment for each line of I_ZVISTA_PM
LOOP AT I_ZVISTA_PM INTO WA_ZVISTA_PM.
  MOVE-CORRESPONDING WA_ZVISTA_PM TO WA_Z1VISTAPM.
  CLEAR WA_EDIDD.
  MOVE C_SEGNAM TO WA_EDIDD-SEGNAM.
  MOVE WA_Z1VISTAPM TO WA_EDIDD-SDATA.
  APPEND WA_EDIDD TO I_EDIDD.
  CLEAR WA_ZVISTA_PM.
  CLEAR WA_Z1VISTAPM.
ENDLOOP.
* Count the number of data segments
DESCRIBE TABLE I_EDIDD LINES V_NBSEG.
* If the number of data segments exceeds the maximum
* allowed number, then edit a message in the spool,
* then display an error message (quit the program)
IF V_NBSEG GT V_OCCMAX.
  WRITE:/ TEXT-003, V_OCCMAX.
  MESSAGE E751.
ENDIF.
* Call the IDoc creation function
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
  EXPORTING
    MASTER_IDOC_CONTROL = WA_EDIDC
  TABLES
    COMMUNICATION_IDOC_CONTROL = I_EDIDC
    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 there was an error, display a message (quit the
* program)
IF SY-SUBRC NE 0.
  MESSAGE E746.
ENDIF.
ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;ravish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;plz dont forget to reward if helpful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2007 13:27:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2508212#M567112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-16T13:27:34Z</dc:date>
    </item>
  </channel>
</rss>

