<?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: function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3369843#M808857</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;instead of using sy-datum1 and sy-datum as parameters take them in two separate varibales who has type same as sy-datum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then pass these variables you will get desired output for sure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;keep rockin&lt;/P&gt;&lt;P&gt;vivek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 1, 2008 12:52 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Feb 2008 15:04:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-01T15:04:41Z</dc:date>
    <item>
      <title>function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3369842#M808856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an sap table lfa1&lt;/P&gt;&lt;P&gt;I have to extract the vendor records &lt;/P&gt;&lt;P&gt;Which were created from sy-datum-1 to sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I created a function module &lt;/P&gt;&lt;P&gt;My import parameters will be sy-datum and sy-datum-1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 15:00:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3369842#M808856</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T15:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3369843#M808857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;instead of using sy-datum1 and sy-datum as parameters take them in two separate varibales who has type same as sy-datum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then pass these variables you will get desired output for sure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;keep rockin&lt;/P&gt;&lt;P&gt;vivek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 1, 2008 12:52 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 15:04:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3369843#M808857</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T15:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3369844#M808858</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;&lt;/P&gt;&lt;P&gt;goto se37&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;give Zname to your FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Import PARAmeters are sy-datum &amp;amp; sy-datum1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in tables give a table to store vendor information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in source code write select stmt. to populate that table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RAISE exception for error condition....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some thing like this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of t_po,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        ebeln type ebeln,&lt;/P&gt;&lt;P&gt;        ebelp type ebelp,&lt;/P&gt;&lt;P&gt;         etenr type eeten,&lt;/P&gt;&lt;P&gt;        aedat type erdat,&lt;/P&gt;&lt;P&gt;        VERKF type EVERK,&lt;/P&gt;&lt;P&gt;        TELF1 type TELF0,&lt;/P&gt;&lt;P&gt;        lifnr type ELIFN,&lt;/P&gt;&lt;P&gt;        NAME1 type  NAME1_GP,&lt;/P&gt;&lt;P&gt;        ORT01 type ORT01_GP,&lt;/P&gt;&lt;P&gt;        regio type regio,&lt;/P&gt;&lt;P&gt;        bukrs type bukrs,&lt;/P&gt;&lt;P&gt;        ORT01_c type ORT01,  "address of the company&lt;/P&gt;&lt;P&gt;        LFDAT type LFDAT_V,&lt;/P&gt;&lt;P&gt;        matnr type matnr,&lt;/P&gt;&lt;P&gt;        menge type bstmg,&lt;/P&gt;&lt;P&gt;        meins type meins,&lt;/P&gt;&lt;P&gt;        netpr type bprei,&lt;/P&gt;&lt;P&gt;        netwr type bwert,&lt;/P&gt;&lt;P&gt;        maktx type maktx,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        menge_d type etmen,&lt;/P&gt;&lt;P&gt;        eindt type eindt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        end of t_po.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_po_final type t_po.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*data: it_po type t_po.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of t_po_details ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         ebeln type ebeln,&lt;/P&gt;&lt;P&gt;         ebelp type ebelp,&lt;/P&gt;&lt;P&gt;         matnr type matnr,&lt;/P&gt;&lt;P&gt;         menge type bstmg,&lt;/P&gt;&lt;P&gt;         meins type meins,&lt;/P&gt;&lt;P&gt;         netpr type bprei,&lt;/P&gt;&lt;P&gt;         netwr type bwert,&lt;/P&gt;&lt;P&gt;         maktx type maktx,&lt;/P&gt;&lt;P&gt;         etenr type eeten,&lt;/P&gt;&lt;P&gt;         menge_d type etmen,&lt;/P&gt;&lt;P&gt;         eindt type eindt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      end of t_po_details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_po_details type t_po_details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: po_details type t_po_details occurs 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**data: it_eket like eket.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of t_deliv_details,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        ebelp type ebelp,&lt;/P&gt;&lt;P&gt;        ebeln type ebeln,&lt;/P&gt;&lt;P&gt;        etenr type eeten,&lt;/P&gt;&lt;P&gt;         menge_d type etmen,&lt;/P&gt;&lt;P&gt;         eindt type eindt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    end of t_deliv_details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_delivery type t_deliv_details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: it_delivery type t_deliv_details occurs 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: y type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of t_po_header,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        ebeln type ebeln,&lt;/P&gt;&lt;P&gt;        aedat type erdat,&lt;/P&gt;&lt;P&gt;        VERKF type EVERK,&lt;/P&gt;&lt;P&gt;        TELF1 type TELF0,&lt;/P&gt;&lt;P&gt;        lifnr type ELIFN,&lt;/P&gt;&lt;P&gt;        NAME1 type  NAME1_GP,&lt;/P&gt;&lt;P&gt;        ORT01 type ORT01_GP,&lt;/P&gt;&lt;P&gt;        regio type regio,&lt;/P&gt;&lt;P&gt;        bukrs type bukrs,&lt;/P&gt;&lt;P&gt;        ORT01_c type ORT01,  "address of the company&lt;/P&gt;&lt;P&gt;        LFDAT type LFDAT_V,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        end of t_po_header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*select * into table po_header from ekko where ebeln in po_range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_po_header type t_po_header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: po_header type standard table of t_po_header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_details1 type t_po_details.&lt;/P&gt;&lt;P&gt;data: po_details1 type standard table of t_po_details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*data: po_header type standard table of t_po_header.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;select ebeln aedat verkf telf1 bukrs lifnr into corresponding fields of wa_po_header from ekko where ebeln in PO_RANGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_po_header to po_header.&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;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;select ebeln ebelp matnr menge meins netpr netwr into corresponding fields of wa_po_details from ekpo&lt;/P&gt;&lt;P&gt;   where&lt;/P&gt;&lt;P&gt;  ebeln in po_range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; select single matnr maktx into (wa_po_details-matnr,&lt;/P&gt;&lt;P&gt;                                  wa_po_details-maktx)&lt;/P&gt;&lt;P&gt;                            from makt where matnr = wa_po_details-matnr and spras = sy-langu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_po_details to po_details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endselect.&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;loop at po_details into wa_po_details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ebeln ebelp etenr eindt menge into (wa_delivery-ebeln,&lt;/P&gt;&lt;P&gt;                                           wa_delivery-ebelp,&lt;/P&gt;&lt;P&gt;                                           wa_delivery-etenr,&lt;/P&gt;&lt;P&gt;                                           wa_delivery-eindt,&lt;/P&gt;&lt;P&gt;                                           wa_delivery-menge_d) from eket&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        where ebeln = wa_po_details-ebeln and ebelp = wa_po_details-ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_delivery to it_delivery.&lt;/P&gt;&lt;P&gt;&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;loop at po_header into wa_po_header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*clear wa_po_header-lifnr.&lt;/P&gt;&lt;P&gt;clear wa_po_header-name1.&lt;/P&gt;&lt;P&gt;clear wa_po_header-ort01.&lt;/P&gt;&lt;P&gt;clear wa_po_header-regio.&lt;/P&gt;&lt;P&gt;*clear wa_po_header-bukrs.&lt;/P&gt;&lt;P&gt;clear wa_po_header-ort01_c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   select single lifnr name1 ort01 regio into (wa_po_header-lifnr,&lt;/P&gt;&lt;P&gt;                                               wa_po_header-name1,&lt;/P&gt;&lt;P&gt;                                               wa_po_header-ort01,&lt;/P&gt;&lt;P&gt;                                               wa_po_header-regio)&lt;/P&gt;&lt;P&gt;                                               from lfa1 where lifnr = wa_po_header-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          select single bukrs ort01 into (wa_po_header-bukrs,&lt;/P&gt;&lt;P&gt;                                            wa_po_header-ort01_c)&lt;/P&gt;&lt;P&gt;                        from t001&lt;/P&gt;&lt;P&gt;                        where bukrs = wa_po_header-bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  modify po_header from wa_po_header.&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort po_details by ebeln ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort it_delivery by ebeln ebelp etenr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append lines of po_details to po_details1.&lt;/P&gt;&lt;P&gt;refresh po_details.&lt;/P&gt;&lt;P&gt;loop at po_details1 into wa_po_details.&lt;/P&gt;&lt;P&gt;loop at it_delivery into wa_delivery where ebeln = wa_po_details-ebeln and ebelp =&lt;/P&gt;&lt;P&gt;wa_po_details-ebelp.&lt;/P&gt;&lt;P&gt;wa_po_details-etenr = wa_delivery-etenr.&lt;/P&gt;&lt;P&gt;wa_po_details-eindt = wa_delivery-eindt.&lt;/P&gt;&lt;P&gt;wa_po_details-menge_d = wa_delivery-menge_d.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_po_details to po_details.&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort po_details by ebeln ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at po_details into wa_po_details.&lt;/P&gt;&lt;P&gt;at new ebeln.&lt;/P&gt;&lt;P&gt;read table po_header into wa_po_header with key ebeln = wa_po_details-ebeln binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; read table po_header into wa_po_header with key ebeln = wa_po_details-ebeln transporting all fields.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        wa_po_final-ebeln = wa_po_header-ebeln.&lt;/P&gt;&lt;P&gt;        wa_po_final-aedat = wa_po_header-aedat.&lt;/P&gt;&lt;P&gt;        wa_po_final-VERKF = wa_po_header-verkf.&lt;/P&gt;&lt;P&gt;        wa_po_final-TELF1 = wa_po_header-telf1.&lt;/P&gt;&lt;P&gt;        wa_po_final-lifnr = wa_po_header-lifnr.&lt;/P&gt;&lt;P&gt;        wa_po_final-NAME1 = wa_po_header-name1.&lt;/P&gt;&lt;P&gt;        wa_po_final-ORT01 = wa_po_header-ort01.&lt;/P&gt;&lt;P&gt;        wa_po_final-regio = wa_po_header-regio.&lt;/P&gt;&lt;P&gt;        wa_po_final-bukrs = wa_po_header-bukrs.&lt;/P&gt;&lt;P&gt;        wa_po_final-ORT01_c = wa_po_header-ort01_c.&lt;/P&gt;&lt;P&gt;        wa_po_final-LFDAT = wa_po_header-lfdat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        wa_po_final-ebelp = wa_po_details-ebelp.&lt;/P&gt;&lt;P&gt;        wa_po_final-matnr = wa_po_details-matnr.&lt;/P&gt;&lt;P&gt;        wa_po_final-menge = wa_po_details-menge.&lt;/P&gt;&lt;P&gt;        wa_po_final-meins = wa_po_details-meins.&lt;/P&gt;&lt;P&gt;        wa_po_final-netpr = wa_po_details-netpr.&lt;/P&gt;&lt;P&gt;        wa_po_final-netwr = wa_po_details-netwr.&lt;/P&gt;&lt;P&gt;        wa_po_final-maktx = wa_po_details-maktx.&lt;/P&gt;&lt;P&gt;        wa_po_final-etenr = wa_po_details-etenr.&lt;/P&gt;&lt;P&gt;        wa_po_final-menge_d = wa_po_details-menge_d.&lt;/P&gt;&lt;P&gt;        wa_po_final-eindt = wa_po_details-eindt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_po_final to po_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REGARDS,&lt;/P&gt;&lt;P&gt;GAURAVJ.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 15:08:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3369844#M808858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T15:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3369845#M808859</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;Declare 2 variables of same type as sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move these fields to a range field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: r_datum like line of sy-datum.  (work around this) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;r_datum-low - v_date1.&lt;/P&gt;&lt;P&gt;r_datum-high-v_date2.&lt;/P&gt;&lt;P&gt;select * from lfa1 into it_lfa1 where datum in r_datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Nageswar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 1, 2008 12:53 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 15:12:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3369845#M808859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T15:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3369846#M808860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What exactly do you mean by "created from sy-datum-1 to sy-datum"? Is it created between yesterday and today or created between 2 different dates?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you mean yesterday and today there is no necessity to ask the user for iunput, you can always calculate it, using the system variable sydatum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;today = sy-datum.&lt;/P&gt;&lt;P&gt;yesterday = sy-datum-1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if you mean 2 dates, then goto import parameters of the FM and create 2 parameters FROM_DATE and TO_DATE, both with type sy-datum. Then you can use these two dates in your logic accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its better to create a range as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RANGE : r_date for lfa1-erdat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;r_date-sign = 'I'.&lt;/P&gt;&lt;P&gt;r_date-option = 'EQ'.&lt;/P&gt;&lt;P&gt;r_date-low = from_date.&lt;/P&gt;&lt;P&gt;r_date-high = to_date.&lt;/P&gt;&lt;P&gt;append r_Date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your select query you can write&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;from lfa1&lt;/P&gt;&lt;P&gt;into table t_lfa1&lt;/P&gt;&lt;P&gt;where erdat in r_date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 15:13:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3369846#M808860</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T15:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3369847#M808861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Import Parameters: &lt;/P&gt;&lt;P&gt;erdat1 type sy-datum&lt;/P&gt;&lt;P&gt;erdat2 type sy-datum&lt;/P&gt;&lt;P&gt;tables:&lt;/P&gt;&lt;P&gt;t_lfa1 like lfa1&lt;/P&gt;&lt;P&gt;code in fm&lt;/P&gt;&lt;P&gt;tables: lfa1.&lt;/P&gt;&lt;P&gt;ranges: r_erdat for lfa1-erdat.&lt;/P&gt;&lt;P&gt;r_erdat-sign = 'I'.&lt;/P&gt;&lt;P&gt;r_erdat-option = 'BT'.&lt;/P&gt;&lt;P&gt;r_erdat-low = erdat1.&lt;/P&gt;&lt;P&gt;r_erdat-high = erdat2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from lfa1 into table t_lfa1 where erdat in r_erdat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think this is the function module u need &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raghu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 1, 2008 12:53 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 15:16:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3369847#M808861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T15:16:57Z</dc:date>
    </item>
  </channel>
</rss>

