Dynamic vs. Declarative HtmlDataTable pagination/scolling issue

I've been struggling with trying to create a paginating HtmlDataTable dynamically to replace my current jsf declarative datatable. I've tried to crib from the BalusC examples and multiple google searches. I've removed a lot of the 'read-only' data column
Here's the current declarative jsp code with my dynamic hook added to it:
<h:panelGroup binding="#{searchHandler.searchResults}"/>
///// Original code to be replaced with the above dynamic control
<center><h1><h:outputText value="#{i18n.searchResults}"/></h1></center>
<h:messages style="color:#FF0000;" globalOnly="true"/>
<f:subview id="searchResultsControls" rendered="#{myResultsHandler.hasResults}">
     <h:form id="mySearchResultsForm">
          <h:dataTable border="1" cellspacing="2" cellpadding="2"
                   first="#{myResultsHandler.firstRowIndex}"
                   id="searchResultsId"
                   rows="#{myResultsHandler.noOfRows}" 
                   rowClasses="oddRows, evenRows"
                   value="#{myResultsHandler.results}"
                   var="result"  width="100%">
               <h:column>
                    <f:facet name="header" ><h:outputText value="#{i18n.username}"/></f:facet>
                    <h:commandLink action="#{userDetailsHandler.selectUserToSeeDetails}" value="#{result.userName}">
                         <f:param name="userId" value="#{result.userId}" />
                    </h:commandLink>
                    </h:column>
               </h:dataTable>
               <h:commandButton id="declNext" value=">" disabled="#{myResultsHandler.scrollNextDisabled}" action="#myResultsHandler.scrollNext}" />
     </h:form>
</f:subview>And here is my dynamic code I'm trying to use to replace it.
         private HtmlPanelGroup searchResults;
     public HtmlPanelGroup getSearchResults() {
          searchResults = (HtmlPanelGroup) FacesContext.getCurrentInstance().getApplication().createComponent(HtmlPanelGroup.COMPONENT_TYPE);
          searchResults.setId("dyn_SRPanel");
          final HtmlForm form = (HtmlForm) FacesContext.getCurrentInstance().getApplication().createComponent(HtmlForm.COMPONENT_TYPE);
          form.setId("dyn_CustForm");
          final HtmlDataTable table = new HtmlDataTable();
          table.setFirst(myResultsHandler.getFirstRowIndex());
          table.setId("dyn_my_results_table");
          table.setBorder(1);
          table.setCellpadding("2");
          table.setCellspacing("2");
          table.setRowClasses("oddRows, evenRows");
          table.setRows(myResultsHandler.getNoOfRows());
          table.setValueExpression("value", createValueExpression("#{myResultsHandler.results}", List.class));
          table.setVar("dyn_result");
          table.setWidth("100%");
          final HtmlColumn actionColumn = new HtmlColumn();
          table.getChildren().add(actionColumn);
          final HtmlOutputText commandHeader = new HtmlOutputText();
          commandHeader.setValueExpression("value", createValueExpression(resultHeaders[0], String.class));
          actionColumn.setHeader(commandHeader);
          HtmlCommandLink action = new HtmlCommandLink();
          action.setValueExpression("value", createValueExpression("#{dyn_result.userName}", String.class));
          action.setActionExpression(createActionExpression("#{userDetailsHandler.selectUserToSeeDetails}", String.class));
          final UIParameter param = new UIParameter();
          param.setName("userId");
          param.setValueExpression("value", createValueExpression("#{dyn_result.userId}", Long.class));
          action.getChildren().add(param);
          actionColumn.getChildren().add(action);
          form.getChildren().add(table);
          final HtmlCommandButton scrollNext = (HtmlCommandButton) FacesContext.getCurrentInstance().getApplication().createComponent(HtmlCommandButton.COMPONENT_TYPE);
          scrollNext.setValue(">");
          scrollNext.setId("dyn_next");
          scrollNext.setDisabled(myResultsHandler.isScrollNextDisabled());
          final FacesContext facesContext = FacesContext.getCurrentInstance();
          MethodExpression expr= facesContext.getApplication().getExpressionFactory().createMethodExpression(
              facesContext.getELContext(), "#{myResultsHandler.scrollNext}", String.class, new Class[]{});
          scrollNext.setActionExpression(expr);
          form.getChildren().add(scrollNext);
          searchResults.getChildren().add(form);
          return searchResults;
     }Now here's the odd thing, the dynamically created table doesn't scroll through the results like the declarative table. I've check the JSF event flow and the actions get invoke for the declarative/dynamic controls at the correct place in the event trace, but only the declarative version actually shows the correct model state. When either the dynamic or the declarative button are pressed, the correct backing action is called. All of the beans are session scoped.
