Application Development and Automation 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: 
Read only

Stock Overview

Former Member
0 Likes
601

Dear friends

When I make a consignment issue delivery and before the Post goods issue, I find the amounts were added to the scheduled for delivery in the stock overview (T-Code MMBE) on the plant level not the consignment level (as if it is at the company store not at the customer's); how can I solve it.

Thanks

1 ACCEPTED SOLUTION
Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
536

Most likely this could be done in configuration. Please consult your MM expert or move your question to the MM forum. This is not related to ABAP, in my opinion.

Dear friends

When I make a consignment issue delivery and before the Post goods issue, I find the amounts were added to the scheduled for delivery in the stock overview (T-Code MMBE) on the plant level not the consignment level (as if it is at the company store not at the customer's); how can I solve it.

Thanks

2 REPLIES 2
Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
537

Most likely this could be done in configuration. Please consult your MM expert or move your question to the MM forum. This is not related to ABAP, in my opinion.

Read only

Former Member
0 Likes
536

Same program i written for our requirment:

FUNCTION zz_test1 .

*"----


""Local interface:

*" IMPORTING

*" VALUE(PWERKS) TYPE MARD-WERKS

*" TABLES

*" I_INVENTORY_DATA STRUCTURE ZTEST1975

*"----


***********************************************************************

  • DESCRIPTION: *

***********************************************************************

  • M O D I F I C A T I O N L O G *

***********************************************************************

  • Date Programmer CCR/PIR/TIR CTS *

----


  • 16 Aug 2007 Murali Poli *

***********************************************************************

DATA : BEGIN OF itab1 OCCURS 0,

matnr LIKE mard-matnr,

werks LIKE mard-werks,

lgort LIKE mard-lgort,

labst LIKE mard-labst,

speme LIKE mard-speme,

END OF itab1.

DATA: BEGIN OF it_mdez OCCURS 0.

INCLUDE STRUCTURE mdez.

DATA END OF it_mdez.

DATA: BEGIN OF it_mdps OCCURS 0.

INCLUDE STRUCTURE mdps.

DATA END OF it_mdps .

DATA: BEGIN OF it_output1 OCCURS 0.

INCLUDE STRUCTURE ztest1975.

DATA END OF it_output1.

  • De

DATA: w_matnr TYPE matnr,

v_count TYPE i,

w_sum TYPE i,

  • w_sum(13) type c,

v_flg TYPE char1.

SELECT matnr

werks

lgort

labst

FROM mard

INTO TABLE itab1

WHERE werks EQ pwerks

AND lgort = '0001'.

IF sy-subrc = 0.

SORT itab1 BY matnr.

ENDIF.

LOOP AT itab1.

*If not it_output is initial.

CALL FUNCTION 'MD_STOCK_REQUIREMENTS_LIST_API'

EXPORTING

  • PLSCN =

matnr = itab1-matnr

werks = itab1-werks

  • BERID =

  • ERGBZ =

  • DISPLAY_LIST_MDPSX = 'X'

  • DISPLAY_LIST_MDEZX = 'X'

TABLES

mdpsx = it_mdps

mdezx = it_mdez

EXCEPTIONS

material_plant_not_found = 1

plant_not_found = 2

OTHERS = 3

.

IF sy-subrc <> 0.

WRITE:/ 'Error in function module'.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

*else.

ENDIF.

LOOP AT it_mdez.

*READ TABLE IT_MDEZ WITH KEY DELKZ = 'VJ'.

*IF SY-SUBRC = 0.

IF it_mdez-delkz = 'VJ'.

it_output1-matnr = itab1-matnr.

it_output1-werks = itab1-werks.

it_output1-clabs = itab1-labst.

it_output1-cspem = itab1-speme.

it_output1-mng01 = it_mdez-mng01.

v_flg = 'X'.

w_sum = w_sum + it_mdez-mng01.

it_output1-mng01 = w_sum.

it_output1-quantity = it_output1-clabs + it_output1-mng01.

ENDIF.

ENDLOOP.

IF v_flg = 'X'.

APPEND it_output1.

MOVE it_output1 TO i_inventory_data .

APPEND i_inventory_data.

ENDIF.

CLEAR: v_flg,

w_sum.

ENDLOOP.

ENDFUNCTION.

Please give me reward point if it is useful.

Thanks

Murali Poli