<?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: Need help in Logic...? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877019#M675339</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sri, this code will work but it will give duplicate entries for ledger...a FI GL document gets posted in 3 ledgers I1 L1 L2 for debit and credit enties....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this code will give: 6 entries back...&lt;/P&gt;&lt;P&gt;1001 7000000034 2007 I1&lt;/P&gt;&lt;P&gt;1001 7000000034 2007 I1&lt;/P&gt;&lt;P&gt;1001 7000000034 2007 L1&lt;/P&gt;&lt;P&gt;1001 7000000034 2007 L1&lt;/P&gt;&lt;P&gt;1001 7000000034 2007 L2&lt;/P&gt;&lt;P&gt;1001 7000000034 2007 L2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Oct 2007 19:02:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-01T19:02:39Z</dc:date>
    <item>
      <title>Need help in Logic...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877003#M675323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written a FM that takes current date and find out all the FI GL Documents that are parked and then check for documents that got posted...I mean parked docs that were posted....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will attach the code here...I am returning the list of parked and posted docs as two tables...now i want to find the ledgers in which the parked documents got posted....so what shud i include in my code....Please suggest...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION Z_FIGL_GL_PARK_TO_POST.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local Interface:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(V_CPUDT) TYPE  CPUDT&lt;/P&gt;&lt;P&gt;*"  TABLES&lt;/P&gt;&lt;P&gt;*"      TB_PARKED STRUCTURE  ZSFIGL_PARK_TO_POST&lt;/P&gt;&lt;P&gt;*"      TB_POSTED STRUCTURE  ZSFIGL_PARK_TO_POST&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select BUKRS BELNR GJAHR from BKPF into TABLE tb_parked where BLART = 'SY'&lt;/P&gt;&lt;P&gt;                                                                AND CPUDT eq v_cpudt&lt;/P&gt;&lt;P&gt;                                                                AND PPNAM IS NOT NULL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc  = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select BUKRS BELNR GJAHR from BKPF into table tb_posted&lt;/P&gt;&lt;P&gt;                                      for all entries in tb_parked&lt;/P&gt;&lt;P&gt;                                      where BUKRS = tb_parked-v_BUKRS AND&lt;/P&gt;&lt;P&gt;                                      BELNR = tb_parked-v_BELNR AND&lt;/P&gt;&lt;P&gt;                                      GJAHR = tb_parked-v_GJAHR AND&lt;/P&gt;&lt;P&gt;                                      BSTAT = ''.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Sam williams&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 21:10:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877003#M675323</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T21:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Logic...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877004#M675324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can get the ledger out of the FAGLFLEXA table but when i fill the TB_posted tablles it shud show the ledger also...&lt;/P&gt;&lt;P&gt;CC   Doc NO       Year Ledger&lt;/P&gt;&lt;P&gt;1001 7000000789   2007    I1&lt;/P&gt;&lt;P&gt;                                   L1&lt;/P&gt;&lt;P&gt;                                   L2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it has to be displayed like this...is it possible....&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 22:22:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877004#M675324</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T22:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Logic...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877005#M675325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it will be possible. You have the docnumber and company code and you can get the ledger from GLFLEXA table and MODIFY your TB_POSTED table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 22:27:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877005#M675325</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T22:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Logic...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877006#M675326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Sri...how can i do it can u tell me....can u please show it to me ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 22:49:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877006#M675326</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T22:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Logic...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877007#M675327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i do this...kindly help....I can get ledger data from FAGLFLEXA but how shud i modify the internal table so that ledger reflects there...i am trying to do this but each time the loop executes it replaces the ledger value with new one i want to keep each value...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I mean &lt;/P&gt;&lt;P&gt;CC Doc NO Year Ledger&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------" /&gt;&lt;P&gt;1001 7000000789 2007 I1&lt;/P&gt;&lt;P&gt;                                   L1&lt;/P&gt;&lt;P&gt;                                   L2&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying this piece of code but it replaces the ledger value each time the loop executes...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_LEDGER into wa_LEDGER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select distinct RLDNR from FAGLFLEXA into (wa_ledger-V_RLDNR) where RBUKRS = wa_LEDGER-v_RBUKRS and&lt;/P&gt;&lt;P&gt;                                                 DOCNR = wa_LEDGER-v_DOCNR and&lt;/P&gt;&lt;P&gt;                                                 RYEAR = wa_LEDGER-v_RYEAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Modify i_ledger FROM wa_ledger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What shud i do to get the result....?&lt;/P&gt;&lt;P&gt;Please help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 16:52:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877007#M675327</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T16:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Logic...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877008#M675328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sam - what release are you on? Table FAGLFLEXA doesn't exist in 4.7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you mean GLFLEXA?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and how is I_LEDGER filled? You should post that portion of code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Rob Burbank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 17:29:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877008#M675328</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T17:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Logic...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877009#M675329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob, I am on ECC 6.0...&lt;/P&gt;&lt;P&gt;Yaa. i think it is GLFLEXA in 4.7....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 17:39:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877009#M675329</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T17:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Logic...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877010#M675330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gurus, kindly provide me some suggestions....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 18:42:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877010#M675330</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T18:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Logic...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877011#M675331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You didn't answer my question - how is I_LEDGER filled?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 18:44:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877011#M675331</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T18:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Logic...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877012#M675332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;oK...Let me send u the test code that i have written:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: Begin of i_bkpf occurs 0,&lt;/P&gt;&lt;P&gt;      v_bukrs LIKE BKPF-BUKRS,&lt;/P&gt;&lt;P&gt;      v_BELNR LIKE BKPF-BELNR,&lt;/P&gt;&lt;P&gt;      v_GJAHR LIKE BKPF-GJAHR.&lt;/P&gt;&lt;P&gt;DATA: End of i_bkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: Begin of i_ledger occurs 0,&lt;/P&gt;&lt;P&gt;      v_rbukrs LIKE FAGLFLEXA-RBUKRS,&lt;/P&gt;&lt;P&gt;      v_docnr LIKE FAGLFLEXA-DOCNR,&lt;/P&gt;&lt;P&gt;      v_ryear LIKE FAGLFLEXA-RYEAR,&lt;/P&gt;&lt;P&gt;      v_rldnr LIKE FAGLFLEXA-RLDNR.&lt;/P&gt;&lt;P&gt;DATA: End of i_ledger.&lt;/P&gt;&lt;P&gt;DATA: wa_ledger like i_ledger,&lt;/P&gt;&lt;P&gt;      wa_bkpf like i_bkpf,&lt;/P&gt;&lt;P&gt;      idx like sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select BUKRS BELNR GJAHR from BKPF into TABLE i_vbkpf where BLART = 'SY'&lt;/P&gt;&lt;P&gt;                                                              AND CPUDT eq p_cpudt&lt;/P&gt;&lt;P&gt;                                                              AND PPNAM IS NOT NULL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc  = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select BUKRS BELNR GJAHR from BKPF into table i_LEDGER&lt;/P&gt;&lt;P&gt;                                      for all entries in i_vbkpf&lt;/P&gt;&lt;P&gt;                                      where BUKRS = i_vbkpf-v_BUKRS AND&lt;/P&gt;&lt;P&gt;                                      BELNR = i_vbkpf-v_BELNR AND&lt;/P&gt;&lt;P&gt;                                      GJAHR = i_vbkpf-v_GJAHR AND&lt;/P&gt;&lt;P&gt;                                      BSTAT = ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;loop at i_bkpf into wa_bkpf.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;select rldnr from faglflexa into corresponding fields of i_ledger where&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_LEDGER into wa_LEDGER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select distinct RLDNR from FAGLFLEXA into (wa_ledger-V_RLDNR) where RBUKRS = wa_LEDGER-v_RBUKRS and&lt;/P&gt;&lt;P&gt;                                                 DOCNR = wa_LEDGER-v_DOCNR and&lt;/P&gt;&lt;P&gt;                                                 RYEAR = wa_LEDGER-v_RYEAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Modify i_ledger FROM wa_ledger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know what shud i do Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 18:46:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877012#M675332</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T18:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Logic...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877013#M675333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this out...It should work for you....I have declared an internal table with i_faglflexa to avoid select...endselect and to use For All Entries to fetch all relevant document numbers.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPES: BEGIN OF i_faglflexa,
        ryear TYPE faglflexa-ryear,
        docnr TYPE faglflexa-docnr,
        rldnr TYPE faglflexa-rldnr,
       END OF i_faglflexa.
