Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
Jigang_Zhang张吉刚
Active Contributor
MB51 had been enhanced a long time ago without any issues, and suddenly everyone got a dump caused by one SYNTAX_ERROR inside MB51's program RM07DOCS.


The reason why has syntax error is caused by one enhancement referring to one definition inside the program 'RM07DOCS_GENERATED'. This definition disappears completely because 'RM07DOCS_GENERATED' has been re-generated at the production system without any transport movement. And left one user name as the last change person for 'RM07DOCS_GENERATED'.

First, check related SAP notes as RM07DOCS_GENERATED is purely standard without any enhancement.

1, Notes 215435 - MB51: Procedure for regeneration



Reason and Prerequisites


Due to an error in the transport of the table MMIM_REP_CUST, the transaction was set to an incorrect status.

A program correction requires the existence of a field that was previously not a mandatory field.

Table MMIM_REP_CUST(Customizing f. Inventory Mgmt Reporting) is like one customized layout setting table for MM transactions used including MB51. But we don't have any changes in the past few years. Same for view V_MMIM_REP_CUST, no idea why some entry doesn't has a timestamp, no change log found even with check box of <Log Data Changes> at technical setting.


Also, mandatory setting changes for one field are not our case as well.

2, Question: How has this RM07DOCS_GENERATED been generated?


I got the answer from Notes: 830170 - MB51: Runtime error DBIF_RSQL_INVALID_RSQL with MARI.
   The RM07DOCS_GENERATED include report contains important data definitions and functions. There are often also program errors in this include. However, when you implement this note only the source code of the RM07DOCS report is corrected. You must generate the RM07DOCS_GENERATED include again after a correction. This was often forgotten in the customer system and resulted in subsequent problems.
The RM07DOCS report was changed in such a way that when you start Transaction MB51, the RM07DOCS_GENERATED include is automatically generated if the change date of the RM07DOCS report deviates from the change date of the RM07DOCS_GENERATED include. Therefore, you normally do not have to carry out any more manual steps after you have implemented the corrections in the RM07DOCS report and have transported this to the respective production system.
If the generation of the RM07DOCS_GENERATED include does not occur automatically, you can generate this using the ZRM07DOCS_GENERATED_EMERGENCY report in accordance with Note 215435.

Even with no clue about why the issue happened, have to make MB51 work properly first as user operation and business processing have been impacted.

3, Re-generate RM07DOCS_GENERATED


Report ZRM07DOCS_GENERATED_EMERGENCY is provided by Notes 215435.
This report generates the emergency source text for the include report RM07DOCS_GENERATED, which means that regeneration of the MB51 takes place automatically at the next start.

The report can only be started by users who have the system authorization for debugging.

After running ZRM07DOCS_GENERATED_EMERGENCY:

  1. The inside routine like 'DATA_SELECTION_NEW' will be blank after RM07DOCS_GENERATED been re-generated;

  2. The routine inside the RM07DOCS_GENERATED will be filled once MB51 has been run 1st time;

  3. But if any enhancement for MB51 relies on RM07DOCS_GENERATED it will lead to a dump once MB51 has been run, cause MB51 needs to pass a syntax check first before re-generation is done which blocks each other.

  4. So have to deactivate custom enhancements for MB51 if it has a dependence on RM07DOCS_GENERATED before running the re-generation report.

  5. The regeneration of the MB51 code will work properly, then another transport to bring customized enhancement back.

  6. It seems will refresh the MSEG table and remove the appended customized structure, so if QAS/PRD still have that appended structure need to add them back and remove it. Save those as transport moved to QAS/PRD to sync. Otherwise, the dump will be waiting for that.


At last, still don’t figure out the reason why this includes program RM07DOCS_GENERATED being re-generated at production, if it happens again we need to do the same manual re-create/re-generation again which is risky. Please let me know if any ideas about this, thanks in advance.

 

 

 
Labels in this area