cancel
Showing results for 
Search instead for 
Did you mean: 

0IC_C03 Cube Data Value is Zero for particular.

0 Kudos

Hi Expert,

I have 0IC_C03 Cube, this cube is Active process chain so this cube load daily properly. my problem is BF data particular movement type data only show in zero value of cube output. but psa have correct value, cube is not showing this value. cube show zero.

my data flow is 0IC_C03<-BF info source<-BF data source. same like Um Data source. but my problem is BF data.

for example:

PSA Data

movement type/ materialno/ qty/ amount

122/ 1234/ 22/ 5000

101/ 3462/ 33/ 6000

123/ 9872/ 44/ 4329

102/ 2356/ 55/ 3458

0IC_C03 Cube Data

movement type/ materialno/ qty/ amount

122/ 1234/ 0.0/ 0.0

101/ 3462/ 33/ 6000

123/ 9872/ 0.0/ 0.0

102/ 2356/ 55/ 3458

Plz give me solution how can i find. Actually i am not well in routine, so i can't find where is problem?

plz urgent help me Experts,

Thank you,

Regards,

Gokul

Accepted Solutions (0)

Answers (8)

Answers (8)

0 Kudos

hi,

Actually my cube otuput:

movement type/ material no/ rec qty/ rec value/ return qty/ return value

122 123 0 0 22 100

101 231 34 230 0 0

123 456 0 0 45 900

102 675 45 567 0 0

so now my query is designed by

movement type/ material no/ rec qty/ rec value

122 123 0 0

101 231 34 230

123 456 0 0

102 675 45 567

sorry my mistake now only i find it.

so plz guide me now they want to like this report in analyzer output.

movement type/ material no/ vendor qty/ vendorvalue

122 123 -22 -100

101 231 34 230

123 456 -45 -900

102 675 45 567

so plz guide me how to create like above data in bex report.

Thank you,

Gokul

0 Kudos

hi,

Now my client want to This 2kF same field row in bex analyzer output, for vendor Received qty and vendor return qty. plz how to create same field in row. plz guide me..

Thank you,

Gokul

Former Member
0 Kudos

hi,

can you see values for movement 121/122 in cube now? I mean did you run the delta and check the values in cube?

how are you displaying qty and value for other movement types in report? if your report has movement in rows and qty and amount in columns.. then after delta load.. you should data in report.

if you are restricting the qty and values with some restrictions, then can you post it here ?

0 Kudos

hi jyothi,

I Find the Problem, here 2 KF available for one is vendor received qty same value and 2nd KF is vendor return value same qty. that why not showing in cube. thank you so much,

Thank you,

Gokul

0 Kudos

hi,

I have one more qus. here using standard routine, then why not showing particular material type data. here not using any type of filter. my doubt is how to the particular material type data value only zero? otherwise other material type data's showing correct. plz tell me what is correct solution where i check? plz give me the solution...

thank you,

Gokul

Former Member
0 Kudos

Gokul,

I guess, you didn't understand my previous reply..

go to PSA and find out what is the value present in field bwapplnm when movement type is '121/122'. this should help you finding the root cause.

0 Kudos

hi,

Plz tell where i give particular place here more time come same comm_structure-bwapplnm eq "mm"

so plz tell where i give particular place.

thanks

gokul

0 Kudos

hi,

i Cant find any thing, plz where i change the program? plz tell me....

thanks,

Regards,

gokul

0 Kudos

Hi Jyothi,

Thank you for quick Replay,

Here my start Routine is,

PROGRAM trans_routine.


*---------------------------------------------------------------------*
* CLASS routine DEFINITION
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
CLASS lcl_transform DEFINITION.
PUBLIC SECTION.

* Attributs
DATA:
p_check_master_data_exist
TYPE RSODSOCHECKONLY READ-ONLY,
*- Instance for getting request runtime attributs;
* Available information: Refer to methods of
* interface 'if_rsbk_request_admintab_view'
p_r_request
TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.

PRIVATE SECTION.

TYPE-POOLS: rsd, rstr.

* Rule specific types
TYPES:
BEGIN OF _ty_s_SC_1,
* InfoObject: 0STORNO Reversal indicator.
STORNO TYPE /BI0/OISTORNO,
* InfoObject: 0RT_PROMO Promotion.
RT_PROMO TYPE /BI0/OIRT_PROMO,
* InfoObject: 0VAL_CLASS Valuation class.
VAL_CLASS TYPE /BI0/OIVAL_CLASS,
* InfoObject: 0DOC_DATE Document Date.
DOC_DATE TYPE /BI0/OIDOC_DATE,
* InfoObject: 0STOCKTYPE Stock type.
STOCKTYPE TYPE /BI0/OISTOCKTYPE,
* InfoObject: 0STOCKCAT Stock Categories.
STOCKCAT TYPE /BI0/OISTOCKCAT,
* InfoObject: 0PSTNG_DATE Posting date in the document.
PSTNG_DATE TYPE /BI0/OIPSTNG_DATE,
* InfoObject: 0COMP_CODE Company code.
COMP_CODE TYPE /BI0/OICOMP_CODE,
* InfoObject: 0BWAPPLNM Application component.
BWAPPLNM TYPE /BI0/OIBWAPPLNM,
* InfoObject: 0MOVETYPE Movement Type (Inventory Management).
MOVETYPE TYPE /BI0/OIMOVETYPE,
* InfoObject: 0STOCKRELEV BW: Relevance to Stock.
STOCKRELEV TYPE /BI0/OISTOCKRELEV,
* InfoObject: 0CPPVLC BW: Purchase Value in Local Currency.
CPPVLC TYPE /BI0/OICPPVLC,
* InfoObject: 0CPSVLC BW: Sales Value in Local Currency.
CPSVLC TYPE /BI0/OICPSVLC,
* InfoObject: 0CPSTLC BW: Sales Value in Local Currency.
CPSTLC TYPE /BI0/OICPSTLC,
* InfoObject: 0CPQUABU BW: Amount in base unit of measure.
CPQUABU TYPE /BI0/OICPQUABU,
* InfoObject: 0VAL_TYPE Valuation type.
VAL_TYPE TYPE /BI0/OIVAL_TYPE,
* InfoObject: 0PROCESSKEY BW: Transaction Key.
PROCESSKEY TYPE /BI0/OIPROCESSKEY,
* InfoObject: 0BATCH Batch number.
BATCH TYPE /BI0/OIBATCH,
* InfoObject: 0MATMREA Reason for Goods Movement.
MATMREA TYPE /BI0/OIMATMREA,
* InfoObject: 0BUS_AREA Business area.
BUS_AREA TYPE /BI0/OIBUS_AREA,
* InfoObject: 0COSTCENTER Cost Center.
COSTCENTER TYPE /BI0/OICOSTCENTER,
* InfoObject: 0SOLD_TO Sold-to party.
SOLD_TO TYPE /BI0/OISOLD_TO,
* InfoObject: 0WHSE_NUM Warehouse number / warehouse complex.
WHSE_NUM TYPE /BI0/OIWHSE_NUM,
* InfoObject: 0STOR_LOC Storage location.
STOR_LOC TYPE /BI0/OISTOR_LOC,
* InfoObject: 0STRGE_BIN Storage bin.
STRGE_BIN TYPE /BI0/OISTRGE_BIN,
* InfoObject: 0STRGE_TYPE Storage type.
STRGE_TYPE TYPE /BI0/OISTRGE_TYPE,
* InfoObject: 0VENDOR Vendor.
VENDOR TYPE /BI0/OIVENDOR,
* InfoObject: 0MATERIAL Material.
MATERIAL TYPE /BI0/OIMATERIAL,
* InfoObject: 0DOC_NUM BW: Document Number.
DOC_NUM TYPE /BI0/OIDOC_NUM,
* InfoObject: 0BASE_UOM Base Unit of Measure.
BASE_UOM TYPE /BI0/OIBASE_UOM,
* InfoObject: 0DOC_YEAR BW: Document Year.
DOC_YEAR TYPE /BI0/OIDOC_YEAR,
* InfoObject: 0PROFIT_CTR Profit Center.
PROFIT_CTR TYPE /BI0/OIPROFIT_CTR,
* InfoObject: 0DCINDIC Debit/credit indicator.
DCINDIC TYPE /BI0/OIDCINDIC,
* InfoObject: 0LOC_CURRCY Local currency.
LOC_CURRCY TYPE /BI0/OILOC_CURRCY,
* InfoObject: 0PLANT Plant.
PLANT TYPE /BI0/OIPLANT,
* InfoObject: 0FISCVARNT Fiscal year variant.
FISCVARNT TYPE /BI0/OIFISCVARNT,
* InfoObject: 0CPNOITEMS BW: Number of Activities.
CPNOITEMS TYPE /BI0/OICPNOITEMS,
* InfoObject: 0CO_AREA Controlling area.
CO_AREA TYPE /BI0/OICO_AREA,
* InfoObject: 0DOC_ITEM BW: Document Item Number.
DOC_ITEM TYPE /BI0/OIDOC_ITEM,
* InfoObject: 0VALUE_LC Amount in local currency.
VALUE_LC TYPE /BI0/OIVALUE_LC,
* InfoObject: 0COORDER Order Number.
COORDER TYPE /BI0/OICOORDER,
* InfoObject: 0QUANT_B Quantity in base units of measure.
QUANT_B TYPE /BI0/OIQUANT_B,
* InfoObject: 0MOVE_PLANT Receiving Plant/Issuing Plant.
MOVE_PLANT TYPE /BI0/OIMOVE_PLANT,
* InfoObject: 0RECORDMODE BW Delta Process: Update Mode.
RECORDMODE TYPE RODMUPDMOD,
* InfoObject: 0BWCOUNTER Additional Key Field Revaluation Document
*Record.
BWCOUNTER TYPE /BI0/OIBWCOUNTER,
* InfoObject: 0INDSPECSTK Indicator: Valuation of Special Stock.
INDSPECSTK TYPE /BI0/OIINDSPECSTK,
* InfoObject: 0GN_R3_SSY Source System for R/3 Entity.
GN_R3_SSY TYPE /BI0/OIGN_R3_SSY,
* InfoObject: 0RT_MOVINV Movement Type is Physical Inventory.
RT_MOVINV TYPE /BI0/OIRT_MOVINV,
* InfoObject: 0RT_MOVADJ Movement Type is Stock Adjustment.
RT_MOVADJ TYPE /BI0/OIRT_MOVADJ,
* InfoObject: 0RSL_STMAT Structured Article.
RSL_STMAT TYPE /BI0/OIRSL_STMAT,
* InfoObject: 0RT_MOVRET Movement Type is Return.
RT_MOVRET TYPE /BI0/OIRT_MOVRET,
* InfoObject: 0RSL_STAUTO Automatically Completed Component.
RSL_STAUTO TYPE /BI0/OIRSL_STAUTO,
* InfoObject: 0RT_MOVTRAN Movement Type is Stock Transfer.
RT_MOVTRAN TYPE /BI0/OIRT_MOVTRAN,
* InfoObject: 0RT_MATPOST Transfer Posting from Article to Article.
RT_MATPOST TYPE /BI0/OIRT_MATPOST,
* InfoObject: 0RT_SASTSV Share of Business Volume for Set Sales Val
*ue in Local Crcy.
RT_SASTSV TYPE /BI0/OIRT_SASTSV,
* InfoObject: 0RT_SASTST Share of Business Volume for Set with Tax
*in Local Currency.
RT_SASTST TYPE /BI0/OIRT_SASTST,
* InfoObject: 0RMA_XCC RMA Cross-Company Code Stock Transfer.
RMA_XCC TYPE /BI0/OIRMA_XCC,
* InfoObject: 0RMA_LNK RMA Stock Transfer Reference Item.
RMA_LNK TYPE /BI0/OIRMA_LNK,
* InfoObject: 0RMA_RFLG RMA Relevance Flag.
RMA_RFLG TYPE /BI0/OIRMA_RFLG,
* InfoObject: 0RTHFEES Stock Transfer Fees.
RTHFEES TYPE /BI0/OIRTHFEES,
* InfoObject: 0CPDEOGQUOU Delta PO/GR Order Quantity.
CPDEOGQUOU TYPE /BI0/OICPDEOGQUOU,
* InfoObject: 0PO_UNIT Order unit.
PO_UNIT TYPE /BI0/OIPO_UNIT,
* InfoObject: 0LOGSYS Source System.
LOGSYS TYPE RSDLOGSYS,
* InfoObject: 0OI_EBELN Purchasing document number.
OI_EBELN TYPE /BI0/OIOI_EBELN,
* InfoObject: 0OI_EBELP Item number of purchasing document.
OI_EBELP TYPE /BI0/OIOI_EBELP,
* InfoObject: 0RT_CPUDT Created On.
RT_CPUDT TYPE /BI0/OIRT_CPUDT,
* InfoObject: 0RMA_CCIND Cycle Count Indicator.
RMA_CCIND TYPE /BI0/OIRMA_CCIND,
* InfoObject: 0DF_MOVFLAG Movement Indicator.
DF_MOVFLAG TYPE /BI0/OIDF_MOVFLAG,
* Field: RECORD.
RECORD TYPE RSARECORD,
END OF _ty_s_SC_1.
TYPES:
_ty_t_SC_1 TYPE STANDARD TABLE OF _ty_s_SC_1
WITH NON-UNIQUE DEFAULT KEY.

