Workflow : Using include CNTN01 in Method in 4.6C

Hi,
I am using the include <CNTN01> in BADI method in 4.6C release. But I get syntax error as <CNTN01> has data declarations using LIKE. And LIKE is not allowed in Method in release 4.6C.
I want to use Macros to set the container Variable to pass to FM SWW_WI_START. Kindly suggest me if there is any alternalte include to use the Macros.
Regards,

Hi,
I had the same problem and just defined a new macro inside the BADI method:
+DEFINE swc_set_element.
    call function 'SWC_ELEMENT_SET'
         exporting
              element   = &2
              field     = &3
         tables
              container = &1
         exceptions
              others    = 1.
  END-OF-DEFINITION.+
Regards,
André

Similar Messages

  • Example code for Trigering a workflow using WAPI from JAVA based tool

    Hi Experts,
    I am the newest guy in SAP workFlow and BAPI world. I need to trigger a workflow defined in WebFlow engine from a Java client. I know i can use JCo and to use WAPI to get workflow information but i am not sure how it works. Can you give me some example code to trigger one workflow defined in WebFlow using WAPI? If there is any alternative i am interested to know that as well.
    Thanks in advance.
    Regards,
    Riyadh

    Use Function Module SWE_EVENT_CReate top trigger event that is linked with a Workflow.
    <b>Please reward points if useful</b>
    INCLUDE <cntn01> .
      DATA:i_emp_details TYPE STANDARD TABLE OF p0001,  "Employee Details
           wa_request    TYPE p0001,                    "Workarea for Employee details
           v_country_grp TYPE molga,                    "Country SubGrouping
           v_object_key  TYPE sweinstcou-objkey.        "Key for the buisness object ZWOBUSTRIP
      CONSTANTS: c_bo_trip     TYPE swo_objtyp VALUE 'ZWOBUSTRIP',
                 c_event_trip  TYPE swo_event  VALUE 'TripCreate',
                 c_infy_type_1 TYPE infty      VALUE '0001'.
    Event Container declaration
      swc_container i_event_cont.
      swc_create_container i_event_cont.
    Reading the INFO TYPE 0001 to obtain the
    Employee details
      CALL FUNCTION 'HR_READ_INFOTYPE'
        EXPORTING
          pernr           = i_emp_number
          infty           = c_infy_type_1
          begda           = sy-datum
          endda           = sy-datum
        TABLES
          infty_tab       = i_emp_details
        EXCEPTIONS
          infty_not_found = 1
          OTHERS          = 2.
    SY-SUBRC check is not required as the error
    handelling will be done by WorkFlow rule
    resolution.
      CLEAR wa_request.
      READ TABLE i_emp_details INTO wa_request INDEX 1.
      IF sy-subrc = 0.
      Retrieving the Country SubGrouping for the employee
        SELECT SINGLE molga
          FROM t001p
          INTO v_country_grp
         WHERE werks = wa_request-werks
           AND btrtl = wa_request-persk.
      ENDIF.
    Sending the relevant data to event container
      swc_set_element i_event_cont 'EmpId'     i_emp_number.
      IF sy-subrc <> 0.
    No Processing needed.
      ENDIF.
      swc_set_element i_event_cont 'PersonnelArea'    wa_request-werks.
      IF sy-subrc <> 0.
    No Processing needed.
      ENDIF.
      swc_set_element i_event_cont 'CountryGrouping' v_country_grp.
      IF sy-subrc <> 0.
    No Processing needed.
      ENDIF.
      swc_set_element i_event_cont 'EmpSubGrp'       wa_request-persk.
      IF sy-subrc <> 0.
    No Processing needed.
      ENDIF.
      swc_set_element i_event_cont 'EmpTripId'       i_emp_trip.
      IF sy-subrc <> 0.
    No Processing needed.
      ENDIF.
    Raising the event to trigger the workflow
      v_object_key = i_emp_number.
      CALL FUNCTION 'SWE_EVENT_CREATE'
        EXPORTING
          objtype           = c_bo_trip
          objkey            = v_object_key
          event             = c_event_trip
        TABLES
          event_container   = i_event_cont
        EXCEPTIONS
          objtype_not_found = 1
          OTHERS            = 2.
      IF sy-subrc <> 0.
    No Processing needed.
      ENDIF.
      COMMIT WORK.
    ENDFUNCTION.
    Thanks
    Arghadip

  • Issue while starting a workflow using a form submission cq5

    Hi,
    I have followed the below mentioned tutorial and completed it.
    http://dev.day.com/docs/en/cq/current/workflows/create-models.html#par_reference
    Once done, I did try to start the workflow using a normal form submission, by giving workflow name in the "Start Workflow" box.
    Once clicked it will send the notification to my inbox, and when I double click, the form 1 will be displayed. Once submitted form two will be displayed.
    But when I submit the form 2, it thorws the below exception.
    But when I start the same workflow using the sidekick, It works perfectly fine. I am guessing that the {payload}.html is not getting set when the WF is initaited by a form submission.
    Could you please help with this. Thank you !
    Exception
    Not Found
    Cannot serve request to /content/usergenerated/mywebsite/en/products/product12/cq-gen1361441037192/1361448480595_ 27.html in org.apache.sling.servlets.get.DefaultGetServlet
    Request Progress:
          0 (2013-02-21 17:38:19) TIMER_START{Request Processing}
          0 (2013-02-21 17:38:19) COMMENT timer_end format is {<elapsed msec>,<timer name>} <optional message>
          0 (2013-02-21 17:38:19) LOG Method=GET, PathInfo=/content/usergenerated/mywebsite/en/products/product12/cq-gen1361441037192/13614 48480595_27.html
          0 (2013-02-21 17:38:19) TIMER_START{ResourceResolution}
          1 (2013-02-21 17:38:19) TIMER_END{1,ResourceResolution} URI=/content/usergenerated/mywebsite/en/products/product12/cq-gen1361441037192/1361448480 595_27.html resolves to Resource=JcrNodeResource, type=sling:Folder, superType=null, path=/content/usergenerated/mywebsite/en/products/product12/cq-gen1361441037192/136144848 0595_27
          1 (2013-02-21 17:38:19) LOG Resource Path Info: SlingRequestPathInfo: path='/content/usergenerated/mywebsite/en/products/product12/cq-gen1361441037192/13614484 80595_27', selectorString='null', extension='html', suffix='null'
          1 (2013-02-21 17:38:19) TIMER_START{ServletResolution}
          1 (2013-02-21 17:38:19) TIMER_START{resolveServlet(JcrNodeResource, type=sling:Folder, superType=null, path=/content/usergenerated/mywebsite/en/products/product12/cq-gen1361441037192/136144848 0595_27)}
          1 (2013-02-21 17:38:19) TIMER_END{0,resolveServlet(JcrNodeResource, type=sling:Folder, superType=null, path=/content/usergenerated/mywebsite/en/products/product12/cq-gen1361441037192/136144848 0595_27)} Using servlet org.apache.sling.servlets.get.DefaultGetServlet
          1 (2013-02-21 17:38:19) TIMER_END{0,ServletResolution} URI=/content/usergenerated/mywebsite/en/products/product12/cq-gen1361441037192/1361448480 595_27.html handled by Servlet=org.apache.sling.servlets.get.DefaultGetServlet
          1 (2013-02-21 17:38:19) LOG Applying Requestfilters
          1 (2013-02-21 17:38:19) LOG Calling filter: org.apache.sling.bgservlets.impl.BackgroundServletStarterFilter
          1 (2013-02-21 17:38:19) LOG Calling filter: org.apache.sling.rewriter.impl.RewriterFilter
          1 (2013-02-21 17:38:19) LOG Calling filter: com.day.cq.wcm.core.impl.WCMRequestFilter
          1 (2013-02-21 17:38:19) LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter
          1 (2013-02-21 17:38:19) LOG Calling filter: com.day.cq.theme.impl.ThemeResolverFilter
          1 (2013-02-21 17:38:19) LOG Calling filter: com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet
          1 (2013-02-21 17:38:19) LOG Calling filter: org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
          1 (2013-02-21 17:38:19) LOG Calling filter: com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter
          1 (2013-02-21 17:38:19) LOG RedirectFilter did not redirect (MobileUtil.isMobileResource() returns false)
          1 (2013-02-21 17:38:19) LOG Calling filter: com.day.cq.wcm.core.impl.warp.TimeWarpFilter
          1 (2013-02-21 17:38:19) LOG Applying Componentfilters
          1 (2013-02-21 17:38:19) LOG Calling filter: com.day.cq.wcm.core.impl.WCMComponentFilter
          1 (2013-02-21 17:38:19) LOG Calling filter: com.day.cq.wcm.core.impl.WCMDebugFilter
          1 (2013-02-21 17:38:19) TIMER_START{org.apache.sling.servlets.get.DefaultGetServlet#0}
          1 (2013-02-21 17:38:19) LOG No renderer for extension html
          1 (2013-02-21 17:38:19) LOG Applying Error filters
          1 (2013-02-21 17:38:19) LOG Calling filter: org.apache.sling.rewriter.impl.RewriterFilter
          1 (2013-02-21 17:38:19) TIMER_START{handleError:status=404}
          1 (2013-02-21 17:38:19) TIMER_END{0,handleError:status=404} Using handler /libs/sling/servlet/errorhandler/404.jsp
          2 (2013-02-21 17:38:19) LOG Found processor for post processing ProcessorConfiguration: {contentTypes=[text/html],order=-1, active=true, valid=true, processErrorResponse=true, pipeline=(generator=Config(type=htmlparser, config={}), transformers=(Config(type=linkchecker, config={}), Config(type=mobile, config=org.apache.sling.jcr.resource.JcrPropertyMap@88fc5d1), Config(type=mobiledebug, config=org.apache.sling.jcr.resource.JcrPropertyMap@170420bb), Config(type=contentsync, config=org.apache.sling.jcr.resource.JcrPropertyMap@1000e0cb), serializer=Config(type=htmlwriter, config={}))}
          2 (2013-02-21 17:38:19) TIMER_END{2,Request Processing} Dumping SlingRequestProgressTracker Entries
    ApacheSling/2.2 (Day-Servlet-Engine/4.1.24, Java HotSpot(TM) 64-Bit Server VM 1.7.0_07, Windows 7 6.1 amd64)

    Hi chamila,
        I never tried the example. Exception is not clear. Could you please post more stack trace from log files.
    Thanks,
    Sham

  • Syntax Error occured in Program  in include " CNTN01

    Hi,
    We are working on SAP 4.6C to ECC 6.0 Migration. While testing One Transaction, I am getting following error:
    The current ABAP program "CL_GOS_TOOLBOX_MODEL==========CP" had to be
    terminated because it has come across a statement that unfortunately cannot be executed.
    The following syntax error occurred in program
    "Z3I_CL_BASCULER_SCS_GOS=======CP " in include "<CNTN01> " in
    line 13:
    "Within classes and interfaces, you can only use "TYPE" to refer to ABA"
    "P Dictionary types, not "LIKE" or "STRUCTURE"."
    The include has been created and last changed by:
    Created by: "SAP "
    Last changed by: "SAP "
    Error in the ABAP Application Program
    This Error is coming while executing transaction in ECC 6.0 however in R/3 4.6C it is working fine.
    Pls Advice what should be done to resolve this issue. This issue is coing in alot of transactions.
    I will appreciate if anyone of you can guide me regarding same.
    regards
    Sandeep

    Hi,
    I was trying hand on one of my Z class which contain  include <CNTN01>. in its Local Types.
    I commented the existing include statement and added new statement as
    INCLUDE CNTN01_OO.
    After saving now when i try to activate the Z Class, it is giving me following error:
    INCLUDE CNTN01_OO
    You can only define classes and interfaces at the highest level of CLASS-POOL.
    CLASS Z5C_CL_MESSAGE, Internal classes in a class include "CNTN01_OO" does not start with the prefix (Z5C_CL_MESSAGE=======)of the current class pool.
    pls advice what i should do correct this issue.
    Sandeep

  • Doubt in Workflows using Programming Exits on OO ABAP

    I have a doubt on workflows:-
    Let me brief you about my requirement:
    I am trying to update some Master data using ABAP Methods through Programming Exits in a Workflow.
    I managed to find an OO method that can fetch the workflow container values directly into the structure.
    While testing the workflow:-
    The OO ABAP method executes and successfully updates the master tables.
    However, a calling method (that triggers this method indirectly), raises an exception called SWF_RUN_WIM_EXEC_INTERRUPTED.  
    The exception is caught within the caller method and the workflow errors saying that “the method ABC… cannot be executed.”
    The caller method is:-
    CL_SWF_RUN_WORKFLOW_START
    The exception is raised on execution of the following statement:-
    CALL METHOD me->start_workitem( lh_wi_handle ).
    One reason for this is that the workflow is still not completed and still in “READY” state.
    Alternative method
    Once the Master data is updated successfully,
    I tried to use the FM SAP_WAPI_WORKITEM_COMPLETE to end the work item or tried another FM to suspend the workflow.
    Now it gives an error saying that these FMs are restricted from use during run-time execution.
    Query
    Do you have an idea why the exception is raised and how to track/prevent the same?
    Can you suggest any other alternative?  Your valuable advice is urgently needed.
    Thanks a million in advance,
    Best Regards,
    Vinod

    Check the code
          CLASS zcl_event_handler IMPLEMENTATION
    CLASS zcl_event_handler IMPLEMENTATION.
    Top-of-page event
      METHOD top_of_page.
        PERFORM event_top_of_page
                USING z_dyndoc_id.
      ENDMETHOD.   "METHOD top_of_page
    Change Status Button
      METHOD handle_toolbar.
        IF NOT pa_prodr IS INITIAL.
          DATA: lz_toolbar  TYPE stb_button.
          CLEAR lz_toolbar.
          MOVE    'CHANGE_STATUS'  TO lz_toolbar-function.
          MOVE    text-001         TO lz_toolbar-text.
          APPEND  lz_toolbar       TO e_object->mt_toolbar.
        ENDIF.          "IF NOT pa_prodr IS INITIAL
      ENDMETHOD.   "METHOD handle_toolbar
    Handle User Command
      METHOD handle_user_command.
        CASE e_ucomm.
          WHEN 'CHANGE_STATUS'.
            LOOP AT    it_output
                 INTO  wa_output.
              IF wa_output-chk_box EQ kc_x.
                z_flag = 1.
                EXIT.
              ENDIF.          "IF wa_output-chk_box EQ kc_x
            ENDLOOP.      "LOOP AT it_output INTO  wa_output
            IF z_flag EQ 1.
              PERFORM display_selected_data.
            ELSE.
              MESSAGE i001(zzrefn01)
                      WITH text-023.
            ENDIF.       "IF z_flag EQ 1
        ENDCASE.      "CASE e_ucomm
      ENDMETHOD.   "METHOD handle_user_command
    ENDCLASS.   "zcl_event_handler IMPLEMENTATION

  • How can i execute a workflow using a bapi/wapi??

    Hi All,
    How can i execute a workflow using a bapi/wapi??
    pls advice
    thanks

    Hi Hrus,
    it's not as simple as a single BAPI to approve a workflow.
    Workflow comes with a Workflow API (WAPI) that you can use to programmatically interact with the workflow system. The WAPI is implemented as a group of RFC-enabled function modules that are prefixed with "SAP_WAPI_".
    Approving a workflow is simply taking a decision path for a workflow item. It is logically no different to rejecting the same workflow item or any other workflow decision.
    As part of NetWeaver workflow is tightly coupled to the WAS platform you are running on so you may need to perform WAPI operations slightly differently on older releases.
    Some of the WAPI calls you might need to use include: -
      SAP_WAPI_GET_HEADER to get the workitem header
      SAP_WAPI_READ_CONTAINER to get the workitem container
      SAP_WAPI_GET_OBJECTS to get the attached objects
      SAP_WAPI_DECISION_READ to get a list of possible decisions
      SAP_WAPI_SET_WORKITEM_STATUS to set the workitem status
      SAP_WAPI_WRITE_CONTAINER to write to the workitem container
      SAP_WAPI_EXECUTE_WORKITEM to execute the workitem
    I usually do what you are trying to do by adding the decision to the workflow container and then executing the workflow.
    Be warned, you can really stuff things up if you get this wrong! Make sure you know what you are doing.
    Quoting from Practical Workflow for SAP by Alan Rickayzen, et al from SAP Press...
    Writing directly to the workflow container is dangerous because it can compromise the integrity of the process.
    ...be careful that you do not waste time duplicating existing ad hoc features of SAP's Workflow Engine.
    For example you can use events (combined with wait steps), instead of container modifications to force the workflow to restart.
    Cheers
    Graham Robbo

  • Sharepoint Forms and Custom Lists and Workflows using Sharepoint Designer

     I created a Custom SharePoint List with a custom work flow. Basically the list does the following:
    Group A initiates the list, fills in all the information
    Group A will check a box based on a Y/N question, the driver of the work flow is if the Y/N question is answered with an Y, then Group B will get a task assigned and an email notification will go to Group B to continue the work flow.
    Group B will fill out information and check Y/N question, if answer is returned Y it will go to Group C via the same method as above.
    What I need is as the form goes from one group to the next how can I make sure that Group C doesn't see the responses from Group B? How do I write this into the workflow?

    I think now I can add screen shots to explain what I need to do better.
    I created a custom sharepoint list. Users click on Add new Item and Group A will answer generic questions until they get to Continue to Dispute to IQ (Yes/no) Checkbox.  If they answer Yes, the workflow will start and create a task for Group B
    (IQ Group). Group B will answer 4 questions (IQ Responses, IQ Notes, IQ Name and Date). Group B will check Yes or No to Continue Dispute to QA (Group C).
    See Screen shot.
    What we would like for the workflow to do is based on the Yes or No check boxes (Continue to IQ or QA). If Yes is checked then the workflow will generate a task in the task list. We don't want Group B and C to see each other's responses. I set up a workflow
    using impersonate steps, but am not sure if this is correct. Can you look at the workflow steps below and let me know if this is right?

  • NullPointerException caused by the use of the addDoubleField method

    I develop most of my programs in BreezySwing GUI because I like the simplicity of it compared to AWT. I recently bought a new computer that I wanted to make Java equipped; just like my other two computers. I will get back to that later.
    Before I got a new computer, I made all of my programs on the first computer successfully. One of my most significant ones is a multiple conversion program developed in BreezySwing. After I made it, I wanted to make it runnable on my other computer. Using the BreezySwing jar file, the application's class file, an installed JDK, and a batch file, I now know how to make my programs work on new computers.
    Things changed when I tried to put my program on my newest computer. I moved all the necessary files (except the JDK and BreezySwing; which I downloaded again) from the original computer to my newest one. The first two computers had JDK version 7 while the newest one got JDK version 14. I made all the necessary changes to the batch file for the program (such as changing the classpath for the JDK and the class directory). However, upon running this program, Java throws a NullPointerException. This exception does not occur on either of my two other computers.
    Right away, I was determined to find the cause. I have no idea why the exception occurs, but I do know what part of the code causes the exception. By commenting out parts of a test program, I managed to find out that the use of the addDoubleField method causes the exception because it is thrown when not commented out, but it is not thrown when commented out. Here is the code for the test program:
    application: DFTest.class
    import javax.swing.*;
    import BreezySwing.*;
    class DFTest extends GBFrame {
    JTextField txtFld = addTextField("abcdefg",1,1,1,1);
    DoubleField valueFld = addDoubleField(0.0 ,2,1,1,1); /*this line causes the NullPointerException*/
    static public void main(String[] args){
    DFTest obj = new DFTest();
    obj.setSize(300,100);
    obj.setVisible(true);
    }Both my conversion program and this program use the addDoubleField method. I also tested the BreezySwing variable type DoubleField by seperating it from addDoubleField with a constructor. Java did not throw an exception for the DoubleField variable type.
    What do I need to do to get my programs working again?

    I will give one last detailed synopsis of the problem that I am having. I will do my best to include every detail and make the explanation as useful as possible.
    About a year ago I became interested in Java programming. I was learning it at school but I wanted to continue with it on my own as well. The first time I installed Java was on my first computer. I will call this computer Computer A. The first thing I did was download the JDK that was available at the time. It ended up being jdk1.6.0_07. Then I downloaded JCreator IDE because it was the same IDE that I was familiar with in the classroom. The classroom textbook was The Fundamentals of Java, by Lambert and Osborne. This textbook uses the add-on package BreezySwing which is available from their website. I downloaded whatever version or update that was available at the time. Computer A still has that same download.
    In the classroom I became very familar with BreezySwing to the point where I could use all the methods for it comfortably. During the school year, I ended up using about five different computers. There were no problems with them as far as odd errors go. Every time there was an error, it was clearly the fault of the programmer and easily fixable.
    Back to Computer A: Since almost all of the programs I wanted to write used BreezySwing, it had to be set up properly. After some instructions were given to me from my teacher, I created the PATH environment variable and set it to the location of the BreezySwing documentation; which on Computer A was:
    'C:\Program Files\Java\jdk1.6.0_07\bin'
    Every kind of program that I made on Computer A works perfectly; including my test program mentioned earlier:
    application: DFTest.class
    import javax.swing.*;
    import BreezySwing.*;
    class DFTest extends GBFrame {
    JTextField txtFld = addTextField("abcdefg",1,1,1,1);
    DoubleField valueFld = addDoubleField(0.0 ,2,1,1,1);
    static public void main(String[] args){
    DFTest obj = new DFTest();
    obj.setSize(300,100);
    obj.setVisible(true);
    }By now I was getting good at making programs. Some of them I found very useful, so I wanted to make them into some type of executable file. I became familiar with all of them including .jar and .exe. However, the only one that worked for me was the batch file. I also liked its simplicity. I quickly became good at using them to execute Java bytecode.
    The next thing I wanted to do was put the useful programs I had made on a computer that was in the other room. This computer will be called Computer B. Computer B is much older than Computer A, but still a Windows.
    I knew this computer first needed Java installed on it, so I returned to the Sun download site. This time, the newest Java JDK download was jdk1.6.0_13. I also downloaded jre6 and NetBeans IDE to see if I liked it better than JCreator and to have the option to develop Java on Computer B. Next, I had to download BreezySwing again to Computer B.
    A very odd thing occurred next:
    Upon trying to extract the files of BreezySwing to the proper directory 'C:\Program Files\Java\jdk1.6.0_13\bin', a message came saying that every file in BreezySwing required a password. It also said that all the files in the 'bin' folder (of jdk1.6.0_13) were read-only and it would not let any files be placed there. I still do not know why I did not have this issue with Computer A. I did not know what to do for weeks.
    In the end, I had to copy jdk1.6.0_07 from Computer A to Computer B. It already had BreezySwing in it. However, I was unable to set up NetBeans to work with BreezySwing. Part of the problem was that Computer B is too old and slow for such an advanced program like NetBeans. It was at this point that I started using batch and command prompt entirely to execute all the programs I made or used on Computer B.
    Just like I expected, every type of program I made or put on Computer B worked perfectly.
    About a month ago, I got a third computer; Computer C. By now I knew what I wanted in it so again I returned to the Sun download site. This time, I downloaded jdk1.6.0_14 and nothing else. Both Computer A and Computer B also had jre6; but not Computer C because I saw no need for it if I already had the JDK. I also did not bother with IDEs for Computer C; I just used notepad and command prompt to develop programs.
    The first program I put on Computer C was the one that I had made on Computer A. I already got it to work on Computer B, so I used that knowledge to do everything correctly for Computer C. The program would be executed by batch file which would tell the computer it was interacting with:
    1. The directory of the .class file
    2. The directory of the JDKs bin folder
    3. To include BreezySwing.jar in the execution path (needed to recognize all the methods used in the program)
    Everything about the batch files was correct. An error in the batch file would clearly cause an error not Java related; but rather cmd.exe related.
    After placing the .class file into the directory of all my other .class files (and BreezySwing)
    'C:\Documents and Settings\Java Applications\classes+src',
    I changed the information in the batch file to match the jdk update and match the correct class directory. Upon double clicking the batch file, a NullPointerException was thrown.
    Jump ahead to my test program; DFTest.class. After creating several other test programs to try to isolate the cause of the exception, this is what I found:
    When I attempt to execute the following code (after successful compilation):
    application: DFTest.class
    import javax.swing.*;
    import BreezySwing.*;
    class DFTest extends GBFrame {
    JTextField txtFld = addTextField("abcdefg",1,1,1,1);
    DoubleField valueFld = addDoubleField(0.0 ,2,1,1,1);
    static public void main(String[] args){
    DFTest obj = new DFTest();
    obj.setSize(300,100);
    obj.setVisible(true);
    }My message is too long so I will continue...

  • Best way of using includes

    Hi there,
    I have a question about the use of includes.
    Every time I use them I get some sort of erros and I always spend way to much time trying to nest things up.
    I usually have one include for the connection, one for the menu and a few more. As you start building the
    page, Dreamweaver adds heavy coding and often the reference to the different include files adds up through
    the different pages. If the same reference appears twice in a page you need to remove one of them, but then
    some recordset loses it's connection and you get the red mark in the bindings/server behavior.
    So my question is this: for a scenario where I need to use includes for a connection, a menu and a few recordsets,
    what would be the best way to set things up in order to prevent a conflict?
    I have been walking the path of learning by doing over the years and I suspect there is a better way of building a
    page when using includes.
    Thanks in advance for any answers or hints,
    Christian
    DWCS5 | Asp | Access

    Firstly, it sounds like you are letting DW write code for you. Write your own code. NEVER have a program like DW write any of your code. None. The issues you are describing simply would not occur if you were writing your own code. Your own code will be terse and easier to read and maintain. DW often does simple things in complicated ways.
    I try to put as much of my logic code (PHP for me, ASP for you) at the top of the page, even above the HTML tag, so the HTML presentation code is not very  mixed up with the logic code. At first this might feel clumsy and your results might not be efficient, but eventually you will learn tricks to make this work effectively.
    The method above allows you to organize your code categorically so that you are not forced to make your code follow the presentation sequence. This can be especially useful if the script is long (over 500 lines).
    Use includes only for code that is used in more than one script. Write functions and build classes for logic that is repeated.
    Store your database connection include above the web root where it won't be as easy for someone else to access it.

  • Couldn't include CNTN01 in z function group created at SE80

    Dear All,
             I am involved in workflow development for determining agent for a step.
             But I couldn't include <CNTN01> in z function group created at SE80?
             How to do so?I will be grateful for your help.
    Thanks,
    S.Suresh

    Hi Samson,
                   Thanks for your reply.
                   As you stated, <CNTN01> is found at the include file LSWEATOP under the function group SWEA.
                   It implies that I need not include ,<CNTN01> in my z function group?
    Thanks,
    S.Suresh

  • How to test workflow using eCATT?

    Hi,
    Is there any method to test workflow using eCATT?
    SS

    Hi. What have you done so far, and what are your conclusions based on what you have examined and found out? I wouldn't want to tell you things you already know.
    <b>Spending 10 minutes more asking the question initially can save you a day in solving the problem.</b> See the <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/communityguidelines">Community Guidelines</a> for information about how you should ask a question (the section called Forum Rules of Engagement) to increase the likelihood of getting the best answers - that in turn will solve your problem sooner. Spending 10 minutes more asking the question initially can save you a day in solving the problem.

  • Where to include connection processing methods?

    In an architecture which uses JSPs as the presentation layer, and contains objects representing each table of an Oracle database (one object per table), should the connection processing be included in the JSPs, or should it be included within the method of each database object that prepares the SQL statement?
    By connection processing, I mean methods for establishing the connection, returning a reference to it, and closing it.

    You should not include that type of logic in the JSP at all! It's usually not clean to do that. You should separate that portion of the code and put them inside the DAO perhaps...

  • N-Step workflow using BADI.

    Dear Experts,
    I want to implement N-step workflow using Badi. I have already maintained the data in Z table for approvers and corresponding limits.
    Based on the shopping cart value, cost centre and plant i will pick the approver from the Ztable.
    I would apreciate if you can guide me step by step. I would appreciate if anyone send me the sample code for this.
    Thanks
    Ravi

    Hi,
    Determing the approvers for the SC using Z table would be the simplest method.
    You can store the combination of values(e.g. a/c assignment,plant fields etc) in the Z table and the corresponding approver names as well asl the approval levels (no of approvers) for those combinations.
    E.g. for SC with values between rs.1- rs.100,level approval would be 1 and the approver would be ABC.
    Maintaining Z table will be based on your requirement/fields for determing the approvers.In the BADI ,you will just need to determine the runtime values for the determing fields(e.g. a/c assignment,plant etc) and then fetch the approver names and approval levels from the Z table.
    For determing the runtime values for the determing fields(e.g. a/c assignment,plant etc),in the BADI,at the start,use the FM BBP_PD_SC_GETDETAIL to fetch the SC details such as a.c assignment,plant etc and then acc fetch the approver details from the Z table and pass to the export parameter APPROVAL_TABLE in the badi.For more details,refer the documentation of the badi:
    http://help.sap.com/saphelp_srm50/helpdata/en/58/c14e3c59bfe747e10000000a11402f/frameset.htm
    For sample code of N-Level Approver BADI - BBP_WFL_APPROV_BADI,
    Refer to this link ->
    how to code APPROVAL_ADMINISTRATORS in n-step WF?

  • When I want to organise my bookmarks most of the options are greyed out and cannot be used including create new folder! Help

    '''''''''bold text'''''''''
    When i want to organise my bookmarks most of the options on the organise bookmarks menu are greyed out and cannot be used - including create new folder etc. Help please.

    Make sure you are not in the Private Browsing Mode:
    File > Private Browsing is UNCHECKED.

  • SharePoint Approval Workflow using SharePoint Designer in SharePoint Foundation 2013

    I am unable to do SharePoint Designer workflow for approval process and I didnt get any Approval process in Actions in SharePoint designer Workflow also I don't find workflow features in Site collection features SharePoint 2013.
    Even I am not able to do simple Out of the box Approval Workflow.
    Kindly help me with this

    Unfortunately, Out of the box workflows are not available in SharePoint foundation 2013, you need at least the standard version of SharePoint 2013.
    You can still create .Net Workflows using the 2010 plateform.
    Take a look at this great comparative between the three versions of SharePoint 2013 :
    http://blog.blksthl.com/2013/01/14/sharepoint-2013-feature-comparison-chart-all-editions/

Maybe you are looking for

  • Replacement hard drive not recognized in mac mini

    Hi folks, I have an issue similar to several threads that were active during 2007 and 2008, but the information and answers given then do not solve my problem. The original 80 GB Hitachi drive in a 1.5 Mhz PPC failed. I replaced it with a Western Dig

  • SX50HS - LCD doesn't display in any of the shooting modes..

    lens cap is off . The LCD works in playback mode.

  • C3-01 memory card problem..

    Hi guys, I have a problem and that is that when i take a picture or download an app and want to install it my phone gives the message that i don't have enough space and that i have to delete some stuff but i got a memory card of 8Gb inside!!!???? How

  • IPhone 6 screen freezes and can't find wifi after iOS 8.0.2 update

    iPhone 6 screen freezes and can't find wifi after iOS 8.0.2 update. Have to do a hard reboot. I am Extremely disappointed and lost ALL trust in Apples Quality Assurance. From now on I'll wait a week before I update.

  • Nested Sequence

    Hi... i would like to ask if i can do nested sequence with different sequence settings in fcp? would there be any problem when i render the project? assuming the first sequence settings is 720p (progressive) and the other one will be at 1080i thanks