Syntax Error after creating enhancements for subroutine

Problem:
Creating enhancement sections gives a syntax error when creating enhancement options and implementations for a subroutine and then ceating enhancement options and implementations for the call to that same subroutine.
<p>
Syntax Error:
"Different number of parameters in FORM and PERFORM (routine: SET_LAYOUT, number of formal parameters: 2, number of actual parameters: 1)
</p>
<p>
Here's the following scenario:
</p>
<p>
A subroutine is defined in a program.
The subroutine is called within the same program.
</p>
<p>
I then executed these steps:
<br>     1. Defined an enhancement section around the subroutine definition
<br>     2. Defined an enhancement section around the subroutine call.
<br>     3. Implemented the enhancement section around the subroutine definition and add an additional parameter.
</p>
<p>
     Currently, this gives a syntax error as expected, since the call to the subroutine needs 1 more parameter.
</p>
<p>
     4. Implemented the enhancement section for the subroutine call.  I change the call in the implementation so it passes the new parameter.
</p>
<p>
A syntax check to this gives an error.  The syntax checker is not only checking the new implementation, but also the original subroutine that should have been overwritten.
</p>
<p>
The enhancement sections use the same enhancement spot, and the enhancement implementations use the same implementation.
</p>
<p>
I tried various combinations of using different enhancement spots and/or implementations, but all give the same syntax error.  I tried separating the subroutine in a different include and  retried my testing, but it still gave the same syntax error.
</p>
<p>
Here's the sample code I first created to try troubleshooting the problem:
</p>
<p>
<pre>
ENHANCEMENT-SECTION ZEP_Z_MICHAEL_02 SPOTS ZES_Z_MICHAEL .
     PERFORM set_layout
          CHANGING
          wa_layout.
END-ENHANCEMENT-SECTION.
$$-Start: ZEP_Z_MICHAEL_02----
$$
ENHANCEMENT 2  ZEI_TEST_SECTIONS.
     "inactive version
     PERFORM set_layout
     using 'X'
          CHANGING
          wa_layout.
ENDENHANCEMENT.
$$-End:   ZEP_Z_MICHAEL_02----
$$
ENHANCEMENT-SECTION ZEP_Z_MICHAEL_01 SPOTS ZES_Z_MICHAEL STATIC .
FORM set_layout
CHANGING p_wa_layout TYPE slis_layout_alv.
p_wa_layout-zebra = 'X'.
wa_layout-no_colhead = 'X'..
p_wa_layout-colwidth_optimize ='X'.
wa_layout-window_titlebar = 'Woot'.
ENDFORM. "set_layout
END-ENHANCEMENT-SECTION.
$$-Start: ZEP_Z_MICHAEL_01----
$$
ENHANCEMENT 1  ZEI_TEST_SECTIONS.
     "inactive version
FORM set_layout
using p_test type boolean
CHANGING p_wa_layout TYPE slis_layout_alv.
p_wa_layout-zebra = 'X'.
wa_layout-no_colhead = 'X'..
p_wa_layout-colwidth_optimize ='X'.
wa_layout-window_titlebar = 'Woot'.
ENDFORM. "set_layout
ENDENHANCEMENT.
$$-End:   ZEP_Z_MICHAEL_01----
$$
</pre>
</p>
<p>
Please let me know if you think I am doing something wrong. 
</p>
<p>
Thanks, <br>
Mike
</p>
Edited by: Michael Herman on Mar 8, 2010 8:11 PM

Yes, Sandra.  That is what did and it worked with no syntax errors!
I'm not sure if this is getting off topic or not, but the SAP documentation(taken from the SAP help after pressing F1 on the keyword static in ERP6) seems misleading:
"The STATIC addition is intended for the enhancement of data declarations, while the statement ENHANCEMENT-POINT without the STATIC addition is designed for the enhancement of executable coding."
I would think the enhancement section ZEP_Z_MICHAEL_02 would fall under the category of executable code, while the enhancement section ZEP_Z_MICHAEL_01 would fall under the category of declarative code.
Unfortunately, all the SAP enhancement sections I come accross are dynamic.  The SAP help explains the reasoning for this:
"In contrast to the statement ENHANCEMENT-POINT, the addition STATIC of the statement ENHANCEMENT-SECTION can only be used with maximum caution for changes of data declarations, because a replacement and no completion is carried out. Especially application development within SAP should not use the addition STATIC at all with ENHANCEMENT-SECTION as the change will be active in the entire customer system. "
I do not know what the word "completion" means in the previous quote, so I can't determine why it would matter.  Regardless, if a developer wanted to change a standard subroutine declaration, they would also have to mod an enhancement section to change it to static.  This seems to defeat the purpose of using enhancements, but maybe this scenario is not what enhancements were intended for.