*$*$ begin of global - insert your declaration only below this line *-*
... "insert your code here


*$*$ end of global - insert your declaration only before this line *-*

METHODS
start_routine
IMPORTING
request type rsrequest
datapackid type rsdatapid
EXPORTING
monitor type rstr_ty_t_monitors
CHANGING
SOURCE_PACKAGE type _ty_t_SC_1
RAISING
cx_rsrout_abort.
METHODS
inverse_start_routine
IMPORTING
i_th_fields_outbound TYPE rstran_t_field_inv
i_r_selset_outbound TYPE REF TO cl_rsmds_set
i_is_main_selection TYPE rs_bool
i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set
i_r_universe_inbound TYPE REF TO cl_rsmds_universe
CHANGING
c_th_fields_inbound TYPE rstran_t_field_inv
c_r_selset_inbound TYPE REF TO cl_rsmds_set
c_exact TYPE rs_bool.
ENDCLASS. "routine DEFINITION

*$*$ begin of 2nd part global - insert your code only below this line *
*$*$ begin of version
*-- migration tool version 19.02.2009
*$*$ end of version
TYPES:
BEGIN OF _ty_s_SC_1_full,
* InfoObject: 0STORNO Reversal indicator.
STORNO TYPE /BI0/OISTORNO,
* InfoObject: 0RT_PROMO Promotion.
RT_PROMO TYPE /BI0/OIRT_PROMO,
* InfoObject: 0VAL_CLASS Valuation class.
VAL_CLASS TYPE /BI0/OIVAL_CLASS,
* InfoObject: 0DOC_DATE Document Date.
DOC_DATE TYPE /BI0/OIDOC_DATE,
* InfoObject: 0STOCKTYPE Stock type.
STOCKTYPE TYPE /BI0/OISTOCKTYPE,
* InfoObject: 0STOCKCAT Stock Categories.
STOCKCAT TYPE /BI0/OISTOCKCAT,
* InfoObject: 0PSTNG_DATE Posting date in the document.
PSTNG_DATE TYPE /BI0/OIPSTNG_DATE,
* InfoObject: 0COMP_CODE Company code.
COMP_CODE TYPE /BI0/OICOMP_CODE,
* InfoObject: 0BWAPPLNM Application component.
BWAPPLNM TYPE /BI0/OIBWAPPLNM,
* InfoObject: 0MOVETYPE Movement Type (Inventory Management).
MOVETYPE TYPE /BI0/OIMOVETYPE,
* InfoObject: 0STOCKRELEV BW: Relevance to Stock.
STOCKRELEV TYPE /BI0/OISTOCKRELEV,
* InfoObject: 0CPPVLC BW: Purchase Value in Local Currency.
CPPVLC TYPE /BI0/OICPPVLC,
* InfoObject: 0CPSVLC BW: Sales Value in Local Currency.
CPSVLC TYPE /BI0/OICPSVLC,
* InfoObject: 0CPSTLC BW: Sales Value in Local Currency.
CPSTLC TYPE /BI0/OICPSTLC,
* InfoObject: 0CPQUABU BW: Amount in base unit of measure.
CPQUABU TYPE /BI0/OICPQUABU,
* InfoObject: 0VAL_TYPE Valuation type.
VAL_TYPE TYPE /BI0/OIVAL_TYPE,
* InfoObject: 0PROCESSKEY BW: Transaction Key.
PROCESSKEY TYPE /BI0/OIPROCESSKEY,
* InfoObject: 0BATCH Batch number.
BATCH TYPE /BI0/OIBATCH,
* InfoObject: 0MATMREA Reason for Goods Movement.
MATMREA TYPE /BI0/OIMATMREA,
* InfoObject: 0BUS_AREA Business area.
BUS_AREA TYPE /BI0/OIBUS_AREA,
* InfoObject: 0COSTCENTER Cost Center.
COSTCENTER TYPE /BI0/OICOSTCENTER,
* InfoObject: 0SOLD_TO Sold-to party.
SOLD_TO TYPE /BI0/OISOLD_TO,
* InfoObject: 0WHSE_NUM Warehouse number / warehouse complex.
WHSE_NUM TYPE /BI0/OIWHSE_NUM,
* InfoObject: 0STOR_LOC Storage location.
STOR_LOC TYPE /BI0/OISTOR_LOC,
* InfoObject: 0STRGE_BIN Storage bin.
STRGE_BIN TYPE /BI0/OISTRGE_BIN,
* InfoObject: 0STRGE_TYPE Storage type.
STRGE_TYPE TYPE /BI0/OISTRGE_TYPE,
* InfoObject: 0VENDOR Vendor.
VENDOR TYPE /BI0/OIVENDOR,
* InfoObject: 0MATERIAL Material.
MATERIAL TYPE /BI0/OIMATERIAL,
* InfoObject: 0DOC_NUM BW: Document Number.
DOC_NUM TYPE /BI0/OIDOC_NUM,
* InfoObject: 0BASE_UOM Base Unit of Measure.
BASE_UOM TYPE /BI0/OIBASE_UOM,
* InfoObject: 0DOC_YEAR BW: Document Year.
DOC_YEAR TYPE /BI0/OIDOC_YEAR,
* InfoObject: 0PROFIT_CTR Profit Center.
PROFIT_CTR TYPE /BI0/OIPROFIT_CTR,
* InfoObject: 0DCINDIC Debit/credit indicator.
DCINDIC TYPE /BI0/OIDCINDIC,
* InfoObject: 0LOC_CURRCY Local currency.
LOC_CURRCY TYPE /BI0/OILOC_CURRCY,
* InfoObject: 0PLANT Plant.
PLANT TYPE /BI0/OIPLANT,
* InfoObject: 0FISCVARNT Fiscal year variant.
FISCVARNT TYPE /BI0/OIFISCVARNT,
* InfoObject: 0CPNOITEMS BW: Number of Activities.
CPNOITEMS TYPE /BI0/OICPNOITEMS,
* InfoObject: 0CO_AREA Controlling area.
CO_AREA TYPE /BI0/OICO_AREA,
* InfoObject: 0DOC_ITEM BW: Document Item Number.
DOC_ITEM TYPE /BI0/OIDOC_ITEM,
* InfoObject: 0VALUE_LC Amount in local currency.
VALUE_LC TYPE /BI0/OIVALUE_LC,
* InfoObject: 0COORDER Order Number.
COORDER TYPE /BI0/OICOORDER,
* InfoObject: 0QUANT_B Quantity in base units of measure.
QUANT_B TYPE /BI0/OIQUANT_B,
* InfoObject: 0MOVE_PLANT Receiving Plant/Issuing Plant.
MOVE_PLANT TYPE /BI0/OIMOVE_PLANT,
* InfoObject: 0RECORDMODE BW Delta Process: Record Mode.
RECORDMODE TYPE RODMUPDMOD,
* InfoObject: 0BWCOUNTER Additional Key Field Revaluation Document
*Record.
BWCOUNTER TYPE /BI0/OIBWCOUNTER,
* InfoObject: 0INDSPECSTK Indicator: Valuation of Special Stock.
INDSPECSTK TYPE /BI0/OIINDSPECSTK,
* InfoObject: 0GN_R3_SSY Source System for R/3 Entity.
GN_R3_SSY TYPE /BI0/OIGN_R3_SSY,
* InfoObject: 0RT_MOVINV Movement Type is Physical Inventory.
RT_MOVINV TYPE /BI0/OIRT_MOVINV,
* InfoObject: 0RT_MOVADJ Movement Type is Stock Adjustment.
RT_MOVADJ TYPE /BI0/OIRT_MOVADJ,
* InfoObject: 0RSL_STMAT Structured Article.
RSL_STMAT TYPE /BI0/OIRSL_STMAT,
* InfoObject: 0RT_MOVRET Movement Type is Return.
RT_MOVRET TYPE /BI0/OIRT_MOVRET,
* InfoObject: 0RSL_STAUTO Automatically Completed Component.
RSL_STAUTO TYPE /BI0/OIRSL_STAUTO,
* InfoObject: 0RT_MOVTRAN Movement Type is Stock Transfer.
RT_MOVTRAN TYPE /BI0/OIRT_MOVTRAN,
* InfoObject: 0RT_MATPOST Transfer Posting from Article to Article.
RT_MATPOST TYPE /BI0/OIRT_MATPOST,
* InfoObject: 0RT_SASTSV Share of Business Volume for Set Sales Val
*ue in Local Crcy.
RT_SASTSV TYPE /BI0/OIRT_SASTSV,
* InfoObject: 0RT_SASTST Share of Business Volume for Set with Tax
*in Local Currency.
RT_SASTST TYPE /BI0/OIRT_SASTST,
* InfoObject: 0RMA_XCC RMA Cross-Company Code Stock Transfer.
RMA_XCC TYPE /BI0/OIRMA_XCC,
* InfoObject: 0RMA_LNK RMA Stock Transfer Reference Item.
RMA_LNK TYPE /BI0/OIRMA_LNK,
* InfoObject: 0RMA_RFLG RMA Relevance Flag.
RMA_RFLG TYPE /BI0/OIRMA_RFLG,
* InfoObject: 0RTHFEES Stock Transfer Fees.
RTHFEES TYPE /BI0/OIRTHFEES,
* InfoObject: 0CPDEOGQUOU Delta PO/GR Order Quantity.
CPDEOGQUOU TYPE /BI0/OICPDEOGQUOU,
* InfoObject: 0PO_UNIT Order unit.
PO_UNIT TYPE /BI0/OIPO_UNIT,
* InfoObject: 0LOGSYS Source System.
LOGSYS TYPE RSDLOGSYS,
* InfoObject: 0OI_EBELN Purchasing document number.
OI_EBELN TYPE /BI0/OIOI_EBELN,
* InfoObject: 0OI_EBELP Item number of purchasing document.
OI_EBELP TYPE /BI0/OIOI_EBELP,
* InfoObject: 0RT_CPUDT Created On.
RT_CPUDT TYPE /BI0/OIRT_CPUDT,
* InfoObject: 0RMA_CCIND Cycle Count Indicator.
RMA_CCIND TYPE /BI0/OIRMA_CCIND,
* InfoObject: 0DF_MOVFLAG Movement Indicator.
DF_MOVFLAG TYPE /BI0/OIDF_MOVFLAG,
* Field: RECNO Data record number.
RECNO TYPE RSARECORD,
END OF _ty_s_SC_1_full.
TYPES:
_ty_t_SC_1_full TYPE STANDARD TABLE OF _ty_s_SC_1_full
WITH NON-UNIQUE DEFAULT KEY.

