Professional Documents
Culture Documents
For migrating the Material Master data we designed two BODS jobs
Material_Master_Format
Material_Master_Idoc
The Material Master job is executed for the 2 Material Types ‘ZHAW’ and ‘ZROH’.
Inside the condtion flow MaterialMaster_Mapping_Required we are having the workflow
with so many data flow in it
DF_MAT_GROUP
File Name ->
The file is consumed in the bods and moved the data into Permanent table
‘DM_MM_LEGACY’
DF_MAT_PLANT
File Name->
DF_LOOKUP_PLANT
DF_LOOKUP_MARA
The data in the standard MARA table is moved to DM_MARA2 by writing a condition in
where of the query MARA.MTART=$G_MaterialType
In this job we need to explicitly generate the No Range for the two material types
ZHAW-> ‘1100000000’
ZROH-> ‘4100000000’
Inside the script we written the logic to fetch the highest no range for the Materials inside
the script. We declared a Global Variable $L_MATNR
if ( $L_MATNR is null )
begin
if ( $G_MaterialType = 'ZHAW') print( 'SAP Material No will start from: 1100000000');
if ( $G_MaterialType = 'ZROH') print( 'SAP Material No will start from: 4100000000');
if ( ( $G_MaterialType != 'ZHAW') and ( $G_MaterialType != 'ZROH') ) print( $G_MaterialType
|| ' is not a valid Material Type' );
if ( ( $G_MaterialType != 'ZHAW') and ( $G_MaterialType != 'ZROH') ) raise_exception(
$G_MaterialType || ' is not a valid Material Type' );
end
else
begin
print( 'Do not worry about this message if you are running in UPDATE MODE: ');
print( 'Highest SAP Material No is: ' || $L_MATNR );
$L_MATNR = $L_MATNR + 1;
print( 'Next SAP Material No will be: ' || $L_MATNR );
end