Similar Messages

  • DATAMOVER: Error: Syntax error in where clause for PSOPRDEFN

    SET LOG C:\PSUSER_HRM.log;
    SET input F:\psoprdefn.dat;
    IMPORT psoprdefn where OPRId = 'PS';
    when i execute this command after importing .dat file from my database i get error:
    Error: Syntax error in where clause for PSOPRDEFN
    any suggestions pls help....
    Thanks
    aravind
    Edited by: 967641 on Nov 20, 2012 11:39 AM
    Edited by: 967641 on Nov 20, 2012 11:40 AM

    That is correct.
    Datamover tries to insert data in PSOPRDEFN and rows exist with these keys.
    To avoid this you can add the following statement in your script:
    SET UPDATE_DUPS;
    This will update the values other than the keys if a row already exists in the database with the keys in the dat file.
    I can advice you to buy the new book of Jim Marion, PeopleSoft PeopleTools Data Management and Upgrade Handbook
    http://www.amazon.com/PeopleSoft-PeopleTools-Management-Upgrade-Handbook/dp/0071787925/ref=sr_1_1?ie=UTF8&qid=1353575734&sr=8-1&keywords=jim+j+marion
    It has an entire chapter on how to use datamover.
    Hakan

  • Error when creating interval for number range object

    Hi,
           I am trying to transport my BW stuff from QA to Production and I am getting the following error in the transport logs. The info objects are inactive in RSA1.
    Start of the after-import method RS_IOBJ_AFTER_IMPORT for object type(s) IOBJ (Activation Mode)
    Characteristic YRESD: Error when creating interval for number range object BIM0000396
    Can some body advise me what's wrong? Is something need to be maintained in number ranges?
    Also when I am checking the objects in RSA1, I am getting a message saying "source system WD110 does not exist", WD110 is our dev system. How can I change the source system after transport?
    Thanks.
    Edited by: Raj G on Mar 20, 2008 11:38 AM

    Also when I am checking the objects in RSA1, I am getting a message saying "source system WD110 does not exist", WD110 is our dev system. How can I change the source system after transport?
    Which system are you checking this?
    refer: Re: Transport Source Systems from DEV to Testing for step to map the source systems for transport

  • Error while creating user for a  domain

    i am developing a web-application which is hosted on tomcat server.
    it is creating domains and users at another remote domain server.
    localy it is working fine..
    but when i test it online..
    the problem is,
    sometimes it works fine ,the domains are being creted at remote server..
    but sometimes it delivers error that domain at remote server can not be created.
    Is it due to fact that theat some errornous code in the buffer of application have older versions of applications causing the error ?
    Code::
    if(strPlanId.equalsIgnoreCase("3")) {
                    //Create domain account  for planid=3 plantype=Cp
                    blnOK=false;
    passwordGS comes from database
    strUrl="http://sosync.net/sosync/admin?pwd="+passwordGS+"&action=user_createdomain&domain="+strSubDomain+".gosync.net&adminpassword=aspire3002&diskquota="+longdk;  
                    u=new URL(strUrl);
                    uc=(HttpURLConnection)u.openConnection();
                    code=uc.getResponseCode();
                    if(code == 200) {
                        rUrl="/TransCompleteServlet";
                        blnOK=true;
                        uc.disconnect();
                    } else {
                        rUrl="/GSView.jsp?page=GSError.jsp?REQ=Unknown";
                    if(blnOK) {
                        String strUrlUser="http://gosyncdesk.net/gosync/admin?pwd="+passwordGS+"&action=user_createuser&username="+strEmailId+"&password="+strPassword+"&domain="+strSubDomain+".gosync.net&communityname=Default&firstname="+user.getFirstName()+"&lastname="+user.getLastName();
                       URL u1=new URL(strUrlUser);
                    HttpURLConnection   uc1=(HttpURLConnection)u1.openConnection();
                        code=uc1.getResponseCode();
                        response1=uc1.getResponseMessage();
                        if(code == 200) {
                            rUrl="/TransCompleteServlet";
                            String strUrlTZ="http://gosyncdesk.net/gosync/admin?pwd="+passwordGS+"&action=user_setuserpreference&username="+strEmailId+"&domain="+strSubDomain+".gosync.net&name=web_timezone&value='"+timeZone+"'";
                            u=new URL(strUrlTZ);
                            uc=(HttpURLConnection)u.openConnection();
                            code=uc.getResponseCode();
                              if(code != 200) {
                               rUrl="/GSView.jsp?page=GSError.jsp?REQ=Unknown";
                        } else {
                            rUrl="/GSView.jsp?page=GSError.jsp?REQ=Unknown";
                            mailUtil.sendMail_admin("Error In Creating  User for the Domain","While creating domain for "+user.getEmail()+" user could not be created due to following reason: <BR> "+response1+"<br>GoSync UserName:"+strEmailId+"<br>GoSync Password:"+strPassword+"<br>GoSync Domain :"+strSubDomain+".gosync.net and URl String was :"+strUrlUser+"");
                }

    if the problem is caching try setting the useChasses to false
    uc.setUseCaches(false);

  • Syntax error when creating a user-defined table type in SQL Server 2012

    Why am I getting a syntax error when creating a user-defined table type in SQL Server 2014?
    CREATE TYPE ReportsTableType AS TABLE 
    ( reportId INT
    , questionId INT
    , questionOrder INT );
    Results:
    Msg 156, Level 15, State 1, Line 1
    Incorrect syntax near the keyword 'AS'.

    Hope these posts could help, 
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/37a45a9a-ed8c-4655-be93-f6e6d5ef44be/getting-incorrect-syntax-while-creating-a-table-type-in-sql-server-2008-r2?forum=transactsql
    Regards, Dineshkumar,
    Please Mark as Answer if my post answers your question and
    Vote as Helpful if it helps you

  • POV-After creating Tcode for a table SM30 I want F4 Help here

    Hi All,
    After creating Tcode for a table, When I am trying to give table entries thro' this Tcode, I want F4 help for those fields. Apart form assigning "Fixed values" in Domain level how can I achieve this.
    Points Assured.
    Regards,
    Suresh

    Hi,
          You need to create search helps based on this table for each filed or one for all the fields with proper import and export paramters. Or else you can give check table entries for each of the table fields for which you need the F4 help. Check table us assigned to a field using the Foriegn key assignment.
    Best Regards,
    Sesh

  • Error when creating files for transport request SAPK-700BGINPLMWUI

    Hello experts,
    We're upgrading our 46c System to ERP 6.0 EHP4.
    In Phase  EHP_INCLUSION we get the following error Message: Disassembling package queue failed, rc = "2", reason = "Error when creating files for transport request SAPK-700BGINPLMWUI"
    We've already checked the SAINT version; Upgrade Fix, SAPCAR version. We've checked our TMS as well and everything seems  O.K.
    Any help would be really appreciated!!!
    Complete Error message:
    EhP component PLMWUI, 700                                                                               
    Looking for SAINT package for 'PLMWUI' ...                                                                               
    R3upReadNewPackages:                                                                               
    patchType='U', langVect='DEC'                                                                               
    RFC Login to: System="X05", Nr="00", GwHost="sxt ", GwService="sapgw00"                                                 
    RFC Login succeeded                                                                               
    Calling function module "spda_read_new_packages" by RFC                                                                     
      ismovesVersion='0'                                                                               
    R3upReadNewPackages: exit: rc=0                                                                               
    ... No matching package found.                                                                               
    R3upReadNewPackages:                                                                               
    patchType='I', langVect='DEC'                                                                               
    RFC Login to: System="X05", Nr="00", GwHost="sxt ", GwService="sapgw00"                                                 
    RFC Login succeeded                                                                               
    Calling function module "spda_read_new_packages" by RFC                                                                     
      ismovesVersion='0'                                                                               
    R3upReadNewPackages: exit: rc=0                                                                               
    Found: name = 'PLMWUI', release = '700', package = 'SAPK-700BGINPLMWUI', type = 'AOI'                                  
    ... Matching package found: 'PLMWUI','700','SAPK-700BGINPLMWUI'                                                             
    (trc) R3upPatchDisassembleQueue: 1 package queue entries                                                                    
    (trc) R3upPatchDisassembleQueue: force=YES                                                                               
    (trc) R3upPatchDisassembleQueue: 1 packages will be disassembled                                                            
    Starting disassembling package queue                                                                               
    Date & Time: 20100319133139                                                                               
    Starting RFC Login to: System = "X05", GwHost = "sxt ", GwService = "sapgw00"                                           
    RFC Login to: System="X05", Nr="00", GwHost="sxt ", GwService="sapgw00"                                                 
    RFC Login succeeded                                                                               
    Calling function module "SPDA_DISASSEMBLE_QUEUE" by RFC                                                                     
    Input table IT_PATQ:                                                                               
    "SAPK-700BGINPLMWUI","000","AOI","PLMWUI","700","SAP PLM Web UI","00"                                                       
    Call of function module "SPDA_DISASSEMBLE_QUEUE" by RFC succeeded                                                           
    Logging off from SAP system                                                                               
    Date & Time: 20100319133139                                                                               
    Disassembling package queue failed, rc = "2", reason = "Error when creating files for transport request SAPK-700BGINPLMWUI"

    Hello Anthes,
    Please Check the things in following sequence :
    1.Use latest SAPehpi, R3trans and tp versions.
    2. users/group authorization issue and/or ownersip limitations (set 777) .Reboot the server to make sure, that the authorisations are updated and there is no lock on a file in the EHPI dir.Repeat the phase.
    Folders where permissions should be 777 are Upgrade directory, Data Directory, Cofile directory and .../EPS/in.
    3. Source file corruption can be ruled out by execution
    R3trans -l /usr/sap/<SID>/..../abap/data/R-700BGINPLMWUI.SAP (The data file corresponding to the Package which is giving error). Check if this ends fine.
    Note 2050
    4. Confirm that your transport tool is 'healthy' by testing it in STMS. In SPAM in client 000 use the function Disassemble package and enter the package <Package name>.
    5. Try to update the kernel if it not helps.
    Best Regards
    Niraj

  • How to create enhancement for VF04 for program SDBILLDL

    Hi,
        How to create enhancement for VF04 for program SDBILLDL
        I need to create custom enhancement for the Tcode VF04.
    Requirement:
    The output displayed is to be filtered based on the input given in the selection screen filed - Sort Criterion in the transaction VF04. The filter is for displaying Sales orders if contract number is given as input and Deliveries if shipment number is given as input.
    Regards,
    Kishore.

    Hi Kishore,
    Check this User exit EXIT_SAPLV60A_002.
    Reward Points if this helps,
    Satish

  • SYntax error while creating a formula for %

    Hi All,
    I have to calculate Growth percentage and creating formula.  But its giving me a syntax error.
    I am writing like this:-
    (Month to Date Sales-MTD PRior Year Sales)/ MTD PRior Year Sales*100 %
    Can anyone please tell me where I am making a mistake.
    Regards

    Syntex for Percentage Deviation (%)
    Plan Sales % Actual Sales (this will give the percentage deviation between Planned Sales and Actual Sales)
    this is identical to formula
    100 * (Planned Sales - Actual Sales) / (Actual Sales)
    please check the space in your foumula
    Dev

  • Syntax error while creating tax codes for sales n purchases

    Hi all,
    While creating the tax codes for sales and purchases, i got the below error:
    Report RB13A003 has a syntax error.
    What should be done?
    Thank you

    Hi,
    I believe, it's RV13A003 report and not RB13A003... What is the exact error message (or is it a dump)?
    Regards,
    Eli

  • Syntax error while creating a standard order

    Hi All,
    I created a projet in CMOD and than added the enhancement  V45A0002.The components shown as EXIT_SAPMV45A_002(Predefined sold to party when making the standard order),i double click on the exit and entered into the function module.After that i double clicked on the include ZXVVZU04 and entered in and wrote E_KUNNR=100171
    While activating i got error msg 'The last statement is not complete (period missing)." & i have saved inspite the error .After that i tried to create a order and program terminated error came after entering sold to party no. in sales order
    so now i have deactivated the project which i created in CMOD & deleted it aswell,than also i am getting the syntax error while making the order thru VA01.I want to come out of this please.
    I would be great ful if somebody helps me *** out of this syntax error.
    Thanks
    Rishi

    Hi Rishi
    As you are getting message that "The last statement is not complete (period missing)", check in your assigned project in CMOD the last statement , what is the last statement maintained in that project
    Secondly also check the closing period and the current period. as it is giving in the message that "The last statement is not complete (period missing)".So check the  current period and check the period maintained in the CMOD
    It would be better if you take ABAP'ers help . So  post in ABAP forum
    Regards
    Srinath

  • Error While creating Delivery For  AAK

    Hi experts ,
    I am creating Delivery for AAK in sap but i m getting error as
    ERROR:::--
    A delivery of type Installation/Upgrade already
    exists for component KAARTECH (version 400_700)
    We have already created the delivery but we couldn use the old one. so i m creating new delivery but it throws an error like .
    Kindly help me proceed after this..
    I just want to create a new delivery and proceed in this AAK.in old delivery i am facing few errors so i m creating new delivery , but its unable to create .
    Regards,
    Ajay.
    Edited by: ajayshyam on Jan 27, 2011 8:54 AM

    Hi,
    Do you have any steps to follow AAK.
    We have lots of TOC's delivered to different client.
    Now i have to install AAK and start delivering the files through AAK.
    I dont know how to start. I registered a TOC. Next what ?
    Can you share some information on how to start working with AAK.
    Regards
    Kuna

  • Getting a syntax error while creating the simple OData service.

    Hi Folks,
    That is what I typed in a in .xsodata file but it is giving me a syntax error..any idea why this can be?
    Thank you for your help.
    service namespace "sap.hana.test.service"
    { "SYS" , "AFL_AREAS_" as "TEST";

    Hi,
    I tried creating the same. I was able to activate all three files i.e. .xsapp,.xsaccess,*.xsodata. The three file contents are mentioned below. The data might not be displayed in the browser due to privileges issue as it is SYS table.
    .xsapp contains
    .xsaccess contains
      "exposed" : true
    *.xsodata contains
    service
    "SYS"."AFL_AREAS_" as "mytable";

  • Error after creating a struts portlet in weblogic 8.1 SP 5

    Hi,
    I am using weblogic 8.1 SP 5, to develop an struts-portlet.
    I tested my struts application and it is working fine.
    I have one action i.e firstAction and 2 jsp's in my struts application.
    The action just forwards to the one jsp through struts-config.
    However, when i try to start the server after creating the struts-portlet i get the following error:
    The source of this error is com.bea.netuix.nf.UIControlException: For portlet [portlet_1_1], could not retrieve a result for the given action [firstAction] in the given PageFlow: [null]. at com.bea.netuix.servlets.controls.content.NetuiContent.preRender(NetuiContent.java:365) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:443) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:718) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender
    Please Help !!!

    Hi,
    Even I am facing the same issue could any body help me out to solve this issue.

  • EEWB - Syntax error while generating Enhancement Project component

    Hi,
    I'm using SAP CRM 7.0. I used EEWB (Extended Enhancement Workbench) to create a project and add 3 fields to Business Partner (BUPA). On generation I get an error 'Syntax error in Function Group SAPLZZG00BUPA: The field '"GV_ZZATTR1_PAI_ERROR" is unknown.
    There are these fields ZZATTR1 .... ZZATTR9 created by someone. Do not know in which enhancement they are in. But somehow the program generated by SAP - APLZZG00BUPA is giving this error. Is there a way to fix it?
    Any help or guidance will be appreciated.
    Regards,

    Hi Harshit,
    I check the details as mentioned by the thread. The structures are created properly.
    To give you more details:
    1. There is already one extension in the system created by someone - ADD NEW FIELDS - which created the structure with additional fields - ZBSTC0000000002.
    2. I did an extension - ADD NEW FIELDS which added another structure in CI_EEW_BUT000 and CI_EEW_BUT000_X - ZBSTC00009JACQV
    3. When I generate the project I get syntax error in SAPLZZG00BUPA - as the fields from prior structure do not exist in this program which is generated during the project generation.
    Regards,

Maybe you are looking for

  • Portal events are not getting loaded into the Analytics database tables

    Analytics database ASFACT tables (ASFACT_PAGEVIEWS,ASFACT_PORLETVIEW) are not getting populated with data. Possible diagnosis/workarounds tried: -Checked the analytics configuration in configuration manager, Enable Analytics Communication option chec

  • How do I set up a shared folder so all user accounts can view photos?

    How do I set up a shared drive for iPhotos for multiple users of my iMac?

  • How to open a word document

    hi all,   How i can open a word document containing data by clicking a text in a smart form. Thanks, Ranjith

  • Code Page Repository Service

    I installed Informatica on Linux Cent OS Successfully, but when I am trying to create repository service its giving error of code page incompatibility. My database code page is AL32UTF8. So what code page should i select for repository service,it sho

  • InDesign malfunction.

    I have had problems with InDesign for several months and the situation is not getting any better, in fact, it is getting worse. I was advised to do a clean install recently on my Macbook pro - which I did. Unfortunately, this action has not helped th