[SAP] – Set Automatic Value Infotype 8 (Suggest value infotype 8) | ABAP-HR
Kadangkala, dalam mendevelop Payroll System, user mengharapkan suggestion value pada system untuk memudahkan kinerjanya (suggestion value berdasarkan rumus pada perusahaan tersebut). Pada tulisan ini tidak menitikberatkan menunjukkan formula perhitungan (yang pasti berbeda-beda pada setiap company dan sangat rahasia, melainkan bagaimana cara mentriggernya dan cara untuk meng-set valuenya.
1.Set enhancement in the ‘cmod’ tcode
2. Code
“=============================
*&——-main process
CHECK innnn-infty = ’0008′.
“=============================
CALL FUNCTION ’HR_READ_INFOTYPE’ “read data infotype 1
EXPORTING
tclas = ’A’
pernr = innnn-pernr
infty = ’0001′
begda = innnn-begda
endda = innnn-endda
TABLES
infty_tab = i0001.
“=============================
CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn “==> get infotype 8 (sebagai source)
EXPORTING
prelp = innnn
IMPORTING
pnnnn = i0008.
lv_datum = i0008-begda. “sy-datum.
ASSIGN i0008 TO <fs_i0008>.
“==============================
DO 40 TIMES. “dilakukan pengulangan 40x, karena pada structure infotype 8 value disimpan pada 40 field.
CONCATENATE ’BET’ lv_index_c INTO lv_bet. “declare untuk mengambil value field BETXX
CONCATENATE ’LGA’ lv_index_c INTO lv_lga. “declare untuk mengambil value field LGAXX
IF <fs_i0008> IS ASSIGNED.
“===============================
<fs_valbt> = VALUE “nilai suggestion diset disini
ENDDO.
“==============================
*&——- update invotype 8
CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
EXPORTING
pnnnn = i0008
IMPORTING
prelp = innnn.
IF sy-ucomm NE ’UPD’.
show_data_again = ’X’. “ditampilkan pada layout screen
ENDIF.
3. Testing
Sistem dapat memberikan saran pada PA30 Infotype 8 sesuai dengan hasil perhitungan.
a. Process
b. Result display setelah enter
–DONE
Demikian sharing terkait suggestion pada infotype 8, sesuai dengan rumus yang berlaku. Jadi user tidak perlu memasukkan nilainya berapa, namun cukup dengan memasukkan WT nya, lalu enter, semoga tulisan ini dapat bermanfaat dan membantu.
Jika ada yang perlu didiskusikan, please contact me at : yudho.guritno@gmail.com
_TerimaKasih,
GuritnoY
https://www.linkedin.com/in/guritno-yudho-wibowo-95944236/
Thx!
A gorgeous thing!
How good that we managed to find such a wonderful blog, and all the more excellent that there are such sensible authors!
There is something in this. Thank you very much for the information. You were right.
Zer good I put 5 points.
Like your explaining, and the look like its detail, but i must open the translate for read youre blog. I feel better you serve English language into youre blog.
But this is no worry
Thank for your advice John
Great, this is funny information
Oh thank you
Awesome! Thanks!!!
It is very comforting to see that others are suffering from the same problem as you, wow!
Thanks for thr great article!
It is very comforting to see that others are suffering from the same problem as you, wow!
Thank you so much!
Thank you so much!
It is very comforting to see that others are suffering from the same problem as you, wow!
Thank you so much!
Thank you so much!
Thanks for thr great article!
Thanks for thr great article!
Thanks for thr great article!
Thank you so much!
Of course, what a magnificent site and instructive posts, I surely will bookmark your website.Best Regards!
Thanks for thr great article!
Thank you so much!