uncaught_exception cx_sy_ref_is_initial

2020-09-09 21:42发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)我在导出为ex​​cel格式时遇...

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


我在导出为ex​​cel格式时遇到错误 uncaught_exception cx_sy_ref_is_initial ,代码如下:

SPAN {font-family:" Courier New"; 字体大小:10pt; 颜色:#000000; 背景:#FFFFFF; } .L0S31 {font-style:italic; 颜色:#808080; } .L0S32 {color:#3399FF; } .L0S33 {color:#4DA619; } .L0S52 {color:#0000FF; } .L0S55 {color:#800080; } .L0S70 {color:#808080; }

FORM DISPLAY。
gt_fieldcat = VALUE#(

(fieldname ='MATNR'OUTPUTLEN ='12'seltext_l ='ParentCode'tabname ='IT_STDBOM')
(fieldname ='OJTXB ''OUTPUTLEN ='50'seltext_l ='ParentCodeDesc'标签名='IT_STDBOM')
(字段名='IDNRK'OUTPUTLEN ='12'seltext_l ='ChildCode'标签名='IT_STDBOM')
(字段名='OJTXP ''OUTPUTLEN ='50'seltext_l ='ChildCodeDesc'标签名='IT_STDBOM')
(字段名='MTART'OUTPUTLEN ='5'seltext_l ='MTGroup'标签名='IT_STDBOM')
(字段名='DISMM ''OUTPUTLEN ='5'seltext_l ='MRPType'标签名='IT_STDBOM')
(字段名='MATMK'OUTPUTLEN ='5'seltext_l ='MatSubType'标签名='IT_STDBOM')
(字段名='MNGLG ''OUTPUTLEN ='20'seltext_l ='CompQty'标签名='IT_STDBOM')
(字段名='FPINHOUSEC'OUTPUTLEN ='20'seltext_l ='Parent.InHouseCost'DO_SUM ='X'标签名='IT_STDBOM')< br>(字段名='FPBOUGHTC'OUTPUTLEN ='20'seltext_l ='Parent.BoughtOutCost'DO_SUM ='X'标签名='IT_S TDBOM')
(字段名='FPINFOREC'OUTPUTLEN ='20'seltext_l ='Parent.InfoRec'DO_SUM ='X'标签名='IT_STDBOM')
(字段名='FINHOUSEC'OUTPUTLEN ='20'seltext_l ='InHouseCost'DO_SUM ='X'标签名='IT_STDBOM')
(字段名='FBOUGHTC'OUTPUTLEN ='20'seltext_l ='BoughtOutCost'DO_SUM ='X'标签名='IT_STDBOM')
(字段名 ='FINFOREC'OUTPUTLEN ='20'seltext_l ='InfoRec'DO_SUM ='X'标签名='IT_STDBOM')
(字段名='TOTALCOST'OUTPUTLEN ='20'seltext_l ='TotalCost'DO_SUM ='X'标签名 ='IT_STDBOM')
)。

wasort-spos = 1.
wasort-fieldname ='MATNR'。
wasort-UP ='X'。
wasort-subtot ='X'。
APPEND wasort到itsort。

gs_layout-colwidth_optimize ='X'。
CLEAR ALV_HEADING。
CONCATENATE'标准BOM成本核算:'P_MATNR INTO alv_heading。
通话功能'REUSE_ALV_GRID_DISPLAY'
导出
* I_INTERFACE_CHECK =''
* I_BYPASSING_BUFFER =''
* I_BUFFER_ACTIVE =''
I_CALLBACK_PROGRAM ='ZCL ASS_STD_COST_NEW'
* I_CALLBACK_PF_STATUS_SET =''
* I_CALLBACK_USER_COMMAND =''
* I_CALLBACK_TOP_OF_PAGE ='
* I_CALLBACK_HTML_TOP_OF_PAGE ='
* I_CALLBACK * > * I_BACKGROUND_ID =''
I_GRID_TITLE = alv_heading
* I_GRID_SETTINGS =
IS_LAYOUT = gs_layout
IT_FIELDCAT = gt_fieldcat
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS = <
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT ='X'
I_SAVE ='X'
* IS_VARIANT = g_variant
* IT_EVENTS =
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* I_HTML_HEIGHT_TOP = 0
= 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* IR_SALV_FULLSCREEN_ADAPTER =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER = USER =
表格
T_OUTTAB = it_stdbom
例外情况
program_error = 1
其他=2。

IF SY-SUBRC <> 0.
*实施合适 错误处理此处
ENDIF。
ENDFORM。