測試 批量刪除供應商配額(Quota )

2021-10-09 19:41:17 字數 2909 閱讀 6338

主要涉及table:equk(配額檔案: 標題)和equp(配額檔案:專案)

***選擇螢幕

selection-screen begin of block b1 with frame title text-001.

parameters: p_werks type equk-werks default '1200' obligatory.

select-options: s_matnr for equk-matnr modif id g2.

selection-screen end of block b1.

*** 定義內錶

types:begin of ty_display,

matnr type equk-matnr,

werks type equk-werks,

bdatu type equk-bdatu,

vdatu type equk-vdatu,

qunum type equk-qunum,

erdat type equk-erdat,

ernam type equk-ernam,

scmng type equk-scmng,

message type bapi_msg,

end of ty_display.

data: gt_equp type equp occurs 0 with header line,

gt_display type ty_display occurs 0 with header line.

*** 查詢資料

select *

from equk

into corresponding fields of table gt_display

where werks = p_werks

and matnr in s_matnr.

if gt_display is not initial.

sort gt_display by qunum.

select *

from equp

into corresponding fields of table gt_equp

for all entries in gt_display

where qunum = gt_display-qunum.

sort gt_equp by qunum.

loop at gt_display .

lv_index = sy-tabix.

read table gt_equp with key qunum = gt_display-qunum binary search.

if sy-subrc <> 0.

delete gt_display index lv_index.

endif.

endloop.

endif.

*** 定義內錶

data: t_xequk type equku occurs 0 with header line,"

t_xequp type uequp occurs 0 with header line,"

t_yequk type equku occurs 0 with header line,"

t_yequp type uequp occurs 0 with header line."

*** 刪除配額

loop at gt_display into gw_display.

read table gt_equp with key qunum = gw_display-qunum binary search.

if sy-subrc = 0.

lv_index = sy-tabix.

*** 配額抬頭資訊

clear : t_xequk,t_yequk.

move-corresponding gw_display to t_xequk.

move-corresponding gw_display to t_yequk.

t_yequk-kz = 'u'. "更改型別 (u, i, e, d)

*** 專案明細資訊

clear gt_equp.

loop at gt_equp from lv_index.

if gt_equp-qunum <> gw_display-qunum.

exit.

endif.

clear t_yequp.

move-corresponding gt_equp to t_yequp.

clear: gt_equp.

endloop.

endif.

clear w_display.

endloop.

call function 'me_update_quota'

tables

xequk = t_xequk

xequp = t_xequp

yequk = t_yequk

yequp = t_yequp.

if sy-subrc = 0.

*** 刪除成功

else.

*** 刪除失敗

MM 供應商刪除

參閱 sap 商主資料刪除fk06 這裡的刪除僅僅是標記刪除,只有通過後台執行正式刪除程式,才能將資料從系統中刪除obr2 客戶,商,科目主資料同理,注意 obr2刪除主資料前,先做歸檔操作 所有範圍 選擇本項表示在所有公司 中將該 商標記為刪除 所選的公司 選擇本項表示在前頁所輸入的公司 中刪除該...

優質供應商選擇標準 優秀供應商評選標準

優秀 商評選標準 評選 商標準主要有 合適的商品質量。採購商品的質量合乎採購單位的要求是採 購單位進行商品採購時首先要考慮的條件。對於質量差 偏低的 商品,雖然採購成本低,但會導致企業的總成本增加。因為質量不合 格的產品在企業投入使用的過程中,往往會影響生產的連續性和產成 品的質量,這些最終都會反映...

InfiniBand OS 供應商支援

mellanox infiniband 驅動程式 協議軟體和工具由其各自的主要作業系統 商和分布式系統收件箱提供支援,或在另有說明的情況下由 mellanox 提供支援。mellanox 還可支援所有主要處理器架構。mellanox infiniband 驅動程式和 ulp 均已經過測試和驗證,可支...