AR Aging Document Date

Is there any way to run an AR Aging by Due date, but actually have the document date field included in the results?

No.  You could only select one kind of date at one time by this system report.
Thanks,
Gordon

Similar Messages

  • Running Aging reports based on Document date in 2007

    Hi All,
    I have an issue while running the Receivables aging report in the 2007 version. The customer usually runs the reports based on the document date. Document date holds more importance in their case.
    However, in the 2007 version, the aging report is totally governed by the posting date. For example, if I change the aging date, the posting date also changes to the aging date and viceversa. If I want to change the aging date to 01/31/09, the posting date u2018Tou2019 automatically changes to 01/31/09 and when we run the report, it will bring in all transactions until the posting date of 01/31/09.
    But, the requirement is to leave the posting date as blank and give the document date u2018Tou2019 01/31/09. This will then pull all transactions until the document date of 01/31/09 irrespective of the posting date.
    As a result, when you run the balance sheet with the document date of 01/31/09, receivables show a different balance. This discrepancy is due to the fact that AR Receivable aging report forces to keep the Aging date = Posting date.
    This was not the case in SAP 2005 version where we were allowed to key in the aging date and the document date to get results based on document date.
    This is very critical as they have recently upgraded from 2005 to 2007 and they are unable to reconcile the balances out of Balance sheet and Aging.
    Please advise.
    Thanks,
    Payal

    Hi Jitin,
    We tried that as well but no luck. There is still a discrepency between what the aging shows and what the BS shows. When we put the Aging date as 01/31/09 and Document date as 01/3109, the posting date 'To' is automatically filled with 01/31/09, so it basically searches for all transactions with the posting date 01/31/09 and document date 01/31/09. This is not the requirement as we do not want to consider the posting date at all while running the aging.
    I also have some screenshots if I can share. I am not sure if I should report this to SAP for further investigation or am I missing something here.
    Thanks for your help.
    Regards,
    Payal
    Edited by: Rui Pereira on May 1, 2009 10:48 AM

  • Variable for Document Date in Customer Receivable Aging

    Hi all,
    This is regarding u201CCustomer Receivable Aging u2013 Detailsu201D in SBOne.
    In the print layout, I found 3 types of date in system variables i.e.
    1) system variable 184 = Due Date
    2) system variable 185 = Posting Date
    3) system variable 187 = The is vary by u201Cage byu201D Date (either document date, posting  date or due date)
    Regardless the date chosen for aging, we would like to display both Invoice (Document) Date and Due Date permanently on the layout.
    Does anyone know what is the system variable for invoice/document date in this layout. Thanks for help in advance.
    Regards,
    Eric Tan

    Sorry this is no right answer. I had test it variable 65 doesn't work.
    I found that the System variable 187 will be either document date, posting date or due date based on the aging date selection in Receivable Details Aging Report
    Any other advise.How to check the all the variable in Receivable Detals Aging Report.
    Thanks.

  • Include Document Date & Doc Due Date in SAP B1 Aging Details Report

    We are not able to view the actual document date and document due date from the Aging details report, it should be an essential information that should be show in the aging report. It make no sense that user still have to manually drill into each document to just read the document date/ due date for their aging analysis!!!
    Try to imaging that how important this information to a business, for instance, to age the invoice which due for 1 - 30 days, the document date which due for 1 days is categorise into 1-30days aged, the documents due for 30days also categorise into 1-30days aged, however it bring the different meanings to user and user need these information to take the action decision! How useful for an aging report which could not equip user with these basic information to provide user with efficiency to make effective decision???
    I think it is necessary to incorporate this level of details to the SAP B1 Aging Report.

    Hi Theerawat,
    You may check these threads first:
    Document Date
    Posting / Due / Document date trouble
    Re: Posting Date
    Re: Difference between posting & system date in Inventory Audit Report
    Thanks,
    Gordon

  • Customer/vendors aging by document date

    The standard customer aging report S_ALR_87012168 does not have the document date as option for key date. Is there another report/option to do aging by document date?
    Moderator: Please, search before posting

    Check Re: Creditors ageing report

  • Vendor ageing report data for all doc type needed(urgent)

    hello everyone
    once again i need ur help guys.
    in the vendor ageing report i am getting data for only one document type and not of other.
    ex- see i have two documents type-
    1.KD 2. EJ
    so i am getting data for document type KD only.
    so how to get the data of document type EJ along with KD.
    below is my code .
    so tell what modifications i have to made .
    *& Report  Z_VENDOR AGEING                                                    *
    *&  in this repoet I am calculating the vendor ageing
        which is depending on formula
        AGEING = Current Date(or any date entered by user) – Bline Date(BSIK-ZFBDT)                                                                 *
    REPORT  z_vendor  NO STANDARD PAGE HEADING
                      LINE-SIZE 200
                      LINE-COUNT 65(3).
    TABLES : bsik.
    DATA : BEGIN OF t_out OCCURS 0,
           bukrs LIKE bsik-bukrs,
           saknr LIKE bsik-saknr,
           bldat LIKE bsik-bldat,
           wrbtr LIKE bsik-wrbtr,
           lifnr LIKE bsik-lifnr,
           zfbdt like bsik-zfbdt,
           zbd1t like bsik-zbd1t,
           ageing type i,
           END OF t_out.
    parameters : p_date1 type d.
    SELECT-OPTIONS : s_bukrs FOR bsik-bukrs,
                     s_saknr FOR bsik-saknr,
                     s_lifnr FOR bsik-lifnr.
    SELECT bukrs saknr bldat wrbtr lifnr zfbdt zbd1t
           FROM bsik
           INTO  TABLE t_out
           WHERE saknr IN s_saknr
           AND bukrs IN s_bukrs
           AND lifnr IN s_lifnr.
    Loop at t_out.
    CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
      EXPORTING
        i_datum_bis                   = p_date1
        i_datum_von                   = t_out-zfbdt
      I_KZ_EXCL_VON                 = '0'
      I_KZ_INCL_BIS                 = '0'
      I_KZ_ULT_BIS                  = ' '
      I_KZ_ULT_VON                  = ' '
      I_STGMETH                     = '0'
      I_SZBMETH                     = '1'
    IMPORTING
       E_TAGE                        = t_out-ageing
    EXCEPTIONS
      DAYS_METHOD_NOT_DEFINED       = 1
      OTHERS                        = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Modify t_out.
    Clear t_out.
    Endloop.
    LOOP AT T_OUT.
    IF T_OUT-SHKZG = ‘H’.
    T_OUT-WRBTR = T_OUT-WRBTR * -1.
    T_OUT-WRBTR = T_OUT-DMBTR * -1.
    ENDIF.
    DATA: TOTAL(16) TYPE P DECIMALS 2.
    TOTAL = TOTAL + T_OUT-DMBTR.
    Endloop.
    LOOP AT t_out.
      WRITE : / t_out-saknr,
                t_out-lifnr,
                t_out-wrbtr,
                t_out-zfbdt,
                T_OUT-DMBTR,
                t_out-ageing.
    AT LAST.
    WRITE:/ TOTAL.
    CLEAR TOTAL.
    ENDAT.
    ENDLOOP.
    Message was edited by: sanjeev singh

    Sanjeev,
    Can you tell what is document type EJ representing...Secondly, if you check couple of documents of EJ type and check if data is available as per you WHERE clause filters.
    Regards
    Anurag

  • Document date instead of the BP Ref. No.

    Hi All,
    In Aging Reports:
      On Either  customer and vendor aging reports:
      For the detailed again report printout, i need to see the document date instead of the BP Ref. No.
    will you pls guide me how to do this?
    thanks,
    philip

    Hi, hope still not late to solve your issue, you may this link to get the aging report in XLR
    https://websmp209.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000654469&_SCENARIO=01100035870000000183&_ADDINC=&_OBJECT=011000358700001172792006E.htm
    , under Supporting Materials >> Sample Reports XL Reporter 2005..
    Cheers

  • Document Date on Outgoing Payment/Statement Report PLD

    Hi,
    Is there a way to display the Document Date of the paid/outstanding invoice on the print layout for Remittances (Outgoing Payment) and Customer Statement (Ageing - Customer Statement Report)? At the moment it's only the Posting Date for the Outgoing Payment and Posting Date + Due Date for the Statement Report but would be great to have the Document Date too.
    Regards,
    Nat

    Hi Natalia,
    for adding the Document date to the Outgoing payments form you can add field via modification of the print layout. For example OVTG.Tax Date should represent the document date.
    I would like to know what is the scenario for the document date to be visible on the Aging report.
    Best Regards,
    Martin Slavik
    SAP Business One Solution Manager

  • DRQ: document date column vendor statement

    Hello!
    We request to implement to add "document date" column on "vendor statement" report.
    Now, even if it is "checked" in settings and it is visible on "supplier liabilities ageing" (screenshot z1)
    [z1|http://img130.imageshack.us/img130/2002/61227598.jpg]
    It is not visible on reportsand printings ("supplier statement report") screenshot zel3
    [zel3|http://img406.imageshack.us/img406/994/zel3.jpg]
    This issue is detailed described (with screenshots) under SAP support
    request nr 280783 
    I have created service request to SAP and i have received answer:
    "There is note no. 1260740 which explains how to get the document date in the printout of aging report in the layout "Detailed Receivable Ageing Report".
    Unfortunately, after checking this in the layout you asked called "statement report", I saw that it is not possible to see the document date there, and it is not possible to add this field in the layo ut as the report is hardcoded.
    So the customer can see this field when using the layout "Detailed Receivable Ageing Report", but if it is very important for the customer to see the document date in the "statement report" layout, pl ease kindly refer to SAP Note No.1028874 regards Missing Functionality."

    I sort of solved this problem myself.
    Apparently, OPCH table (AP Invoice) was not available in the drop-down menu.
    So, I selected the closest I can get: OJDT table (Journal Entry) and selected TaxDate - Document Date.
    It works now.

  • Using spry to filter age or date range?

    I'm trying to create a spry filter to filter between age or date ranges. I can get the code to filter an age if it's greater or below a number, but not a range between numbers. How can I modify the following code to filter between a  range of numbers? I would prefer to use drop down for age range choices so the user can choose each age from a drop down menu but I wasn't having much luck with it whereas the checkbox was somewhat working for me. If someone has a drop down method to select ages and have spry filter between the values I would be very grateful. Many thanks in advance!
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Multiple Filters Sample</title>
    <link href="http://labs.adobe.com/technologies/spry/css/samples.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" type="text/javascript" src="http://labs.adobe.com/technologies/spry/includes/xpath.js"></script>
    <script language="JavaScript" type="text/javascript" src="http://labs.adobe.com/technologies/spry/includes/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript" src="http://labs.adobe.com/technologies/spry/includes/SpryDataExtensions.js"></script>
    <script type="text/javascript">
    <!--
    var dsStates = new Spry.Data.XMLDataSet("states.xml", "states/state");
    dsStates.setColumnType("name", "number");
    function ff15(ds, row, index){ var c = row.name; return c >= '6' && c <= '100' ? null : row; };
    function ffIP(ds, row, index){ var c = row.name; return c >= '11' && c <= '100' ? null : row; };
    function ffQZ(ds, row, index){ var c = row.name; return c >= '0' && c <= '10' ? null : row; };
    function ToggleFilter(enable, f)
         if (enable)
              dsStates.addFilter(f, true);
         else
              dsStates.removeFilter(f, true);
    function RemoveAllFilters()
         document.forms[0]["f15"].checked = false;
         document.forms[0]["fIP"].checked = false;
         document.forms[0]["fQZ"].checked = false;
         dsStates.removeAllFilters(true);
    -->
    </script>
    </head>
    <body>
    <div class="liveSample" style="float: left; margin-bottom: 4px;">
         <form action="">
         <label>Show '1' - '5': <input name="f15" type="checkbox" value="" onclick="ToggleFilter(this.checked, ff15);" /></label><br />
         <label>Show '6' - '10': <input name="fIP" type="checkbox" value="" onclick="ToggleFilter(this.checked, ffIP);" /></label><br />
         <label>Show '11' - '20': <input name="fQZ" type="checkbox" value="" onclick="ToggleFilter(this.checked, ffQZ);" /></label><br />
         <input type="button" value="Remove All Filters" onclick="RemoveAllFilters();" />
         </form>
         <div spry:region="dsStates" spry:repeatchildren="dsStates">
              <span>{name}</span>
         </div>
    </div>
    </body>
    </html>
    <states>
         <state>
              <name>1</name>
         </state>
         <state>
              <name>2</name>
         </state>
         <state>
              <name>3</name>
         </state>
         <state>
              <name>4</name>
         </state>
         <state>
              <name>5</name>
         </state>
    etc. etc.
    </states>

    The syntax for the xml file along with the rest of the source was provided in the original post. Here's the modified html file. How do I concactenate if (cat = 2) if (cat = 3) etc. into the function? Thanks in advance.
    Also as you can see from my modified html source, I want two separate drop downs: one for MINage and one for MAx age. From looking at my provided source I have a feeling that when a user clicks on one or the other drop downs it will trigger the function for that selection and cancel the other filter out, which is undesired. So I am wondering how to have two drop downs work to filter between min and max age where if a user clicks on one drop down it doesn't cancel the function of the previous filter selection.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Multiple Filters Sample</title>
    <link href="http://labs.adobe.com/technologies/spry/css/samples.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" type="text/javascript" src="http://labs.adobe.com/technologies/spry/includes/xpath.js"></script>
    <script language="JavaScript" type="text/javascript" src="http://labs.adobe.com/technologies/spry/includes/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript" src="http://labs.adobe.com/technologies/spry/includes/SpryDataExtensions.js"></script>
    <script type="text/javascript">
    <!--
    var dsStates = new Spry.Data.XMLDataSet("states.xml", "states/state");
    dsStates.setColumnType("name", "number");
    function MINage(cat){
         if (cat = 1)
           dsStates.setXPath('states/state[name > 0]');
         dsStates.loadData();
    function MAXage(cat){
         if (cat = 10)
           dsStates.setXPath('states/state[name < 10]');
         dsStates.loadData();
    -->
    </script>
    <style type="text/css">
    <!--
    .badge {
         float: left;
         margin: 4px;
         padding: 4px;
         text-align: center;
         background-color: #FFCC99;
         border-top: solid 1px #999999;
         border-left: solid 1px #999999;
         border-bottom: solid 1px #CCCCCC;
         border-right: solid 1px #CCCCCC;
    label {
         font-weight: bold;
    -->
    </style>
    </head>
    <body>
    <h3>Multiple Filters Sample</h3>
    <div class="liveSample" style="float: left; margin-bottom: 4px;">
    <form action="">
    <select name="ageCat" onchange="MINage(this.value)">
        <option value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
        <option value="5">5</option>
        <option value="6">6</option>
        <option value="7">7</option>
        <option value="8">8</option>
        <option value="9">9</option>
        <option value="10">10</option>
        <option value="11">11</option>
        <option value="12">12</option>
        <option value="13">13</option>
        <option value="14">14</option>
        <option value="15">15</option>
        <option value="16">16</option>
        <option value="17">17</option>
        <option value="18">18</option>
        <option value="19">19</option>
        <option value="20">20</option>
        <option value="21">21</option>
        <option value="22">22</option>
        <option value="23">23</option>
        <option value="24">24</option>
        <option value="25">25</option>
        <option value="26">26</option>
        <option value="27">27</option>
        <option value="28">28</option>
        <option value="29">29</option>
        <option value="30">30</option>
        <option value="31">31</option>
        <option value="32">32</option>
        <option value="33">33</option>
        <option value="34">34</option>
        <option value="35">35</option>
        <option value="36">36</option>
        <option value="37">37</option>
        <option value="38">38</option>
        <option value="39">39</option>
        <option value="40">40</option>
        <option value="41">41</option>
        <option value="42">42</option>
        <option value="43">43</option>
        <option value="44">44</option>
        <option value="45">45</option>
        <option value="46">46</option>
        <option value="47">47</option>
        <option value="48">48</option>
        <option value="49">49</option>
        <option value="50">50</option>
        <option value="51">51</option>
        <option value="52">52</option>
        <option value="53">53</option>
        <option value="54">54</option>
        <option value="55">55</option>
        <option value="56">56</option>
        <option value="57">57</option>
        <option value="58">58</option>
        <option value="59">59</option>
        <option value="60">60</option>
        <option value="61">61</option>
        <option value="62">62</option>
        <option value="63">63</option>
        <option value="64">64</option>
        <option value="65">65</option>
        <option value="66">66</option>
        <option value="67">67</option>
        <option value="68">68</option>
        <option value="69">69</option>
        <option value="70">70</option>
        <option value="71">71</option>
        <option value="72">72</option>
        <option value="73">73</option>
        <option value="74">74</option>
        <option value="75">75</option>
        <option value="76">76</option>
        <option value="77">77</option>
        <option value="78">78</option>
        <option value="79">79</option>
        <option value="80">80</option>
        <option value="81">81</option>
        <option value="82">82</option>
        <option value="83">83</option>
        <option value="84">84</option>
        <option value="85">85</option>
        <option value="86">86</option>
        <option value="87">87</option>
        <option value="88">88</option>
        <option value="89">89</option>
        <option value="90">90</option>
        <option value="91">91</option>
        <option value="92">92</option>
        <option value="93">93</option>
        <option value="94">94</option>
        <option value="95">95</option>
        <option value="96">96</option>
        <option value="97">97</option>
        <option value="98">98</option>
        <option value="99">99</option>
      </select>
    <select name="ageCat" onchange="MAXage(this.value)">
        <option value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
        <option value="5">5</option>
        <option value="6">6</option>
        <option value="7">7</option>
        <option value="8">8</option>
        <option value="9">9</option>
        <option value="10">10</option>
        <option value="11">11</option>
        <option value="12">12</option>
        <option value="13">13</option>
        <option value="14">14</option>
        <option value="15">15</option>
        <option value="16">16</option>
        <option value="17">17</option>
        <option value="18">18</option>
        <option value="19">19</option>
        <option value="20">20</option>
        <option value="21">21</option>
        <option value="22">22</option>
        <option value="23">23</option>
        <option value="24">24</option>
        <option value="25">25</option>
        <option value="26">26</option>
        <option value="27">27</option>
        <option value="28">28</option>
        <option value="29">29</option>
        <option value="30">30</option>
        <option value="31">31</option>
        <option value="32">32</option>
        <option value="33">33</option>
        <option value="34">34</option>
        <option value="35">35</option>
        <option value="36">36</option>
        <option value="37">37</option>
        <option value="38">38</option>
        <option value="39">39</option>
        <option value="40">40</option>
        <option value="41">41</option>
        <option value="42">42</option>
        <option value="43">43</option>
        <option value="44">44</option>
        <option value="45">45</option>
        <option value="46">46</option>
        <option value="47">47</option>
        <option value="48">48</option>
        <option value="49">49</option>
        <option value="50">50</option>
        <option value="51">51</option>
        <option value="52">52</option>
        <option value="53">53</option>
        <option value="54">54</option>
        <option value="55">55</option>
        <option value="56">56</option>
        <option value="57">57</option>
        <option value="58">58</option>
        <option value="59">59</option>
        <option value="60">60</option>
        <option value="61">61</option>
        <option value="62">62</option>
        <option value="63">63</option>
        <option value="64">64</option>
        <option value="65">65</option>
        <option value="66">66</option>
        <option value="67">67</option>
        <option value="68">68</option>
        <option value="69">69</option>
        <option value="70">70</option>
        <option value="71">71</option>
        <option value="72">72</option>
        <option value="73">73</option>
        <option value="74">74</option>
        <option value="75">75</option>
        <option value="76">76</option>
        <option value="77">77</option>
        <option value="78">78</option>
        <option value="79">79</option>
        <option value="80">80</option>
        <option value="81">81</option>
        <option value="82">82</option>
        <option value="83">83</option>
        <option value="84">84</option>
        <option value="85">85</option>
        <option value="86">86</option>
        <option value="87">87</option>
        <option value="88">88</option>
        <option value="89">89</option>
        <option value="90">90</option>
        <option value="91">91</option>
        <option value="92">92</option>
        <option value="93">93</option>
        <option value="94">94</option>
        <option value="95">95</option>
        <option value="96">96</option>
        <option value="97">97</option>
        <option value="98">98</option>
        <option value="99">99</option>
      </select>
         </form>
         <div spry:region="dsStates" spry:repeatchildren="dsStates">
              <span class="badge">{name}</span>
         </div>
    </div>
    <p><br style="clear: both;" />
    </p>
    </body>
    </html>
    Thanks!

  • Calculating local currency based on document date in goods receipt

    We have a requirement in Poland that the local currency PLN should be calculated based on the document date when doing goods receipt, and not standard SAP posting date. I can only find note 619330 according to this requirement, but this note requires use of material ledger which we are not using. We have implemented note 574583 for the same requirement in transaction MIRO.
    Since there are no notes from SAP according to the requirement in transaction MIGO, are there any enhancements available for using the document date instead for posting date when calculating local currency?
    Best regards,
    Terje

    substitution used

  • I dont see 'documents & data' in settings

    Why cant i see 'documents & data' in the settings in iPhone? Im trying to backup whatsapp but i have to turn on documents & data first but i don't see it in settings/iCloud

    This is in my settings. No documents & data

  • Problem with material and document date in sales order

    Hi All,
    I am working in ECC 6.0 .I am facing problem with two fields when in enter in to sales order(tcode:va01)
    1.A material comes automatically in line item.
    2.Document date also comes as 27.03.2008 instead of todays date in each order i create.
    I think its not related to configuration.I think its related to some modifications through exits or enhancement points.could someone suggest me a where to check and solve that.
    Your's suggestion is appreciated.

    Hi Sharad,
    Check MV45AFZZ include in se38..It is a user exit for basic validation on sales...We may be able to find some code there (if screen data is predefined by code as mentioned)
    Hope it helps
    Regards
    Byju

  • Regarding : Material document data and PO data do not match (Plant)

    Hi Gurus,
    Please go through this BAPI program.
    While uploading it is giving an error ' Material document data and PO data do not match (Plant) '.
    Please help regarding this issue.For all Other moment types it is working fine except this 351 moment type.
    dATA: i_excel TYPE truxs_t_text_data. "work table for excel upload
    DATA: BEGIN OF it_itab OCCURS 100,
          docdate(10),
          postdate(10),
          mvt_type(3), "Movement Type
          plant(4), "Plant
          lgort(4),
          pur_doc(10), "Purchase Document No
          po_item(3), "Purchase Document Item No
          material(18), "Material Number
         delnote(16),
          erfmg(13),
          uom(3),
         lfmng(13), "Quantity
          batch(10) TYPE c,
          vfdat TYPE vfdat,
          END OF it_itab.
    DATA: it_goodsmvt_head TYPE TABLE OF bapi2017_gm_head_01      INITIAL SIZE 100,
          it_goodsmvt_code TYPE TABLE OF bapi2017_gm_code         INITIAL SIZE 100,
          it_goodsmvt_item TYPE TABLE OF bapi2017_gm_item_create  INITIAL SIZE 100.
    DATA: wa_goodsmvt_head LIKE LINE OF it_goodsmvt_head,
          wa_goodsmvt_code LIKE LINE OF it_goodsmvt_code,
          wa_goodsmvt_item LIKE LINE OF it_goodsmvt_item.
    DATA: w_mat_doc  TYPE bapi2017_gm_head_ret-mat_doc,
          w_year     TYPE bapi2017_gm_head_ret-doc_year.
    DATA: BEGIN OF it_errmsg_goodsmvt OCCURS 10.
            INCLUDE STRUCTURE bapiret2.
    DATA: END OF it_errmsg_goodsmvt.
    DATA : obj_type LIKE bapiache09-obj_type,
           obj_key  LIKE bapiache09-obj_key,
           obj_sys  LIKE bapiache09-obj_sys.
    DATA: v_date1 TYPE sy-datum.
    DATA: v_date2 TYPE sy-datum.
    DATA: w_lines TYPE i.
    DATA: errflag.
    SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE text-100.
    PARAMETERS: p_file TYPE  rlgrap-filename.
    SELECTION-SCREEN END OF BLOCK bk1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          field_name = 'P_FILE'
        IMPORTING
          file_name  = p_file.
    Start-of-selection processing
    START-OF-SELECTION.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
          i_line_header        = 'X'
          i_tab_raw_data       = i_excel
          i_filename           = p_file
        TABLES
          i_tab_converted_data = it_itab[]
        EXCEPTIONS
          conversion_failed    = 1
          OTHERS               = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      LOOP AT it_itab.
        REFRESH it_goodsmvt_head.
        REFRESH it_goodsmvt_item.
        CONCATENATE it_itab-docdate6(4) it_itab-docdate3(2) it_itab-docdate+0(2) INTO v_date1.
        CONCATENATE it_itab-postdate6(4) it_itab-postdate3(2) it_itab-postdate+0(2) INTO v_date2.
        wa_goodsmvt_head-pstng_date = v_date2.
        wa_goodsmvt_head-doc_date   = v_date1.
       wa_goodsmvt_head-ref_doc_no = it_itab-delnote.
    wa_goodsmvt_head-pr_uname   = sy-uname.
        APPEND wa_goodsmvt_head TO it_goodsmvt_head.
    Maintain it_goodsmvt_code
        wa_goodsmvt_code-gm_code    = '04'.
    Maintain it_goodsmvt_item
    *LOOP AT it_itab.
    IF wa_goodsmvt_item-po_number IS INITIAL.
        wa_goodsmvt_item-po_number    = it_itab-pur_doc.
        wa_goodsmvt_item-move_type    = it_itab-mvt_type.
        wa_goodsmvt_item-MOVE_PLANT      = it_itab-plant.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = it_itab-material
          IMPORTING
            output = it_itab-material.
        wa_goodsmvt_item-material     = it_itab-material.
        wa_goodsmvt_item-stge_loc     = it_itab-lgort.
        wa_goodsmvt_item-po_item      = it_itab-po_item.
        wa_goodsmvt_item-entry_qnt    = it_itab-erfmg.
        wa_goodsmvt_item-ENTRY_UOM_ISO    = it_itab-uom.
       wa_goodsmvt_item-po_pr_qnt    = it_itab-lfmng.
        wa_goodsmvt_item-batch        = it_itab-batch.
        wa_goodsmvt_item-expirydate   = it_itab-vfdat.
       wa_goodsmvt_item-NO_MORE_GR   = 'X'.
        wa_goodsmvt_item-mvt_ind      = 'B'.
        APPEND wa_goodsmvt_item TO it_goodsmvt_item.
        CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
          EXPORTING
            goodsmvt_header  = wa_goodsmvt_head
            goodsmvt_code    = wa_goodsmvt_code
          IMPORTING
            materialdocument = w_mat_doc
          TABLES
            goodsmvt_item    = it_goodsmvt_item
            return           = it_errmsg_goodsmvt.
    Process of commit work
        IF it_goodsmvt_head[] IS NOT INITIAL.
          DESCRIBE TABLE it_goodsmvt_head LINES w_lines.
        ENDIF.
        IF it_goodsmvt_item[] IS NOT INITIAL.
          DESCRIBE TABLE it_goodsmvt_item LINES w_lines.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              wait = 'X'.
        IMPORTING
        RETURN        =
          CLEAR errflag.
          READ TABLE it_errmsg_goodsmvt INDEX 1.
          IF it_errmsg_goodsmvt-type EQ 'E'.
            WRITE:/'Error in function', it_errmsg_goodsmvt-message.
            errflag = 'X'.
          ELSE.
            WRITE:/ it_errmsg_goodsmvt-message.
          ENDIF.
          IF errflag IS INITIAL.
            COMMIT WORK AND WAIT.
            IF sy-subrc NE 0.
              WRITE:/ 'Error in updating'.
              EXIT.
            ELSE.
              WRITE:/ 'Material Document created successfully and the Document Number for the Material',
                      wa_goodsmvt_item-material,'is:', w_mat_doc, w_year.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.

    Hey,
    Just wanted to post that in my case this was the error of MVT_IND field in item table. When I made it from 'B' to blank then it worked.
    Mine is solved....
    Thanks

  • Open items yet to be cleared which have 2-3 years old document date

    Sap Experts,
    This is my first post and would like to ask for a help .
    I would like to clear all the open items which have Zero balance and belongs to Fiscal year 2007, 2008, 2009, 2010.
    In F-04 T.code, When I put the document date, it does not allow me to clear it.
    Please give me the best solution you think of any other alternative which is right or please provide me with steps to clear by using F-04
    Your help will be greatly appreciated.
    Kind regards
    LSD

    Thanks Atif & Sanil for your quick reply,
    But the problem is when I enter the GL account, it is giving me error, stating that "there are no open items managed in Account XXXXXXXXXX". I have checked the control data in FS00 and only Line item Display is ticked.
    I have recently joined this place, and the items are open from the day SAP was implemented. So they do not use Auto clearing.
    Some points I am thinking below,
    Q1. Does it mean that the control data must have open item to be "ticked"?
    Q2. The A/c i am trying to clear is Non-current Trade receivables, so can we clear such accounts.
    In terms of Clearing the data from 2007 till date,
    Q3. Do I have to open the old periods or can I clear in current period.
    Further info will be very helpful.
    Cheers

Maybe you are looking for

  • Error during deploying SOA Composite

    I have created a SOA Composite in which I am trying to access an External Web Service. The compilation goes fine but its failing at the time of deployment to Soa Server. My BPEL consists of following activities-> RecieveInput-> Assign -> Invoke -> As

  • Third party software for transferring music content to new laptop

    Help! My laptop died and I need help finding a third party software to copy my music files and transfer them from my Iphone to my new laptop's Itunes. Apple tech support helped me set up Itunes and transfer my purchased content, but I have 1,000 song

  • BAPI for External Acqisition of Asset through vendor

    Hi All, Are their any standard BAPI / FM's to CHECK asset before saving and PARK the document. Regards, Gautham Paspala

  • How to search Open Inbound Delivery

    Hi Experts, How can I search inbound delivery for which the goods receipt is still pending ( open inbound delivery ). Thanks & Regards Shyam Kogta

  • Having trouble connecting to AIM on iChat, adium and AIM

    hi guys, as the title states, i am having a **** of a time connecting to ichat through my wireless connection! i recently moved and have a new ISP provider (qwest). i have contacted them regarding port forwarding/firewall settings and they assured me