*&---------------------------------------------------------------------*
*& Report ZVVF_MR046_STOCK_SPLIT_MOVE *
*& *
*&---------------------------------------------------------------------*
REPORT ZVVF_MR046_STOCK_SPLIT_MOVE no standard page heading line-size
246 MESSAGE-ID ZMM .
*---------------------------------------------------------------------*
* MODULE MM. *
*---------------------------------------------------------------------*
* Objective : Stock Statement Report
*
*
*
* Technical Spec No .
* Date Created
* Author
* Location
* LDB Nil
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
* Amendment History *
*---------------------------------------------------------------------*
* Who Change ID Reason *
* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ *
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
* Tables *
*---------------------------------------------------------------------*
tables : mseg, "Document Segment: Material
makt, "Material Descriptions
mkpf, "Header: Material Document
ekpo, "Purchasing Document Item
MARDH, "Batch Stocks: History
MARD, "Batch Stocks
mara, "General Material Data
mbewh,
J_1IMTCHID.
*---------------------------------------------------------------------**
* Type-pools
*----------------------------------------------------------------------*
TYPE-POOLS : slis.
*---------------------------------------------------------------------*
* Types Begin with TY_ *
*---------------------------------------------------------------------*
Types : begin of ty_display,
matnr like mseg-matnr,
date type dats,
MAKTX LIKE MAKT-MAKTX,
WERKS LIKE MSEG-WERKS,
MENGE_O like MSEG-MENGE,
MENGE_R1 LIKE MSEG-MENGE,
MENGE_R2 LIKE MSEG-MENGE,
MENGE_R3 LIKE MSEG-MENGE,
MENGE_R4 LIKE MSEG-MENGE,
MENGE_R LIKE MSEG-MENGE,
MENGE_I1 LIKE MSEG-MENGE,
MENGE_I2 LIKE MSEG-MENGE,
MENGE_I3 LIKE MSEG-MENGE,
MENGE_I4 LIKE MSEG-MENGE,
MENGE_I5 LIKE MSEG-MENGE,
MENGE_I6 LIKE MSEG-MENGE,
MENGE_I7 LIKE MSEG-MENGE,
MENGE_I LIKE MSEG-MENGE,
MENGE_RE LIKE MSEG-MENGE,
MENGE_SO LIKE MSEG-MENGE,
MENGE_SI LIKE MSEG-MENGE,
MENGE_ST LIKE MSEG-MENGE,
MENGE_MM LIKE MSEG-MENGE,
MENGE_PL LIKE MSEG-MENGE,
MENGE_PG LIKE MSEG-MENGE,
MENGE_C LIKE MSEG-MENGE,
* VPRSV LIKE MBEWH-VPRSV,
* VERPR LIKE MBEWH-VERPR,
* STPRS LIKE MBEWH-STPRS,
* MENGE_S LIKE MSEG-MENGE,
* EXCSE(3) TYPE C,
end of ty_display.
types : begin of ty_MARD,
matnr like MCHB-matnr,
maktx LIKE makt-maktx,
* LGORT like MCHB-LGORT,
end of ty_MARD.
types : begin of ty_mara,
matnr like mara-matnr,
end of ty_mara.
types : begin of ty_MARDH,
matnr like MARDH-matnr,
WERKS LIKE MARDH-WERKS,
labst like MARDH-LABST,
insmt like MARDH-insmE,
EINMt LIKE MARDH-EINME,
spemt like MARDH-spemE,
end of ty_MARDH.
types : begin of ty_mseg,
mblnr like mseg-mblnr,
matnr like mseg-matnr,
WERKS LIKE MCHBH-WERKS,
budat like mkpf-budat,
BWART like mseg-BWART,
SHKZG like mseg-SHKZG,
aufnr like mseg-aufnr,
lifnr like mseg-lifnr,
ebeln like mseg-ebeln,
ebelp like mseg-ebelp,
bednr like ekpo-bednr,
charg like mseg-charg,
menge like mseg-menge,
meins like mseg-meins,
sgtxt like mseg-sgtxt,
sobkz like mseg-sobkz,
end of ty_mseg.
types : begin of ty_recve,
matnr like mseg-matnr,
WERKS LIKE MCHBH-WERKS,
budat like mkpf-budat,
menge like mseg-menge,
end of ty_recve.
types : begin of ty_extend,
matnr like mseg-matnr,
WERKS LIKE MCHBH-WERKS,
budat like mkpf-budat,
menge like mseg-menge,
end of ty_extend.
types : begin of ty_move,
matnr like mseg-matnr,
WERKS LIKE MCHBH-WERKS,
budat like mkpf-budat,
menge like mseg-menge,
shkzg like mseg-shkzg,
end of ty_move.
types : begin of ty_extend1,
matnr like mseg-matnr,
WERKS LIKE MCHBH-WERKS,
budat like mkpf-budat,
charg like mseg-charg,
BWART like mseg-BWART,
meins like mseg-meins,
menge like mseg-menge,
strngt like mseg-menge,
actve like mseg-menge,
end of ty_extend1.
Types : begin of ty_MBEWH,
matnr like mbewh-matnr,
bwkey like mbewh-bwkey,
lbkum like mbewh-lbkum,
vprsv like mbewh-vprsv,
verpr like mbewh-verpr,
stprs like mbewh-stprs,
end of ty_MBEWH.
Types : begin of ty_MBEWH1,
matnr like mbewh-matnr,
vprsv like mbewh-vprsv,
verpr like mbewh-verpr,
stprs like mbewh-stprs,
lbkum like mbewh-lbkum,
salk3 like mbewh-salk3,
end of ty_MBEWH1.
types : begin of ty_total,
matnr like mseg-matnr,
DATE like mkpf-budat,
charg like mseg-charg,
meins like mseg-meins,
menge like mseg-menge,
actve like mseg-menge,
end of ty_total.
**---------------------------------------------------------------------*
* Constants Begin with C_
**---------------------------------------------------------------------*
*--- For ALV ----*
CONSTANTS: c_top_of_page_db TYPE slis_formname VALUE 'TOP_OF_PAGE_DB'.
*---------------------------------------------------------------------*
* Internal tables Begin with IT_ *
*---------------------------------------------------------------------*
*--- For ALV ----*
DATA: it_list_top_of_page TYPE slis_t_listheader,
it_events TYPE slis_t_event,
it_fieldcat TYPE slis_t_fieldcat_alv.
data : it_mseg type standard table of ty_mseg with header line,
it_mseg1 type standard table of ty_mseg with header line,
it_mARa type standard table of ty_MARa with header line,
it_mARD type standard table of ty_MARD with header line,
it_MARDH1 type standard table of ty_MARDH with header line,
it_MARDH type standard table of ty_MARDH with header line,
it_MBEWH type standard table of ty_MBEWH with header line,
it_MBEWH1 type standard table of ty_MBEWH1 with header line,
it_recve type standard table of ty_recve with header line,
it_extend type standard table of ty_extend with header line,
it_extend1 type standard table of ty_extend1 with header line,
it_display type standard table of ty_display with header line,
it_r1 type standard table of ty_move with header line,
it_r2 type standard table of ty_move with header line,
it_r3 type standard table of ty_move with header line,
it_r4 type standard table of ty_move with header line,
it_i1 type standard table of ty_move with header line,
it_i2 type standard table of ty_move with header line,
it_i3 type standard table of ty_move with header line,
it_i4 type standard table of ty_move with header line,
it_i5 type standard table of ty_move with header line,
it_i6 type standard table of ty_move with header line,
it_i7 type standard table of ty_move with header line,
it_re type standard table of ty_move with header line,
it_so type standard table of ty_move with header line,
it_si type standard table of ty_move with header line,
it_st type standard table of ty_move with header line,
it_mm type standard table of ty_move with header line,
it_pl type standard table of ty_move with header line,
it_pg type standard table of ty_move with header line.
"it_display1 type standard table of ty_display with header line,
"it_total type standard table of ty_total with header line.
*---------------------------------------------------------------------*
* Work Area Begin with WA_ *
*---------------------------------------------------------------------*
data : wa_mseg like line of it_mseg,
wa_MARD like line of it_MARD,
wa_MARDH1 like line of it_MARDH,
wa_MARDH like line of it_MARDH,
wa_MBEWH like line of it_MBEWH,
wa_MBEWH1 like line of it_MBEWH1,
wa_recve like line of it_recve,
wa_extend like line of it_extend,
wa_extend1 like line of it_extend1,
wa_display like line of it_display,
"wa_total like line of it_total,
"wa_display like line of it_display,
wa_r1 like line of it_r1,
wa_r2 like line of it_r1,
wa_r3 like line of it_r1,
wa_r4 like line of it_r1,
wa_i1 like line of it_r1,
wa_i2 like line of it_r1,
wa_i3 like line of it_r1,
wa_i4 like line of it_r1,
wa_i5 like line of it_r1,
wa_i6 like line of it_r1,
wa_i7 like line of it_r1,
wa_re like line of it_r1,
wa_so like line of it_r1,
wa_si like line of it_r1,
wa_st like line of it_r1,
wa_mm like line of it_r1,
wa_pl like line of it_r1,
wa_pg like line of it_r1,
WA_layout TYPE slis_layout_alv. " For ALV
*---------------------------------------------------------------------*
* Data Begin with W_ *
*---------------------------------------------------------------------*
DATA : W_DATE LIKE MKPF-BUDAT,
W_DATE1 LIKE MKPF-BUDAT,
W_DATE2 LIKE MKPF-BUDAT,
W_DATE3 LIKE MKPF-BUDAT,
W_DATE4 LIKE MKPF-BUDAT,
W_BUPER LIKE T009B-POPER,
W_lfmon LIKE mchb-lfmon,
W_YEAR LIKE T009B-BDATJ,
W_RMENGE LIKE MSEG-MENGE,
W_MON(2) TYPE N,
W_INDEX TYPE SY-INDEX,
W_CNT TYPE I,
W_CNT1 TYPE I,
W_CNT2 TYPE I,
W_IMENGE LIKE MSEG-MENGE,
W_MENGE LIKE MSEG-MENGE,
w_maktx like makt-maktx,
W_KEY LIKE INOB-OBJEK,
W_STRENGTH LIKE AUSP-ATFLV,
W_REPID LIKE SY-REPID.
DATA : W_R1 LIKE MSEG-MENGE,
W_R2 LIKE MSEG-MENGE,
W_R3 LIKE MSEG-MENGE,
W_R4 LIKE MSEG-MENGE,
W_I1 LIKE MSEG-MENGE,
W_I2 LIKE MSEG-MENGE,
W_I3 LIKE MSEG-MENGE,
W_I4 LIKE MSEG-MENGE,
W_I5 LIKE MSEG-MENGE,
W_I6 LIKE MSEG-MENGE,
W_I7 LIKE MSEG-MENGE,
W_RE LIKE MSEG-MENGE,
W_SO LIKE MSEG-MENGE,
W_SI LIKE MSEG-MENGE,
W_ST LIKE MSEG-MENGE,
W_MM LIKE MSEG-MENGE,
W_PL LIKE MSEG-MENGE,
W_PG LIKE MSEG-MENGE.
*---------------------------------------------------------------------*
* Select Options Begin with SO_ *
*---------------------------------------------------------------------*
selection-screen : begin of block b1 with frame title text-023.
PARAMETERS : PR_plant LIKE mseg-werks default 'P001' .
select-options : so_matnr for mard-matnr obligatory. "Material code
select-options : so_mtart for mara-mtart. "Material Type
select-options : so_matkl for mara-matkl. "Material Group
select-options : so_date for sy-datum obligatory no-extension.
selection-screen : end of block b1.
*selection-screen : begin of block b2 with frame title text-002.
*PARAMETERS : PR_exc(1) type c .
*PARAMETERS : PR_nexc(1) type c.
*selection-screen : end of block b2.
************************************************************************
*---------------------------------------------------------------------*
* Ranges Begin with R_ *
*---------------------------------------------------------------------*
ranges : r_movtype for mseg-bwart, "Movement type
r_date for sy-datum. "Date
* r_movrec for mseg-bwart,
* r_moviss for mseg-bwart,
* r_movtra for mseg-bwart.
ranges : r_movr1 for mseg-bwart, "Movement type
r_movr2 for mseg-bwart,
r_movr3 for mseg-bwart,
r_movr4 for mseg-bwart,
r_movi1 for mseg-bwart,
r_movi2 for mseg-bwart,
r_movi3 for mseg-bwart,
r_movi4 for mseg-bwart,
r_movi5 for mseg-bwart,
r_movi6 for mseg-bwart,
r_movi7 for mseg-bwart,
r_movre for mseg-bwart,
r_movso for mseg-bwart,
r_movsi for mseg-bwart,
r_movst for mseg-bwart,
r_movmm for mseg-bwart,
r_movpl for mseg-bwart,
r_movpg for mseg-bwart.
*---------------------------------------------------------------------*
* Initialisation *
*---------------------------------------------------------------------*
initialization.
w_repid = SY-REPID.
*---------------------------------------------------------------------*
* At selection-screen *
*---------------------------------------------------------------------*
at selection-screen .
if not so_date-high is initial.
***Dates should be from the similar month of the similar year
if ( so_date-high+4(2) ne so_date-low+4(2) )
or ( so_date-high+0(4) ne so_date-low+0(4) ).
message e119.
endif.
endif.
***********************************************************************
* S T A R T O F S E L E C T I O N *
***********************************************************************
start-of-selection.
perform move_types.
perform get_mchb.
perform get_mseg.
end-of-selection.
PERFORM DATA_SUM.
PERFORM fieldcat_init USING it_fieldcat[].
PERFORM eventtab_build USING it_events[].
PERFORM comment_build USING it_list_top_of_page[].
PERFORM layout_build USING WA_layout.
PERFORM write_alv_grid.
*&---------------------------------------------------------------------*
*& Form get_mchb
*&---------------------------------------------------------------------*
form get_mchb.
IF so_date-HIGH IS INITIAL.
so_date-HIGH = so_date-LOW.
ENDIF.
select matnr from mara into CORRESPONDING FIELDS OF TABLE it_mara
where matnr in so_matnr and
matkl in so_matkl and
mtart in so_mtart.
CONCATENATE so_date-low+0(6) '01' INTO W_DATE.
W_DATE1 = W_DATE.
PERFORM FISCAL_PERIOD USING W_DATE1
CHANGING W_BUPER
W_YEAR.
w_lfmon = w_buper+1(2).
***Select all stock details from MCHB creation le selection screen high
***date
SELECT DISTINCT mard~matnr makt~maktx
FROM MARD inner join makt on
mard~matnr = makt~matnr
INTO CORRESPONDING
FIELDS OF TABLE It_MARD
for all entries in it_mara WHERE mard~MATNR = it_mara-MATNR
AND mard~WERKS = PR_plant
and makt~spras = sy-langu.
* AND LFGJA = W_YEAR
* AND LFMON = w_lfmon.
if sy-subrc = 0.
SELECT matnr BWKEY LBKUM VPRSV VERPR STPRS
FROM MBEWH INTO CORRESPONDING
FIELDS OF TABLE It_MBEWH1
FOR ALL ENTRIES IN It_Mard
WHERE BWKEY = pr_plant
AND MATNR = It_MARD-MATNR
AND LFGJA = w_year
AND LFMON = w_lfmon.
W_DATE = W_DATE - 1.
PERFORM FISCAL_PERIOD USING W_DATE
CHANGING W_BUPER
W_YEAR.
w_lfmon = w_buper+1(2).
***current stock is taken from stock history table MARDH
SELECT matnr WERKS labst insme EINMe speme
FROM MARDH INTO CORRESPONDING
FIELDS OF TABLE It_MARDH1
FOR ALL ENTRIES IN It_Mard
WHERE WERKS = pr_plant
AND MATNR = It_MARD-MATNR
AND LFGJA = w_year
AND LFMON = w_lfmon.
if sy-subrc = 0.
LOOP AT IT_Mardh1 INTO WA_Mardh1.
MOVE-CORRESPONDING WA_Mardh1 TO WA_MardH.
COLLECT WA_MardH INTO IT_MardH.
ENDLOOP.
endif.
SELECT matnr BWKEY LBKUM vprsv verpr stprs FROM MBEWH INTO
CORRESPONDING FIELDS OF TABLE It_MBEWH
FOR ALL ENTRIES IN It_Mard
WHERE BWKEY = pr_plant
AND MATNR = It_MARD-MATNR
AND LFGJA = w_year
AND LFMON = w_lfmon.
else.
message e123 with 'MARD' W_DATE1 so_date-HIGH pr_plant.
endif.
endform. "get_mchb
**&-------------------------------------------------------------------
**& Form get_mseg
**&-------------------------------------------------------------------
form get_mseg.
IF SO_DATE-LOW = SO_DATE-HIGH.
select mseg~mblnr
mseg~matnr
mseg~WERKS
mkpf~budat
mseg~bwart
mseg~SHKZG
mseg~aufnr
mseg~lifnr
mseg~ebeln
mseg~ebelp
ekpo~bednr
mseg~charg
mseg~menge
mseg~meins
mseg~sgtxt
mseg~sobkz
into corresponding
fields of
table it_mseg
from mseg inner join mkpf
on mkpf~mblnr = mseg~mblnr and
mkpf~mjahr = mseg~mjahr
LEFT OUTER join ekpo
on mseg~ebeln = ekpo~ebeln and
mseg~ebelp = ekpo~ebelp
for all entries in it_mara where
mseg~werks = PR_plant and
mseg~matnr = it_mara-matnr and
mkpf~budat = so_date-HIGH .
ELSE.
select mseg~mblnr
mseg~matnr
mseg~WERKS
mkpf~budat
mseg~bwart
mseg~SHKZG
mseg~aufnr
mseg~lifnr
mseg~ebeln
mseg~ebelp
ekpo~bednr
mseg~charg
mseg~menge
mseg~meins
mseg~sgtxt
mseg~sobkz
into corresponding
fields of
table it_mseg
from mseg inner join mkpf
on mkpf~mblnr = mseg~mblnr and
mkpf~mjahr = mseg~mjahr
LEFT OUTER join ekpo
on mseg~ebeln = ekpo~ebeln and
mseg~ebelp = ekpo~ebelp
for all entries in it_mara where
mseg~werks = PR_plant and
mseg~matnr = it_mara-matnr and
mkpf~budat BETWEEN W_DATE1 AND so_date-HIGH .
* mkpf~budat BETWEEN so_date-low AND so_date-HIGH .
ENDIF.
if sy-subrc = 0.
loop at It_Mard into wa_mard.
it_mseg1[] = it_mseg[].
delete it_mseg1 where matnr ne wa_mard-matnr.
delete it_mseg1 where not bwart in r_movr1.
loop at it_mseg1 into wa_mseg where bwart in r_movr1 and
matnr = wa_mard-matnr and aufnr = ''.
if wa_mseg-SHKZG = 'S'.
w_rmenge = w_rmenge + wa_mseg-menge .
endif.
if wa_mseg-SHKZG = 'H'.
w_imenge = w_imenge + wa_mseg-menge .
endif.
at end of budat.
w_imenge = w_imenge * ( -1 ).
wa_r1-matnr = wa_mard-matnr.
wa_r1-WERKS = pr_plant.
wa_r1-budat = wa_mseg-budat.
* added by rupal for reversal movement types on 03/05/2005
wa_r1-menge = w_rmenge + w_imenge.
* wa_r1-menge = w_rmenge - w_imenge.
collect wa_r1 into it_r1.
clear : w_rmenge,w_imenge,wa_r1.
endat.
endloop.
it_mseg1[] = it_mseg[].
delete it_mseg1 where matnr ne wa_mard-matnr.
delete it_mseg1 where not bwart in r_movr2.
loop at it_mseg1 into wa_mseg where bwart in r_movr2 and
matnr = wa_mard-matnr and aufnr <> ''.
if wa_mseg-SHKZG = 'S'.
w_rmenge = w_rmenge + wa_mseg-menge .
endif.
if wa_mseg-SHKZG = 'H'.
w_imenge = w_imenge + wa_mseg-menge .
endif.
at end of budat.
w_imenge = w_imenge * ( -1 ).
wa_r2-matnr = wa_mard-matnr.
wa_r2-WERKS = pr_plant.
wa_r2-budat = wa_mseg-budat.
* added by rupal for reversal movement types on 03/05/2005
wa_r2-menge = w_rmenge + w_imenge.
* wa_r2-menge = w_rmenge - w_imenge.
collect wa_r2 into it_r2.
clear : w_rmenge,w_imenge,wa_r2.
endat.
endloop.
it_mseg1[] = it_mseg[].
delete it_mseg1 where matnr ne wa_mard-matnr.
delete it_mseg1 where not bwart in r_movr3.
loop at it_mseg1 into wa_mseg where bwart in r_movr3 and
matnr = wa_mard-matnr.
if wa_mseg-SHKZG = 'S'.
w_rmenge = w_rmenge + wa_mseg-menge .
endif.
if wa_mseg-SHKZG = 'H'.
w_imenge = w_imenge + wa_mseg-menge .
endif.
at end of budat.
w_imenge = w_imenge * ( -1 ).
wa_r3-matnr = wa_mard-matnr.
wa_r3-WERKS = pr_plant.
wa_r3-budat = wa_mseg-budat.
* added by rupal for reversal movement types on 03/05/2005
* wa_r3-menge = w_rmenge - w_imenge.
wa_r3-menge = w_rmenge + w_imenge.
collect wa_r3 into it_r3.
clear : w_rmenge,w_imenge,wa_r3.
endat.
endloop.
it_mseg1[] = it_mseg[].
delete it_mseg1 where matnr ne wa_mard-matnr.
delete it_mseg1 where not bwart in r_movr4.
loop at it_mseg1 into wa_mseg where bwart in r_movr4 and
matnr = wa_mard-matnr.
if wa_mseg-SHKZG = 'S'.
w_rmenge = w_rmenge + wa_mseg-menge .
endif.
if wa_mseg-SHKZG = 'H'.
w_imenge = w_imenge + wa_mseg-menge .
endif.
at end of budat.
w_imenge = w_imenge * ( -1 ).
wa_r4-matnr = wa_mard-matnr.
wa_r4-WERKS = pr_plant.
wa_r4-budat = wa_mseg-budat.
* added by rupal for reversal movement types on 03/05/2005
* wa_r4-menge = w_rmenge - w_imenge.
wa_r4-menge = w_rmenge + w_imenge.
collect wa_r4 into it_r4.
clear : w_rmenge,w_imenge,wa_r4.
endat.
endloop.
it_mseg1[] = it_mseg[].
delete it_mseg1 where matnr ne wa_mard-matnr.
delete it_mseg1 where not bwart in r_movi1.
loop at it_mseg1 into wa_mseg where bwart in r_movi1 and
matnr = wa_mard-matnr.
if wa_mseg-SHKZG = 'S'.
w_rmenge = w_rmenge + wa_mseg-menge .
endif.
if wa_mseg-SHKZG = 'H'.
w_imenge = w_imenge + wa_mseg-menge .
endif.
at end of budat.
* w_imenge = w_imenge * ( -1 ).
w_rmenge = w_rmenge * ( -1 ).
wa_i1-matnr = wa_mard-matnr.
wa_i1-WERKS = pr_plant.
wa_i1-budat = wa_mseg-budat.
wa_i1-menge = w_imenge + w_rmenge.
* wa_i1-menge = w_rmenge + w_imenge.
collect wa_i1 into it_i1.
clear : w_rmenge,w_imenge,wa_i1.
endat.
endloop.
it_mseg1[] = it_mseg[].
delete it_mseg1 where matnr ne wa_mard-matnr.
delete it_mseg1 where not bwart in r_movi2.
loop at it_mseg1 into wa_mseg where bwart in r_movi2 and
matnr = wa_mard-matnr.
if wa_mseg-SHKZG = 'S'.
w_rmenge = w_rmenge + wa_mseg-menge .
endif.
if wa_mseg-SHKZG = 'H'.
w_imenge = w_imenge + wa_mseg-menge .
endif.
at end of budat.
w_rmenge = w_rmenge * ( -1 ).
wa_i2-matnr = wa_mard-matnr.
wa_i2-WERKS = pr_plant.
wa_i2-budat = wa_mseg-budat.
* added by rupal for reversal movement types on 03/05/2005
wa_i2-menge = w_imenge + w_rmenge.
** wa_i2-menge = w_rmenge + w_imenge.
collect wa_i2 into it_i2.
clear : w_rmenge,w_imenge,wa_i2.
endat.
endloop.
it_mseg1[] = it_mseg[].
delete it_mseg1 where matnr ne wa_mard-matnr.
delete it_mseg1 where not bwart in r_movi3.
loop at it_mseg1 into wa_mseg where bwart in r_movi3 and
matnr = wa_mard-matnr.
if wa_mseg-SHKZG = 'S'.
w_rmenge = w_rmenge + wa_mseg-menge .
endif.
if wa_mseg-SHKZG = 'H'.
w_imenge = w_imenge + wa_mseg-menge .
endif.
at end of budat.
w_rmenge = w_rmenge * ( -1 ).
wa_i3-matnr = wa_mard-matnr.
wa_i3-WERKS = pr_plant.
wa_i3-budat = wa_mseg-budat.
* added by rupal for reversal movement types on 03/05/2005
* wa_i3-menge = w_rmenge - w_imenge.
wa_i3-menge = w_imenge + w_rmenge.
collect wa_i3 into it_i3.
clear : w_rmenge,w_imenge,wa_i3.
endat.
endloop.
it_mseg1[] = it_mseg[].
delete it_mseg1 where matnr ne wa_mard-matnr.
delete it_mseg1 where not bwart in r_movi4.
loop at it_mseg1 into wa_mseg where bwart in r_movi4 and
matnr = wa_mard-matnr.
if wa_mseg-SHKZG = 'S'.
w_rmenge = w_rmenge + wa_mseg-menge .
endif.
if wa_mseg-SHKZG = 'H'.
w_imenge = w_imenge + wa_mseg-menge .
endif.
at end of budat.
w_rmenge = w_rmenge * ( -1 ).
wa_i4-matnr = wa_mard-matnr.
wa_i4-WERKS = pr_plant.
wa_i4-budat = wa_mseg-budat.
* added by rupal for reversal movement types on 03/05/2005
* wa_i4-menge = w_rmenge - w_imenge.
wa_i4-menge = w_imenge + w_rmenge.
collect wa_i4 into it_i4.
clear : w_rmenge,w_imenge,wa_i4.
endat.
endloop.
it_mseg1[] = it_mseg[].
delete it_mseg1 where matnr ne wa_mard-matnr.
delete it_mseg1 where not bwart in r_movi5.
delete it_mseg1 where sobkz = 'O'.
loop at it_mseg1 into wa_mseg where bwart in r_movi5 and
matnr = wa_mard-matnr.
if wa_mseg-SHKZG = 'S'.
w_rmenge = w_rmenge + wa_mseg-menge .
endif.
if wa_mseg-SHKZG = 'H'.
w_imenge = w_imenge + wa_mseg-menge .
endif.
at end of budat.
w_rmenge = w_rmenge * ( -1 ).
wa_i5-matnr = wa_mard-matnr.
wa_i5-WERKS = pr_plant.
wa_i5-budat = wa_mseg-budat.
* added by rupal for reversal movement types on 03/05/2005
* wa_i5-menge = w_rmenge - w_imenge.
wa_i5-menge = w_imenge + w_rmenge.
collect wa_i5 into it_i5.
clear : w_rmenge,w_imenge,wa_i5.
endat.
endloop.
it_mseg1[] = it_mseg[].
delete it_mseg1 where matnr ne wa_mard-matnr.
delete it_mseg1 where not bwart in r_movi6.
loop at it_mseg1 into wa_mseg where bwart in r_movi6 and
matnr = wa_mard-matnr.
if wa_mseg-SHKZG = 'S'.
w_rmenge = w_rmenge + wa_mseg-menge .
endif.
if wa_mseg-SHKZG = 'H'.
w_imenge = w_imenge + wa_mseg-menge .
endif.
at end of budat.
w_rmenge = w_rmenge * ( -1 ).
wa_i6-matnr = wa_mard-matnr.
wa_i6-WERKS = pr_plant.
wa_i6-budat = wa_mseg-budat.
* added by rupal for reversal movement types on 03/05/2005
* wa_i6-menge = w_rmenge - w_imenge.
wa_i6-menge = w_imenge + w_rmenge.
collect wa_i6 into it_i6.
clear : w_rmenge,w_imenge,wa_i6.
endat.
endloop.
******added for 'customer consignment' column
it_mseg1[] = it_mseg[].
delete it_mseg1 where matnr ne wa_mard-matnr.
delete it_mseg1 where not bwart in r_movi7.
delete it_mseg1 where sobkz = 'W'.
loop at it_mseg1 into wa_mseg where bwart in r_movi7 and
matnr = wa_mard-matnr.
if wa_mseg-SHKZG = 'S'.
w_rmenge = w_rmenge + wa_mseg-menge .
endif.
if wa_mseg-SHKZG = 'H'.
w_imenge = w_imenge + wa_mseg-menge .
endif.
at end of budat.
w_rmenge = w_rmenge * ( -1 ).
wa_i7-matnr = wa_mard-matnr.
wa_i7-WERKS = pr_plant.
wa_i7-budat = wa_mseg-budat.
* added by rupal for reversal movement types on 03/05/2005
* wa_i6-menge = w_rmenge - w_imenge.
wa_i7-menge = w_imenge + w_rmenge.
collect wa_i7 into it_i7.
clear : w_rmenge,w_imenge,wa_i7.
endat.
endloop.
*********************************************
it_mseg1[] = it_mseg[].
delete it_mseg1 where matnr ne wa_mard-matnr.
delete it_mseg1 where not bwart in r_movre.
loop at it_mseg1 into wa_mseg where bwart in r_movre and
matnr = wa_mard-matnr.
.
if wa_mseg-SHKZG = 'S'.
w_rmenge = w_rmenge + wa_mseg-menge .
endif.
if wa_mseg-SHKZG = 'H'.
w_imenge = w_imenge + wa_mseg-menge .
endif.
at end of budat.
w_rmenge = w_rmenge * ( -1 ).
wa_re-matnr = wa_mard-matnr.
wa_re-WERKS = pr_plant.
wa_re-budat = wa_mseg-budat.
* added by rupal for reversal movement types on 03/05/2005
* wa_re-menge = w_rmenge - w_imenge.
wa_re-menge = w_imenge - w_rmenge.
collect wa_re into it_re.
clear : w_rmenge,w_imenge,wa_re.
endat.
endloop.
it_mseg1[] = it_mseg[].
delete it_mseg1 where matnr ne wa_mard-matnr.
delete it_mseg1 where not bwart in r_movso.
loop at it_mseg1 into wa_mseg where bwart in r_movso and
matnr = wa_mard-matnr.
.
if wa_mseg-SHKZG = 'S'.
w_rmenge = w_rmenge + wa_mseg-menge .
endif.
if wa_mseg-SHKZG = 'H'.
w_imenge = w_imenge + wa_mseg-menge .
endif.
at end of budat.
w_imenge = w_imenge * ( -1 ).
wa_so-matnr = wa_mard-matnr.
wa_so-WERKS = pr_plant.
wa_so-budat = wa_mseg-budat.
* added by rupal for reversal movement types on 03/05/2005
* wa_so-menge = w_rmenge - w_imenge.
wa_so-menge = w_rmenge - w_imenge.
collect wa_so into it_so.
clear : w_rmenge,w_imenge,wa_so.
endat.
endloop.
it_mseg1[] = it_mseg[].
delete it_mseg1 where matnr ne wa_mard-matnr.
delete it_mseg1 where not bwart in r_movsi.
loop at it_mseg1 into wa_mseg where bwart in r_movsi and
matnr = wa_mard-matnr.
.
if wa_mseg-SHKZG = 'S'.
w_rmenge = w_rmenge + wa_mseg-menge .
endif.
if wa_mseg-SHKZG = 'H'.
w_imenge = w_imenge + wa_mseg-menge .
endif.
at end of budat.
w_imenge = w_imenge * ( -1 ).
wa_si-matnr = wa_mard-matnr.
wa_si-WERKS = pr_plant.
wa_si-budat = wa_mseg-budat.
* added by rupal for reversal movement types on 03/05/2005
* wa_si-menge = w_rmenge - w_imenge.
wa_si-menge = w_rmenge - w_imenge.
collect wa_si into it_si.
clear : w_rmenge,w_imenge,wa_si.
endat.
endloop.
*it_mseg1[] = it_mseg[].
*delete it_mseg1 where matnr ne wa_mard-matnr.
*delete it_mseg1 where not bwart in r_movst.
*
* loop at it_mseg1 into wa_mseg where bwart in r_movst and
* matnr = wa_mard-matnr.
*.
* if wa_mseg-SHKZG = 'S'.
* w_rmenge = w_rmenge + wa_mseg-menge .
* endif.
*
* if wa_mseg-SHKZG = 'H'.
* w_imenge = w_imenge + wa_mseg-menge .
* endif.
*
*at end of budat.
* w_imenge = w_imenge * ( -1 ).
* wa_st-matnr = wa_mard-matnr.
* wa_st-WERKS = pr_plant.
* wa_st-budat = wa_mseg-budat.
* wa_st-menge = w_rmenge - w_imenge.
* collect wa_st into it_st.
*clear : w_rmenge,w_imenge,wa_st.
*endat.
* endloop.
it_mseg1[] = it_mseg[].
delete it_mseg1 where matnr ne wa_mard-matnr.
delete it_mseg1 where not bwart in r_movmm.
loop at it_mseg1 into wa_mseg where bwart in r_movmm and
matnr = wa_mard-matnr.
.
if wa_mseg-SHKZG = 'S'.
w_rmenge = w_rmenge + wa_mseg-menge .
endif.
if wa_mseg-SHKZG = 'H'.
w_imenge = w_imenge + wa_mseg-menge .
endif.
wa_mm-shkzg = wa_mseg-shkzg.
at end of budat.
w_imenge = w_imenge * ( -1 ).
wa_mm-matnr = wa_mard-matnr.
wa_mm-WERKS = pr_plant.
wa_mm-budat = wa_mseg-budat.
* added by rupal for reversal movement types on 03/05/2005
* wa_mm-menge = w_rmenge - w_imenge.
wa_mm-menge = w_rmenge - w_imenge.
collect wa_mm into it_mm.
clear : w_rmenge,w_imenge,wa_mm.
endat.
endloop.
it_mseg1[] = it_mseg[].
delete it_mseg1 where matnr ne wa_mard-matnr.
delete it_mseg1 where not bwart in r_movpl.
loop at it_mseg1 into wa_mseg where bwart in r_movpl and
matnr = wa_mard-matnr.
.
if wa_mseg-SHKZG = 'S'.
w_rmenge = w_rmenge + wa_mseg-menge .
endif.
if wa_mseg-SHKZG = 'H'.
w_imenge = w_imenge + wa_mseg-menge .
endif.
at end of budat.
w_imenge = w_imenge * ( -1 ).
wa_pl-matnr = wa_mard-matnr.
wa_pl-WERKS = pr_plant.
wa_pl-budat = wa_mseg-budat.
* added by rupal for reversal movement types on 03/05/2005
* wa_pl-menge = w_rmenge - w_imenge.
wa_pl-menge = w_rmenge - w_imenge.
collect wa_pl into it_pl.
clear : w_rmenge,w_imenge,wa_pl.
endat.
endloop.
it_mseg1[] = it_mseg[].
delete it_mseg1 where matnr ne wa_mard-matnr.
delete it_mseg1 where not bwart in r_movpg.
loop at it_mseg1 into wa_mseg where bwart in r_movpg and
matnr = wa_mard-matnr.
.
if wa_mseg-SHKZG = 'S'.
w_rmenge = w_rmenge + wa_mseg-menge .
endif.
if wa_mseg-SHKZG = 'H'.
w_imenge = w_imenge + wa_mseg-menge .
endif.
at end of budat.
w_imenge = w_imenge * ( -1 ).
wa_pg-matnr = wa_mard-matnr.
wa_pg-WERKS = pr_plant.
wa_pg-budat = wa_mseg-budat.
* added by rupal for reversal movement types on 03/05/2005
* wa_pg-menge = w_rmenge - w_imenge.
wa_pg-menge = w_rmenge - w_imenge.
collect wa_pg into it_pg.
clear : w_rmenge,w_imenge,wa_pg.
endat.
endloop.
ENDLOOP.
endif.
endform. "get_mseg
*&---------------------------------------------------------------------*
*& Form FISCAL_PERIOD
*&---------------------------------------------------------------------*
FORM FISCAL_PERIOD USING W_DATE
CHANGING W_BUPER
W_YEAR.
***find the fiscal year and month of previous year&month
call function 'DATE_TO_PERIOD_CONVERT'
EXPORTING
i_date = W_DATE
i_periv = 'V3'
IMPORTING
e_buper = w_buper
e_gjahr = w_year.
ENDFORM.
**&---------------------------------------------------------------------
**
**& Form DATA_SUM
**&---------------------------------------------------------------------
**
FORM DATA_SUM.
sort it_mard stable by matnr.
W_DATE2 = so_date-LOW.
W_DATE3 = so_date-LOW - 1.
W_MON = ( so_date-HIGH+6(2) - so_date-LOW+6(2) ) + 1.
LOOP AT IT_MARD INTO WA_MARD.
DO W_MON TIMES.
W_INDEX = SY-INDEX.
WA_DISPLAY-WERKS = pr_plant.
WA_DISPLAY-maktx = WA_MARD-MAktx.
WA_DISPLAY-MATNR = WA_MARD-MATNR.
WA_DISPLAY-DATE = W_DATE2.
IF W_INDEX = 1.
READ TABLE IT_MBEWH INTO WA_MBEWH WITH KEY MATNR = WA_MARD-MATNR.
IF SY-SUBRC = 0.
WA_DISPLAY-menge_o = WA_MBEWH-lbkum.
ENDIF.
***********************************
LOOP AT IT_R1 INTO WA_R1 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT BETWEEN W_DATE1 AND W_DATE3
.
W_R1 = W_R1 + WA_R1-MENGE.
ENDLOOP.
LOOP AT IT_R2 INTO WA_R2 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT BETWEEN W_DATE1 AND W_DATE3
.
W_R2 = W_R2 + WA_R2-MENGE.
ENDLOOP.
LOOP AT IT_R3 INTO WA_R3 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT BETWEEN W_DATE1 AND W_DATE3
.
W_R3 = W_R3 + WA_R3-MENGE.
ENDLOOP.
LOOP AT IT_R4 INTO WA_R4 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT BETWEEN W_DATE1 AND W_DATE3
.
W_R4 = W_R4 + WA_R4-MENGE.
ENDLOOP.
W_RMENGE = W_R1 + W_R2 + W_R3 + W_R4 .
****************************************
LOOP AT IT_I1 INTO WA_I1 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT BETWEEN W_DATE1 AND W_DATE3.
W_I1 = W_I1 + WA_I1-MENGE.
ENDLOOP.
LOOP AT IT_I2 INTO WA_I2 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT BETWEEN W_DATE1 AND W_DATE3.
W_I2 = W_I2 + WA_I2-MENGE.
ENDLOOP.
LOOP AT IT_I3 INTO WA_I3 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT BETWEEN W_DATE1 AND W_DATE3.
W_I3 = W_I3 + WA_I3-MENGE.
ENDLOOP.
LOOP AT IT_I4 INTO WA_I4 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT BETWEEN W_DATE1 AND W_DATE3.
W_I4 = W_I4 + WA_I4-MENGE.
ENDLOOP.
LOOP AT IT_I5 INTO WA_I5 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT BETWEEN W_DATE1 AND W_DATE3.
W_I5 = W_I5 + WA_I5-MENGE.
ENDLOOP.
LOOP AT IT_I6 INTO WA_I6 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT BETWEEN W_DATE1 AND W_DATE3.
W_I6 = W_I6 + WA_I6-MENGE.
ENDLOOP.
LOOP AT IT_I7 INTO WA_I7 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT BETWEEN W_DATE1 AND W_DATE3.
W_I7 = W_I7 + WA_I7-MENGE.
ENDLOOP.
* W_IMENGE = W_I1 + W_I2 + W_I3 + W_I4 + W_I5 + W_I6.
W_IMENGE = W_I1 + W_I2 + W_I3 + W_I4 + W_I6 .
*****************************************
WA_DISPLAY-menge_c = WA_DISPLAY-menge_o + ( W_RMENGE - W_IMENGE ).
IF NOT so_date-LOW+6(2) = '01'.
WA_DISPLAY-menge_o = WA_DISPLAY-menge_c.
ENDIF.
PERFORM GET_QTY.
WA_DISPLAY-menge_c = WA_DISPLAY-menge_o + ( W_RMENGE - W_IMENGE )
+ WA_DISPLAY-MENGE_RE - WA_DISPLAY-MENGE_SO +
WA_DISPLAY-MENGE_SI + WA_DISPLAY-MENGE_MM -
WA_DISPLAY-MENGE_PL + WA_DISPLAY-MENGE_PG.
WA_DISPLAY-menge_r = W_RMENGE.
WA_DISPLAY-menge_i = W_IMENGE.
W_MENGE = WA_DISPLAY-menge_c.
else.
WA_DISPLAY-menge_o = W_Menge.
PERFORM GET_QTY.
WA_DISPLAY-menge_r = W_RMENGE.
WA_DISPLAY-menge_i = W_IMENGE.
WA_DISPLAY-menge_c = WA_DISPLAY-menge_o + ( W_RMENGE - W_IMENGE ).
* WA_DISPLAY-menge_c = WA_DISPLAY-menge_o + ( W_RMENGE - W_IMENGE )
* + W_RE - W_SO + W_SI + W_MM - W_PL + W_PG.
W_MENGE = WA_DISPLAY-menge_c.
endif.
* READ TABLE IT_MBEWH INTO WA_MBEWH WITH KEY MATNR = WA_MARD-MATNR.
*
*
* IF SY-SUBRC = 0.
* WA_DISPLAY-vprsv = WA_MBEWH-vprsv.
* WA_DISPLAY-verpr = WA_MBEWH-verpr.
* WA_DISPLAY-stprs = WA_MBEWH-stprs.
* ENDIF.
* if not WA_DISPLAY-stprs = 0.
* WA_DISPLAY-menge_s = WA_DISPLAY-menge_c * WA_DISPLAY-stprs.
* endif.
*
* if not WA_DISPLAY-verpr = 0.
* WA_DISPLAY-menge_s = WA_DISPLAY-menge_c * WA_DISPLAY-verpr.
* endif.
*select single matnr into J_1IMTCHID-matnr from J_1IMTCHID
* where WERKS = pr_plant and
* matnr = WA_MARD-MATNR and
* J_1ICAPIND NE 'N' .
* if sy-subrc = 0.
* WA_DISPLAY-excse = 'Yes'.
* endif.
PERFORM MATNR_FORMAT.
append wa_display to it_display.
clear : WA_DISPLAY,W_IMENGE,W_RMENGE.
W_DATE2 = W_DATE2 + 1.
enddo.
W_DATE2 = so_date-LOW.
clear : W_index,W_MENGE.
endloop.
ENDFORM. "DATA_SUM
FORM GET_QTY.
clear : W_RMENGE,W_iMENGE.
LOOP AT IT_R1 INTO WA_R1 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT = W_DATE2.
W_R1 = W_R1 + WA_R1-MENGE.
ENDLOOP.
LOOP AT IT_R2 INTO WA_R2 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT = W_DATE2.
.
W_R2 = W_R2 + WA_R2-MENGE.
ENDLOOP.
LOOP AT IT_R3 INTO WA_R3 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT = W_DATE2.
.
W_R3 = W_R3 + WA_R3-MENGE.
ENDLOOP.
LOOP AT IT_R4 INTO WA_R4 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT = W_DATE2.
.
W_R4 = W_R4 + WA_R4-MENGE.
ENDLOOP.
W_RMENGE = W_R1 + W_R2 + W_R3 + W_R4 .
****************************************
LOOP AT IT_I1 INTO WA_I1 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT = W_DATE2.
W_I1 = W_I1 + WA_I1-MENGE.
ENDLOOP.
LOOP AT IT_I2 INTO WA_I2 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT = W_DATE2.
W_I2 = W_I2 + WA_I2-MENGE.
ENDLOOP.
LOOP AT IT_I3 INTO WA_I3 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT = W_DATE2.
W_I3 = W_I3 + WA_I3-MENGE.
ENDLOOP.
LOOP AT IT_I4 INTO WA_I4 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT = W_DATE2.
W_I4 = W_I4 + WA_I4-MENGE.
ENDLOOP.
LOOP AT IT_I5 INTO WA_I5 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT = W_DATE2.
W_I5 = W_I5 + WA_I5-MENGE.
ENDLOOP.
LOOP AT IT_I6 INTO WA_I6 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT = W_DATE2.
W_I6 = W_I6 + WA_I6-MENGE.
ENDLOOP.
LOOP AT IT_I7 INTO WA_I7 WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT = W_DATE2.
W_I7 = W_I7 + WA_I7-MENGE.
ENDLOOP.
* W_IMENGE = W_I1 + W_I2 + W_I3 + W_I4 + W_I5 + W_I6.
W_IMENGE = W_I1 + W_I2 + W_I3 + W_I4 + W_I6.
*****************************************
LOOP AT IT_RE INTO WA_RE WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT = W_DATE2.
W_RE = W_RE + WA_RE-MENGE.
ENDLOOP.
LOOP AT IT_SO INTO WA_SO WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT = W_DATE2.
W_SO = W_SO + WA_SO-MENGE.
ENDLOOP.
LOOP AT IT_SI INTO WA_SI WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT = W_DATE2.
W_SI = W_SI + WA_SI-MENGE.
ENDLOOP.
* LOOP AT IT_ST INTO WA_ST WHERE WERKS = pr_plant AND
* MATNR = WA_Mard-MATNR AND
* BUDAT = W_DATE2.
* W_ST = W_ST + WA_ST-MENGE.
*
* ENDLOOP.
LOOP AT IT_MM INTO WA_MM WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT = W_DATE2.
IF WA_MM-SHKZg = 'H'.
WA_MM-MENGE = WA_MM-MENGE * ( -1 ).
ENDIF.
W_MM = W_MM + WA_MM-MENGE.
ENDLOOP.
LOOP AT IT_PL INTO WA_PL WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT = W_DATE2.
W_PL = W_PL + WA_PL-MENGE.
ENDLOOP.
LOOP AT IT_PG INTO WA_PG WHERE WERKS = pr_plant AND
MATNR = WA_Mard-MATNR AND
BUDAT = W_DATE2.
W_PG = W_PG + WA_PG-MENGE.
ENDLOOP.
WA_DISPLAY-MENGE_R1 = W_R1.
WA_DISPLAY-MENGE_R2 = W_R2.
WA_DISPLAY-MENGE_R3 = W_R3.
WA_DISPLAY-MENGE_R4 = W_R4.
WA_DISPLAY-MENGE_I1 = W_I1.
WA_DISPLAY-MENGE_I2 = W_I2.
WA_DISPLAY-MENGE_I3 = W_I3.
WA_DISPLAY-MENGE_I4 = W_I4.
WA_DISPLAY-MENGE_I5 = W_I5.
WA_DISPLAY-MENGE_I6 = W_I6.
WA_DISPLAY-MENGE_I7 = W_I7.
WA_DISPLAY-MENGE_RE = W_RE.
WA_DISPLAY-MENGE_SO = W_SO.
WA_DISPLAY-MENGE_SI = W_SI.
* WA_DISPLAY-MENGE_ST = W_ST.
WA_DISPLAY-MENGE_MM = W_MM.
WA_DISPLAY-MENGE_PL = W_PL.
WA_DISPLAY-MENGE_PG = W_PG.
CLEAR : W_R1,
W_R2,
W_R3,
W_R4,
W_I1,
W_I2,
W_I3,
W_I4,
W_I5,
W_I6,
W_I7,
W_RE,
W_SO,
W_SI,
W_ST,
W_MM,
W_PL,
W_PG.
*****************************************
ENDFORM.
*&--------------------------------------------------------------------*
*& Form fieldcat_init
*&--------------------------------------------------------------------*
FORM fieldcat_init USING lt_fieldcat TYPE slis_t_fieldcat_alv.
DATA : wa_fieldcat TYPE slis_fieldcat_alv.
DATA :w_pos TYPE i VALUE 0.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-seltext_m = 'Material'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'DATE'.
wa_fieldcat-seltext_m = 'Date'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MAKTX'.
wa_fieldcat-seltext_m = 'Material Description'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '40'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'WERKS'.
wa_fieldcat-seltext_m = 'Plant'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '5'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_O'.
wa_fieldcat-seltext_m = 'Opening Balance'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '15'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_R1'.
wa_fieldcat-seltext_m = 'Receipts-PO'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '15'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_R2'.
wa_fieldcat-seltext_m = 'Receipts-Pr.Order'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '18'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_R3'.
wa_fieldcat-seltext_m = 'Receipts-By Products'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '21'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_R4'.
wa_fieldcat-seltext_m = 'Receipts-Others'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '15'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_R'.
wa_fieldcat-seltext_m = 'Total Receipts'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '15'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_I1'.
wa_fieldcat-seltext_m = 'Issues-Production'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '17'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_I2'.
wa_fieldcat-seltext_m = 'Issues-Customer'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '15'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_I3'.
wa_fieldcat-seltext_m = 'Issues-Cost Center'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '18'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_I4'.
wa_fieldcat-seltext_m = 'Issues-Scrapping'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '17'.
APPEND wa_fieldcat TO lt_fieldcat.
* w_pos = w_pos + 1.
* CLEAR wa_fieldcat.
* wa_fieldcat-col_pos = w_pos.
* wa_fieldcat-tabname = 'IT_DISPLAY'.
* wa_fieldcat-fieldname = 'MENGE_I5'.
* wa_fieldcat-seltext_m = 'Issues-Subcontractor'.
* wa_fieldcat-do_sum = 'X'.
* wa_fieldcat-emphasize = 'C410'.
* wa_fieldcat-outputlen = '20'.
* APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_I6'.
wa_fieldcat-seltext_m = 'Issues-Sampling'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '15'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_I'.
wa_fieldcat-seltext_m = 'Total Issues'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '15'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_RE'.
wa_fieldcat-seltext_m = 'Purchase Returns'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '15'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_SO'.
wa_fieldcat-seltext_m = 'Stock transfer Out'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '15'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_SI'.
wa_fieldcat-seltext_m = 'Stock transfer In'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '15'.
APPEND wa_fieldcat TO lt_fieldcat.
* w_pos = w_pos + 1.
* CLEAR wa_fieldcat.
* wa_fieldcat-col_pos = w_pos.
* wa_fieldcat-tabname = 'IT_DISPLAY'.
* wa_fieldcat-fieldname = 'MENGE_ST'.
* wa_fieldcat-seltext_m = 'Stock in Transit'.
* wa_fieldcat-do_sum = 'X'.
* wa_fieldcat-emphasize = 'C410'.
* wa_fieldcat-outputlen = '15'.
* APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_MM'.
wa_fieldcat-seltext_m = 'Matrl.to Matrl. transfer'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '15'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_PL'.
wa_fieldcat-seltext_m = 'Phy. Inventory Loss'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '15'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_PG'.
wa_fieldcat-seltext_m = 'Phy. Inventory Gains'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '15'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_C'.
wa_fieldcat-seltext_m = 'Closing Balance'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '15'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_I5'.
wa_fieldcat-seltext_m = 'Issues-Subcontractor'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '20'.
APPEND wa_fieldcat TO lt_fieldcat.
w_pos = w_pos + 1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = w_pos.
wa_fieldcat-tabname = 'IT_DISPLAY'.
wa_fieldcat-fieldname = 'MENGE_I7'.
wa_fieldcat-seltext_m = 'Customer Consignment'.
* wa_fieldcat-do_sum = 'X'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-outputlen = '20'.
APPEND wa_fieldcat TO lt_fieldcat.
ENDFORM. " fieldcat_init
*&---------------------------------------------------------------------*
*& Form eventtab_build
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_it_EVENTS[] text
*----------------------------------------------------------------------*
FORM eventtab_build USING lt_events TYPE slis_t_event.
DATA: wa_event TYPE slis_alv_event.
DATA: c_top_of_page TYPE slis_formname.
c_top_of_page = c_top_of_page_db.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = lt_events.
READ TABLE lt_events WITH KEY name = slis_ev_top_of_page
INTO wa_event.
IF sy-subrc <> 0.
MOVE c_top_of_page TO wa_event-form.
APPEND wa_event TO lt_events.
ELSE.
MOVE c_top_of_page TO wa_event-form.
MODIFY lt_events FROM wa_event INDEX sy-tabix .
ENDIF.
ENDFORM. " eventtab_build
*&---------------------------------------------------------------------*
*& Form comment_build
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_it_LIST_TOP_OF_PAGE[] text
*----------------------------------------------------------------------*
FORM comment_build USING lt_top_of_page TYPE slis_t_listheader.
DATA: wa_line TYPE slis_listheader.
CLEAR wa_line.
wa_line-typ = 'H'.
wa_line-info = 'VVF LTD. Mumbai'.
APPEND wa_line TO lt_top_of_page.
wa_line-typ = 'H'.
wa_line-info = SY-ULINE.
APPEND wa_line TO lt_top_of_page.
wa_line-typ = 'H'.
wa_line-info = 'Stock Statement Report'.
APPEND wa_line TO lt_top_of_page.
ENDFORM. " comment_build
*&---------------------------------------------------------------------*
*& Form layout_build
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_WA_layout text
*----------------------------------------------------------------------*
FORM layout_build USING wa_layout TYPE slis_layout_alv.
wa_layout-zebra = 'X'.
wa_layout-colwidth_optimize = 'X'.
* wa_layout-no_totalline = 'X'.
* wa_layout-numc_sum = 'X'.
* wa_layout-no_sumchoice = SPACE.
* wa_layout-edit = SPACE.
ENDFORM. " layout_build
*&---------------------------------------------------------------------*
*& Form write_alv_grid
*&---------------------------------------------------------------------*
FORM write_alv_grid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = w_repid
i_background_id = 'ALV_BACKGROUND'
I_CALLBACK_TOP_OF_PAGE = c_top_of_page_db
is_layout = WA_layout
it_fieldcat = it_fieldcat[]
it_events = it_events[]
i_save = 'A'
TABLES
t_outtab = IT_DISPLAY
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " write_alv_grid
*---------------------------------------------------------------------*
* FORM TOP_OF_PAGE_DB *
*---------------------------------------------------------------------*
FORM TOP_OF_PAGE_DB.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_list_top_of_page
i_logo = ' '.
ENDFORM. "top_of_page_db
*&--------------------------------------------------------------------*
*& Form MATNR_FORMAT
*&--------------------------------------------------------------------*
* MATNR FORMAT
*---------------------------------------------------------------------*
FORM MATNR_FORMAT.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = WA_DISPLAY-MATNR
IMPORTING
OUTPUT = WA_DISPLAY-MATNR.
ENDFORM.
form move_types.
*********************************
r_movr1-sign = 'I'.
r_movr1-option = 'EQ'.
r_movr1-low = '105'.
r_movr1-high = ' '.
append r_movr1.
r_movr1-sign = 'I'.
r_movr1-option = 'EQ'.
r_movr1-low = '106'.
r_movr1-high = ' '.
append r_movr1.
r_movr1-sign = 'I'.
r_movr1-option = 'EQ'.
r_movr1-low = '101'.
r_movr1-high = ' '.
append r_movr1.
r_movr1-sign = 'I'.
r_movr1-option = 'EQ'.
r_movr1-low = '102'.
r_movr1-high = ' '.
append r_movr1.
************************************
r_movr2-sign = 'I'.
r_movr2-option = 'EQ'.
r_movr2-low = '101'.
r_movr2-high = ' '.
append r_movr2.
r_movr2-sign = 'I'.
r_movr2-option = 'EQ'.
r_movr2-low = '102'.
r_movr2-high = ' '.
append r_movr2.
************************************
r_movr3-sign = 'I'.
r_movr3-option = 'EQ'.
r_movr3-low = '531'.
r_movr3-high = ' '.
append r_movr3.
r_movr3-sign = 'I'.
r_movr3-option = 'EQ'.
r_movr3-low = '532'.
r_movr3-high = ' '.
append r_movr3.
************************************
r_movr4-sign = 'I'.
r_movr4-option = 'EQ'.
r_movr4-low = '511'.
r_movr4-high = ' '.
append r_movr4.
r_movr4-sign = 'I'.
r_movr4-option = 'EQ'.
r_movr4-low = '512'.
r_movr4-high = ' '.
append r_movr4.
r_movr4-sign = 'I'.
r_movr4-option = 'EQ'.
r_movr4-low = '561'.
r_movr4-high = ' '.
append r_movr4.
r_movr4-sign = 'I'.
r_movr4-option = 'EQ'.
r_movr4-low = '562'.
r_movr4-high = ' '.
append r_movr4.
r_movr4-sign = 'I'.
r_movr4-option = 'EQ'.
r_movr4-low = '501'.
r_movr4-high = ' '.
append r_movr4.
r_movr4-sign = 'I'.
r_movr4-option = 'EQ'.
r_movr4-low = '502'.
r_movr4-high = ' '.
append r_movr4.
r_movr4-sign = 'I'.
r_movr4-option = 'EQ'.
r_movr4-low = '563'.
r_movr4-high = ' '.
append r_movr4.
r_movr4-sign = 'I'.
r_movr4-option = 'EQ'.
r_movr4-low = '564'.
r_movr4-high = ' '.
append r_movr4.
r_movr4-sign = 'I'.
r_movr4-option = 'EQ'.
r_movr4-low = '565'.
r_movr4-high = ' '.
append r_movr4.
r_movr4-sign = 'I'.
r_movr4-option = 'EQ'.
r_movr4-low = '566'.
r_movr4-high = ' '.
append r_movr4.
r_movr4-sign = 'I'.
r_movr4-option = 'EQ'.
r_movr4-low = '901'.
r_movr4-high = ' '.
append r_movr4.
r_movr4-sign = 'I'.
r_movr4-option = 'EQ'.
r_movr4-low = '902'.
r_movr4-high = ' '.
append r_movr4.
r_movr4-sign = 'I'.
r_movr4-option = 'EQ'.
r_movr4-low = '501M'.
r_movr4-high = ' '.
append r_movr4.
r_movr4-sign = 'I'.
r_movr4-option = 'EQ'.
r_movr4-low = '502M'.
r_movr4-high = ' '.
append r_movr4.
r_movr4-sign = 'I'.
r_movr4-option = 'EQ'.
r_movr4-low = '521'.
r_movr4-high = ' '.
append r_movr4.
r_movr4-sign = 'I'.
r_movr4-option = 'EQ'.
r_movr4-low = '522'.
r_movr4-high = ' '.
append r_movr4.
************************************
r_movi1-sign = 'I'.
r_movi1-option = 'EQ'.
r_movi1-low = '261'.
r_movi1-high = ' '.
append r_movi1.
r_movi1-sign = 'I'.
r_movi1-option = 'EQ'.
r_movi1-low = '262'.
r_movi1-high = ' '.
append r_movi1.
r_movi1-sign = 'I'.
r_movi1-option = 'EQ'.
r_movi1-low = '961'.
r_movi1-high = ' '.
append r_movi1.
r_movi1-sign = 'I'.
r_movi1-option = 'EQ'.
r_movi1-low = '962'.
r_movi1-high = ' '.
append r_movi1.
************************************
r_movi2-sign = 'I'.
r_movi2-option = 'EQ'.
r_movi2-low = '601'.
r_movi2-high = ' '.
append r_movi2.
r_movi2-sign = 'I'.
r_movi2-option = 'EQ'.
r_movi2-low = '602'.
r_movi2-high = ' '.
append r_movi2.
r_movi2-sign = 'I'.
r_movi2-option = 'EQ'.
r_movi2-low = '633'.
r_movi2-high = ' '.
append r_movi2.
r_movi2-sign = 'I'.
r_movi2-option = 'EQ'.
r_movi2-low = '634'.
r_movi2-high = ' '.
append r_movi2.
************************************
r_movi3-sign = 'I'.
r_movi3-option = 'EQ'.
r_movi3-low = '201'.
r_movi3-high = ' '.
append r_movi3.
r_movi3-sign = 'I'.
r_movi3-option = 'EQ'.
r_movi3-low = '202'.
r_movi3-high = ' '.
append r_movi3.
r_movi3-sign = 'I'.
r_movi3-option = 'EQ'.
r_movi3-low = '231'.
r_movi3-high = ' '.
append r_movi3.
r_movi3-sign = 'I'.
r_movi3-option = 'EQ'.
r_movi3-low = '232'.
r_movi3-high = ' '.
append r_movi3.
r_movi3-sign = 'I'.
r_movi3-option = 'EQ'.
r_movi3-low = '241'.
r_movi3-high = ' '.
append r_movi3.
r_movi3-sign = 'I'.
r_movi3-option = 'EQ'.
r_movi3-low = '242'.
r_movi3-high = ' '.
append r_movi3.
************************************
r_movi4-sign = 'I'.
r_movi4-option = 'EQ'.
r_movi4-low = '551'.
r_movi4-high = ' '.
append r_movi4.
r_movi4-sign = 'I'.
r_movi4-option = 'EQ'.
r_movi4-low = '552'.
r_movi4-high = ' '.
append r_movi4.
************************************
r_movi5-sign = 'I'.
r_movi5-option = 'EQ'.
r_movi5-low = '541'.
r_movi5-high = ' '.
append r_movi5.
r_movi5-sign = 'I'.
r_movi5-option = 'EQ'.
r_movi5-low = '542'.
r_movi5-high = ' '.
append r_movi5.
************************************
r_movi6-sign = 'I'.
r_movi6-option = 'EQ'.
r_movi6-low = '331'.
r_movi6-high = ' '.
append r_movi6.
r_movi6-sign = 'I'.
r_movi6-option = 'EQ'.
r_movi6-low = '332'.
r_movi6-high = ' '.
append r_movi6.
r_movi6-sign = 'I'.
r_movi6-option = 'EQ'.
r_movi6-low = '333'.
r_movi6-high = ' '.
append r_movi6.
r_movi6-sign = 'I'.
r_movi6-option = 'EQ'.
r_movi6-low = '334'.
r_movi6-high = ' '.
append r_movi6.
r_movi6-sign = 'I'.
r_movi6-option = 'EQ'.
r_movi6-low = '335'.
r_movi6-high = ' '.
append r_movi6.
r_movi6-sign = 'I'.
r_movi6-option = 'EQ'.
r_movi6-low = '336'.
r_movi6-high = ' '.
append r_movi6.
************************************
r_movi7-sign = 'I'.
r_movi7-option = 'EQ'.
r_movi7-low = '631'.
r_movi7-high = ' '.
append r_movi7.
r_movi7-sign = 'I'.
r_movi7-option = 'EQ'.
r_movi7-low = '632'.
r_movi7-high = ' '.
append r_movi7.
************************************
r_movre-sign = 'I'.
r_movre-option = 'EQ'.
r_movre-low = '161'.
r_movre-high = ' '.
append r_movre.
r_movre-sign = 'I'.
r_movre-option = 'EQ'.
r_movre-low = '162'.
r_movre-high = ' '.
append r_movre.
r_movre-sign = 'I'.
r_movre-option = 'EQ'.
r_movre-low = '122'.
r_movre-high = ' '.
append r_movre.
r_movre-sign = 'I'.
r_movre-option = 'EQ'.
r_movre-low = '123'.
r_movre-high = ' '.
append r_movre.
************************************
r_movso-sign = 'I'.
r_movso-option = 'EQ'.
r_movso-low = '641'.
r_movso-high = ' '.
append r_movso.
r_movso-sign = 'I'.
r_movso-option = 'EQ'.
r_movso-low = '642'.
r_movso-high = ' '.
append r_movso.
r_movso-sign = 'I'.
r_movso-option = 'EQ'.
r_movso-low = '351'.
r_movso-high = ' '.
append r_movso.
r_movso-sign = 'I'.
r_movso-option = 'EQ'.
r_movso-low = '352'.
r_movso-high = ' '.
append r_movso.
r_movso-sign = 'I'.
r_movso-option = 'EQ'.
r_movso-low = '643'.
r_movso-high = ' '.
append r_movso.
r_movso-sign = 'I'.
r_movso-option = 'EQ'.
r_movso-low = '644'.
r_movso-high = ' '.
append r_movso.
r_movso-sign = 'I'.
r_movso-option = 'EQ'.
r_movso-low = '301'.
r_movso-high = ' '.
append r_movso.
r_movso-sign = 'I'.
r_movso-option = 'EQ'.
r_movso-low = '302'.
r_movso-high = ' '.
append r_movso.
r_movso-sign = 'I'.
r_movso-option = 'EQ'.
r_movso-low = '303'.
r_movso-high = ' '.
append r_movso.
r_movso-sign = 'I'.
r_movso-option = 'EQ'.
r_movso-low = '304'.
r_movso-high = ' '.
append r_movso.
************************************
r_movsi-sign = 'I'.
r_movsi-option = 'EQ'.
r_movsi-low = '305'.
r_movsi-high = ' '.
append r_movsi.
r_movsi-sign = 'I'.
r_movsi-option = 'EQ'.
r_movsi-low = '306'.
r_movsi-high = ' '.
append r_movsi.
************************************
* r_movst-sign = 'I'.
* r_movst-option = 'EQ'.
* r_movst-low = '305'.
* r_movst-high = ' '.
* append r_movst.
************************************
r_movmm-sign = 'I'.
r_movmm-option = 'EQ'.
r_movmm-low = '309'.
r_movmm-high = ' '.
append r_movmm.
r_movmm-sign = 'I'.
r_movmm-option = 'EQ'.
r_movmm-low = '310'.
r_movmm-high = ' '.
append r_movmm.
r_movmm-sign = 'I'.
r_movmm-option = 'EQ'.
r_movmm-low = '909'.
r_movmm-high = ' '.
append r_movmm.
r_movmm-sign = 'I'.
r_movmm-option = 'EQ'.
r_movmm-low = '910'.
r_movmm-high = ' '.
append r_movmm.
************************************
r_movpl-sign = 'I'.
r_movpl-option = 'EQ'.
r_movpl-low = '701'.
r_movpl-high = ' '.
append r_movpl.
************************************
r_movpg-sign = 'I'.
r_movpg-option = 'EQ'.
r_movpg-low = '702'.
r_movpg-high = ' '.
append r_movpg.
************************************
endform.
No comments:
Post a Comment