data: wa_source_package type _ty_t_SC_1_full.
data: gt_plant_mat type table of /BI0/PMAT_PLANT.
data :gs_plant_mat type /BI0/PMAT_PLANT.

data: gt_Zplant_mat type table of /BIC/QZMATPLANT.
data :gs_Zplant_mat type /BIC/QZMATPLANT.


TYPES:
BEGIN OF _ty_s_TG_1_full,
* InfoObject: 0CHNGID Änderungslauf ID.
CHNGID TYPE /BI0/OICHNGID,
* InfoObject: 0RECORDTP Satztyp.
RECORDTP TYPE /BI0/OIRECORDTP,
* InfoObject: 0REQUID Request ID.
REQUID TYPE /BI0/OIREQUID,
* InfoObject: 0CALDAY Kalendertag.
CALDAY TYPE /BI0/OICALDAY,
* InfoObject: 0CALMONTH Kalenderjahr / Monat.
CALMONTH TYPE /BI0/OICALMONTH,
* InfoObject: 0CALWEEK Kalenderjahr / Woche.
CALWEEK TYPE /BI0/OICALWEEK,
* InfoObject: 0CALYEAR Kalenderjahr.
CALYEAR TYPE /BI0/OICALYEAR,
* InfoObject: 0MATERIAL Material.
MATERIAL TYPE /BI0/OIMATERIAL,
* InfoObject: 0PLANT Werk.
PLANT TYPE /BI0/OIPLANT,
* InfoObject: 0STOR_LOC Lagerort.
STOR_LOC TYPE /BI0/OISTOR_LOC,
* InfoObject: 0BATCH Chargennummer.
BATCH TYPE /BI0/OIBATCH,
* InfoObject: 0STOCKTYPE Bestandsausprägung.
STOCKTYPE TYPE /BI0/OISTOCKTYPE,
* InfoObject: 0STOCKCAT Bestandstypen.
STOCKCAT TYPE /BI0/OISTOCKCAT,
* InfoObject: 0GN_VENDOR Lieferant.
GN_VENDOR TYPE /BI0/OIGN_VENDOR,
* InfoObject: 0RECVS_VAL Zugangswert Bewerteter Bestand.
RECVS_VAL TYPE /BI0/OIRECVS_VAL,
* InfoObject: 0ISSVS_VAL Abgangswert Bewerteter Bestand.
ISSVS_VAL TYPE /BI0/OIISSVS_VAL,
* InfoObject: 0ISSBLOSTCK Abgangsmenge Gesperrter Bestand.
ISSBLOSTCK TYPE /BI0/OIISSBLOSTCK,
* InfoObject: 0ISSCNSSTCK Abgangsmenge Konsignationsbestand.
ISSCNSSTCK TYPE /BI0/OIISSCNSSTCK,
* InfoObject: 0ISSQMSTCK Abgangsmenge Qualitätsbestand.
ISSQMSTCK TYPE /BI0/OIISSQMSTCK,
* InfoObject: 0ISSTRANSST Abgangsmenge Transitbestand.
ISSTRANSST TYPE /BI0/OIISSTRANSST,
* InfoObject: 0RECBLOSTCK Zugangsmenge Gesperrter Bestand.
RECBLOSTCK TYPE /BI0/OIRECBLOSTCK,
* InfoObject: 0RECCNSSTCK Zugangsmenge Konsignationsbestand.
RECCNSSTCK TYPE /BI0/OIRECCNSSTCK,
* InfoObject: 0RECQMSTCK Zugangsmenge Qualitätsbestand.
RECQMSTCK TYPE /BI0/OIRECQMSTCK,
* InfoObject: 0RECTRANSST Zugangsmenge Transitbestand.
RECTRANSST TYPE /BI0/OIRECTRANSST,
* InfoObject: 0ISSSCRP Abgangsmenge Ausschuss.
ISSSCRP TYPE /BI0/OIISSSCRP,
* InfoObject: 0ISSVALSCRP Abgangswert Ausschuss.
ISSVALSCRP TYPE /BI0/OIISSVALSCRP,
* InfoObject: 0RECTOTSTCK Zugangsmenge Gesamt Bestand.
RECTOTSTCK TYPE /BI0/OIRECTOTSTCK,
* InfoObject: 0ISSTOTSTCK Abgangsmenge Gesamtbestand.
ISSTOTSTCK TYPE /BI0/OIISSTOTSTCK,
* InfoObject: 0ISSVALSTCK Abgangsmenge Bewerteter Bestand.
ISSVALSTCK TYPE /BI0/OIISSVALSTCK,
* InfoObject: 0RECVALSTCK Zugangsmenge Bewerteter Bestand.
RECVALSTCK TYPE /BI0/OIRECVALSTCK,
* InfoObject: 0VENCONCON Verbrauchswerte Lieferantenkonsignationsbe
*stand.
VENCONCON TYPE /BI0/OIVENCONCON,
* InfoObject: 0LOC_CURRCY Hauswährung.
LOC_CURRCY TYPE /BI0/OILOC_CURRCY,
* InfoObject: 0BASE_UOM Basismengeneinheit.
BASE_UOM TYPE /BI0/OIBASE_UOM,
* Field: RECORD Nummer des Datensatzes.
RECORD TYPE RSARECORD,
END OF _ty_s_TG_1_full.

TYPES:
BEGIN OF _ty_s_SC_1__RULE_9,
* InfoObject: 0BWAPPLNM Anwendungskomponente.
BWAPPLNM TYPE /BI0/OIBWAPPLNM,
* InfoObject: 0CPQUABU BW: Menge in Basismengeneinheit.
CPQUABU TYPE /BI0/OICPQUABU,
* InfoObject: 0PROCESSKEY BW:Vorgangsschlüssel.
PROCESSKEY TYPE /BI0/OIPROCESSKEY,
* InfoObject: 0STOCKCAT Bestandstypen.
STOCKCAT TYPE /BI0/OISTOCKCAT,
* InfoObject: 0STOCKRELEV BW: Best.Relevanz.
STOCKRELEV TYPE /BI0/OISTOCKRELEV,
* InfoObject: 0STOCKTYPE Bestandsausprägung.
STOCKTYPE TYPE /BI0/OISTOCKTYPE,
* InfoObject: 0BASE_UOM Basismengeneinheit.
BASE_UOM TYPE /BI0/OIBASE_UOM,
END OF _ty_s_SC_1__RULE_9.

TYPES:
BEGIN OF _ty_s_SC_1__RULE_10,
* InfoObject: 0BWAPPLNM Anwendungskomponente.
BWAPPLNM TYPE /BI0/OIBWAPPLNM,
* InfoObject: 0CPQUABU BW: Menge in Basismengeneinheit.
CPQUABU TYPE /BI0/OICPQUABU,
* InfoObject: 0PROCESSKEY BW:Vorgangsschlüssel.
PROCESSKEY TYPE /BI0/OIPROCESSKEY,
* InfoObject: 0STOCKCAT Bestandstypen.
STOCKCAT TYPE /BI0/OISTOCKCAT,
* InfoObject: 0STOCKRELEV BW: Best.Relevanz.
STOCKRELEV TYPE /BI0/OISTOCKRELEV,
* InfoObject: 0STOCKTYPE Bestandsausprägung.
STOCKTYPE TYPE /BI0/OISTOCKTYPE,
* InfoObject: 0BASE_UOM Basismengeneinheit.
BASE_UOM TYPE /BI0/OIBASE_UOM,
END OF _ty_s_SC_1__RULE_10.

TYPES:
BEGIN OF _ty_s_SC_1__RULE_11,
* InfoObject: 0GN_R3_SSY Quellsystem der R/3 Entität.
GN_R3_SSY TYPE /BI0/OIGN_R3_SSY,
* InfoObject: 0STOCKCAT Bestandstypen.
STOCKCAT TYPE /BI0/OISTOCKCAT,
* InfoObject: 0VENDOR Lieferant.
VENDOR TYPE /BI0/OIVENDOR,
END OF _ty_s_SC_1__RULE_11.

