<?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 BADI problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi-problem/m-p/913190#M57525</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 am writing a BADI.somebody coded already...I am modifying the code. &lt;/P&gt;&lt;P&gt;I have created one ZTable, that table contains 2 fields one is Date and another one is Program name. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my problem is, the date (20050510) in the following code is hard coded...now i want to replace the 20050510 with Ztable date field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF &amp;lt;ACCIT_EX&amp;gt;-ACCIT-BUDAT &amp;gt; '20050510' OR &lt;/P&gt;&lt;P&gt;&amp;lt;ACCIT_EX&amp;gt;-ACCIT-AWTYP = 'BEBD' OR &lt;/P&gt;&lt;P&gt;&amp;lt;ACCIT_EX&amp;gt;-ACCIT-AWTYP = 'ACE'. &lt;/P&gt;&lt;P&gt;EXIT. &lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can we do this? &lt;/P&gt;&lt;P&gt;where should i declare the table name and field name(Date) in BADI... &lt;/P&gt;&lt;P&gt;how can i call?  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance, &lt;/P&gt;&lt;P&gt;Yad.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 May 2005 19:35:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-05-30T19:35:39Z</dc:date>
    <item>
      <title>BADI problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi-problem/m-p/913190#M57525</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 am writing a BADI.somebody coded already...I am modifying the code. &lt;/P&gt;&lt;P&gt;I have created one ZTable, that table contains 2 fields one is Date and another one is Program name. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my problem is, the date (20050510) in the following code is hard coded...now i want to replace the 20050510 with Ztable date field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF &amp;lt;ACCIT_EX&amp;gt;-ACCIT-BUDAT &amp;gt; '20050510' OR &lt;/P&gt;&lt;P&gt;&amp;lt;ACCIT_EX&amp;gt;-ACCIT-AWTYP = 'BEBD' OR &lt;/P&gt;&lt;P&gt;&amp;lt;ACCIT_EX&amp;gt;-ACCIT-AWTYP = 'ACE'. &lt;/P&gt;&lt;P&gt;EXIT. &lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can we do this? &lt;/P&gt;&lt;P&gt;where should i declare the table name and field name(Date) in BADI... &lt;/P&gt;&lt;P&gt;how can i call?  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance, &lt;/P&gt;&lt;P&gt;Yad.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2005 19:35:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi-problem/m-p/913190#M57525</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-30T19:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: BADI problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi-problem/m-p/913191#M57526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yad&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So your Z table seems to have some customization value. Why not defining it in the BAdI code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;b&amp;gt;DATA lv_date TYPE sydatum .

SELECT SINGLE date FROM ztable
       INTO lv_date
       WHERE &amp;lt;i&amp;gt;&amp;lt;your_condition&amp;gt;&amp;lt;/i&amp;gt; .

IF sy-subrc NE 0 .
*--Setting lv_date if not found in Ztable
ENDIF .&amp;lt;/b&amp;gt;

IF &amp;lt;ACCIT_EX&amp;gt;-ACCIT-BUDAT &amp;gt; &amp;lt;b&amp;gt;lv_date&amp;lt;/b&amp;gt; OR 
&amp;lt;ACCIT_EX&amp;gt;-ACCIT-AWTYP = 'BEBD' OR 
&amp;lt;ACCIT_EX&amp;gt;-ACCIT-AWTYP = 'ACE'. 
EXIT. 
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, instead of program name, I would use transaction code to choose dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT SINGLE date from ztable
       INTO lv_date
       WHERE &amp;lt;b&amp;gt;tcode = sy-tcode&amp;lt;/b&amp;gt; .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Serdar &amp;lt;a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d"&amp;gt;[ BC ]&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2005 19:57:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi-problem/m-p/913191#M57526</guid>
      <dc:creator>ssimsekler</dc:creator>
      <dc:date>2005-05-30T19:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: BADI problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi-problem/m-p/913192#M57527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Serdar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for ur reply.i have one doubt.In report's we will declare tables like this&lt;/P&gt;&lt;P&gt; tables: mara, marm, ztable. &lt;/P&gt;&lt;P&gt;but in BADI where should i declare like that?  In class or some where?&lt;/P&gt;&lt;P&gt;I didn't worked till now in BADI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Yad.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2005 20:34:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi-problem/m-p/913192#M57527</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-30T20:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: BADI problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi-problem/m-p/913193#M57528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yad&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Think BAdI as a function module for now. With TABLES statement, we declare not tables but row structure with the same row type of a table. This is something from the older versions of ABAP. The code I have written will do what you want. There you do not need to use a TABLES statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, since you are new to SDN, I'd like to tell that if you find an answer helpful, you can reward points to it using the scala on the left of each specific post and for the post which solves your question click the appropriate option saying it solved your problem. If you yourself solve your problem, then click the relevant radiobutton at the left of your original post. This way, you will save valuable times of SDNers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Serdar &amp;lt;a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d"&amp;gt;[ BC ]&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2005 20:49:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi-problem/m-p/913193#M57528</guid>
      <dc:creator>ssimsekler</dc:creator>
      <dc:date>2005-05-30T20:49:35Z</dc:date>
    </item>
  </channel>
</rss>

