<?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: User exit issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-issue/m-p/2815970#M658561</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Aryan , u proceed in the way I have specified. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example - Say u have got 4 header docs in ur internal table i_header_tab. and u populated that like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT docno docdate docetc
FROM    doc_header
INTO     TABLE i_header_tab
WHERE ...............
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now for all these header data , u r trying to fetch the corresponding items then u ll write - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IF NOT i_header_tab[] IS INITIAL.

SELECT docno docitem fld2 fld3
FROM   doc_item
INTO     TABLE i_item_tab
FOR     ALL ENTRIES IN i_header_tab
WHERE docno = i_header_tab-docno.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So all the related items will be in the internal table i_item_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now u can process like this - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT i_header_tab.&lt;/P&gt;&lt;P&gt; LOOP AT i_item_tab WHERE docno = i_header_tab-docno.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Processing logic for Items for Individual Doc numbers.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does it help now ???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Sep 2007 13:51:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-26T13:51:02Z</dc:date>
    <item>
      <title>User exit issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-issue/m-p/2815964#M658555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created genric extracter on Header table,But for item table fields has been inclued in the extract structure.&lt;/P&gt;&lt;P&gt;In header table we have key Doc Number,where as in item table has several lintems for the Doc number.&lt;/P&gt;&lt;P&gt;When i write a user exit for line item data,which is picking first line item for the doc no from the Item table.&lt;/P&gt;&lt;P&gt;SELECT SINGLE ABC&lt;/P&gt;&lt;P&gt;XYZ&lt;/P&gt;&lt;P&gt;UVC&lt;/P&gt;&lt;P&gt;ASD&lt;/P&gt;&lt;P&gt;POS&lt;/P&gt;&lt;P&gt;INTO (&amp;lt;ZBW_EXTRACTER&amp;gt;-ABC,&lt;/P&gt;&lt;P&gt;&amp;lt;ZBW_EXTRACTER&amp;gt;-XYZ&lt;/P&gt;&lt;P&gt;&amp;lt;ZBW_EXTRACTER&amp;gt;-UVC,&lt;/P&gt;&lt;P&gt;&amp;lt;ZBW_EXTRACTER&amp;gt;ASD-,&lt;/P&gt;&lt;P&gt;&amp;lt;ZBW_EXTRACTER&amp;gt;-POS,&lt;/P&gt;&lt;P&gt;FROM ZTABLE_ITEM&lt;/P&gt;&lt;P&gt;WHERE DOCNUM = &amp;lt;ZBW_EXTRACTER&amp;gt;-DOCNUM.&lt;/P&gt;&lt;P&gt;This user exit is picking first line item from the ZTABLE_ITM for the Docu num of Heasdre table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to populate my structure with all line items for the Doc no.&lt;/P&gt;&lt;P&gt;How would i populate my extracter with all line items data.&lt;/P&gt;&lt;P&gt;Some one can help me in this scenario.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 11:11:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-issue/m-p/2815964#M658555</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T11:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: User exit issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-issue/m-p/2815965#M658556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT &amp;lt;b&amp;gt;SINGLE&amp;lt;/b&amp;gt; ABC&lt;/P&gt;&lt;P&gt;XYZ&lt;/P&gt;&lt;P&gt;UVC&lt;/P&gt;&lt;P&gt;ASD&lt;/P&gt;&lt;P&gt;POS&lt;/P&gt;&lt;P&gt;INTO (&amp;lt;ZBW_EXTRACTER&amp;gt;-ABC,&lt;/P&gt;&lt;P&gt;&amp;lt;ZBW_EXTRACTER&amp;gt;-XYZ&lt;/P&gt;&lt;P&gt;&amp;lt;ZBW_EXTRACTER&amp;gt;-UVC,&lt;/P&gt;&lt;P&gt;&amp;lt;ZBW_EXTRACTER&amp;gt;ASD-,&lt;/P&gt;&lt;P&gt;&amp;lt;ZBW_EXTRACTER&amp;gt;-POS,&lt;/P&gt;&lt;P&gt;FROM ZTABLE_ITEM&lt;/P&gt;&lt;P&gt;WHERE DOCNUM = &amp;lt;ZBW_EXTRACTER&amp;gt;-DOCNUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You select Query is supposed to fetch only one row as per the syntax. If u want to pick all the lines from it use INTO TABLE and remove the SINGLE statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or Do it inside a SELECT ENDSELECT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 11:30:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-issue/m-p/2815965#M658556</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T11:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: User exit issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-issue/m-p/2815966#M658557</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;just remove the SINGLE from the query  and &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT  ABC  XYX          ..............&lt;/P&gt;&lt;P&gt;INTO corresponding fields of table zbw_extracter &lt;/P&gt;&lt;P&gt;from........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 11:50:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-issue/m-p/2815966#M658557</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T11:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: User exit issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-issue/m-p/2815967#M658558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SKC,&lt;/P&gt;&lt;P&gt;If i remove single ,which will fetch all the line items for the document number?&lt;/P&gt;&lt;P&gt;Document no is in Header table and as key ,where as in item table it is foreign key.&lt;/P&gt;&lt;P&gt;As per your instruction does it pull all the records from item table which is related document number.&lt;/P&gt;&lt;P&gt;Please guide me in this scenario.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 12:23:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-issue/m-p/2815967#M658558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T12:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: User exit issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-issue/m-p/2815968#M658559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT ABC XYZ UVC ASD POS