DATA: i_faglflexa TYPE STANDARD TABLE OF i_faglflexa.
DATA: wa_faglflexa LIKE LINE OF i_faglflexa.
DATA: t_tabix TYPE sy-tabix.

IF NOT i_ledger[] IS INITIAL.
  SELECT DISTINCT ryear docnr rldnr FROM FAGLFLEXA
                                    INTO TABLE i_faglflexa
                                    FOR ALL ENTRIES IN i_ledger
                                    WHERE ryear = i_ledger-ryear
                                    AND   docnr = i_ledger-docnr.
ENDIF.

LOOP AT i_ledger INTO wa_ledger.
  t_tabix = sy-tabix.
  READ TABLE i_faglflexa INTO wa_faglflexa
                         WITH KEY ryear = wa_ledger-ryear
                                  docnr = wa_ledger-docnr.
  IF sy-subrc EQ 0  .
    wa_ledger-rldnr = wa_faglflexa-rldnr.
    MODIFY i_ledger FROM wa_ledger INDEX t_tabix.
  ENDIF.
  CLEAR: wa_ledger, wa_faglflexa, t_tabix.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 18:50:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877013#M675333</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T18:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Logic...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877014#M675334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where are you filling the i_ledger in the code??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 18:54:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877014#M675334</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T18:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Logic...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877015#M675335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But this code is entirely different from the code you first posted in this thread. which code snippet is the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 18:55:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877015#M675335</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T18:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Logic...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877016#M675336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be you can do a JOIN on BKPF and GLFLEXA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select bkpf~bukrs bkpf~belnr bkpf~gjahr glflexa~rldnr 