TYPES:
BEGIN OF _ty_s_SC_1__RULE_12,
* InfoObject: 0BWAPPLNM Anwendungskomponente.
BWAPPLNM TYPE /BI0/OIBWAPPLNM,
* InfoObject: 0CPPVLC BW: Einkaufswert in Hauswährung.
CPPVLC TYPE /BI0/OICPPVLC,
* InfoObject: 0INDSPECSTK Kennzeichen Bewertung Sonderbestand.
INDSPECSTK TYPE /BI0/OIINDSPECSTK,
* InfoObject: 0PROCESSKEY BW:Vorgangsschlüssel.
PROCESSKEY TYPE /BI0/OIPROCESSKEY,
* InfoObject: 0STOCKCAT Bestandstypen.
STOCKCAT TYPE /BI0/OISTOCKCAT,
* InfoObject: 0STOCKRELEV BW: Best.Relevanz.
STOCKRELEV TYPE /BI0/OISTOCKRELEV,
* InfoObject: 0LOC_CURRCY Hauswährung.
LOC_CURRCY TYPE /BI0/OILOC_CURRCY,
END OF _ty_s_SC_1__RULE_12.

TYPES:
BEGIN OF _ty_s_SC_1__RULE_13,
* InfoObject: 0BWAPPLNM Anwendungskomponente.
BWAPPLNM TYPE /BI0/OIBWAPPLNM,
* InfoObject: 0CPPVLC BW: Einkaufswert in Hauswährung.
CPPVLC TYPE /BI0/OICPPVLC,
* InfoObject: 0INDSPECSTK Kennzeichen Bewertung Sonderbestand.
INDSPECSTK TYPE /BI0/OIINDSPECSTK,
* InfoObject: 0PROCESSKEY BW:Vorgangsschlüssel.
PROCESSKEY TYPE /BI0/OIPROCESSKEY,
* InfoObject: 0STOCKCAT Bestandstypen.
STOCKCAT TYPE /BI0/OISTOCKCAT,
* InfoObject: 0STOCKRELEV BW: Best.Relevanz.
STOCKRELEV TYPE /BI0/OISTOCKRELEV,
* InfoObject: 0LOC_CURRCY Hauswährung.
LOC_CURRCY TYPE /BI0/OILOC_CURRCY,
END OF _ty_s_SC_1__RULE_13.

TYPES:
BEGIN OF _ty_s_SC_1__RULE_15,
* InfoObject: 0GN_R3_SSY Quellsystem der R/3 Entität.
GN_R3_SSY TYPE /BI0/OIGN_R3_SSY,
* InfoObject: 0STOCKCAT Bestandstypen.
STOCKCAT TYPE /BI0/OISTOCKCAT,
* InfoObject: 0STOCKTYPE Bestandsausprägung.
STOCKTYPE TYPE /BI0/OISTOCKTYPE,
* InfoObject: 0VENDOR Lieferant.
VENDOR TYPE /BI0/OIVENDOR,
END OF _ty_s_SC_1__RULE_15.

TYPES:
BEGIN OF _ty_s_SC_1__RULE_19,
* InfoObject: 0BWAPPLNM Anwendungskomponente.
BWAPPLNM TYPE /BI0/OIBWAPPLNM,
* InfoObject: 0CPQUABU BW: Menge in Basismengeneinheit.
CPQUABU TYPE /BI0/OICPQUABU,
* InfoObject: 0PROCESSKEY BW:Vorgangsschlüssel.
PROCESSKEY TYPE /BI0/OIPROCESSKEY,
* InfoObject: 0STOCKRELEV BW: Best.Relevanz.
STOCKRELEV TYPE /BI0/OISTOCKRELEV,
* InfoObject: 0BASE_UOM Basismengeneinheit.
BASE_UOM TYPE /BI0/OIBASE_UOM,
END OF _ty_s_SC_1__RULE_19.

TYPES:
BEGIN OF _ty_s_SC_1__RULE_20,
* InfoObject: 0BWAPPLNM Anwendungskomponente.
BWAPPLNM TYPE /BI0/OIBWAPPLNM,
* InfoObject: 0CPQUABU BW: Menge in Basismengeneinheit.
CPQUABU TYPE /BI0/OICPQUABU,
* InfoObject: 0PROCESSKEY BW:Vorgangsschlüssel.
PROCESSKEY TYPE /BI0/OIPROCESSKEY,
* InfoObject: 0STOCKRELEV BW: Best.Relevanz.
STOCKRELEV TYPE /BI0/OISTOCKRELEV,
* InfoObject: 0BASE_UOM Basismengeneinheit.
BASE_UOM TYPE /BI0/OIBASE_UOM,
END OF _ty_s_SC_1__RULE_20.

TYPES:
BEGIN OF _ty_s_SC_1__RULE_21,
* InfoObject: 0BWAPPLNM Anwendungskomponente.
BWAPPLNM TYPE /BI0/OIBWAPPLNM,
* InfoObject: 0CPQUABU BW: Menge in Basismengeneinheit.
CPQUABU TYPE /BI0/OICPQUABU,
* InfoObject: 0INDSPECSTK Kennzeichen Bewertung Sonderbestand.
INDSPECSTK TYPE /BI0/OIINDSPECSTK,
* InfoObject: 0PROCESSKEY BW:Vorgangsschlüssel.
PROCESSKEY TYPE /BI0/OIPROCESSKEY,
* InfoObject: 0STOCKCAT Bestandstypen.
STOCKCAT TYPE /BI0/OISTOCKCAT,
* InfoObject: 0STOCKRELEV BW: Best.Relevanz.
STOCKRELEV TYPE /BI0/OISTOCKRELEV,
* InfoObject: 0BASE_UOM Basismengeneinheit.
BASE_UOM TYPE /BI0/OIBASE_UOM,
END OF _ty_s_SC_1__RULE_21.

TYPES:
BEGIN OF _ty_s_SC_1__RULE_22,
* InfoObject: 0BWAPPLNM Anwendungskomponente.
BWAPPLNM TYPE /BI0/OIBWAPPLNM,
* InfoObject: 0CPQUABU BW: Menge in Basismengeneinheit.
CPQUABU TYPE /BI0/OICPQUABU,
* InfoObject: 0INDSPECSTK Kennzeichen Bewertung Sonderbestand.
INDSPECSTK TYPE /BI0/OIINDSPECSTK,
* InfoObject: 0PROCESSKEY BW:Vorgangsschlüssel.
PROCESSKEY TYPE /BI0/OIPROCESSKEY,
* InfoObject: 0STOCKCAT Bestandstypen.
STOCKCAT TYPE /BI0/OISTOCKCAT,
* InfoObject: 0STOCKRELEV BW: Best.Relevanz.
STOCKRELEV TYPE /BI0/OISTOCKRELEV,
* InfoObject: 0BASE_UOM Basismengeneinheit.
BASE_UOM TYPE /BI0/OIBASE_UOM,
END OF _ty_s_SC_1__RULE_22.

TYPES:
BEGIN OF _ty_s_SC_1__RULE_25,
* InfoObject: 0GN_R3_SSY Quellsystem der R/3 Entität.
GN_R3_SSY TYPE /BI0/OIGN_R3_SSY,
* InfoObject: 0STOCKCAT Bestandstypen.
STOCKCAT TYPE /BI0/OISTOCKCAT,
* InfoObject: 0STOCKTYPE Bestandsausprägung.
STOCKTYPE TYPE /BI0/OISTOCKTYPE,
* InfoObject: 0VENDOR Lieferant.
VENDOR TYPE /BI0/OIVENDOR,
END OF _ty_s_SC_1__RULE_25.

TYPES:
BEGIN OF _ty_s_SC_1__RULE_31,
* InfoObject: 0BWAPPLNM Anwendungskomponente.
BWAPPLNM TYPE /BI0/OIBWAPPLNM,
* InfoObject: 0CPPVLC BW: Einkaufswert in Hauswährung.
CPPVLC TYPE /BI0/OICPPVLC,
* InfoObject: 0PROCESSKEY BW:Vorgangsschlüssel.
PROCESSKEY TYPE /BI0/OIPROCESSKEY,
* InfoObject: 0STOCKCAT Bestandstypen.
STOCKCAT TYPE /BI0/OISTOCKCAT,
* InfoObject: 0STOCKRELEV BW: Best.Relevanz.
STOCKRELEV TYPE /BI0/OISTOCKRELEV,
* InfoObject: 0LOC_CURRCY Hauswährung.
LOC_CURRCY TYPE /BI0/OILOC_CURRCY,
END OF _ty_s_SC_1__RULE_31.

TYPES:
BEGIN OF _ty_s_SC_1__RULE_37,
* InfoObject: 0BWAPPLNM Anwendungskomponente.
BWAPPLNM TYPE /BI0/OIBWAPPLNM,
* InfoObject: 0CPQUABU BW: Menge in Basismengeneinheit.
CPQUABU TYPE /BI0/OICPQUABU,
* InfoObject: 0PROCESSKEY BW:Vorgangsschlüssel.
PROCESSKEY TYPE /BI0/OIPROCESSKEY,
* InfoObject: 0STOCKCAT Bestandstypen.
STOCKCAT TYPE /BI0/OISTOCKCAT,
* InfoObject: 0STOCKRELEV BW: Best.Relevanz.
STOCKRELEV TYPE /BI0/OISTOCKRELEV,
* InfoObject: 0STOCKTYPE Bestandsausprägung.
STOCKTYPE TYPE /BI0/OISTOCKTYPE,
* InfoObject: 0BASE_UOM Basismengeneinheit.
BASE_UOM TYPE /BI0/OIBASE_UOM,
END OF _ty_s_SC_1__RULE_37.

TYPES:
BEGIN OF _ty_s_SC_1__RULE_38,
* InfoObject: 0BWAPPLNM Anwendungskomponente.
BWAPPLNM TYPE /BI0/OIBWAPPLNM,
* InfoObject: 0CPQUABU BW: Menge in Basismengeneinheit.
CPQUABU TYPE /BI0/OICPQUABU,
* InfoObject: 0PROCESSKEY BW:Vorgangsschlüssel.
PROCESSKEY TYPE /BI0/OIPROCESSKEY,
* InfoObject: 0STOCKCAT Bestandstypen.
STOCKCAT TYPE /BI0/OISTOCKCAT,
* InfoObject: 0STOCKRELEV BW: Best.Relevanz.
STOCKRELEV TYPE /BI0/OISTOCKRELEV,
* InfoObject: 0STOCKTYPE Bestandsausprägung.
STOCKTYPE TYPE /BI0/OISTOCKTYPE,
* InfoObject: 0BASE_UOM Basismengeneinheit.
BASE_UOM TYPE /BI0/OIBASE_UOM,
END OF _ty_s_SC_1__RULE_38.

