Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Syntax Error in Function Group in Upgradation

Former Member
0 Likes
785

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

1 ACCEPTED SOLUTION
Read only

matt
Active Contributor
0 Likes
648

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.

3 REPLIES 3
Read only

matt
Active Contributor
0 Likes
649

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.

Read only

madhu_vadlamani
Active Contributor
0 Likes
648

Hi Susanta,

Check each and every fm and declarations and screens.There is no other option.

Regards,

Madhu.

Read only

former_member193464
Contributor
0 Likes
648

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....