• SAP FICO error 行项目无法显示(没有选择行项目)


    版本:ECC6.0

    新增公司代码时,使用FS15复制科目后。SKB1中的XLGCLR字段值成了”/”.

    导致行项目无法查看

    解决方法:

    相关note:1323960

    1. Import the current Support Package for one of the releases specified above or implement the source code correction as described in the attached correction instructions.

    2. Generate the program RFBISA02 using the program RFBISAG0: Call transaction SE38. Enter the program name RFBISAG0. Then choose "Execute" or F8. The generation log appears with the information message "Include report RFBISA02 was generated". The program RFBISA02 has now been generated successfully.

    3. Generate the program RFBISA11 using the program RFBISAG1: Call transaction SE38. Enter the program name RFBISAG1. Select the parameter "Generating RFBISA11" and execute the program. The program RFBISA11 has now been generated successfully.

    4. Generate the program RFBISA52 using the program RFBISAG1: Call transaction SE38. Enter the program name RFBISAG1. Select the "Generating RFBISA52" parameter and execute the program. The program RFBISA52 has now been generated successfully.

    5. Generate the include using the program SAPGL_ACCOUNT_MASTER_GENERATE: Call transaction SE38. Enter the program name SAPGL_ACCOUNT_MASTER_GENERATE. Then choose "Execute" or F8. No list is displayed. The includes have now been generated successfully.

    6. Additional step for symptom 1, 2 or 3: To delete the incorrect content '/' from the field SKB1-XLGCLR in the database, to correct the incorrect documents in the table BSEG and to adjust indices, implement the correction report ZF_CORR_XLGCLR_BSEG in accordance with Note 1437341. You can run the report in update mode. If you have any questions or problems, contact SAP Support under the component FI-GL-GL-X.

    相关note:1437341

    In Transaction SE38 create objects ZF_CORR_XLGCLR_BSEG and implement the attached source code. For ZF_CORR_XLGCLR_BSEG use the following selection texts in TransactionSE38: S_BELNR Document Number S_BUKRS Company Code S_GJAHR Fiscal Year UPDATE Update Please ensure that the report is executed with the selection criteria having one fiscal year for fewer company codes so that the time taken for the correction process is minimal and to avoid any further inconsistencies.

    1. *&---------------------------------------------------------------------*
    2. *& Report ZF_CORR_XLGCLR_BSEG
    3. *&
    4. *&---------------------------------------------------------------------*
    5. *& To correct the BSEG-XLGCLR field with the values in SKB1-XLGCLR
    6. *& after implementing the note 1323960
    7. *&
    8. *& Change log:
    9. *& 16.06.2010: Check cleared BSEG for existing BSIS and delete BSIS
    10. *& (error case when BSEG-XLGCLR was filled with '/' AFTER
    11. *& the document was posted => no index update during
    12. *& clearing)
    13. *&
    14. *& 02.09.2010: Included SY-SUBRC check
    15. *&
    16. *& 22.09.2010: For asset accounting recon account is checked
    17. *& 14.01.2011: Wrong SKB1-XLGCLR will be corrected as well
    18. *&
    19. *& 02.02.2011: New update form for SKB1 added to ensure that all
    20. *& affected accounts will be updated, not only those with
    21. *& inconsistent documents
    22. *& 04.09.2012: XLGCLR value in BSEG should be set to that in SKB1
    23. *& for the account, missing value for some fields in index
    24. *& update is filled.
    25. *& Can be found in E38
    26. *&---------------------------------------------------------------------*
    27. REPORT zf_corr_xlgclr_bseg.
    28. *----------------------------------------------------------------------*
    29. * DATA DECLARATION *
    30. *----------------------------------------------------------------------*
    31. TABLES: bkpf. "SKJ020910
    32. DATA: it_bkpf TYPE TABLE OF bkpf WITH HEADER LINE,
    33. it_bseg TYPE TABLE OF bseg WITH HEADER LINE,
    34. it_bseg1 TYPE TABLE OF bseg WITH HEADER LINE,
    35. it_skb1 TYPE TABLE OF skb1 WITH HEADER LINE.
    36. DATA: letter TYPE c,
    37. l_lines TYPE i,
    38. l_lines_1 TYPE i,
    39. count TYPE i.
    40. *----------------------------------------------------------------------*
    41. * SELECTION-SCREEN *
    42. *----------------------------------------------------------------------*
    43. SELECTION-SCREEN BEGIN OF BLOCK 001 WITH FRAME.
    44. SELECT-OPTIONS: s_belnr FOR bkpf-belnr,
    45. s_bukrs FOR bkpf-bukrs,
    46. s_gjahr FOR bkpf-gjahr.
    47. SELECTION-SCREEN END OF BLOCK 001.
    48. PARAMETERS : update AS CHECKBOX.
    49. *----------------------------------------------------------------------*
    50. * START-OF-SELECTION *
    51. *----------------------------------------------------------------------*
    52. IF update = 'X'.
    53. WRITE:/ 'Update RUN' COLOR 5 INTENSIFIED.
    54. ELSE.
    55. WRITE:/ 'Test RUN ' COLOR 3 INTENSIFIED.
    56. ENDIF.
    57. REFRESH:it_bseg,it_bkpf,it_skb1,it_bseg1.
    58. * DB020211: new update form
    59. PERFORM update_skb1. "DB020211
    60. SELECT * FROM bseg INTO TABLE it_bseg
    61. WHERE bukrs IN s_bukrs
    62. AND belnr IN s_belnr
    63. AND gjahr IN s_gjahr
    64. AND xlgclr = '/'.
    65. IF sy-subrc = 0. "SKJ020910
    66. DESCRIBE TABLE it_bseg LINES l_lines.
    67. * WRITE:/ 'Lines seleted with BSEG-XLGCLR = / are:', l_lines.
    68. count = 0.
    69. it_bseg1[] = it_bseg[].
    70. SORT it_bseg1 BY bukrs belnr gjahr.
    71. DELETE ADJACENT DUPLICATES FROM it_bseg1 COMPARING bukrs belnr gjahr.
    72. SELECT * FROM bkpf INTO TABLE it_bkpf
    73. FOR ALL ENTRIES IN it_bseg1
    74. WHERE bukrs = it_bseg1-bukrs
    75. AND belnr = it_bseg1-belnr
    76. AND gjahr = it_bseg1-gjahr.
    77. IF sy-subrc = 0.
    78. SORT it_bkpf BY bukrs belnr gjahr.
    79. ENDIF.
    80. SELECT * FROM skb1 INTO TABLE it_skb1 "DB020211
    81. WHERE bukrs IN s_bukrs. "DB020211
    82. *
    83. * describe table it_skb1 lines l_lines_1. "DB020211
    84. * write:/ 'Number of gl accounts in company codes','is', l_lines_1.
    85. *C--Loop on BSEG and get values from SKB1 to update BSEG
    86. LOOP AT it_bseg.
    87. AT NEW bukrs.
    88. count = 0.
    89. NEW-PAGE.
    90. WRITE:/'Lines items to be updated in BSEG in company code',
    91. it_bseg-bukrs, ':'.
    92. SKIP 1.
    93. FORMAT COLOR 1 ON.
    94. WRITE:/(6) 'BUKRS',
    95. (10) 'BELNR',
    96. (5) 'Year',
    97. (5) 'BUZEI',
    98. (10) 'Account',
    99. (11) 'SBK1-XLGCLR',
    100. (20) 'COMMENT'.
    101. FORMAT COLOR OFF.
    102. ENDAT.
    103. * begin of DB020211: SKB1-check needs to be done for ALL accounts
    104. READ TABLE it_skb1 WITH
    105. KEY bukrs = it_bseg-bukrs
    106. saknr = it_bseg-hkont.
    107. *begin of SKJ040912 : XLGCLR should be set based on the value in SKB1
    108. IF sy-subrc = 0.
    109. letter = it_skb1-xlgclr.
    110. *end of SKJ040912
    111. * IF letter = '/'.
    112. * DB140111: change SKB1-XLGCLR in DB
    113. * WRITE:/ 'Please implement the note 1323960 immediately' COLOR 6.
    114. * EXIT.
    115. * IF update = 'X'.
    116. * CLEAR it_skb1-xlgclr.
    117. * UPDATE skb1
    118. * SET xlgclr = it_skb1-xlgclr
    119. * WHERE bukrs = it_skb1-bukrs
    120. * AND saknr = it_skb1-saknr.
    121. * ENDIF.
    122. * end of DB140111
    123. * ENDIF.
    124. * end of DB020211
    125. WRITE:/(6) it_bseg-bukrs,
    126. (10) it_bseg-belnr,
    127. (5) it_bseg-gjahr,
    128. (5) it_bseg-buzei,
    129. (10) it_skb1-saknr,
    130. (11) letter.
    131. IF update = 'X'.
    132. UPDATE bseg SET: xlgclr = letter
    133. WHERE belnr = it_bseg-belnr
    134. AND bukrs = it_bseg-bukrs
    135. AND gjahr = it_bseg-gjahr
    136. AND buzei = it_bseg-buzei.
    137. IF sy-subrc = 0.
    138. PERFORM insert_index USING it_bseg.
    139. ENDIF.
    140. ENDIF.
    141. count = count + 1.
    142. * begin of SKJ040912
    143. ENDIF.
    144. * end of SKJ040912
    145. AT END OF bukrs.
    146. SKIP 1.
    147. IF update = 'X'.
    148. WRITE:/ 'The number of lines updated in BSEG are:',
    149. count COLOR 3.
    150. ELSE.
    151. WRITE:/ 'The number of lines that will',
    152. 'be updated in BSEG are:', count COLOR 3.
    153. ENDIF.
    154. ENDAT.
    155. ENDLOOP.
    156. ELSE. "SKJ020910
    157. WRITE:/ 'No error documents found and no corrections',
    158. 'required for the given selection criteria'.
    159. "SKJ020910
    160. ENDIF. "SKJ020910
    161. *&---------------------------------------------------------------------*
    162. *& Form INSERT_INDEX
    163. *&---------------------------------------------------------------------*
    164. * To insert the secondary index table entries
    165. *----------------------------------------------------------------------*
    166. * --> LS_BSEG BSEG processing BSEG table entry
    167. *----------------------------------------------------------------------*
    168. FORM insert_index USING ls_bseg TYPE bseg.
    169. DATA: ls_bsis TYPE bsis.
    170. DATA: ls_bsis_check TYPE bsis. "DB160610
    171. CLEAR:it_bkpf.
    172. READ TABLE it_bkpf WITH KEY
    173. bukrs = ls_bseg-bukrs
    174. belnr = ls_bseg-belnr
    175. gjahr = ls_bseg-gjahr BINARY SEARCH.
    176. IF sy-subrc = 0.
    177. CASE ls_bseg-koart.
    178. WHEN 'K' OR 'D'.
    179. IF ls_bseg-augbl EQ space.
    180. *C--Insert corresponding recon account
    181. CHECK ( ls_bseg-xlgclr EQ ' ') .
    182. MOVE-CORRESPONDING it_bkpf TO ls_bsis.
    183. MOVE-CORRESPONDING ls_bseg TO ls_bsis.
    184. ls_bsis-zuonr = ls_bseg-hzuon.
    185. *begin of SKJ040912 : updation of missing fields
    186. ls_bsis-fkber = ls_bseg-fkber_long.
    187. CLEAR ls_bsis-xopvw.
    188. *end of SKJ040912
    189. INSERT bsis FROM ls_bsis.
    190. IF sy-subrc EQ 0.
    191. WRITE: 'BSIS inserted' COLOR 5.
    192. ENDIF.
    193. ELSE.
    194. *C--Insert corresponding recon account
    195. CHECK ls_bseg-xhres EQ 'X'.
    196. MOVE-CORRESPONDING it_bkpf TO ls_bsis.
    197. MOVE-CORRESPONDING ls_bseg TO ls_bsis.
    198. ls_bsis-zuonr = ls_bseg-hzuon.
    199. *begin of SKJ040912 : updation of missing fields
    200. ls_bsis-fkber = ls_bseg-fkber_long.
    201. CLEAR ls_bsis-xopvw.
    202. *end of SKJ040912
    203. INSERT bsas FROM ls_bsis.
    204. IF sy-subrc EQ 0.
    205. WRITE: 'BSAS inserted' COLOR 5.
    206. ENDIF.
    207. *Check for existing BSIS if BSEG is cleared "DB160610
    208. SELECT SINGLE * FROM bsis INTO ls_bsis_check "DB160610
    209. WHERE bukrs EQ ls_bsis-bukrs AND "DB160610
    210. hkont EQ ls_bsis-hkont AND "DB160610
    211. gjahr EQ ls_bsis-gjahr AND "DB160610
    212. belnr EQ ls_bsis-belnr AND "DB160610
    213. buzei EQ ls_bsis-buzei. "DB160610
    214. *Delete BSIS "DB160610
    215. IF sy-subrc = 0. "DB160610
    216. DELETE bsis FROM ls_bsis_check. "DB160610
    217. IF sy-subrc EQ 0. "DB160610
    218. WRITE: 'DEL BSIS' COLOR 5. "DB160610
    219. ENDIF. "DB160610
    220. ENDIF. "DB160610
    221. ENDIF.
    222. WHEN 'S'.
    223. CHECK ls_bseg-xkres EQ 'X'.
    224. IF ls_bseg-augbl EQ space.
    225. MOVE-CORRESPONDING it_bkpf TO ls_bsis.
    226. MOVE-CORRESPONDING ls_bseg TO ls_bsis.
    227. *begin of SKJ040912 : updation of missing fields
    228. ls_bsis-fkber = ls_bseg-fkber_long.
    229. *end of SKJ040912
    230. INSERT bsis FROM ls_bsis.
    231. IF sy-subrc EQ 0.
    232. WRITE: 'BSIS inserted' COLOR 5.
    233. ENDIF.
    234. ELSE.
    235. MOVE-CORRESPONDING it_bkpf TO ls_bsis.
    236. MOVE-CORRESPONDING ls_bseg TO ls_bsis.
    237. *begin of SKJ040912 : updation of missing fields
    238. ls_bsis-fkber = ls_bseg-fkber_long.
    239. *end of SKJ040912
    240. INSERT bsas FROM ls_bsis.
    241. IF sy-subrc EQ 0.
    242. WRITE: 'BSAS inserted' COLOR 5.
    243. ENDIF.
    244. *Check for existing BSIS if BSEG is cleared "DB160610
    245. SELECT SINGLE * FROM bsis INTO ls_bsis_check "DB160610
    246. WHERE bukrs EQ ls_bsis-bukrs AND "DB160610
    247. hkont EQ ls_bsis-hkont AND "DB160610
    248. gjahr EQ ls_bsis-gjahr AND "DB160610
    249. belnr EQ ls_bsis-belnr AND "DB160610
    250. buzei EQ ls_bsis-buzei. "DB160610
    251. *Delete BSIS "DB160610
    252. IF sy-subrc = 0. "DB160610
    253. DELETE bsis FROM ls_bsis_check. "DB160610
    254. IF sy-subrc EQ 0. "DB160610
    255. WRITE: 'DEL BSIS' COLOR 5. "DB160610
    256. ENDIF. "DB160610
    257. ENDIF. "DB160610
    258. ENDIF.
    259. * WHEN 'M' OR 'A'.
    260. WHEN 'M'. "SKJ220910
    261. CHECK ls_bseg-xkres EQ 'X'.
    262. MOVE-CORRESPONDING it_bkpf TO ls_bsis.
    263. MOVE-CORRESPONDING ls_bseg TO ls_bsis.
    264. *begin of SKJ040912 : updation of missing fields
    265. ls_bsis-fkber = ls_bseg-fkber_long.
    266. *end of SKJ040912
    267. INSERT bsis FROM ls_bsis.
    268. IF sy-subrc EQ 0.
    269. WRITE: 'BSIS inserted' COLOR 5.
    270. ENDIF.
    271. WHEN 'A'. "SKJ220910
    272. CHECK ls_bseg-xhres EQ 'X'. "SKJ220910
    273. MOVE-CORRESPONDING it_bkpf TO ls_bsis. "SKJ220910
    274. MOVE-CORRESPONDING ls_bseg TO ls_bsis. "SKJ220910
    275. ls_bsis-zuonr = ls_bseg-hzuon.
    276. *begin of SKJ040912 : updation of missing fields
    277. ls_bsis-fkber = ls_bseg-fkber_long.
    278. *end of SKJ040912
    279. INSERT bsis FROM ls_bsis. "SKJ220910
    280. IF sy-subrc EQ 0. "SKJ220910
    281. WRITE: 'BSIS inserted' COLOR 5. "SKJ220910
    282. ENDIF. "SKJ220910
    283. WHEN OTHERS.
    284. ENDCASE.
    285. ENDIF. " IF SY-SUBRC = 0.
    286. ENDFORM. " INSERT_INDEX
    287. *&---------------------------------------------------------------------*
    288. *& Form UPDATE_SKB1
    289. *&---------------------------------------------------------------------*
    290. FORM update_skb1 .
    291. DATA: lt_skb1 TYPE TABLE OF skb1 WITH HEADER LINE.
    292. REFRESH lt_skb1.
    293. SELECT * FROM skb1 INTO TABLE lt_skb1
    294. WHERE bukrs IN s_bukrs
    295. AND xlgclr = '/'.
    296. CHECK sy-subrc = 0.
    297. SKIP 2.
    298. WRITE:/ 'Affected GL account master entries to be changed:'.
    299. SKIP.
    300. FORMAT COLOR 1.
    301. WRITE:/(5) 'BUKRS',
    302. (10) 'SAKNR',
    303. (6) 'XLGCLR',
    304. (20) 'COMMENT'.
    305. FORMAT COLOR OFF.
    306. LOOP AT lt_skb1.
    307. WRITE:/(5) lt_skb1-bukrs,
    308. (10) lt_skb1-saknr,
    309. (6) lt_skb1-xlgclr.
    310. IF update = 'X'.
    311. CLEAR lt_skb1-xlgclr.
    312. UPDATE skb1
    313. SET xlgclr = lt_skb1-xlgclr
    314. WHERE bukrs = lt_skb1-bukrs
    315. AND saknr = lt_skb1-saknr.
    316. IF sy-subrc = 0.
    317. WRITE: 'updated' COLOR 5.
    318. ENDIF.
    319. ENDIF.
    320. ENDLOOP.
    321. SKIP.
    322. NEW-LINE.
    323. ULINE (80).
    324. SKIP 2.
    325. ENDFORM. " UPDATE_SKB1

  • 相关阅读:
    NET CORE Configuraion 使用详解
    PowerBI真经连续剧
    ES整合SpringBoot
    Python 中的迭代器(iter、next)与生成器(yield)解析
    cocos入门7:cocos creator 中的ui系统
    Redis存储结构之zskiplist
    封装、继承、多态的概念
    运维常用概念
    DVWA-JavaScript Attacks
    Git使用总结
  • 原文地址:https://blog.csdn.net/IamRunjiang/article/details/127768481