<?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: Outbound interface in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/outbound-interface/m-p/1471987#M221746</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Simran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your defined situations can't be achieved in a single loop or it would be very complex to do that. The solution I would suggest is as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Situation 1- Exists in header and not in item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at I_H1.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;loop at i_I1 (for I_H1).&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  clear the item fields (your situation)&lt;/P&gt;&lt;P&gt;  transfer item record.&lt;/P&gt;&lt;P&gt;endif.  &lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Situation 2. - Exists in Item and not in Header&lt;/P&gt;&lt;P&gt;Loop at I_I1.&lt;/P&gt;&lt;P&gt;  read table I_H1 using the link.&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;     initialise the header files as required and tranfer the header data.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endloop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anurag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Aug 2006 10:54:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-11T10:54:16Z</dc:date>
    <item>
      <title>Outbound interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/outbound-interface/m-p/1471982#M221741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi my requirement goes like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to transfer header and item data into file in application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to create separate file for plant (multiple selection field)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However i have a specific requirement which i am not able to map and it is:&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;when only header entries exists for a particular scenario then item fields should come blank ( which is fine )&lt;/P&gt;&lt;P&gt;when only item entries exists for a particular scenario the corresponding fields of item should be filled for header entries ( they have some similar fields).&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Presently i am looping thru header table , then at new plant creating file and opening it in app. server, then i am tranferring header record and after looping item table and using parallel cursor transferring item records.then at end of plant closing file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However the addtional functionality (marked with bold letter) i am not able to map it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone assist&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Simran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2006 08:30:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/outbound-interface/m-p/1471982#M221741</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-11T08:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Outbound interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/outbound-interface/m-p/1471983#M221742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you are populating the header and item data into two different internal tables. Before you start looping, do a read to your header internal table to see whether you have a corresponding header. If &amp;lt;b&amp;gt;sy-subrc value is not equal to 0&amp;lt;/b&amp;gt; then loop at the item table and populate the header values and use the normal way of getting the item fields for the corresponding header when &amp;lt;b&amp;gt;sy-subrc value is 0.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;JK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2006 08:40:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/outbound-interface/m-p/1471983#M221742</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-11T08:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Outbound interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/outbound-interface/m-p/1471984#M221743</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 have an issue:&lt;/P&gt;&lt;P&gt;i will try to map my requirement here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at i_H1( main header table)&lt;/P&gt;&lt;P&gt;from which i get&lt;/P&gt;&lt;P&gt;Header1,header2,header3,header4,header5&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;Read another header table i_H2&lt;/P&gt;&lt;P&gt;from which i get&lt;/P&gt;&lt;P&gt;Header6&lt;/P&gt;&lt;P&gt;Read another header table i_H3&lt;/P&gt;&lt;P&gt;from which i get Header7 and Header 8&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i am using&lt;/P&gt;&lt;P&gt;At new 'field'&lt;/P&gt;&lt;P&gt;creating file&lt;/P&gt;&lt;P&gt;transfer header records.&lt;/P&gt;&lt;P&gt;Loop at i_I1 from syindex&lt;/P&gt;&lt;P&gt;from which i get &lt;/P&gt;&lt;P&gt;Item 1, Item 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read i_I2 &lt;/P&gt;&lt;P&gt;from which i get&lt;/P&gt;&lt;P&gt;Item 3&lt;/P&gt;&lt;P&gt;transfer item records.&lt;/P&gt;&lt;P&gt;endloop  " I_I1&lt;/P&gt;&lt;P&gt;at end of 'field'&lt;/P&gt;&lt;P&gt;close file&lt;/P&gt;&lt;P&gt;Endloop " i_H1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now my requirement is if some records exists only in I_H1&lt;/P&gt;&lt;P&gt;and not in I_I1 then ,item fields (item1,item2,item3) should come blank (which is fine)&lt;/P&gt;&lt;P&gt;But,&lt;/P&gt;&lt;P&gt;if some records exists only in I_I1 and not in I_H1 then the header fields should be filled with correponding item fields.&lt;/P&gt;&lt;P&gt;ex. i_H1-header1 = i_I1-header1&lt;/P&gt;&lt;P&gt;(Header1 is a common field)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to handle this logic?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gunjan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2006 10:33:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/outbound-interface/m-p/1471984#M221743</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-11T10:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Outbound interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/outbound-interface/m-p/1471985#M221744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As you suggested:&lt;/P&gt;&lt;P&gt;Hope you are populating the header and item data into two different internal tables. &amp;lt;b&amp;gt;Before you start looping, do a read to your header internal table to see whether you have a corresponding header.&amp;lt;/b&amp;gt; If sy-subrc value is not equal to 0 then loop at the item table and populate the header values and use the normal way of getting the item fields for the corresponding header when sy-subrc value is 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you clarify the section marked in bold?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2006 10:39:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/outbound-interface/m-p/1471985#M221744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-11T10:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Outbound interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/outbound-interface/m-p/1471986#M221745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;loop at it_item.&lt;/P&gt;&lt;P&gt;lv_tabix = sy-tabix.&lt;/P&gt;&lt;P&gt;at new &amp;lt;header key field&amp;gt;&lt;/P&gt;&lt;P&gt;read it_header with key &amp;lt;header key field&amp;gt; = it_item-&amp;lt;header key field.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;read it_item index lv_tabix.&lt;/P&gt;&lt;P&gt;move-corresponding it_item to it_header.&lt;/P&gt;&lt;P&gt;insert it_header.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_header.&lt;/P&gt;&lt;P&gt;at new plant.  "This wil not work if plant is not your first field&lt;/P&gt;&lt;P&gt;open dataset dsn for output.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;transfer it_header to dsn.&lt;/P&gt;&lt;P&gt;loop at it_item where &amp;lt;header key field&amp;gt; = it_header-&amp;lt;header key field&amp;gt;.&lt;/P&gt;&lt;P&gt;transfer it_item to dsn.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at end of plant.&lt;/P&gt;&lt;P&gt;close dataset.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2006 10:51:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/outbound-interface/m-p/1471986#M221745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-11T10:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Outbound interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/outbound-interface/m-p/1471987#M221746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Simran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your defined situations can't be achieved in a single loop or it would be very complex to do that. The solution I would suggest is as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Situation 1- Exists in header and not in item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at I_H1.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;loop at i_I1 (for I_H1).&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  clear the item fields (your situation)&lt;/P&gt;&lt;P&gt;  transfer item record.&lt;/P&gt;&lt;P&gt;endif.  &lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Situation 2. - Exists in Item and not in Header&lt;/P&gt;&lt;P&gt;Loop at I_I1.&lt;/P&gt;&lt;P&gt;  read table I_H1 using the link.&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;     initialise the header files as required and tranfer the header data.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endloop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anurag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2006 10:54:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/outbound-interface/m-p/1471987#M221746</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-11T10:54:16Z</dc:date>
    </item>
  </channel>
</rss>