into table i_ledger
from bkpf INNER JOIN glflexa 
  on bkpf~bulrs = glflexa~rbukrs AND 
  bkpf~belnr = glflexa~docnr AND 
  bkpf~gjahr = glflexa~ryear 
FOR ALL ENTRIES IN i_vbkpf
where bkpf~BUKRS = i_vbkpf-v_BUKRS AND
      bkpf~BELNR = i_vbkpf-v_BELNR AND
      bkpf~GJAHR = i_vbkpf-v_GJAHR AND
      bkpf~BSTAT = ''.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 18:57:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877016#M675336</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T18:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Logic...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877017#M675337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I take back...I didn't notice it..&lt;/P&gt;&lt;P&gt;&amp;gt; Where are you filling the i_ledger in the code??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 18:57:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877017#M675337</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T18:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Logic...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877018#M675338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;The first code that u see is a FM that i created from the current test code that i posted....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 18:58:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877018#M675338</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T18:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Logic...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877019#M675339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sri, this code will work but it will give duplicate entries for ledger...a FI GL document gets posted in 3 ledgers I1 L1 L2 for debit and credit enties....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this code will give: 6 entries back...&lt;/P&gt;&lt;P&gt;1001 7000000034 2007 I1&lt;/P&gt;&lt;P&gt;1001 7000000034 2007 I1&lt;/P&gt;&lt;P&gt;1001 7000000034 2007 L1&lt;/P&gt;&lt;P&gt;1001 7000000034 2007 L1&lt;/P&gt;&lt;P&gt;1001 7000000034 2007 L2&lt;/P&gt;&lt;P&gt;1001 7000000034 2007 L2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 19:02:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877019#M675339</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T19:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Logic...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877020#M675340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So for each document, you want an entry in some table for each corresponding entry in the ledger table??&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 19:05:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877020#M675340</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T19:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Logic...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877021#M675341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then sort and Delete duplicates...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wont it solve your purpose??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 19:06:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877021#M675341</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T19:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Logic...?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877022#M675342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It will...how shud i do that Sri....can u please tell me....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 19:09:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/2877022#M675342</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T19:09:18Z</dc:date>
    </item>
  </channel>
</rss>

