<?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: BAPI_MATPHYSINV_COUNT and fields WSTI_COUNTDATE, WSTI_COUNTTIME in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-matphysinv-count-and-fields-wsti-countdate-wsti-counttime/m-p/3858444#M927418</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vedat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the BAPI have you included&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION BAPI_TRANSACTION_COMMIT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pass 'zero count' if material wasn't counted&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR check the below link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Raj on [BAPI_MATPHYSINV_COUNT|http://sapass.metro.client.jp/Bapi/BUS2028.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Raj on May 22, 2008 4:21 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 May 2008 22:29:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-21T22:29:25Z</dc:date>
    <item>
      <title>BAPI_MATPHYSINV_COUNT and fields WSTI_COUNTDATE, WSTI_COUNTTIME</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-matphysinv-count-and-fields-wsti-countdate-wsti-counttime/m-p/3858443#M927417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using in a Report BAPI_MATPHYSINV_COUNT for Retail. &lt;/P&gt;&lt;P&gt;After calling this BAPI the fields &lt;STRONG&gt;WSTI_COUNTDATE&lt;/STRONG&gt;  and  &lt;STRONG&gt;WSTI_COUNTTIME&lt;/STRONG&gt; are not filled(space) in the table ISEG. &lt;/P&gt;&lt;P&gt;The other fields are okay.&lt;/P&gt;&lt;P&gt;But when I use the transaction MI04 all fields are filled. &lt;/P&gt;&lt;P&gt;Can anybody help me and tell me what I must do?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 22:18:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-matphysinv-count-and-fields-wsti-countdate-wsti-counttime/m-p/3858443#M927417</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T22:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_MATPHYSINV_COUNT and fields WSTI_COUNTDATE, WSTI_COUNTTIME</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-matphysinv-count-and-fields-wsti-countdate-wsti-counttime/m-p/3858444#M927418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vedat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the BAPI have you included&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION BAPI_TRANSACTION_COMMIT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pass 'zero count' if material wasn't counted&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR check the below link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Raj on [BAPI_MATPHYSINV_COUNT|http://sapass.metro.client.jp/Bapi/BUS2028.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Raj on May 22, 2008 4:21 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 22:29:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-matphysinv-count-and-fields-wsti-countdate-wsti-counttime/m-p/3858444#M927418</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T22:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_MATPHYSINV_COUNT and fields WSTI_COUNTDATE, WSTI_COUNTTIME</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-matphysinv-count-and-fields-wsti-countdate-wsti-counttime/m-p/3858445#M927419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raj,&lt;/P&gt;&lt;P&gt;CALL FUNCTION BAPI_TRANSACTION_COMMIT is included.&lt;/P&gt;&lt;P&gt;When I call the BAPI the items are booked correctly but WSTI_COUNTDATE and WSTI_COUNTTIME are not filled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I tried first this:&lt;/STRONG&gt;  &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_MATPHYSINV_COUNT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      physinventory             = lv_iblnr&lt;/P&gt;&lt;P&gt;      fiscalyear                = p_gjahr&lt;/P&gt;&lt;P&gt;    count_date                  = p_datum&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      items                     = lt_items&lt;/P&gt;&lt;P&gt;      return                    = lt_bapiret2.&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;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;         WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 INTO ls_bapiret2-message.&lt;/P&gt;&lt;P&gt;    WRITE / ls_bapiret2-message.&lt;/P&gt;&lt;P&gt;    RETURN.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT lt_bapiret2 WHERE type = 'E' OR type = 'A'.&lt;/P&gt;&lt;P&gt;    MOVE-CORRESPONDING lt_bapiret2 TO ls_bapiret2.&lt;/P&gt;&lt;P&gt;    WRITE / ls_bapiret2-message.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;  CHECK ls_bapiret2 IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      wait   = 'X'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      return = ls_bapiret2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF ls_bapiret2 IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        return = ls_bapiret2.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correctly booked without WSTI_COUNTDATE and WSTI_COUNTTIME .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already debugged and found this different between MI04 and BAPI_MATPHYSINV_COUNT:&lt;/P&gt;&lt;P&gt;Both call the same BADI  &lt;STRONG&gt;ES_MB_PHYSINV_COUNT_TST&lt;/STRONG&gt; -&amp;gt; method GET_TIMESTAMPS-&amp;gt; lm_fill_count_timestamps&lt;/P&gt;&lt;P&gt;In method LM_FILL_COUNT_TIMESTAMPS  at line 35 is the problem. When I call with MI04 &lt;STRONG&gt;l_lines is 0&lt;/STRONG&gt; and with BAPI is &lt;STRONG&gt;l_lines 1&lt;/STRONG&gt; (when I try with 1 position)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;read buffer with timestamps&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call function 'WSTI_GET_COUNT_DATETIME'&lt;/P&gt;&lt;P&gt;    importing&lt;/P&gt;&lt;P&gt;      et_iseg                   = lt_iseg&lt;/P&gt;&lt;P&gt;      e_ignore_wsti_time_select = l_ignore_wsti_time_select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  describe table lt_iseg lines &lt;STRONG&gt;l_lines&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;if l_lines = 0.&lt;/STRONG&gt;   &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  get system time information&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    get time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  there are no timestamps given: set sy- fields per default&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    l_countdate          = sy-datlo.&lt;/P&gt;&lt;P&gt;    l_counttime          = sy-timlo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    loop at xt_iseg_new assigning &amp;lt;xt_iseg_new&amp;gt;&lt;/P&gt;&lt;P&gt;            where xzael = true.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    read corresponding entry in old iseg&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      read table it_iseg_old assigning &amp;lt;it_iseg_old&amp;gt;&lt;/P&gt;&lt;P&gt;           index sy-tabix.&lt;/P&gt;&lt;P&gt;      if sy-subrc is initial.&lt;/P&gt;&lt;P&gt;        if &amp;lt;it_iseg_old&amp;gt;-xzael = false.&lt;/P&gt;&lt;P&gt;          &amp;lt;xt_iseg_new&amp;gt;-wsti_countdate = l_countdate.&lt;/P&gt;&lt;P&gt;          &amp;lt;xt_iseg_new&amp;gt;-wsti_counttime = l_counttime.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;        &amp;lt;xt_iseg_new&amp;gt;-wsti_countdate = l_countdate.&lt;/P&gt;&lt;P&gt;        &amp;lt;xt_iseg_new&amp;gt;-wsti_counttime = l_counttime.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I tried this:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  initialize buffer with timestamps&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'WSTI_INIT_COUNT_DATETIME'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_MATPHYSINV_COUNT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      physinventory             = lv_iblnr&lt;/P&gt;&lt;P&gt;      fiscalyear                = p_gjahr&lt;/P&gt;&lt;P&gt;    count_date                  = p_datum&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      items                     = lt_items&lt;/P&gt;&lt;P&gt;      return                    = lt_bapiret2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But the fields WSTI_COUNTDATE and WSTI_COUNTTIME  are always still empty.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Do you know why?&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2008 12:49:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-matphysinv-count-and-fields-wsti-countdate-wsti-counttime/m-p/3858445#M927419</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-22T12:49:36Z</dc:date>
    </item>
  </channel>
</rss>

