‎2013 Jun 06 2:29 PM
Hello Expert,
I am facing one issue in Upgrade program. We have copied function group "SO04" to Z Functin group. In side our Function group we have 5 Function modules. During activating custom function group it is showing Syntax error as REC_TAB is not declared as DATA. But when I check standard function group and when i click on REC_TAB it navigate me to function module "SO_DYNP_OBJECT_SEND" . In our case we have a copy of this function module "ZSO_DYNP_OBJECT_SEND" and when i click on REC_TAB it is asking me to declare .and this error is coming from subroutine "address_possible_number_show" and this Subroutine is called from module "MODULE D0100_OKCODE" of screen 1000. and "Call screen 1000" statement is there in Function module "ZSO_DYNP_OBJECT_SEND".
In Z function Group program is not able to access the variables of "ZSO_DYNP_OBJECT_SEND" in screen 1000 but in standard it is able to access. Please suggest me how to fix this issue.
Thanks,
Susant
‎2013 Jun 06 3:32 PM
This really shows how dangerous it is to copy SAP standard. It really should not be done except as a very last resort, and even then very carefully documented, with minimal possible changes. As soon as SAP change something, you have to redevelop.
Somehow the idea has crept in that taking a copy of SAP standard code and modifying it for your own purposes is safe and sensible. It is neither safe, nor sensible. DON'T DO IT.
It is MORE dangerous to make a copy than it is to modify the original. It is of the same level of risk as directly modifying SAP tables.
Effectively, you've got a syntax error in your own program. It's nothing to do with SAP.
Lecture over:
What you must do is work out the difference between your Z modules and the OLD standard. Then systematically apply the same changes to a copy of the new modules.
A far better approach would be to determine what changes to the standard functionality were actually made - maybe there's a specification somewhere - and why they were made. What is the required business functionality. Throw away your horrible cloned code, and work out how to enhance the SAP original, using the enhancement framework to make it do what you need it to do.
‎2013 Jun 06 3:32 PM
This really shows how dangerous it is to copy SAP standard. It really should not be done except as a very last resort, and even then very carefully documented, with minimal possible changes. As soon as SAP change something, you have to redevelop.
Somehow the idea has crept in that taking a copy of SAP standard code and modifying it for your own purposes is safe and sensible. It is neither safe, nor sensible. DON'T DO IT.
It is MORE dangerous to make a copy than it is to modify the original. It is of the same level of risk as directly modifying SAP tables.
Effectively, you've got a syntax error in your own program. It's nothing to do with SAP.
Lecture over:
What you must do is work out the difference between your Z modules and the OLD standard. Then systematically apply the same changes to a copy of the new modules.
A far better approach would be to determine what changes to the standard functionality were actually made - maybe there's a specification somewhere - and why they were made. What is the required business functionality. Throw away your horrible cloned code, and work out how to enhance the SAP original, using the enhancement framework to make it do what you need it to do.
‎2013 Jun 06 3:58 PM
Hi Susanta,
Check each and every fm and declarations and screens.There is no other option.
Regards,
Madhu.
‎2013 Jun 06 4:12 PM
did you checked which include is this variable declared and whether you copied that include in you FG or not, did you created the screen 1000 for your custom FM ...
I guess as Matthews told you need to have a careful look on the standard FM and Z- FM and apply the changes to correct this....