TYPES:
BEGIN OF _ty_s_SC_1__RULE_39,
* InfoObject: 0BWAPPLNM Anwendungskomponente.
BWAPPLNM TYPE /BI0/OIBWAPPLNM,
* InfoObject: 0CPQUABU BW: Menge in Basismengeneinheit.
CPQUABU TYPE /BI0/OICPQUABU,
* InfoObject: 0PROCESSKEY BW:Vorgangsschlüssel.
PROCESSKEY TYPE /BI0/OIPROCESSKEY,
* InfoObject: 0STOCKRELEV BW: Best.Relevanz.
STOCKRELEV TYPE /BI0/OISTOCKRELEV,
* InfoObject: 0STOCKTYPE Bestandsausprägung.
STOCKTYPE TYPE /BI0/OISTOCKTYPE,
* InfoObject: 0BASE_UOM Basismengeneinheit.
BASE_UOM TYPE /BI0/OIBASE_UOM,
END OF _ty_s_SC_1__RULE_39.

TYPES:
BEGIN OF _ty_s_SC_1__RULE_40,
* InfoObject: 0BWAPPLNM Anwendungskomponente.
BWAPPLNM TYPE /BI0/OIBWAPPLNM,
* InfoObject: 0CPQUABU BW: Menge in Basismengeneinheit.
CPQUABU TYPE /BI0/OICPQUABU,
* InfoObject: 0PROCESSKEY BW:Vorgangsschlüssel.
PROCESSKEY TYPE /BI0/OIPROCESSKEY,
* InfoObject: 0STOCKCAT Bestandstypen.
STOCKCAT TYPE /BI0/OISTOCKCAT,
* InfoObject: 0STOCKRELEV BW: Best.Relevanz.
STOCKRELEV TYPE /BI0/OISTOCKRELEV,
* InfoObject: 0STOCKTYPE Bestandsausprägung.
STOCKTYPE TYPE /BI0/OISTOCKTYPE,
* InfoObject: 0BASE_UOM Basismengeneinheit.
BASE_UOM TYPE /BI0/OIBASE_UOM,
END OF _ty_s_SC_1__RULE_40.

TYPES:
BEGIN OF _ty_s_SC_1__RULE_41,
* InfoObject: 0BWAPPLNM Anwendungskomponente.
BWAPPLNM TYPE /BI0/OIBWAPPLNM,
* InfoObject: 0CPQUABU BW: Menge in Basismengeneinheit.
CPQUABU TYPE /BI0/OICPQUABU,
* InfoObject: 0PROCESSKEY BW:Vorgangsschlüssel.
PROCESSKEY TYPE /BI0/OIPROCESSKEY,
* InfoObject: 0STOCKCAT Bestandstypen.
STOCKCAT TYPE /BI0/OISTOCKCAT,
* InfoObject: 0STOCKRELEV BW: Best.Relevanz.
STOCKRELEV TYPE /BI0/OISTOCKRELEV,
* InfoObject: 0STOCKTYPE Bestandsausprägung.
STOCKTYPE TYPE /BI0/OISTOCKTYPE,
* InfoObject: 0BASE_UOM Basismengeneinheit.
BASE_UOM TYPE /BI0/OIBASE_UOM,
END OF _ty_s_SC_1__RULE_41.

TYPES:
BEGIN OF _ty_s_SC_1__RULE_42,
* InfoObject: 0BWAPPLNM Anwendungskomponente.
BWAPPLNM TYPE /BI0/OIBWAPPLNM,
* InfoObject: 0CPQUABU BW: Menge in Basismengeneinheit.
CPQUABU TYPE /BI0/OICPQUABU,
* InfoObject: 0PROCESSKEY BW:Vorgangsschlüssel.
PROCESSKEY TYPE /BI0/OIPROCESSKEY,
* InfoObject: 0STOCKRELEV BW: Best.Relevanz.
STOCKRELEV TYPE /BI0/OISTOCKRELEV,
* InfoObject: 0STOCKTYPE Bestandsausprägung.
STOCKTYPE TYPE /BI0/OISTOCKTYPE,
* InfoObject: 0BASE_UOM Basismengeneinheit.
BASE_UOM TYPE /BI0/OIBASE_UOM,
END OF _ty_s_SC_1__RULE_42.

TYPES:
BEGIN OF _ty_s_SC_1__RULE_43,
* InfoObject: 0BWAPPLNM Anwendungskomponente.
BWAPPLNM TYPE /BI0/OIBWAPPLNM,
* InfoObject: 0CPQUABU BW: Menge in Basismengeneinheit.
CPQUABU TYPE /BI0/OICPQUABU,
* InfoObject: 0MOVETYPE Bewegungsart (Bestandsführung).
MOVETYPE TYPE /BI0/OIMOVETYPE,
* InfoObject: 0BASE_UOM Basismengeneinheit.
BASE_UOM TYPE /BI0/OIBASE_UOM,
END OF _ty_s_SC_1__RULE_43.

TYPES:
BEGIN OF _ty_s_SC_1__RULE_51,
* InfoObject: 0BWAPPLNM Anwendungskomponente.
BWAPPLNM TYPE /BI0/OIBWAPPLNM,
* InfoObject: 0CPPVLC BW: Einkaufswert in Hauswährung.
CPPVLC TYPE /BI0/OICPPVLC,
* InfoObject: 0MOVETYPE Bewegungsart (Bestandsführung).
MOVETYPE TYPE /BI0/OIMOVETYPE,
* InfoObject: 0LOC_CURRCY Hauswährung.
LOC_CURRCY TYPE /BI0/OILOC_CURRCY,
END OF _ty_s_SC_1__RULE_51.

* Additional types for start routine interface
TYPES:
data_package_structure type _ty_s_SC_1_full.

* Additional declaration for update rule interface
DATA:
MONITOR type standard table of rsmonitor WITH HEADER LINE,
MONITOR_RECNO type standard table of rsmonitors WITH HEADER LINE,
RECORD_NO LIKE SY-TABIX,
RECORD_ALL LIKE SY-TABIX,
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS.


* global definitions from update rules
INCLUDE rsbctgn_top.
INCLUDE rsbctgn_update_rules.

*&---------------------------------------------------------------------*
*& Form routine_9998
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->DATA_PACKAGE text
* -->P_MONITOR text
* -->P_MONITOR_RECNO text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_9998
TABLES DATA_PACKAGE TYPE _ty_t_SC_1_full
p_monitor STRUCTURE rsmonitor
p_monitor_recno STRUCTURE rsmonitors
CHANGING
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables



* fill the internal table "MONITOR", to make monitor entries
* see OSS note 571669
LOOP AT DATA_PACKAGE.
IF DATA_PACKAGE-stockcat EQ 'V' OR
DATA_PACKAGE-stocktype EQ 'V'.
DELETE DATA_PACKAGE.
ENDIF.
ENDLOOP.
* if abort is not equal zero, the update process will be canceled
ABORT = 0.

p_monitor[] = MONITOR[].
p_monitor_recno[] = MONITOR_RECNO[].
CLEAR: MONITOR[],
MONITOR_RECNO[].

ENDFORM. "routine_9998

*&---------------------------------------------------------------------*
*& Form routine_0012
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MONITOR text
* -->COMM_STRUCTURE text
* -->RESULT text
* -->RETURNCODE text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_0012
TABLES
p_monitor STRUCTURE rsmonitor
USING
COMM_STRUCTURE type _ty_s_SC_1__RULE_9
CHANGING
RESULT TYPE _ty_s_TG_1_full-ISSCNSSTCK
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries
* only goods issue is considered
IF ( COMM_STRUCTURE-processkey EQ '100' "Other Issues
OR COMM_STRUCTURE-processkey EQ '101' "Returns / Vendor
OR COMM_STRUCTURE-processkey EQ '104' "Material Transfer
OR COMM_STRUCTURE-processkey EQ '105' "Stock Adjustment InvD
OR COMM_STRUCTURE-processkey EQ '106' "Stock Adjustment Other
OR COMM_STRUCTURE-processkey EQ '110' ) "Issue from Stock Transfer
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
* only movements which are relevant for stock control
AND COMM_STRUCTURE-stockrelev EQ '1'
AND COMM_STRUCTURE-cpquabu <> 0.
* only consignment stock is considered
CASE COMM_STRUCTURE-stockcat.
WHEN 'K'.
RESULT = COMM_STRUCTURE-cpquabu.
RETURNCODE = 0.
WHEN space.
IF COMM_STRUCTURE-stocktype CA 'KLM'.
RESULT = COMM_STRUCTURE-cpquabu.
RETURNCODE = 0.
ELSE.
RETURNCODE = 4.
ENDIF.
WHEN OTHERS.
RETURNCODE = 4.
ENDCASE.
ELSE.
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 4.
ENDIF.
* if abort is not equal zero, the update process will be canceled
ABORT = 0.

p_monitor[] = MONITOR[].
CLEAR MONITOR[].

ENDFORM. "routine_0012

*&---------------------------------------------------------------------*
*& Form routine_0014
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MONITOR text
* -->COMM_STRUCTURE text
* -->RESULT text
* -->RETURNCODE text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_0014
TABLES
p_monitor STRUCTURE rsmonitor
USING
COMM_STRUCTURE type _ty_s_SC_1__RULE_10
CHANGING
RESULT TYPE _ty_s_TG_1_full-RECCNSSTCK
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries
* only goods receipt is considered
IF ( COMM_STRUCTURE-processkey EQ '000' "Other Receipts
OR COMM_STRUCTURE-processkey EQ '001' "Goods Receipt / Vendor
OR COMM_STRUCTURE-processkey EQ '004' "Material Transfer
OR COMM_STRUCTURE-processkey EQ '005' "Stock Adjustment InvD
OR COMM_STRUCTURE-processkey EQ '006' "Stock Adjustment Other
OR COMM_STRUCTURE-processkey EQ '010' ) "Receipt from Stock Transfer
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
* only movements which are relevant for stock control
AND COMM_STRUCTURE-stockrelev EQ '1'
AND COMM_STRUCTURE-cpquabu <> 0.
* only consignment stock is considered
CASE COMM_STRUCTURE-stockcat.
WHEN 'K'.
RESULT = COMM_STRUCTURE-cpquabu.
RETURNCODE = 0.
WHEN space.
IF COMM_STRUCTURE-stocktype CA 'KLM'.
RESULT = COMM_STRUCTURE-cpquabu.
RETURNCODE = 0.
ELSE.
RETURNCODE = 4.
ENDIF.
WHEN OTHERS.
RETURNCODE = 4.
ENDCASE.
ELSE.
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 4.
ENDIF.
* if abort is not equal zero, the update process will be canceled
ABORT = 0.