What have I missed/messed up?
Thanks,

Yes, the action method gets invoked no matter if the dynamic or declarative button is pressed. In both cases, the table model is delegating to the same back end. I'm trying to re-wire this declarative component into a dynamic form. The correct list is being returned in both instances, as far as I can tell the next button event is called in the exact same place in the JSF event flow in both cases.
One curious thing I have noticed, is that if I click through the command link to the 'details' page, when I come back to the result table page both views are in sync with the same model state. I.e. the dynamic table will have been 'scolled' properly. I'm not sure if that is a useful clue or just an odd side-effect.
Thanks for your help so far though, I've spent 2.5 days trying to work through this.

Similar Messages

  • How to pass Stages Guid dynamically in declarative workflow

    hello,
    How to pass Stages Guid dynamically in declarative workflow.
    Example For List we used to pass guid like this 
    System.Guid.Parse("{$ListId:Lists/Testlist;}")
    help me out to pass stage guid...
    any help would be appreciated!!!!
    Thanks regards, Vignesh.

    You need to make use of command line arguments. You can go through this link for example.
    http://www.freeos.com/guides/lsst/ch02sec14.html
    In your shell script(say test.sh) you can have
    exp fas/xxxxxx@fasbd001 file=audit_grn_28aug.dmp tables=audit_grn query=\"where org_grp_i=$1 \"$1 indicates it accepts the first argument from command line. if you want to pass 19, add that next to the script you're executing.
    From command line you can call this shell script say test.sh 19

  • Dynamic data declaration refering to local data defined in another program

    Here is the situation:
    The standard program SAPICP__ , SAPICF__ and several other of same series have a form routine REPOSITORY_DEVCLASS_ADD. this subroutine in all SAPI* programs has parameter REPOSITORY of type REPOSITORY (declared as internal table with header lines) and type REPOSITORY is declared with different component in each program.
    Now the problem is that i need to call subroutine REPOSITORY_DEVCLASS_ADD dynamically from my program and so i want to dynamically declare the table REPOSITORY in my program to pass to this subroutine and as program is not yet loaded into memory i have no way to achieve this.
    Can some one help in achieve this?
    Edited by: Gaurav B. on Jan 30, 2012 4:02 PM

    Hello Fred,
    That's a big task, even if it looks "easy". My first idea is, your request can not be covered by dynamic programming. a) every node has a different structure (I guess), b) the code itself has to be adjusted to the nodes in use as well. I.e. when a dynamic data declaration would be possible, the coding has to adhere the used number of nodes.
    My recommendation:
    - declare as many standard tables (nodes) as possible
    - the code for  each node has to be implemented
    - define the number of used nodes by a parameter or an interface
    Have success,
    Heinz

  • Dynamic interface declaration

    Hello,
    Is it possible to have a dynamic interface declaration like you can have a dynamic object declaration?
    For an object:
    data: lo_object type ref to object.
    create object lo_object type (lv_object_name).
    Is this in some way possible to do with an interface? I need to do this for an interface at runtime.
    Gr,
    Jaron

    You can create data of a dynamically given reference  type (which may be an interface) and move the object reference to it.
    Something like so:
    DATA:
          my_obj TYPE REF TO object,
          lr_data TYPE REF TO data.
      FIELD-SYMBOLS: <fs> TYPE ANY.
      CREATE OBJECT my_obj TYPE my_object_type.
    TRY.
      CREATE DATA lr_data TYPE REF TO (some_interface_type_name).
      ASSIGN lr_data->* TO <fs>.
       <fs> ?= my_obj.
      CATCH cx_sy_move_cast_error.
      CATCH cx_sy_create_data_error.
    ENDTRY.
    Basically, the assignment tests if my_obj is an instance of the type named some_interface_type_name.
    Hope this helps,
    Sebastian

  • How to create popup link in OAF dynamically or declaratively.

    Can anybody please help how to create a link as popUp in OAF dynamically or declaratively?

    Step 1: Create an OAPopupBean. For example:
    OAPopupBean popupBean =(OAPopupBean)createWebBean(pageContext,POPUP_BEAN,null,"myPopup");
    //Set the following properties on the pop-up:
    popupBean.setID("myPopup");
    popupBean.setUINodeName("myPopup");
    String popupRegion= "/oracle/apps/fnd/framework/toolbox/labsolutions/webui/TestEmpDetailsRN" ;
    popupBean.setRegion(popupRegion);
    popupBean.setHeight("130");
    popupBean.setWidth("320");
    popupBean.setTitle("Test");
    popupBean.setType(EMBEDDED_POPUP); /* Embedded type */
    Step 2: Select the item (messageStyledText, image, link, or button) on which you want to enable the pop-up, and set the following properties, as shown in this example:
    OATableBean tableBean = (OATableBean)webBean.findChildRecursive("ResultsTable");
    OAImageBean image = (OAImageBean)webBean.findChildRecursive("UpdateImage");
    image.setPopupEnabled(true);
    image.setPopupRenderEvent("onClick");
    image.setPopupID("myPopup");
    Step 3: Add the pop-up as an indexed child of the region that contains the item on which the pop-up is enabled.
    Note: If you are enabling a pop-up on an item within a classic table, advanced table or HGrid, then you must add the pop-up and the item on which it is enabled to a layout and add the layout as the indexed child of the table.
    In this example, the pop-up is enabled on an image within a table, hence the pop-up is added as a second level indexed child of the table:
    OAStackLayoutBean stackLayoutBean = new OAStackLayoutBean();
    stackLayoutBean.addIndexedChild(popupBean);
    tableBean.addIndexedChild(stackLayoutBean);

  • Dynamic data declaration

    I posted same thread into "Dictionary section"
    Hi,
    I have a following issue - I am not sure whether this is possible - so I need your feedback/expertise.
    I have a custom table (example ZABC) with several fields in it - one of them being TABNAME . Content of that table ZABC is
    MANDT TABNAME FIELDNAME ZCHECK
    800 KNA1                KUNNR
    800 KNA1                NAME1         X
    800 KNA1                NAME2         X
    800 KNA1                KUNNR
    800 KNVV                BZIRK           X
    800 KNAS                KUNNR
    800 KNAS                STCEG
    etc.
    There is no rule how many entries will be in this ZABC table - I guess it will be less than 20 - but this is not business rule. Also do not know how many different "tables" could be specified.
    Fields MANDT and ZCHECK fields are not important at this stage.
    The challenge I have is to fetch data for only those fields from their specified physical tables (KNA1, KNVV, KNAS) in internal tables.
    In this case I would need to have 3 internal tables one for KNA1, one for KNAS and one for KNVV.
    I need to keep those "internal" table with content throughout the entire program for certain validation.
    I know that I should dynamically define those internal tables but I have issues not knowing how many tables will be defined in ZABC table and I personally do not want to declare "<fs_itab> TYPE ANY TABLE" 20 or so times as fs_itab1 - fs_itab20.
    Is there any way I can dynamically create as many internal tables as needed and keep their content throughout program run-time.
    Regards
    Goran

    All those examples you'all posted are great BUT it does not answer my question nor help me to solve my issue. Maybe I was not clear enough ... or something is wrong with me
    Once again.
    I have no problem to get a dynamically defined table and fill its content from ONE physicall table. That is pretty straight forward. The issue I have is that I do not know how many dynamically tables I will have to define and later asign to field symbol. Look at my custom table above and you will understand what I am trying to say.
    What makes this issue more complex is that, once data fetch from those physicall SAP tables, I have to keep the content for all those internal tables during the entire program run . Second the most, I do not want to limit the program by defining FS "n" times in data declaration section. That is really important since I have no idea how many tables will be accessed.
    If I follow the logic from your examples, I will end up overwritting the FS content every time I assign new internal table to FS.
    In order to solve this issue, I was thinking that whenever I get the data from SAP table into internal table (field symbol) i export the content of internal table / FS to memory and then retrieve them when needed. This sounds like waky /fuzzy process and I am not aware of anything better. I am old fashion ABAP guy who got certified 1995 and have not seen ABAP for at least 5 years.
    I would like that someone either tells me whether I am OK going forard with my "memory" solution or ... in few words gives me hint how to handle multiple dynamicall defined tables AT THE SAME TIME with its content using some OO code.
    Thanks
    G
    P.S.
    I have erroneusly opened the same thread twice. Sorry

  • Add dynamic namespace declaration into xml root element

    Hello all,
    i've have two scenarios (mail to mail and file to file) with the same issue : no namespace in my XML file and i have to create one 'dynamically' from XML values.
    Example :
    <root>
    <name>test</name>
    <email>test</email>
    <schema>schemaID</schema>
    </root>
    Now I want to add infos into the root element for namespace declaration and so on, without expansion of the xsd. I've must use the value from the field schemaID.
    Example:
    <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns: namespace="http://test.de/schemaID">
    <name>test</name>
    <email>test</email>
    </root>
    I've already done it before through XSLT but it wasn't dynamic !! I don't know how to do it in XSL and i am not a java expert.
    Someone got an idea ?
    Thanks,
    Jean-Philippe.

    Hi,
      If you want to add name space at mapping level two options
    1)Using XSLT Mapping ,its very easy,google it to get sample XSLT code ,it will solve your problem.
    2)Using java mapping,in java mapping use regular expression code ,using regex(Regulkar expresion)we can add any content in message at any level.
    Regards,
    Raj

  • Dynamic variable declaration

    Hi
    I am writing a procedure in which i get the schema name only as input parameter at run time.
    for e.g.:
    v_id sys.dba_users.username%type;
    In the above datatype declaration, SYS is the schema name, dba_users is the table name and username is the column.
    What if i do not know the schema name up front, is there a way for me to have dynamic declaration?
    p_schema VARCHAR2(30) := 'SYS';
    v_id dba_users.username%type; -- how can i associate this with p_schema
    Is it even possible?

    The bigger picture is this. The same set of tables is copied to new schema once every few months. The tables data structure does not change except for the schema it belongs to. So i have to write a code which will accept the schema name as input parameter and retrieve data from the right tables.
    My question is if there is a way to dynamically specify a schema while declaring variables.
    how can i get the equivalent of v_id sys.dba_users.username%type if schema name 'SYS' is not known upfront.
    If i get to to schema name 'SYS' at run time like below:
    p_schema VARCHAR2(30) := 'SYS';
    v_id dba_users.username%type; -- how can i associate this with p_schema
    If dynamic declaration is not at all possible, i can always declare my variables as follows:
    v_id VARCHAR2(30);
    Thanks everyone for your answers though.

  • Dynamic Variable Declare

    Hi experts,
    How can i declare Dynamic variable under loop,
    I have Data from CABN Table with Char Name /Data type/Length.
    Is there any function module or method where i provide the parameters for declaration.
    thanks.

    DATA r_elemdescr TYPE REF TO cl_abap_elemdescr.
    r_elemdescr ?= cl_abap_elemdescr=>describe_by_name( 'DATA_ELEMENT_HERE' ).
    DATA r_field TYPE REF TO data.
    FIELD-SYMBOLS <field> TYPE ANY.
    CREATE DATA r_field TYPE HANDLE r_elemdescr.
    ASSIGN r_field->* TO <field>.
    <field> = .....
    "now <field> is your dynamic field value
    Regards
    Marcin

  • Dynamic build of a table trigger - Issue building :new and :old vars

    (which leads me to my next issue - this one might be a deal killer for me; see "Are Optional Parameters possible in Procedural Units?"
    I'm using a Select statement to dynamically create a table trigger which looks like the following:
    create or replace trigger tr_audit#reporter
    after update on reporter
    for each row
    begin
    ttms_audit_pkg.insert_audit_info( 'reporter', 'ZIP', :new.ZIP, :old.ZIP, 'REPORTER.REPORTER,REPORTER.PROJECT_CD', 'EXFC', :new.reporter, :new.project_cd);
    end;
    The :new. and :old. variables are generated based on which table_name is passed to the script creating this trigger. My problem is that I need all the :new. and :old. parameters to be passed in as Char. regardless of whether they are Number or Date variables.
    So in the example above...if :new.reporter is a number on the table then I need to to_char is like this:
    create or replace trigger tr_audit#reporter
    after update on reporter
    for each row
    begin
    ttms_audit_pkg.insert_audit_info( 'reporter', 'ZIP', :new.ZIP, :old.ZIP,
    'REPORTER.REPORTER,REPORTER.PROJECT_CD', 'EXFC', to_char(:new.reporter), :new.project_cd);
    end;
    However, since this trigger is created dynamically I will not know in advance which :new. and :old. parameters will need to be converted to character. So if to_char(:new.reporter) is used and :new.reporter is already a character on the table then I will get an error.
    So my question then is this. Is there a way to write this dynamic sql in a way to accomidate this problem? I'm thinking something that would act a bit like a decode does with values...pehaps something like this:
    decode(:new.reporter, NUMBER, to_char(:new.reporter), DATE, to_char(:new.reporter,'DD-MON-YYYY HH12:MIPM'), :new.reporter)
    ...if :new.reporter is a number then to_char it; if :new.reporter is a date then to_char it; otherwise let it be.
    By any chance does anyone know if this is possible? I would greatly appreciate any insights.

    Sure, you can selectively version-enable tables using Workspace Manager (you call DBMS_WM.EnableVersioning on each table you want Workspace Manager to track history for).
    What do you mean by "programmatically rollback changes"? Workspace Manager has the ability to call GotoTime and queries against a version-enabled table will return results as if you were querying it at that specific point in time (unless you've purged history of course). You can also use it to create what are essentially long-running transactions where you can work on multiple sets of proposed data changes simultaneously for days or months before finally deciding to commit a one particular set. It's incredibly powerful.
    Justin

  • Dynamic LBFO Load Balancing mode causing issues

    Hi,
    We`re running a couple of virtual machines with the
    BIG-IP Virtual Edition in a Windows Server 2012 R2 Hyper-V cluster.
    These virtual machines have had problems where traffic sent through the virtual machines doesn`t get through due to the MAC Addresses of the physical team NICs being replaced with the Mac Address from the team member actually used to transmit the
    packet.
    Reference:
    Windows Server 2012 R2 NIC Teaming (LBFO) Deployment and Management
    Blog post - Server 2012 Hyper-V / NIC Team Oddity
    One of the comments in the blog-post states what we are seeing:
    The reason for the MAC Address switching you’re seeing is that Server 2012 in some cases will replace the source MAC address on Ethernet frames with the MAC Address from the team member actually used to transmit the packet. The reason for this is that
    if it always kept the MAC Address intact, the switch would throw alarms for “MAC flapping”, i.e. seeing a given MAC Address bouncing back and forth between switch ports.
    When we changed the Load Balancing mode from Dynamic to Hyper-V port, the problem was resolved.
    Is it possible to solve this problem while still using Dynamic as the Load Balancing mode? Would LACP instead of Switch independent teaming mode solve the problem?

    @Rob Thanks, that`s useful information. Did they suggest any other solutions/workarounds? (such as LACP)
    @Alex I understand that I need to configure my switches if I`m going to use LACP, but will LACP cause a different behaviour regarding the replacement of the source MAC address on Ethernet frames? In other words: Will LACP be an alternate solution/workaround
    to using Hyper-V Port in Switch Independent mode?
    I can't answer this from experience because I've never had this problem.
    But, the basic issue with the switch-independent mode is that the physical switch is completely unaware that there is any team situation at all. It can only operate within the base rules of Ethernet, which say that a MAC address can only appear on one endpoint
    at a time. So, if you have built a switch-independent team that crosses 4 physical adapters and a Hyper-V virtual switch on top of that, what the physical switch "sees" is four distinct endpoints that are hosting multiple MAC addresses. When one
    of the virtual adapters transmits on a virtual switch, it could, depending on the load-balancing mode, use any of the four physical lines. If it uses the same source MAC address while communicating across all four lines, the switch might panic. It wants to
    know where the MAC really is for purposes of knowing where to deliver its inbound packets, and depending on security configuration, to be sure that there's not an unauthorized spoofing attempt in progress. That's why the dynamic mode uses MAC substitution.
    The Hyper-V port mode gets around this by locking each virtual adapter on to a single physical channel so that its MAC address doesn't move. This has a cost of not allowing traffic on any given virtual adapter to be load-balanced.
    In a LACP connection, the physical switch is fully aware of the team, and furthermore, it knows that it's not an endpoint. All the MAC addresses of the virtual adapters are associated with this single aggregated tunnel, not the individual physical adapters.
    When it comes down to deciding which of the physical adapters to use to carry any given transmission, that can be negotiated by the switches without the need to lock a MAC to a specific adapter. There isn't, or at least there shouldn't be, any need for the
    dynamic mode to perform MAC substitution.
    Again, I'm speaking from theory, not direct experience with what you're asking about. I do make regular use of the dynamic mode on LACP trunks, but I don't run any applications that would have this MAC sensitivity issue. For all I know, dynamic still performs
    this substitution and I just don't understand why. Also, there's a chance your symptoms just happen to point to this substitution as being a problem. But, I would say there's a good chance that using Dynamic/LACP will solve your issue.
    Eric Siron
    Altaro Hyper-V Blog
    I am an independent blog contributor, not an Altaro employee. I am solely responsible for the content of my posts.

  • Dynamic Type Declaration

    Hi.
    I need to declare an internal table TYPE based on a dynamic table whose name at design time is unknown. I tried the following codes, but it is not working and generated an error:
    DATA: TXT_FILENAME_VALUE(14) TYPE C.
    FIELD-SYMBOLS: <FS_TXT_FILENAME_VALUE>.
    TXT_FILENAME_VALUE = ''.
    CONCATENATE 'TXT_FILENAME' TXT_FILENUMBER INTO TXT_FILENAME_VALUE.
    ASSIGN (TXT_FILENAME_VALUE) TO <FS_TXT_FILENAME_VALUE>.
    DATA UPLOAD_ITAB TYPE TABLE OF (<FS_TXT_FILENAME_VALUE>).
    Error Generated: The type "(<FS_TXT_FILENAME_VALUE>)" is unknown.
    Any help would be appreciated.

    REPORT z_dynamic_program.
    TABLES:dd02l,
           vlcvehicle.
    FIELD-SYMBOLS: <fs_table> TYPE STANDARD TABLE,
                   <fs_warea> TYPE ANY,
                   <fs_any>   TYPE ANY.
    DATA:t_anytable TYPE REF TO data,
         f_warea    TYPE REF TO data,
         tb_condition(72) TYPE c OCCURS 0 WITH HEADER LINE.
    DATA:w_dynproname TYPE sy-repid,
         w_msg(70)    TYPE c.
    DATA:t_code(72) TYPE c   OCCURS 0 WITH HEADER LINE.
    PARAMETERS:pa_tnam  LIKE dd02l-tabname.
    SELECT-OPTIONS:so_comm  FOR vlcvehicle-zz_commnos.
    START-OF-SELECTION.
      SELECT SINGLE * FROM dd02l WHERE tabname = pa_tnam.
      IF sy-subrc NE 0.
        STOP.
      ENDIF.
      APPEND 'Program SubPool.' TO t_code.
      APPEND  ' '               TO t_code.
      CONCATENATE 'TYPES TY_TABLE TYPE ' pa_tnam ' OCCURS 0.'
      INTO t_code SEPARATED BY space.
      APPEND t_code.
      CONCATENATE 'TYPES TY_WAREA TYPE ' pa_tnam '.'
      INTO t_code SEPARATED BY space.
      APPEND t_code.
      APPEND 'Form generate_table changing p_table type ref to data '
                                TO t_code.
      APPEND '                             p_warea type ref to data.'
                                TO t_code.
      APPEND ' create data p_table type (''TY_TABLE''). '
                                TO t_code.
      APPEND ' create data p_warea type (''TY_WAREA''). '
                                TO t_code.
      APPEND 'Endform. '        TO t_code.
      GENERATE SUBROUTINE POOL t_code
                          NAME w_dynproname
                          MESSAGE w_msg.
      IF sy-subrc NE 0.
        WRITE : / w_msg.
        STOP.
      ENDIF.
    Call the subroutine to get reference to dyn table
      PERFORM generate_table  IN PROGRAM (w_dynproname)
                     CHANGING t_anytable
                              f_warea.
      ASSIGN t_anytable->* TO <fs_table>.
      ASSIGN f_warea->*    TO <fs_warea>.
    Fetch the data from the database based on the Commission number
    and the Table name
      SELECT *
      INTO TABLE <fs_table>
      FROM (pa_tnam)
      WHERE Z_COMMNOS IN so_comm.
      IF sy-subrc NE 0.
        STOP.
      ENDIF.
      DELETE FROM (pa_tnam) WHERE Z_COMMNOS IN so_comm.
      IF sy-subrc EQ 0.
        WRITE:/ sy-dbcnt.
      ENDIF.
    END-OF-SELECTION.
    You can also search the forum to see the method using OOPs concept
    Reward if useful
    Regards,
    Aj

  • Dynamic array declaration

    Hi
    This is a simple one but I need the corect way to declare
    arrays in a for loop. I need the correct syntax for creating 10
    arrays for example named dp0 ..dp9.
    Thanks for your help.
    for (i=0;i<10;i++){
    var dp'i' Array= new Array; //This does not work,
    }

    hello, this kind of syntax or something like this was never
    allowed
    var "dp"+i : Array
    var dp[ i ] : Array
    you can't create variables with dynamique name like this,
    the trick is to full an array (or an Object) with dynamical index
    (or propertie) :
    var dp : Array = new Array()
    var dp2 : Object = {}
    for (var i : int = 0 ; i<10 ; i++)
    dp[ i ] = new Array(i,i*i);
    dp2[ i ]= new Array(i,i*i);
    //notice that you dont use 'var' and typing (' : Array')
    cause you only add dynamicly index or property you dont create var
    }

  • How to dynamic for declaration variable?

    This is my problems
    I will by PLMK-STELLEN data to determine decimals
    Example:
    IF PLMK-STELLEN = 3
    then data: l_amt1 type p decimals 3.
    IF PLMK-STELLEN = 2
    then data: l_amt1 type p decimals 2.
    For this case, how can i do, please help.
    Thanks a lot!!

    You should use dynamic declaration.
    TYPES:
    p3 TYPE p DECIMALS 3,
    p2 TYPE p DECIMALS 2.
    DATA dref TYPE REF TO data.
    FIELD-SYMBOLS <l_amt1> TYPE ANY.
    IF PLMK-STELLEN = 3
      CREATE DATA dref TYPE p3.
    ELSEif IF PLMK-STELLEN = 2.
      CREATE DATA dref TYPE p2.
    ENDIF.
    ASSIGN dref TO <l_amt1>.
    Hope it helps.

  • Dynamic Link to Encore from Premiere Issues

    I created a simple After Effects composition and Dynamic Linked it to Premiere Pro. (All CS4 Programs)  I completed the editing process, and Dynamic Linked my timeline into Encore.  In Encore, the Premiere Pro timeline appears, but it does not represent the After Effects composition within the Premiere Pro Timeline.
    I am unsure as to why this occurs.
    Also, I have issues with getting the DVD's I burn to play in other computer/DVD players.  The discs I create work perfectly fine in my computer, as well as my DVD player but I am unsure why they do not work in other people's devices.  The discs are DVD-R discs.

    So you must downrez at some point in the workflow. Some users have problems and/or think they get better quality out of direct PR/AME exports than using DL for this purpose.
    I would test the workflow by creating three short test sequences - one with a clip from one camera, a second from the other, and a third with both in a sequence using the same settings you are using in your edit. I would use the "drag a clip" to the new item method for making each of the first two sequences. By short I mean 30 seconds to 2 minutes with a mixture of still and action.
    Export using whatever method you pick of those recommended, but use CBR 8 instead of VBR etc. Bring the resulting files into Encore. Yes, look at the files exported on the computer, and look at Encore preview, etc, but also burn to a disk and watch on multiple TVs. There are lots of issues in best quality.

Maybe you are looking for