亚洲必赢bwin696.com函数PYXX_READ_PAYROLL_RESULT的dump问题

 

意识产生少数个HR的后台定时任务出现dump,日志表示,是PYXX_READ_PAYROLL_RESULT产生了种冲突的百般CX_SY_DYN_CALL_ILLEGAL_TYPE。

日记标题部分:

种类                  ABAP
编程错误                
运作时左            
PERFORM_CONFLICT_TYPE       
异常                 
CX_SY_DYN_CALL_ILLEGAL_TYPE 
ABAP 程序            
SAPLHRPAY99_IMPEXP          
应用程序组件           
PY-XX                       

谬误分析文本:

An exception has occurred which
is explained in more detail below. The exception is assigned to class
‘CX_SY_DYN_CALL_ILLEGAL_TYPE’ and was no caught in procedure
“PYXX_READ_PAYROLL_RESULT” “(FUNCTION)”, nor was it propagated by a
RAISING clause. Since the caller of the procedure could not have
anticipated this exception, the current program was terminated. The
reason for the exception is: The FORM call “IMPORT_RESULT” is
incorrect: The actual parameter (number 2) has a different data type in
the PERFORM than requested by FORM “IMPORT_RESULT” in program
“%_T000VU”.

代码行:

      PERFORM import_result IN PROGRAM (subroutine_pool-name)
                                   USING key
                                          payroll_result "第二个参数
                                          import_subrc
                                          pcl2_version_number
                                          typepool_version_number
                             IF FOUND.

 

函数PYXX_READ_PAYROLL_RESULT是一个用来取工资的函数。在Google搜索了一半上,不得解法。查阅函数文档,可以识破:

You can use this module to generically read a complete payroll result,
that is for all country versions, from file PCL2 or from the puffer. In
doing so, the payroll result is transferred to the PAYROLL_RESULT
parameter. In the calling system, this must be classified as a complex
structure according to the ‘PAYxx_RESULT‘ dictionary structure. xx
is the ISO code for the country in question (Exception: for the
international part only, use PAY99_RESULT).

 

原来,PAYROLL_RESULT参数是动态类型的。问题出在,最初的开发者只考虑了clusterid为”CN”即中国时不时之状况,把它定义为PAYCN_RESULT色。而当系统放至角落的上,CN的布局类型已不再动用,程序应该用不同之构造来接纳输出结果。

按部就班,当输入参数中之clusterid =
‘RG’(英国)时,就应该定义参数payroll_result参数的门类为PAYGB_RESULT,这样就是未会见发生类型冲突的谬误了。

 

总的看发生上文档比Google更加直白有效。我们无应有因为文档的看难度要舍查阅…如果产生追寻到本文的读者,请和自身共记住是教训:)

 

相关文章