on 08-25-2020 7:38 AM
各位前辈,
当我的程序使用Function HR_INFOTYPE_OPERATION为外籍员工维护0531信息类型时,会返回一个错误消息:发生一个复杂的应用错误。
经过排查,在0531的屏幕PBO模块中有一段子例程,会获取0185信息类型中01子类型身份证号码赋值给0531信息类型税号字段。而外籍员工没有中国的身份证号,所以会在屏幕上返回一个warning消息。
FORM read_residents.
PERFORM read_infotype(sapfp50p) USING p0531-pernr
'0185' '01' no_objps no_sprps p0531-begda
p0531-endda all nop seltab.
IF seltab IS INITIAL.
MESSAGE w041(hrpadcn) WITH '01' p0531-begda.
ELSE.
REFRESH s0185.
*unicode conversion
* MOVE SELTAB[] TO S0185[].
DATA: l_prelp TYPE prelp_tab,
l_s0185 TYPE STANDARD TABLE OF p0185.
* FIELD-SYMBOLS: <FS> LIKE LINE OF SELTAB.
* LOOP AT SELTAB ASSIGNING <FS>.
* APPEND <FS>-PRELP TO L_PRELP.
* ENDLOOP.
l_prelp[] = seltab[]. " unicode check???
CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn_tab
EXPORTING
prelp_tab = l_prelp
IMPORTING
pnnnn_tab = l_s0185.
s0185[] = l_s0185[]. "unicode end
SORT s0185 BY begda DESCENDING.
READ TABLE s0185 WITH KEY astat = '2'. " approved id.
IF sy-subrc NE 0.
MESSAGE w051(hrpadcn) WITH p0531-begda p0531-endda.
ELSE.
MOVE s0185-icnum TO p0531-taxid.
ENDIF.
ENDIF.
ENDFORM.
前台维护时可以pass消息保存成功,但是使用Function HR_INFOTYPE_OPERATION似乎只能报错。
我们不希望使用BDC来实现导入程序,那么,对没有中国身份证的外籍员工(这个情况很正常吧),怎么规避“发生一个复杂的应用错误”呢?
请问这个问题后来是怎样解决的呢?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the documrnt of HR_INFOTYPE_OPERATION, No messages can be processed for PBO. This will lead to error message 428(PG).
Okay, I guess HR_INFOTYPE_OPERATION does not apply.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you will get more replies if you ask your question in English
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.