ME2DP 建立預付款申請增強 F 47 增強

2021-10-20 17:20:12 字數 2533 閱讀 3554

bapi:fpdp_down_payments_sum

方法:if_ex_dp_check~dpsum_check

**如下:

data: gs_ekko  type ekko,

gt_ekpo type table of ekpo,

gs_ekpo type ekpo,

gt_***os type table of fpdp_s_***os_alv,

gs_***os type fpdp_s_***os_alv.

data:lv_***(1),

lv_kbetr type konp-kbetr,

lv_hsj type ekpo-netwr,

lv_shuilv type konp-kbetr,

lv_dpamt type wrbtr,

lv_chayi type wrbtr,

lt_messages type bapiret2,

lv_str_chayi type char20,

lt_ekbe type standard table of ekbe,

ls_ekbe type ekbe,

lt_ekbe_1 type standard table of ekbe

."開關增強函式

call function 'zuser_exit'

exporting

zxh = '0090'

importing

zbs = lv_***.

if lv_*** is initial.

gs_ekko = i_control->t_ekko.

gt_ekpo = i_control->t_ekpo.

gt_***os = i_control->t_***os.

field-symbols :type bseg.

assign: ('(fpdp_start)bseg') to .

read table gt_ekpo into gs_ekpo index 1.

if sy-subrc = 0.

select single b~kbetr

into lv_kbetr

from a003 as a

inner join konp as b

on a~knumh = b~knumh

where a~mwskz = gs_ekpo-mwskz

and a~aland = gs_ekko-lands

and a~kschl = 'mwvs'.

lv_shuilv = lv_kbetr / 1000. "稅率

lv_hsj = gs_ekpo-netwr * ( 1 + lv_shuilv ). "含稅價

"取累計預付款

select ebeln ebelp wrbtr into corresponding fields of table lt_ekbe

from ekbe

where ebeln = gs_ekpo-ebeln

and ebelp = gs_ekpo-ebelp

and vgabe = 'a'.

loop at lt_ekbe into ls_ekbe.

collect ls_ekbe into lt_ekbe_1.

clear: ls_ekbe.

endloop.

"當前預付款金額

read table gt_***os into gs_***os with key ebelp = gs_ekpo-ebelp.

if sy-subrc = 0.

lv_dpamt = gs_***os-dpamt.

clear: gs_***os.

endif.

read table lt_ekbe_1 into ls_ekbe index 1.

clear:lt_messages,lv_str_chayi.

delete et_messages where type = 'e' and id = '00'.

"當前預付款金額+累計預付款》含稅價,則報錯

lv_chayi = lv_dpamt + ls_ekbe-wrbtr - lv_hsj.

if lv_chayi > 0.

lt_messages-type = 'e'.

lt_messages-id = '00'.

lt_messages-number = '001'.

lv_str_chayi = lv_chayi.

condense lv_str_chayi no-gaps.

concatenate '訂單' gs_ekpo-ebeln '行' gs_ekpo-ebelp '預付款金額已超出' lv_str_chayi

into lt_messages-message_v1.

endif.

endif.

endif.

log4j2me 開源的j2me日誌工具

原文 log4j2me是用於j2me平台上的log4j。當把你的 移到j2se j2ee平台上時,不需要對 進行改變,只需把log4j2me.jar替換掉log4jjar檔案。與log4j所不同的是不能在j2me環境中使用log4j.properties檔案來配置log4j,但可以從 jad檔案讀取...

J2ME 文字滾動

private int tipstringpos screen width 當前字串左邊的位置 private int tipstringspeed 2 字串移動速度 private static final int tipstr left 5 5 左邊消失繪製座標 private static f...

j2me記憶體優化

out momory 一陣天旋地轉記憶體又溢位了。在手機上這種痛苦經常都有,套一句俗話在手機上用記憶體必須勒緊褲腰帶。雖然現在pc記憶體上g都不奇怪,可是在手機上卻只能以k來記,可能某位同志會馬上跳出來說也有上m的,記住中國還不富大多數手機都是低端手機。寫手機程式讓我彷彿回到了dos時代 自我安慰一...