Need total consumption quantity year to date for item in inventory
Hi All,
I have a requirement as below.
I need to find the total consumption quantity for a item year to date in inventory i.e i need to find out total issued quantity from year to date for a item.
so i need following details.
Consumption 1st year
Consumption 2nd year
Consumption 3rd year
we are following fiscal year JAN-DEC.
I am looking for a query to find out the above details, please help me out
Thanks
Hi Prashant,
I will try this out. If I remember correctly this did not work especially since we are using the same base condition across the board. I may have to try copying this standard condition and re-assigning it accordingly.
Thanks for the suggestion
Anirudh
Similar Messages
-
Need logic to find Year to Date for customer exit variable
Hi to all,
I am creating customer exit variable for query .
query should display data according to current system year from jan till current system date.
here senario is like that user never enter year and query will automatically will fetch the data according to current year starting from jan to current system date.
example.
current year 2010 and today is system date is sep 29 2010, so query will display data from jan 2010 to current data sep 29 2010.
please can any one provide me logic for that.
any code .
regards
pavneet ranaHi,
You need to create the characteristic customer exit variable of type select-options. Restrict your keyfigure based on this variable.
In the logic in CMOD,
write as below
i_step =2.
case i_vnam.
When 'exit variable'.
temp = sy-datum+0(4).
concatenate temp '0101' into temp1.
l_s_range-low= temp1.
l_s_range-sign = 'I'.
l_s_range-opt = 'BT'.
l_s_range-high= sy-datum.
append APPEND l_s_range TO e_t_range.
endcase.
For any further help on customer exit based variable, please refer below article.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f119d9-922d-2c10-88af-8c016638bd90?quicklink=index&overridelayout=true
Edited by: Rahul K Rai on Sep 29, 2010 3:09 PM -
Year To Date for Current Fiscal Year
Hi All,
I have installed BC variable Year To Date for Current Fiscal Year 0I_CFYTD..
foloowing error occurs
Variable 0I_CFYTD could not be replaced..
Do i need to write any code or Please help.....Hi,
Please check if fiscal year variant is used in the filter. Else the BC variable throws an error. Drag fiscal year variant to the filter area and set a value or variable input for the same.
Regards,
Satya -
Hi,
Currently I'm facing an error "In case of account assignment, please enter acc. assignment data for item" when create a Purchase Order using BAPI_PO_CREATE1. The condition of the data that need to pump into the system is that this PO is an open item PO where does not require a metarial code for input, but it will pump in Short Text and Material Group. Other than that, the account assignment category is "K" and the item category is "9".
Below is the coding that I have implemented.
IF wa_temp_upr1-waers IS NOT INITIAL.
MOVE wa_temp_upr1-waers TO wa_header-currency.
wa_headerx-currency = abap_true.
ENDIF.
MOVE: wa_temp_upr1-lifnr TO wa_header-vendor,
wa_temp_upr1-unsez TO wa_header-collect_no,
wa_temp_upr1-bukrs TO wa_header-comp_code,
sy-datum TO wa_header-doc_date,
sy-langu TO wa_header-langu,
'KTN1' TO wa_header-purch_org,
wa_temp_upr1-bkgrp TO wa_header-pur_group,
wa_temp_upr1-zterm TO wa_header-pmnttrms.
wa_headerx-collect_no = abap_true.
wa_headerx-po_number = abap_true.
wa_headerx-comp_code = abap_true.
wa_headerx-vendor = abap_true.
wa_headerx-doc_date = abap_true.
wa_headerx-langu = abap_true.
wa_headerx-purch_org = abap_true.
wa_headerx-pur_group = abap_true.
wa_headerx-pmnttrms = abap_true.
IF wa_temp_upr1-meins IS NOT INITIAL.
MOVE wa_temp_upr1-meins TO zunit_e.
CALL FUNCTION 'CONVERSION_EXIT_CUNIT_INPUT'
EXPORTING
INPUT = zunit_e
LANGUAGE = 'E'
IMPORTING
OUTPUT = zunit_e.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ELSE.
MOVE zunit_e TO wa_temp_upr1-meins.
ENDIF.
MODIFY it_upr1 FROM wa_temp_upr1.
ENDIF.
ADD 10 TO line_item.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
NR_RANGE_NR = '01'
OBJECT = 'SERVICE'
IMPORTING
NUMBER = pckg_no.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = wa_temp_upr1-matnr
IMPORTING
OUTPUT = wa_po_item-material.
MOVE: line_item TO wa_po_item-po_item,
wa_temp_upr1-ewerks TO wa_po_item-plant,
wa_temp_upr1-lgort TO wa_po_item-stge_loc,
wa_temp_upr1-matnr TO wa_po_item-material,
wa_temp_upr1-menge TO wa_po_item-quantity,
wa_temp_upr1-peinh TO wa_po_item-price_unit,
wa_temp_upr1-netpr TO wa_po_item-net_price,
wa_temp_upr1-meins TO wa_po_item-po_unit,
wa_temp_upr1-afnam TO wa_po_item-preq_name,
wa_temp_upr1-eeind TO wa_po_item-price_date,
' ' TO wa_po_item-gr_ind,
'X' TO wa_po_item-ir_ind,
'X' TO wa_po_item-prnt_price,
' ' TO wa_po_item-distrib.
wa_po_item-acctasscat = 'K'.
MOVE pckg_no TO wa_po_item-pckg_no.
wa_po_itemx-pckg_no = abap_true.
IF wa_temp_upr1-bismt IS INITIAL.
MOVE: wa_temp_upr1-short_text TO wa_po_item-short_text,
wa_temp_upr1-matl_group TO wa_po_item-matl_group,
'9' TO wa_po_item-item_cat.
wa_po_itemx-short_text = abap_true.
wa_po_itemx-matl_group = abap_true.
wa_po_itemx-item_cat = abap_true.
wa_potext-po_item = wa_po_item-po_item.
wa_potext-text_id = 'F01'.
APPEND wa_potext TO it_potext.
ENDIF.
MOVE wa_po_item-po_item TO wa_po_itemx-po_item.
wa_po_itemx-plant = abap_true.
wa_po_itemx-po_itemx = abap_true.
wa_po_itemx-stge_loc = abap_true.
IF wa_po_item-material IS NOT INITIAL.
wa_po_itemx-material = abap_true.
ENDIF.
wa_po_itemx-quantity = abap_true.
wa_po_itemx-price_unit = abap_true.
wa_po_itemx-net_price = abap_true.
wa_po_itemx-po_unit = abap_true.
wa_po_itemx-preq_name = abap_true.
wa_po_itemx-price_date = abap_true.
wa_po_itemx-acctasscat = abap_true.
wa_po_itemx-gr_ind = abap_true.
wa_po_itemx-distrib = abap_true.
wa_po_itemx-part_inv = abap_true.
APPEND wa_po_item TO it_item.
APPEND wa_po_itemx TO it_itemx.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = wa_temp_upr1-kostl
IMPORTING
OUTPUT = wa_temp_upr1-kostl.
wa_account-costcenter = wa_temp_upr1-kostl.
ADD 1 TO l_acc.
ADD 10 TO v_po_item.
MOVE v_po_item TO wa_account-po_item.
MOVE '01' TO wa_account-serial_no.
APPEND wa_account TO it_account.
wa_accountx-costcenter = abap_true.
MOVE v_po_item TO wa_accountx-po_item.
MOVE '01' TO wa_accountx-serial_no.
wa_accountx-SERIAL_NOX = abap_true.
wa_accountx-po_itemx = abap_true.
APPEND wa_accountx TO it_accountx.
*********** services
wa_services-pckg_no = pckg_no.
wa_services-line_no = '0000000001'.
wa_services-outl_ind = 'X'.
wa_services-subpckg_no = pckg_no + 1.
wa_services-quantity = wa_temp_upr1-menge.
wa_services-base_uom = wa_temp_upr1-meins.
wa_services-price_unit = wa_temp_upr1-peinh.
wa_services-gr_price = wa_temp_upr1-netpr.
IF wa_temp_upr1-short_text IS NOT INITIAL.
wa_services-short_text = wa_temp_upr1-short_text.
ENDIF.
APPEND wa_services TO it_services.
CLEAR: wa_services,
val_lin.
wa_services-pckg_no = pckg_no + 1.
wa_services-line_no = '0000000002'.
wa_services-quantity = wa_temp_upr1-menge.
wa_services-base_uom = wa_temp_upr1-meins.
wa_services-price_unit = wa_temp_upr1-peinh.
wa_services-gr_price = wa_temp_upr1-netpr.
IF wa_temp_upr1-short_text IS NOT INITIAL.
wa_services-short_text = 'SERVICE 1'.
ENDIF.
IF NOT wa_temp_upr1-matl_group IS INITIAL.
wa_services-matl_group = wa_temp_upr1-matl_group.
ENDIF.
APPEND wa_services TO it_services.
************* service account assignment
wa_services_acc-pckg_no = pckg_no + 1.
wa_services_acc-line_no = '0000000002'.
wa_services_acc-serno_line = '01'.
wa_services_acc-quantity = wa_temp_upr1-menge.
wa_services_acc-serial_no = '01'.
wa_services_acc-net_value = wa_temp_upr1-netpr.
APPEND wa_services_acc TO it_services_acc.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
POHEADER = wa_header
POHEADERX = wa_headerx
TESTRUN = pa_test
NO_PRICE_FROM_PO = 'X'
IMPORTING
EXPPURCHASEORDER = va_ebeln
EXPHEADER = wa_expheader
TABLES
RETURN = it_return
POITEM = it_item
POITEMX = it_itemx
POACCOUNT = it_account
POACCOUNTX = it_accountx
POSERVICES = it_services
POSRVACCESSVALUES = it_services_acc
POTEXTITEM = it_potext.
I have done some search regarding this error and try to implemented it, but still does not working.
example website that i found for this error is:
David Klein's Corner: SAP Purchase Order Creation Error via BAPI - "In case of account assignment, please enter acc…
PO Upload through BAPI_PO_CREATE1 - Problem in Service Item
Currently my system is using: SAP_APPL SAPKH60604
I am really stuck on this error. Hope you all can help me on this matter.
Thanks.Hi,
Filling the service line have the problem,
while filling the services we must follow correct order,
Here You entering the new services, first manually create purchase order after that observe the table
'ESLL' and use the FM;-' MS_FETCH_SPEC_FOR_LIST' how the services are inserting after that you also follow the same order.
if service entries are created before the creation of the PO.
then follow as bellow....
SELECT * FROM esll INTO TABLE lt_esll WHERE packno = wa_tmp_spec-packno.
IF sy-subrc = '0'.
LOOP AT lt_esll.
CLEAR : lt_poservices.
lt_poservices-pckg_no = lt_esll-packno .
lt_poservices-line_no = lt_esll-introw .
lt_poservices-ext_line = lt_esll-extrow .
lt_poservices-outl_level = lt_esll-rang .
lt_poservices-outl_no = lt_esll-extgroup .
lt_poservices-outl_ind = lt_esll-del .
lt_poservices-subpckg_no = lt_esll-sub_packno .
lt_poservices-service = lt_esll-srvpos .
lt_poservices-edition = lt_esll-ausgb .
lt_poservices-ssc_item = lt_esll-stlvpos .
lt_poservices-ext_serv = lt_esll-extsrvno.
lt_poservices-quantity = lt_esll-menge .
lt_poservices-base_uom = lt_esll-meins .
lt_poservices-ovf_tol = lt_esll-uebto .
lt_poservices-ovf_unlim = lt_esll-uebtk .
lt_poservices-gr_price = lt_esll-tbtwr .
lt_poservices-from_line = lt_esll-frompos .
lt_poservices-to_line = lt_esll-knt_introw.
lt_poservices-short_text = lt_esll-ktext1 .
lt_poservices-distrib = lt_esll-vrtkz .
lt_poservices-pers_no = lt_esll-pernr .
lt_poservices-wagetype = lt_esll-lgart .
lt_poservices-con_pckg = lt_esll-knt_packno.
lt_poservices-con_line = lt_esll-knt_introw .
lt_poservices-matl_group = lt_esll-matkl .
lt_poservices-taxjurcode = lt_esll-txjcd.
lt_poservices-tax_code = lt_esll-mwskz .
lt_poservices-date = lt_esll-sdate .
APPEND lt_poservices TO lt_poservices[].
CLEAR lt_esll.
ENDLOOP.
ENDIF.
CALL FUNCTION 'MS_FETCH_SPEC_FOR_LIST'
EXPORTING
spec_packno = wa_tmp_spec-packno
* ONLINE_DATA = ' '
* IMPORTING
* LIMIT =
TABLES
servicetab = lt_ml_esll1
* LIMITTAB =
EXCEPTIONS
no_specification_exist = 1
OTHERS = 2.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
LOOP AT lt_ml_esll1 INTO DATA(ls_ml_esll1).
CLEAR : lt_poservices.
lt_poservices-pckg_no = ls_ml_esll1-packno .
lt_poservices-line_no = ls_ml_esll1-introw .
lt_poservices-ext_line = ls_ml_esll1-extrow .
lt_poservices-outl_level = ls_ml_esll1-rang .
lt_poservices-outl_no = ls_ml_esll1-extgroup .
lt_poservices-outl_ind = ls_ml_esll1-del .
lt_poservices-subpckg_no = ls_ml_esll1-sub_packno .
lt_poservices-service = ls_ml_esll1-srvpos .
lt_poservices-edition = ls_ml_esll1-ausgb .
lt_poservices-ssc_item = ls_ml_esll1-stlvpos .
lt_poservices-ext_serv = ls_ml_esll1-extsrvno.
lt_poservices-quantity = ls_ml_esll1-menge .
lt_poservices-base_uom = ls_ml_esll1-meins .
lt_poservices-ovf_tol = ls_ml_esll1-uebto .
lt_poservices-ovf_unlim = ls_ml_esll1-uebtk .
lt_poservices-gr_price = ls_ml_esll1-tbtwr .
lt_poservices-from_line = ls_ml_esll1-frompos .
lt_poservices-to_line = ls_ml_esll1-knt_introw.
lt_poservices-short_text = ls_ml_esll1-ktext1 .
lt_poservices-distrib = ls_ml_esll1-vrtkz .
lt_poservices-pers_no = ls_ml_esll1-pernr .
lt_poservices-wagetype = ls_ml_esll1-lgart .
lt_poservices-con_pckg = ls_ml_esll1-knt_packno.
lt_poservices-con_line = ls_ml_esll1-knt_introw .
lt_poservices-matl_group = ls_ml_esll1-matkl .
lt_poservices-taxjurcode = ls_ml_esll1-txjcd.
lt_poservices-tax_code = ls_ml_esll1-mwskz .
lt_poservices-date = ls_ml_esll1-sdate .
APPEND lt_poservices TO lt_poservices[].
CLEAR ls_ml_esll1.
ENDLOOP.
CLEAR : lt_poservices.
*& Filling the po service values internal table from service internal table
LOOP AT lt_poservices[] INTO lt_poservices WHERE gr_price GT 0.
READ TABLE lt_ml_esll1 INTO wa_msll WITH KEY packno = lt_poservices-pckg_no
introw = lt_poservices-line_no
extrow = lt_poservices-ext_line..
IF sy-subrc EQ 0.
CLEAR lt_posvalues.
lt_posvalues-pckg_no = wa_msll-packno.
lt_posvalues-line_no = wa_msll-introw.
lt_posvalues-quantity = wa_msll-menge.
* lt_posvalues-net_value = wa_msll-netwr.
lt_posvalues-serno_line = '01'.
lt_posvalues-serial_no = '01'.
* lt_posvalues-percentage = '100'.
APPEND lt_posvalues TO lt_posvalues[].
CLEAR : wa_msll.
ENDIF.
ENDLOOP.
note:- if it is correct give points -
Last stocktaking date for item
Hi,
Is anyone knows how can i check the last stocktaking date for item (by select query)?
Thanks in advanced,
AviIn SBO we can perform Stocktaking (In SBO menu: Inventory>inventory transactions>Initial Quantities, Stocktaking and Stock Posting).
how can i check when (in which dates) Stocktaking was performed for specific item (Stocktaking history)?
Thanks
Avi -
Hi all,
Is it possible to set Expiry date for Item. if so, how?
Plz let me know,
thanks in advance
KumarHi,
There is no Expiry date field available in the Item Master Data. However, you can check the option of the Validity dates in Item Master Data or if your item is a batch managed item, then you can have the batch expiry date.
Kind Regards,
Jitin
SAP Business One Forum Team -
We are currently supporting an older application which will no longer be patched for future browser releases. We need the end of support date, so we can plan accordingly. Any assistance is truly appreciated.
Hi Tony, and thanks for the reply. I was hoping that might be the case.
Does Mozilla not publish lifecycle dates for Firefox? The reason I am inquiring further, is that our intention is to have upgraded the product we are currently running by late August of next year. I was trying to determine if 3.6 would be supported through August of 2012. I probably should have been more specific with my initial post. -
Previous years plan data for single year.
I have 7 plan data for each year. For example for 2017 I have following ..
what is planned for 2017 in 2011.
what is planned for 2017 in 2012
what is planned for 2017 in 2013.
what is planned for 2017 in 2014.
what is planned for 2017 in 2015.
what is planned for 2017 in 2016.
what is planned for 2017 in 2017.
Client wants to store all the previous years plan relating to each year.
I already have various category for plan such as plan1, plan2, revised plan etc.
How to handle the above scenario for 7 years plan data. Appreciate any inputs..Categories named against planned year can be created. A working category(PLAN) is used in all reports and input templates. whenever PLAN data is finalized PLAN can be copied to respective planned years category . ie in 2012 , when planned data is finalized, PLAN is copied to PLAN2012 .In 2013 , PLAN should be copied to PLAN2013.
That way , planned amounts of 2017 can be retrieved from respective planned year categories .
Planned amount of 2017 in 2012 is cat:PLAN2012,Time:2017.total
Planned amount of 2017 in 2014 is cat:PLAN2014,Time:2017.total
Hope this helps. -
How to get total or sum year to date or date range
Is there a way to duplicate in Numbers what I used to do with Excel's formula =DSUM(Database,"Total",Criteria) where criteria would be any date I plugged into a referenced cell to get a year to date total. Thanks! DBT
As described in the Help which offers a list of available functions(),
In cell B1 of Tableau 2, the formula is:
=SUMIF(Database :: B,A,Database :: C)
In cell B2 of Tableau 2 is an alternate formula which doesn't requires an auxiliary cell like A1
=SUMIF(Database :: B,DATE(2008,3,3),Database :: C)
Yvan KOENIG (from FRANCE lundi 17 novembre 2008 17:16:46) -
Issue with Apex and IE , losing data for items on submit
Hi All,
I am facing one problem in APEX when i run my page on IE 8. When i submit the page i lose the data for all my items while the same does not happen on Firefox mozila and Google chorme.
Actually i have one select list which has one dynamic action associated with it when i select the options from this list other object become enable and disable with that action and page get submit.
but when i select this list in IE page get submit and my value which i selected also get lost.
Please let me know if this is some issue with IE or Apex as soon as possible.
This is bit urgent.
ThanksModify your code as below and run the page in debug mode and note the value shown for p610_x DECLARE
l_vc_arr2 APEX_APPLICATION_GLOBAL.VC_ARR2;
BEGIN
wwv_flow.debug('value for p610_x is ' || :p610_x);
l_vc_arr2 := APEX_UTIL.STRING_TO_TABLE(:P610_X,'~');
FOR z IN 1..l_vc_arr2.count LOOP
htp.p(l_vc_arr2(z) || '
END LOOP;
END;varad -
Customer communication date for items on allocation hold
When a product is on allocation hold, the order confirmation to the customer, which is communicated via email or fax, is showing a delivery date. This delivery date is usually wrong since the allocation hold is overriding the schedule line.
what is a good date to communicate for all items on allocation hold? "Unconfirmed Delivery Date" ??
-SwethaDear,
Can you make it more clear on the ,
When product is on HOLD It means is it product allocated to some other Order /customer?
Or Is it in stores (Ready for sale) , whenever you want someone has to allow this stock to that order?
If it is 2 one: You can do Re-scheduling V_V2 then you send mail/fax to customer.
It may give promt date for your customer(If you keen on you capacity)
Regards
Raj. -
GL Account Master Data for all the inventory Accounts
Hi,
What is common & unique feature in the GL Master data of all the Inventory related accounts? Is it "POST AUTOMATICALLY" or some thing else
Thanks,
LavanyaIn addition to the 'post automatically' option, please also ensure the field status group selected is relating to 'material accounts'.
-
ISA B2b basket extension data for items not showing in ordersimulation
When adding extension data to the items of the shopping basket this works fine until continuing to the Order Simulation. Here all extension data on item level is lost (header level is fine).
When proceeding to create an order template however it works fine.
Data was added using:
item.addExtensionData("FIELD", "VALUE")
Any help is appreciated.
Thanks,
Jurjenhi Jurjen,
In ISA 5.0 b2b from the order.jsp ->order simulation and basket updates go through com.sap.isa.isacore.action.order.MaintainBasketDispatcherAction. In the basketPerform() -> updateBasket() method, existing basket items are removed and created from scratch using the input/hidden field in order.jsp. Unfortunately, item level extension data is not assigned back to the newly created basket items. An alternative solution would be inherit MaintainBasketDispatcherAction and overide parseRequestItems() method. Here in the parseRequestItems() should keep a copy of itemExtension & then assign it back after super.parseRequestItems() method is called.
Regards
Tharaka (attune) -
Need quantitative as well as amount data for an account member
Requirement of the report is that for an account dimension member, there needs to be quatity, amount as well as a ratio in a single line along with the unit for the quantity (which i will keep in the custom dim).
Is this possible.. what are the ways i can handle this?
i was thinking of creating two scenarios.. one for the quantity data and the other for the amount data... will this work? i will calculate the ratio at the report level (smart view)
please help me with your thoughts.
Many thanks,
anji.Hi anji,
One possibility is to turn the structure around, by using a custom member as your report row and use different accounts to input your quantity, value and ratio. Further, the ratio account can be defined as dynamic account and write a dynamic rule to calculate the ratio.
Regards,
--Kostas -
Need a Exit to default price data for ME21/ME21N
Hi Experts,
I need a exit for tcodes ME21/ME21N to default item price data when they create a Purchase order and pop-up a error message if they manually change the price and try to save the purchase order.
I tried to find a exit using SMOD but couldn't figure out which one would be suitable.
Please give your valuable suggestions.
Thanks in advance,
KishoreHi Asik,
Thanks for your reply.
I am working in version 4.7 and i am not able to view the badi in SE18 is it because of the version difference...which i am not sure abt.
Can u suggest me any exits if available for my requirement.
Regards,
Kishore
Maybe you are looking for
-
RFC_REMOTE_PIPE is Returning 1 alwasys and not able to execute Unix shell script
Hello All, I am trying to execute a simple unix shell script from ABAP. What I did so far.. 1. created a test.sh file with single command echo "Hello". 2. placed this file on application server /Usr/sap/test.sh 3. executing ABAP program which as FM
-
Hai, my form consists of only a checkbox group which i have to select or deselect But when i press the ok button .I get the following error "Validation Error: {0}Value is not valid " What does ' {0}' stands for? Thanx for reading this.
-
Problems with downloading Elements.
I recently bought a new laptop with windows 8. I upgraded from Elements 7 to 11 which I downloaded and successfully installed on my laptop. There was a problem with my laptop today and I had to refresh the whole thing which took the elements program
-
How to implement such that "Order reason" not allow the SO to generate PO?
Hi, While Sales Order creation, if 'Order Reason' is "Poor Quality" then I do not want the Purchser order to be generated. such that the system should not allow the Sales order to generate Purchade order until the order reason is changed. Please tell
-
1 January 1970 appears in my contacts as a duplication even though I have not added them myself, is this a virus? What should I do?