p_monitor[] = MONITOR[].
CLEAR MONITOR[].

ENDFORM. "routine_0014

*&---------------------------------------------------------------------*
*& Form routine_0041
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MONITOR text
* -->COMM_STRUCTURE text
* -->RESULT text
* -->RETURNCODE text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_0041
TABLES
p_monitor STRUCTURE rsmonitor
USING
COMM_STRUCTURE type _ty_s_SC_1__RULE_11
CHANGING
RESULT TYPE _ty_s_TG_1_full-GN_VENDOR
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries
* ... determine consolidated key
* IF COMM_STRUCTURE-stockcat EQ 'K'.
PERFORM gn_get_global_key TABLES MONITOR
USING COMM_STRUCTURE-gn_r3_ssy
g_c_bwbeoty_r3vendor
COMM_STRUCTURE-vendor
RECORD_NO
RECORD_ALL
CHANGING RESULT
ABORT.
* if the returncode is not equal zero, the result will not be updated
* Endif.
RETURNCODE = 0.


p_monitor[] = MONITOR[].
CLEAR MONITOR[].

ENDFORM. "routine_0041

*&---------------------------------------------------------------------*
*& Form routine_0010
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MONITOR text
* -->COMM_STRUCTURE text
* -->RESULT text
* -->RETURNCODE text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_0010
TABLES
p_monitor STRUCTURE rsmonitor
USING
COMM_STRUCTURE type _ty_s_SC_1__RULE_12
CHANGING
RESULT TYPE _ty_s_TG_1_full-ISSVS_VAL
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries
* only goods issue is considered
IF ( COMM_STRUCTURE-processkey EQ '100' "Other Issues
OR COMM_STRUCTURE-processkey EQ '101' "Returns / Vendor
OR COMM_STRUCTURE-processkey EQ '104' "Material Transfer
OR COMM_STRUCTURE-processkey EQ '105' "Stock Adjustment InvD
OR COMM_STRUCTURE-processkey EQ '106' "Stock Adjustment Other
OR COMM_STRUCTURE-processkey EQ '110' ) "Issues from Stock Transfers
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
* only movements which are relevant for stock control
AND COMM_STRUCTURE-stockrelev EQ '1'
AND COMM_STRUCTURE-cppvlc <> 0
* see OSS note 630254
AND ( COMM_STRUCTURE-stockcat IS INITIAL OR
( COMM_STRUCTURE-stockcat CA 'EQ' AND
COMM_STRUCTURE-indspecstk CA 'AM' ) ).
* result value of the routine
RESULT = COMM_STRUCTURE-cppvlc.
* if the returncode is zero, the result will be updated
RETURNCODE = 0.
ELSE.
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 4.
ENDIF.
* if abort is not equal zero, the update process will be canceled
ABORT = 0.

p_monitor[] = MONITOR[].
CLEAR MONITOR[].

ENDFORM. "routine_0010

*&---------------------------------------------------------------------*
*& Form routine_0011
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MONITOR text
* -->COMM_STRUCTURE text
* -->RESULT text
* -->RETURNCODE text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_0011
TABLES
p_monitor STRUCTURE rsmonitor
USING
COMM_STRUCTURE type _ty_s_SC_1__RULE_13
CHANGING
RESULT TYPE _ty_s_TG_1_full-RECVS_VAL
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries
* only goods receipt is considered
IF ( COMM_STRUCTURE-processkey EQ '000' "Other Receipts
OR COMM_STRUCTURE-processkey EQ '001' "Goods Receipt / Vendor
OR COMM_STRUCTURE-processkey EQ '004' "Material Transfer / Receipt
OR COMM_STRUCTURE-processkey EQ '005' "Stock Adjustment InvD
OR COMM_STRUCTURE-processkey EQ '006' "Stock Adjustment Other
OR COMM_STRUCTURE-processkey EQ '010' ) "Receipt from Stock Transfer
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
* only movements which are relevant for stock control
AND COMM_STRUCTURE-stockrelev EQ '1'
AND COMM_STRUCTURE-cppvlc <> 0
* see OSS note 630254
AND ( COMM_STRUCTURE-stockcat IS INITIAL OR
( COMM_STRUCTURE-stockcat CA 'EQ' AND
COMM_STRUCTURE-indspecstk CA 'AM' ) ).
* result value of the routine
RESULT = COMM_STRUCTURE-cppvlc.
* if the returncode is zero, the result will be updated
RETURNCODE = 0.
ELSE.
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 4.
ENDIF.
* if abort is not equal zero, the update process will be canceled
ABORT = 0.

p_monitor[] = MONITOR[].
CLEAR MONITOR[].

ENDFORM. "routine_0011

*&---------------------------------------------------------------------*
*& Form routine_0038
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MONITOR text
* -->COMM_STRUCTURE text
* -->RESULT text
* -->RETURNCODE text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_0038
TABLES
p_monitor STRUCTURE rsmonitor
USING
COMM_STRUCTURE type _ty_s_SC_1__RULE_15
CHANGING
RESULT TYPE _ty_s_TG_1_full-GN_VENDOR
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries
* ... determine consolidated key
* IF COMM_STRUCTURE-stockcat CA 'KQ' OR
* COMM_STRUCTURE-stocktype CA 'QRS'.
PERFORM gn_get_global_key TABLES MONITOR
USING COMM_STRUCTURE-gn_r3_ssy
g_c_bwbeoty_r3vendor
COMM_STRUCTURE-vendor
RECORD_NO
RECORD_ALL
CHANGING RESULT
ABORT.
* ENDIF.
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.

p_monitor[] = MONITOR[].
CLEAR MONITOR[].

ENDFORM. "routine_0038

*&---------------------------------------------------------------------*
*& Form routine_0033
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MONITOR text
* -->COMM_STRUCTURE text
* -->RESULT text
* -->RETURNCODE text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_0033
TABLES
p_monitor STRUCTURE rsmonitor
USING
COMM_STRUCTURE type _ty_s_SC_1__RULE_19
CHANGING
RESULT TYPE _ty_s_TG_1_full-ISSTOTSTCK
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries
* only goods issue is considered
IF ( COMM_STRUCTURE-processkey EQ '100' "Other Issues
OR COMM_STRUCTURE-processkey EQ '101' "Returns / Vendor
OR COMM_STRUCTURE-processkey EQ '104' "Material Transfer
OR COMM_STRUCTURE-processkey EQ '105' "Stock Adjustment InvD
OR COMM_STRUCTURE-processkey EQ '106' "Stock Adjustment Other
OR COMM_STRUCTURE-processkey EQ '110' ) "Issue from Stock Transfer
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
* only movements which are relevant for stock control
AND COMM_STRUCTURE-stockrelev EQ '1'
AND COMM_STRUCTURE-cpquabu <> 0.
RESULT = COMM_STRUCTURE-cpquabu.
* if the returncode is zero, the result will be updated
RETURNCODE = 0.
ELSE.
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 4.
ENDIF.
* if abort is not equal zero, the update process will be canceled
ABORT = 0.

p_monitor[] = MONITOR[].
CLEAR MONITOR[].

ENDFORM. "routine_0033

*&---------------------------------------------------------------------*
*& Form routine_0034
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MONITOR text
* -->COMM_STRUCTURE text
* -->RESULT text
* -->RETURNCODE text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_0034
TABLES
p_monitor STRUCTURE rsmonitor
USING
COMM_STRUCTURE type _ty_s_SC_1__RULE_20
CHANGING
RESULT TYPE _ty_s_TG_1_full-RECTOTSTCK
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries
* only goods receipt is considered
IF ( COMM_STRUCTURE-processkey EQ '000' "Other Receipts
OR COMM_STRUCTURE-processkey EQ '001' "Goods Receipt / Vendor
OR COMM_STRUCTURE-processkey EQ '004' "Material Transfer / Receipt
OR COMM_STRUCTURE-processkey EQ '005' "Stock Adjustment InvD
OR COMM_STRUCTURE-processkey EQ '006' "Stock Adjustment Other
OR COMM_STRUCTURE-processkey EQ '010' ) "Receipt from Stock Transfer
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
* only movements which are relevant for stock control
AND COMM_STRUCTURE-stockrelev EQ '1'
AND COMM_STRUCTURE-cpquabu <> 0.
* result value of the routine
RESULT = COMM_STRUCTURE-cpquabu.
* if the returncode is zero, the result will be updated
RETURNCODE = 0.
ELSE.
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 4.
ENDIF.
* if abort is not equal zero, the update process will be canceled
ABORT = 0.

p_monitor[] = MONITOR[].
CLEAR MONITOR[].

ENDFORM. "routine_0034

*&---------------------------------------------------------------------*
*& Form routine_0035
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MONITOR text
* -->COMM_STRUCTURE text
* -->RESULT text
* -->RETURNCODE text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_0035
TABLES
p_monitor STRUCTURE rsmonitor
USING
COMM_STRUCTURE type _ty_s_SC_1__RULE_21
CHANGING
RESULT TYPE _ty_s_TG_1_full-ISSVALSTCK
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries
* only goods issue is considered
IF ( COMM_STRUCTURE-processkey EQ '100' "Other Issues
OR COMM_STRUCTURE-processkey EQ '101' "Returns / Vendor
OR COMM_STRUCTURE-processkey EQ '104' "Material Transfer
OR COMM_STRUCTURE-processkey EQ '105' "Stock Adjustment InvD
OR COMM_STRUCTURE-processkey EQ '106' "Stock Adjustment Other
OR COMM_STRUCTURE-processkey EQ '110' ) "Issues from Stock Transfers
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
* only movements which are relevant for stock control
* additional check if orders on hand or projekt stock
* and if they are valuated (A or M)
AND COMM_STRUCTURE-stockrelev EQ '1'
AND COMM_STRUCTURE-cpquabu <> 0
AND ( COMM_STRUCTURE-stockcat IS INITIAL OR
( COMM_STRUCTURE-stockcat CA 'EQ' AND
COMM_STRUCTURE-indspecstk CA 'AM' ) ).
RESULT = COMM_STRUCTURE-cpquabu.
* if the returncode is zero, the result will be updated
RETURNCODE = 0.
ELSE.
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 4.
ENDIF.
* if abort is not equal zero, the update process will be canceled
ABORT = 0.

