11-25-2009 12:06 PM
Hi,
I want Total Stock Value 0 against Material Number.
Please let me know how can i do it....from BDC or some other alternate is there in system.
Also please tell me, where Total Stock Value stores against material Number. means in which view.
Regards.
11-25-2009 12:27 PM
Hi ,
You can try using Function Module MB_UPDATE_MATERIAL_STOCKS. The Total stock value is stored in the accounting1 view of MM01/02/03.
Set to resolved if it solves your question.
Regards
Abhii
11-25-2009 12:44 PM
How can I change the Total Stock Value because it is gray means non-editable. I make it's BDC, how can i change it???
11-25-2009 12:48 PM
Hi,
I have given you the name of the function module. Try using that.
Regards
Abhii
11-25-2009 4:47 PM
BDC will be a time consuming approach.
If you know the database table and its field, just write a report program and change its value to 0 for all records.
11-26-2009 4:18 AM
Please let me know the database table for Unrestricted field (in Plant stocks in the current period) under Plant Stock View.
11-26-2009 4:37 AM
11-26-2009 5:28 AM
Hi,
perform BDC for 701/702 movement type...
LOOP AT gt_itab.
AT FIRST.
PERFORM bdc_dynpro USING 'SAPMM07I' '0700'.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
PERFORM bdc_field USING 'RM07I-ZLDAT' l_date. "Count Date
PERFORM bdc_field USING 'IKPF-WERKS' werks.
PERFORM bdc_field USING 'IKPF-LGORT' lgort.
ENDAT.
PERFORM bdc_dynpro USING 'SAPMM07I' '0731'.
PERFORM bdc_field USING 'BDC_OKCODE' '=NL'.
PERFORM bdc_field USING 'ISEG-MATNR(01)' gt_itab-matnr.
WRITE gt_itab-quan TO menge DECIMALS 2 LEFT-JUSTIFIED.
PERFORM bdc_field USING 'ISEG-ERFMG(01)' menge.
AT LAST.
PERFORM bdc_dynpro USING 'SAPMM07I' '0731'.
PERFORM bdc_field USING 'BDC_OKCODE' '=BU'.
PERFORM bdc_transaction TABLES msg
USING 'MI09' trans p_mode 'S'.
IF sy-subrc NE 0 AND trans = 'X'.
PERFORM bdc_error TABLES gt_itab.
error-ean11 = gt_itab-matnr.
CONCATENATE
endif.
write:/ 'Error while updating materials in MI09 transaction.'.
ENDIF.
CLEAR:msg, bdcdata. REFRESH bdcdata.
ENDAT.
ENDLOOP.
Before that please do as following:
PERFORM zero_quantity_error.
PERFORM validate_material_plant_loc.
PERFORM valid_material_inventory_exist.
Thanks
RK