SAP: ALV grid Field Catalog [ref_table] SAPLSKBH & [source code of program " "] error
I’ve came across a strange error that occurred while building an SAP ALV grid. After calling the create_dynamic_table method of the CL_ALV_TABLE_CREATE object the program throws a hard error complaining about a blank program call in SAPLSKBH .
After spending some time debugging I’ve identified that based on custom reference table parameters the source 4.6C SAP code attempts to generate a dynamic program using a GENERATE REPORT prog call. When the attempt fails instead of returning a corresponding error message the algorithm throws an error about a blank program pointer that failed to be created.
Here’s the problematic code – while debugging examining the l_message parameter will identify the true cause of the failure.
catch system-exceptions generate_subpool_dir_full = 9.
generate subroutine pool lt_source name l_name
message l_message line l_line word l_word.
endcatch.
case sy-subrc.
when 0.
when 9.
raise generate_subpool_dir_full.
when others.
message x000(0k) with l_message l_line l_word.
endcase.