p_monitor[] = MONITOR[].
CLEAR MONITOR[].

ENDFORM. "routine_0035

*&---------------------------------------------------------------------*
*& Form routine_0036
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MONITOR text
* -->COMM_STRUCTURE text
* -->RESULT text
* -->RETURNCODE text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_0036
TABLES
p_monitor STRUCTURE rsmonitor
USING
COMM_STRUCTURE type _ty_s_SC_1__RULE_22
CHANGING
RESULT TYPE _ty_s_TG_1_full-RECVALSTCK
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries
* only goods receipt is considered
IF ( COMM_STRUCTURE-processkey EQ '000' "Other Receipts
OR COMM_STRUCTURE-processkey EQ '001' "Goods Receipt / Vendor
OR COMM_STRUCTURE-processkey EQ '004' "Material Transfer / Receipt
OR COMM_STRUCTURE-processkey EQ '005' "Stock Adjustment InvD
OR COMM_STRUCTURE-processkey EQ '006' "Stock Adjustment Other
OR COMM_STRUCTURE-processkey EQ '010' ) "Receipt from Stock Transfer
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
* only movements which are relevant for stock control
* additional check if orders on hand or projekt stock
* and if they are valuated (A or M)
AND COMM_STRUCTURE-stockrelev EQ '1'
AND COMM_STRUCTURE-cpquabu <> 0
AND ( COMM_STRUCTURE-stockcat IS INITIAL OR
( COMM_STRUCTURE-stockcat CA 'EQ' AND
COMM_STRUCTURE-indspecstk CA 'AM' ) ).
RESULT = COMM_STRUCTURE-cpquabu.
* if the returncode is zero, the result will be updated
RETURNCODE = 0.
ELSE.
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 4.
ENDIF.
* if abort is not equal zero, the update process will be canceled
ABORT = 0.

p_monitor[] = MONITOR[].
CLEAR MONITOR[].

ENDFORM. "routine_0036

*&---------------------------------------------------------------------*
*& Form routine_0040
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MONITOR text
* -->COMM_STRUCTURE text
* -->RESULT text
* -->RETURNCODE text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_0040
TABLES
p_monitor STRUCTURE rsmonitor
USING
COMM_STRUCTURE type _ty_s_SC_1__RULE_25
CHANGING
RESULT TYPE _ty_s_TG_1_full-GN_VENDOR
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries
* ... determine consolidated key
* IF COMM_STRUCTURE-stockcat CA 'KQ' OR
* COMM_STRUCTURE-stocktype CA 'QRS'.
PERFORM gn_get_global_key TABLES MONITOR
USING COMM_STRUCTURE-gn_r3_ssy
g_c_bwbeoty_r3vendor
COMM_STRUCTURE-vendor
RECORD_NO
RECORD_ALL
CHANGING RESULT
ABORT.
* ENDIF.
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.

p_monitor[] = MONITOR[].
CLEAR MONITOR[].

ENDFORM. "routine_0040

*&---------------------------------------------------------------------*
*& Form routine_0037
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MONITOR text
* -->COMM_STRUCTURE text
* -->RESULT text
* -->RETURNCODE text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_0037
TABLES
p_monitor STRUCTURE rsmonitor
USING
COMM_STRUCTURE type _ty_s_SC_1__RULE_31
CHANGING
RESULT TYPE _ty_s_TG_1_full-VENCONCON
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries
* see OSS note 607710
* only goods issue is considered
IF ( COMM_STRUCTURE-processkey EQ '100' "Other Issues
OR COMM_STRUCTURE-processkey EQ '101' "Returns / Vendor
OR COMM_STRUCTURE-processkey EQ '104' "Material Transfer
OR COMM_STRUCTURE-processkey EQ '105' "Stock Adjustment InvD
OR COMM_STRUCTURE-processkey EQ '106' "Stock Adjustment Other
OR COMM_STRUCTURE-processkey EQ '110' ) "Issues from Stock Transfers
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
* only movements which are relevant for stock control
AND COMM_STRUCTURE-stockrelev EQ '1'
AND COMM_STRUCTURE-cppvlc <> 0
AND COMM_STRUCTURE-stockcat EQ 'K'.
* result value of the routine
RESULT = COMM_STRUCTURE-cppvlc.
* if the returncode is zero, the result will be updated
RETURNCODE = 0.
ELSE.
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 4.
ENDIF.
* if abort is not equal zero, the update process will be canceled
ABORT = 0.

p_monitor[] = MONITOR[].
CLEAR MONITOR[].

ENDFORM. "routine_0037

*&---------------------------------------------------------------------*
*& Form routine_0013
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MONITOR text
* -->COMM_STRUCTURE text
* -->RESULT text
* -->RETURNCODE text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_0013
TABLES
p_monitor STRUCTURE rsmonitor
USING
COMM_STRUCTURE type _ty_s_SC_1__RULE_37
CHANGING
RESULT TYPE _ty_s_TG_1_full-ISSBLOSTCK
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries
* only goods issue is considered
IF ( COMM_STRUCTURE-processkey EQ '100' "Other Issues
OR COMM_STRUCTURE-processkey EQ '101' "Returns / Vendor
OR COMM_STRUCTURE-processkey EQ '104' "Material Transfer
OR COMM_STRUCTURE-processkey EQ '105' "Stock Adjustment InvD
OR COMM_STRUCTURE-processkey EQ '106' "Stock Adjustment Other
OR COMM_STRUCTURE-processkey EQ '110' ) "Issues from Stock Transfers
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
* only blocked stock is considered
AND COMM_STRUCTURE-stocktype EQ 'D'
AND COMM_STRUCTURE-stockcat NA 'KR'
* only movements which are relevant for stock control
AND COMM_STRUCTURE-stockrelev EQ '1'
AND COMM_STRUCTURE-cpquabu <> 0.
* result value of the routine
RESULT = COMM_STRUCTURE-cpquabu.
* if the returncode is zero, the result will be updated
RETURNCODE = 0.
ELSE.
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 4.
ENDIF.
* if abort is not equal zero, the update process will be canceled
ABORT = 0.


p_monitor[] = MONITOR[].
CLEAR MONITOR[].

ENDFORM. "routine_0013

*&---------------------------------------------------------------------*
*& Form routine_0017
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MONITOR text
* -->COMM_STRUCTURE text
* -->RESULT text
* -->RETURNCODE text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_0017
TABLES
p_monitor STRUCTURE rsmonitor
USING
COMM_STRUCTURE type _ty_s_SC_1__RULE_38
CHANGING
RESULT TYPE _ty_s_TG_1_full-ISSQMSTCK
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries
* only goods issue is considered
IF ( COMM_STRUCTURE-processkey EQ '100' "Other Issues
OR COMM_STRUCTURE-processkey EQ '101' "Returns / Vendor
OR COMM_STRUCTURE-processkey EQ '104' "Material Transfer
OR COMM_STRUCTURE-processkey EQ '105' "Stock Adjustment InvD
OR COMM_STRUCTURE-processkey EQ '106' "Stock Adjustment Other
OR COMM_STRUCTURE-processkey EQ '110' ) "Issues from Stock Transfers
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
* only stock in qulality inspection is considered
AND COMM_STRUCTURE-stocktype CA 'BLOR'
AND COMM_STRUCTURE-stockcat NA 'KR'
* only movements which are relevant for stock control
AND COMM_STRUCTURE-stockrelev EQ '1'
AND COMM_STRUCTURE-cpquabu <> 0.
* result value of the routine
RESULT = COMM_STRUCTURE-cpquabu.
* if the returncode is zero, the result will be updated
RETURNCODE = 0.
ELSE.
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 4.
ENDIF.

p_monitor[] = MONITOR[].
CLEAR MONITOR[].

ENDFORM. "routine_0017

*&---------------------------------------------------------------------*
*& Form routine_0023
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MONITOR text
* -->COMM_STRUCTURE text
* -->RESULT text
* -->RETURNCODE text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_0023
TABLES
p_monitor STRUCTURE rsmonitor
USING
COMM_STRUCTURE type _ty_s_SC_1__RULE_39
CHANGING
RESULT TYPE _ty_s_TG_1_full-ISSTRANSST
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries
* only goods issue is considered
IF ( COMM_STRUCTURE-processkey EQ '100' "Other Issues
OR COMM_STRUCTURE-processkey EQ '101' "Returns / Vendor
OR COMM_STRUCTURE-processkey EQ '104' "Material Transfer
OR COMM_STRUCTURE-processkey EQ '105' "Stock Adjustment InvD
OR COMM_STRUCTURE-processkey EQ '106' "Stock Adjustment Other
OR COMM_STRUCTURE-processkey EQ '110' ) "Issues from Stock Transfers
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
* only stock in transit is considered
AND COMM_STRUCTURE-stocktype CA 'FH'
* only movements which are relevant for stock control
AND COMM_STRUCTURE-stockrelev EQ '1'
AND COMM_STRUCTURE-cpquabu <> 0.
* result value of the routine
RESULT = COMM_STRUCTURE-cpquabu.
* if the returncode is zero, the result will be updated
RETURNCODE = 0.
ELSE.
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 4.
ENDIF.

p_monitor[] = MONITOR[].
CLEAR MONITOR[].

ENDFORM. "routine_0023

*&---------------------------------------------------------------------*
*& Form routine_0018
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MONITOR text
* -->COMM_STRUCTURE text
* -->RESULT text
* -->RETURNCODE text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_0018
TABLES
p_monitor STRUCTURE rsmonitor
USING
COMM_STRUCTURE type _ty_s_SC_1__RULE_40
CHANGING
RESULT TYPE _ty_s_TG_1_full-RECBLOSTCK
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries
* only goods receipt is considered
IF ( COMM_STRUCTURE-processkey EQ '000' "Other Receipts
OR COMM_STRUCTURE-processkey EQ '001' "Goods Receipt / Vendor
OR COMM_STRUCTURE-processkey EQ '004' "Material Transfer / Receipt
OR COMM_STRUCTURE-processkey EQ '005' "Stock Adjustment InvD
OR COMM_STRUCTURE-processkey EQ '006' "Stock Adjustment Other
OR COMM_STRUCTURE-processkey EQ '010' ) "Receipt from Stock Transfer
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
* only blocked stock is considered
AND COMM_STRUCTURE-stocktype EQ 'D'
AND COMM_STRUCTURE-stockcat NA 'KR'
* only movements which are relevant for stock control
AND COMM_STRUCTURE-stockrelev EQ '1'
AND COMM_STRUCTURE-cpquabu <> 0.
* result value of the routine
RESULT = COMM_STRUCTURE-cpquabu.
* if the returncode is zero, the result will be updated
RETURNCODE = 0.
ELSE.
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 4.
ENDIF.
* if abort is not equal zero, the update process will be canceled
ABORT = 0.

