Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How can i do Total Stock Value 0

Former Member
0 Kudos

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.

7 REPLIES 7

Former Member
0 Kudos

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

0 Kudos

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???

0 Kudos

Hi,

I have given you the name of the function module. Try using that.

Regards

Abhii

Former Member
0 Kudos

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.

0 Kudos

Please let me know the database table for Unrestricted field (in Plant stocks in the current period) under Plant Stock View.

0 Kudos

Hi,

Refer to MARD and MBEWH tables.

Regards,

Bathri

former_member187457
Active Contributor
0 Kudos

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