class zpp_001_mrp_live_run_badi definition
public
final
create public .
public section.
interfaces if_badi_interface .
interfaces if_pph_mrp_run_badi .
interfaces if_amdp_marker_hdb .
protected section.
private section.
endclass.
class zpp_001_mrp_live_run_badi implementation.
method if_pph_mrp_run_badi~mdps_adjust
by database procedure for hdb language sqlscript options read-only.
-- Our excellent codes
begin sequential execution
end;
endmethod.
method if_pph_mrp_run_badi~planord_before_update_adjust
by database procedure for hdb language sqlscript options read-only.
-- Our excellent codes
begin sequential execution
end;
endmethod.
method if_pph_mrp_run_badi~purreq_before_update_adjust
by database procedure for hdb language sqlscript options read-only.
-- Our excellent codes
begin sequential execution
end;
endmethod.
endclass.
for pilot_index in 1 .. cardinality(:pilot_mng01) do
miktar_tam = 0;
miktar_kalan = 0;
i = 0;
if :pilot_disls[:pilot_index] = 'FX' then
if :pilot_bstfe[:pilot_index] > 0 then
miktar_tam = :pilot_mng01[:pilot_index] / :pilot_bstfe[:pilot_index];
miktar_kalan = mod( :pilot_mng01[:pilot_index], :pilot_bstfe[:pilot_index] );
for i in 1 .. miktar_tam do
yeni_kayit_new_mng01 = cardinality(:pilot_mng01_new) + 1;
pilot_mng01_new[:yeni_kayit_new_mng01] = :pilot_bstfe[:pilot_index];
end for;
if :miktar_kalan > 0 then
if ( :pilot_bstfe[:pilot_index] * ( yuzde / 100 ) ) <= miktar_kalan then
yeni_kayit_new_mng01 = cardinality(:pilot_mng01_new) + 1;
pilot_mng01_new[:yeni_kayit_new_mng01] = :pilot_bstfe[:pilot_index];
end if;
end if;
else
yeni_kayit_new_mng01 = cardinality(:pilot_mng01_new) + 1;
pilot_mng01_new[:yeni_kayit_new_mng01] = 0;
end if;
elseif :pilot_disls[:pilot_index] = 'EX' then
if :pilot_bstma[:pilot_index] > 0 then
miktar_tam = :pilot_mng01[:pilot_index] / :pilot_bstma[:pilot_index];
miktar_kalan = mod( :pilot_mng01[:pilot_index], :pilot_bstma[:pilot_index] );
for i in 1 .. miktar_tam do
yeni_kayit_new_mng01 = cardinality(:pilot_mng01_new) + 1;
pilot_mng01_new[:yeni_kayit_new_mng01] = :pilot_bstma[:pilot_index];
end for;
if :miktar_kalan > 0 then
if :miktar_kalan >= :pilot_bstmi[:pilot_index] and :miktar_kalan <= :pilot_bstma[:pilot_index] then
yeni_kayit_new_mng01 = cardinality(:pilot_mng01_new) + 1;
pilot_mng01_new[:yeni_kayit_new_mng01] = :miktar_kalan;
elseif ( :pilot_bstmi[:pilot_index] * ( yuzde / 100 ) ) < miktar_kalan then
yeni_kayit_new_mng01 = cardinality(:pilot_mng01_new) + 1;
pilot_mng01_new[:yeni_kayit_new_mng01] = :pilot_bstmi[:pilot_index];
end if;
end if;
else
yeni_kayit_new_mng01 = cardinality(:pilot_mng01_new) + 1;
pilot_mng01_new[:yeni_kayit_new_mng01] = 0;
end if;
end if;
end for;
lt_matb_ctrl_del = select ct_matb_ctrl.*
from :lt_out as lt_out
inner join :ct_matb_ctrl as ct_matb_ctrl
on ct_matb_ctrl.matnr <> lt_out.matnr;
lt_out = select * from :lt_out where mng01 <> 0;
found = 0;
select count(*) into found from :lt_out;
if :found > 0 then
ct_result = select * from :lt_out;
end if;
count = 0;
select count(*) into count from :ct_result;
select count(*) into count from :lt_matb_ctrl_del;
if :found > 0 or :count > 0 then
ct_matb_ctrl = select * from :lt_matb_ctrl_del;
end if;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
3 | |
3 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 |