p_monitor[] = MONITOR[].
CLEAR MONITOR[].

ENDFORM. "routine_0018

*&---------------------------------------------------------------------*
*& Form routine_0015
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MONITOR text
* -->COMM_STRUCTURE text
* -->RESULT text
* -->RETURNCODE text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_0015
TABLES
p_monitor STRUCTURE rsmonitor
USING
COMM_STRUCTURE type _ty_s_SC_1__RULE_41
CHANGING
RESULT TYPE _ty_s_TG_1_full-RECQMSTCK
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries
* only goods receipt is considered
IF ( COMM_STRUCTURE-processkey EQ '000' "Other Receipts
OR COMM_STRUCTURE-processkey EQ '001' "Goods Receipt / Vendor
OR COMM_STRUCTURE-processkey EQ '004' "Material Transfer / Receipt
OR COMM_STRUCTURE-processkey EQ '005' "Stock Adjustment InvD
OR COMM_STRUCTURE-processkey EQ '006' "Stock Adjustment Other
OR COMM_STRUCTURE-processkey EQ '010' ) "Receipt from Stock Transfer
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
* only stock in qulality inspection is considered
AND COMM_STRUCTURE-stocktype CA 'BLOR'
AND COMM_STRUCTURE-stockcat NA 'KR'
* only movements which are relevant for stock control
AND COMM_STRUCTURE-stockrelev EQ '1'
AND COMM_STRUCTURE-cpquabu <> 0.
* result value of the routine
RESULT = COMM_STRUCTURE-cpquabu.
* if the returncode is zero, the result will be updated
RETURNCODE = 0.
ELSE.
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 4.
ENDIF.
* if abort is not equal zero, the update process will be canceled
ABORT = 0.

p_monitor[] = MONITOR[].
CLEAR MONITOR[].

ENDFORM. "routine_0015

*&---------------------------------------------------------------------*
*& Form routine_0024
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MONITOR text
* -->COMM_STRUCTURE text
* -->RESULT text
* -->RETURNCODE text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_0024
TABLES
p_monitor STRUCTURE rsmonitor
USING
COMM_STRUCTURE type _ty_s_SC_1__RULE_42
CHANGING
RESULT TYPE _ty_s_TG_1_full-RECTRANSST
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries
* only goods receipt is considered
IF ( COMM_STRUCTURE-processkey EQ '000' "Other Receipts
OR COMM_STRUCTURE-processkey EQ '001' "Goods Receipt / Vendor
OR COMM_STRUCTURE-processkey EQ '004' "Material Transfer / Receipt
OR COMM_STRUCTURE-processkey EQ '005' "Stock Adjustment InvD +
OR COMM_STRUCTURE-processkey EQ '006' "Stock Adjustment Other +
OR COMM_STRUCTURE-processkey EQ '010' ) "Receipt from Stock Transfer
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
* only stock in transit is considered
AND COMM_STRUCTURE-stocktype CA 'FH'
* only movements which are relevant for stock control
AND COMM_STRUCTURE-stockrelev EQ '1'
AND COMM_STRUCTURE-cpquabu <> 0.
* result value of the routine
RESULT = COMM_STRUCTURE-cpquabu.
* if the returncode is zero, the result will be updated
RETURNCODE = 0.
ELSE.
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 4.
ENDIF.

p_monitor[] = MONITOR[].
CLEAR MONITOR[].

ENDFORM. "routine_0024

*&---------------------------------------------------------------------*
*& Form routine_0029
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MONITOR text
* -->COMM_STRUCTURE text
* -->RESULT text
* -->RETURNCODE text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_0029
TABLES
p_monitor STRUCTURE rsmonitor
USING
COMM_STRUCTURE type _ty_s_SC_1__RULE_43
CHANGING
RESULT TYPE _ty_s_TG_1_full-ISSSCRP
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries
* goods issue posting into scrap
* only standard movement types are considered
* copied scrap movement types must be added in this routine
IF ( COMM_STRUCTURE-movetype EQ '551' "GI scrapping
OR COMM_STRUCTURE-movetype EQ '552' "GI scrapping
OR COMM_STRUCTURE-movetype EQ '553' "GI scrapping QI
OR COMM_STRUCTURE-movetype EQ '554' "GI scrapping QI
OR COMM_STRUCTURE-movetype EQ '555' "GI scrapping blocked
OR COMM_STRUCTURE-movetype EQ '556' ) "GI scrapping blocked
AND COMM_STRUCTURE-bwapplnm EQ 'MM'.
* result value of the routine
RESULT = COMM_STRUCTURE-cpquabu .
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
* if abort is not equal zero, the update process will be canceled
ELSE.
RETURNCODE = 4.
ENDIF.
ABORT = 0.

p_monitor[] = MONITOR[].
CLEAR MONITOR[].

ENDFORM. "routine_0029

*&---------------------------------------------------------------------*
*& Form routine_0030
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MONITOR text
* -->COMM_STRUCTURE text
* -->RESULT text
* -->RETURNCODE text
* -->ABORT text
* -->RAISING text
* -->CX_SY_ARITHMETIC_ERROR text
* -->CX_SY_CONVERSION_ERROR text
*----------------------------------------------------------------------*
FORM routine_0030
TABLES
p_monitor STRUCTURE rsmonitor
USING
COMM_STRUCTURE type _ty_s_SC_1__RULE_51
CHANGING
RESULT TYPE _ty_s_TG_1_full-ISSVALSCRP
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries
* goods issue posting into scrap
* only standard movement types are considered
* copied scrap movement types must be added in this routine
IF ( COMM_STRUCTURE-movetype EQ '551' "GI scrapping
OR COMM_STRUCTURE-movetype EQ '552' "GI scrapping
OR COMM_STRUCTURE-movetype EQ '553' "GI scrapping QI
OR COMM_STRUCTURE-movetype EQ '554' "GI scrapping QI
OR COMM_STRUCTURE-movetype EQ '555' "GI scrapping blocked
OR COMM_STRUCTURE-movetype EQ '556' ) "GI scrapping blocked
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
AND COMM_STRUCTURE-cppvlc <> 0 .
* result value of the routine
RESULT = COMM_STRUCTURE-cppvlc .
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
* if abort is not equal zero, the update process will be canceled
ELSE.
RETURNCODE = 4.
ENDIF.
ABORT = 0.

p_monitor[] = MONITOR[].
CLEAR MONITOR[].

ENDFORM. "routine_0030

*$*$ end of 2nd part global - insert your code only before this line *

*---------------------------------------------------------------------*
* CLASS routine IMPLEMENTATION
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
CLASS lcl_transform IMPLEMENTATION.

*----------------------------------------------------------------------*
* Method start_routine
*----------------------------------------------------------------------*
* Calculation of source package via start routine
*----------------------------------------------------------------------*
* <-> source package
*----------------------------------------------------------------------*
METHOD start_routine.
*=== Segments ===

FIELD-SYMBOLS:
<SOURCE_FIELDS> TYPE _ty_s_SC_1.

DATA:
MONITOR_REC TYPE rstmonitor.

*$*$ begin of routine - insert your code only below this line *-*
Data:
l_monitor TYPE STANDARD TABLE OF rsmonitor,
l_monitor_recno TYPE STANDARD TABLE OF rsmonitors,
*--
l_subrc type sy-tabix,
l_abort type sy-tabix,
Ls_monitor type rsmonitor,
ls_monitor_recno type rsmonitors.

Refresh:
MONITOR,
MONITOR_RECNO.

* Runtime attributs
SOURCE_SYSTEM = p_r_request->get_logsys( ).

* Migrated update rule call
Perform routine_9998
TABLES
SOURCE_PACKAGE
l_monitor
l_monitor_recno
CHANGING
l_abort.

IF NOT SOURCE_PACKAGE IS INITIAL.
select * from /BI0/PMAT_PLANT into corresponding fields of table
gt_plant_mat
for all entries in SOURCE_PACKAGE
where plant eq SOURCE_PACKAGE-plant
and mat_plant eq
SOURCE_PACKAGE-matERIAL
and objvers eq 'A'.
ENDIF.
IF NOT SOURCE_PACKAGE IS INITIAL.
select * from /BIC/QZMATPLANT into corresponding fields of table
gt_zplant_mat
for all entries in SOURCE_PACKAGE
where plant eq SOURCE_PACKAGE-plant
and /BIC/ZMATPLANT eq
SOURCE_PACKAGE-matERIAL
and objvers eq 'A'.
ENDIF.
*-- Convert Messages in Transformation format
LOOP AT l_monitor_recno INTO ls_monitor_recno.
move-CORRESPONDING ls_monitor_recno to MONITOR_REC.
append monitor_rec to MONITOR.
ENDLOOP.
LOOP AT l_monitor INTO ls_monitor.
move-CORRESPONDING ls_monitor to MONITOR_REC.
append monitor_rec to MONITOR.
ENDLOOP.
IF l_abort <> 0.
RAISE EXCEPTION TYPE CX_RSROUT_ABORT.
ENDIF.

*$*$ end of routine - insert your code only before this line *-*
ENDMETHOD. "start_routine
*----------------------------------------------------------------------*
* Method inverse_start_routine
*----------------------------------------------------------------------*
*
* This subroutine needs to be implemented only for direct access
* (for better performance) and for the Report/Report Interface
* (drill through).
* The inverse routine should transform a projection and
* a selection for the target to a projection and a selection
* for the source, respectively.
* If the implementation remains empty all fields are filled and
* all values are selected.
*
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
METHOD inverse_start_routine.

*$*$ begin of inverse routine - insert your code only below this line*-*
... "insert your code here
*$*$ end of inverse routine - insert your code only before this line *-*

ENDMETHOD. "inverse_start_routine
ENDCLASS. "routine IMPLEMENTATION

Former Member
0 Kudos

this is a standard routine, see here COMM_STRUCTURE-bwapplnm EQ 'MM' (if movement type 12/122 is not type 'mm' then you can't see values in cube)

you can follow my suggestion in first thread

Former Member
0 Kudos

Hi,

if you check start routine, you notice if statements like below.

if COMM_STRUCTURE-processkey EQ 'xxx'

AND COMM_STRUCTURE-bwapplnm EQ 'MM'


check whether this field bwapplnm is 'mm' or some thing else for movement '121'/'122'


if it is not MM, then you should add it where ever it is applicable (if statement)..


test this is sandbox first and then implement in Dev, it shouldn't impact any existing data.