INTO (&amp;lt;ZBW_EXTRACTER&amp;gt;-ABC,
&amp;lt;ZBW_EXTRACTER&amp;gt;-XYZ
&amp;lt;ZBW_EXTRACTER&amp;gt;-UVC,
&amp;lt;ZBW_EXTRACTER&amp;gt;ASD-,
&amp;lt;ZBW_EXTRACTER&amp;gt;-POS,
FROM ZTABLE_ITEM
WHERE DOCNUM = &amp;lt;ZBW_EXTRACTER&amp;gt;-DOCNUM
* Do the processing here - you will go thru the items here
* -----
ENDSELECT
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;better u select all the records at once - &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IF NOT T_HEADER[] IS INITIAL.
SELECT ABC XYZ UVC ASD POS
INTO table t_items
FROM ZTABLE_ITEM
FOR  ALL ENTRIES IN T_HEADER
WHERE DOCNUM = T_HEADER-DOCNUM
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case - ur internal table T_HEADER should contain the Doc numbers, and for all these headers u ll get the items in internal table T_ITEM and then you can process using LOOP ENDLOOP or by READ itab statements. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it explains.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 12:42:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-issue/m-p/2815968#M658559</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T12:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: User exit issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-issue/m-p/2815969#M658560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SKC,&lt;/P&gt;&lt;P&gt;In my header table having 30 fields and item table have 5 fields.&lt;/P&gt;&lt;P&gt;My requirment is docu num is key in header table and each docum have several items from line item table.&lt;/P&gt;&lt;P&gt;I required total header fields 30 +line item data (5) fields.&lt;/P&gt;&lt;P&gt;Would it be possible if i am going to write a code as specified.&lt;/P&gt;&lt;P&gt;Please guide me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 13:19:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-issue/m-p/2815969#M658560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T13:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: User exit issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-issue/m-p/2815970#M658561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Aryan , u proceed in the way I have specified. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example - Say u have got 4 header docs in ur internal table i_header_tab. and u populated that like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT docno docdate docetc
FROM    doc_header
INTO     TABLE i_header_tab
WHERE ...............
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now for all these header data , u r trying to fetch the corresponding items then u ll write - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IF NOT i_header_tab[] IS INITIAL.

SELECT docno docitem fld2 fld3
FROM   doc_item
INTO     TABLE i_item_tab
FOR     ALL ENTRIES IN i_header_tab
WHERE docno = i_header_tab-docno.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So all the related items will be in the internal table i_item_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now u can process like this - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT i_header_tab.&lt;/P&gt;&lt;P&gt; LOOP AT i_item_tab WHERE docno = i_header_tab-docno.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Processing logic for Items for Individual Doc numbers.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does it help now ???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 13:51:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-issue/m-p/2815970#M658561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T13:51:02Z</dc:date>
    </item>
  </channel>
</rss>

