Looping through screens in BDC

Hi All,
I am trying to create a BDC program in which I have one requirement of looping through screens (PO10 - Relationships Tab).
I have to loop through each relationship until i get B-012 relationship. So how to achieve this requirement. Please help
Thanks,
Shailesh

Hi Shailesh,
You have not specified what you are trying to achieve by looping through to that relationship. If you are trying to change the relationship then you can directly create and system by default will delimit the old relationship based on the Time Constraint.
Regards
Bala

Similar Messages

  • Error "Screen output are too small" when looping through internal table!

    Hello All:
         I have a huge internal table with some 79000 records and while looping through them and doing some other processing inside the loop, I am getting an error "Screen output are too small"! Could someone please help mw how to fix this issue? I can send the all the code if anyone wants to look at the code. Thanks in advance and rewards are assured.
    Mithun

    Hi,
    Check this
    new-page print off.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
    destination = v_dest
    IMPORTING
    out_parameters = params
    valid = valid.
    * params-linct = '58'.
    * params-linsz = '170'.
    * params-paart = 'X_58_170'.
    * params-prtxt = v_spool_text.
    * params-primm = 'X'.
    * params-prrel = 'X'.
    NEW-PAGE PRINT ON PARAMETERS params NO DIALOG.
    After the call fm GET_PRINT_PARAMETERS params internal table contains all the values for generating spool.
    aRs

  • Table ctrl - no screen-name - hav groupid but not visible in Loop at screen

    Hi...
    In pa30, for a pernr, of infotype 0008, we have a table control.
    In that table control, i hav to hide a field. ex: bet01
    it has value..by default it will appear on the screen...
    Now I want this value not to appear on the screen.
    in loop at screen, i am not able to find the sceen-name(Q0008-bet01 or no Q fields...)
    It loops for all the p fields..and exits the loop.
    How can I hide the q fields..
    I have tried with groupids...but, in loop at screen unable to find the groupids...so no use..
    screen name and groupid are there for this field...
    Any solution???????????

    Hi...thanks for ur reply...
    Not that helpful...
    I hav the groupID..screen-name...
    But the problem is, the loop at screen is not going through this groupid or screen-name...
    And if u have any sample code, plz share it..
    I cant modify the data coming to table control...access problem...
    If u have anyother solution, please give it..Anyways thanks once again for ur reply!
    Experts, no solution??? No alternative???
    Edited by: Veeranji Reddy on Nov 13, 2008 3:22 PM
    Edited by: Veeranji Reddy on Nov 14, 2008 5:49 AM

  • Forms 6i loop through datablock question

    I am writing a piece of code to loop through items with in a datablock to programmatically set the width between each field.
    I created my data block through the wizard, but then manually added some fields. I have them listed in the order I expect them to be navigated, which is the order I expect them to appear on the screen.
    When I am looping through the data block, I was assuming that next_item would go to the next navigable item, and it doesn't.
    For example, I have items received_today, worked_today, total_waiting, total_for_today, total_calls, total_priority.
    When the code loops through the data block, it actually loops in this order: received_today, worked_today, total_callbacks, total_priority, total_waiting, total_for_today.
    I even set the next navigation item property for each item, but that didn't help.
    My questions:
    1. Is there a way to control what order the data block loops through items?
    2. Why does this line get_item_property(get_block_property(block_name, FIRST_ITEM), x_pos); sometimes return null? (in my "proof of concept" form it returns a value, but the form I am modifying does not)
    Following is my code:
    PROCEDURE set_x_y_positions IS
         current_x_position pls_integer;
         current_y_position pls_integer;
      block_name varchar2(30) := 'BLOCK22';
      CurrentItem varchar2(30);
    BEGIN
      go_block(block_name);
      current_x_position := get_item_property(get_block_property(block_name, FIRST_ITEM), x_pos);
      current_y_position := get_item_property(get_block_property(block_name, FIRST_ITEM), y_pos);
          go_block(block_name);
      loop
           BEGIN
                if :system.cursor_item <> (block_name || '.' || get_block_property(block_name, FIRST_ITEM))
                     and get_item_property(:system.current_item, displayed) = 'TRUE' then            
                  SET_ITEM_PROPERTY(:system.current_item, x_pos, current_x_position + 38);
                  current_x_position := get_item_property(:system.current_item, x_pos);
                end if;
                if :system.cursor_item = 'BLOCK22.INTERNATIONAL' THEN--block_name || '.' || get_block_property(block_name, LAST_ITEM) then
                          exit;
                else
                     next_item;
                end if;
           END;
      end loop;
    END;I am using Forms 6i version 6.0.8.26.0
    Thank you!
    Katia

    I do have an exit, and yes it does run well.
         if :system.cursor_item = 'ATS_MON_REPORTING_QUEUES_VW.INTERNATIONAL' THEN--block_name || '.' || get_block_property(block_name, LAST_ITEM) then
                          exit;
                else
                     next_item;
                end if;That redundant go_block is there because I had some output going to a dummy field in another block, so I had to make sure it was navigating back to the block. But yes, in this code example, that go_block is redundant.
    Thank you, adding the
    current_x_position := get_item_property(block_name||'.'|| get_block_property(block_name, FIRST_ITEM), x_pos);
      current_y_position := get_item_property(block_name||'.'|| get_block_property(block_name, FIRST_ITEM), y_pos); worked perfectly.

  • How do I loop through tables, not columns in a table?

    Sorry if this is a long one. My problem is actually quite simple. I am trying to write either an ad hoc PL/SQL block or a stored procedure to loop 18 times (thru 18 tables) and perform a SQL query on those tables, returning 18 resultsets. I would like the results to show up on the screen (or in a spool file, whatever).
    So far I have tried 3 different approaches, none of which have worked.
    1. I tried to assign the select query to a variable (qry) and use EXECUTE IMMEDIATE qry. This forced me thru a variety of errors to declare variables and assign the result to them--EXECUTE IMMEDIATE qry into nm0, nm1, nm2...
    The problem with that was the resultset returned more than the variable was built for as there might be no rows returned, or it might be a thousand rows of data. So I tried changing the variables to VARRAYS, but it gave me a type mismatch as the underlying columns were NUMBER and VARCHAR2.
    DECLARE
         ctr number;
         TYPE NUMLIST IS VARRAY (1000) OF NUMBER;
         TYPE VARLIST IS VARRAY (1000) OF VARCHAR2(15);
         nm0 NUMLIST NOT NULL DEFAULT 1;
         nm1 VARLIST;
         nm2 NUMLIST NOT NULL DEFAULT 1;
         nm3 VARLIST;
         nm17 NUMLIST NOT NULL DEFAULT 1;
         qry VARCHAR2(2000) := 'klx_uln_p000_cells';
    BEGIN
    FOR ctr IN 1..17 LOOP
         IF ctr &lt; 10 THEN
              qry := 'SELECT
              A.DIM_0_INDEX,
              S0.SYM_NAME,
              A.DIM_1_INDEX,
              S1.SYM_NAME,
              A.DIM_2_INDEX,
              S2.SYM_NAME,
              A.DIM_3_INDEX,
              S3.SYM_NAME,
              A.NUMERIC_VALUE,
              B.NUMERIC_VALUE
              FROM
              KHALIX.klx_uln_p00'||ctr||'_cells A,
              KHALIX.klx_ucn_p00'||ctr||'_cells B,
              KHALIX.KLX_MASTER_SYMBOL S0,
              KHALIX.KLX_MASTER_SYMBOL S1,
              KHALIX.KLX_MASTER_SYMBOL S7
              WHERE
              A.DIM_0_INDEX=B.DIM_0_INDEX AND
              A.DIM_1_INDEX=B.DIM_1_INDEX AND...
              A.DIM_7_INDEX=S7.SYM_INDEX';
         ELSE
              qry := 'SELECT
              A.DIM_0_INDEX...
              A.DIM_7_INDEX=S7.SYM_INDEX';
         END IF;
         BEGIN
         dbms_output.put_line('SELECT FOR KLX_ULN_P00'||ctr||'_CELLS');
         dbms_output.put_line(nm16);
         dbms_output.put_line(nm17);
         EXECUTE IMMEDIATE qry into nm0,nm1,nm2,nm3,nm4,nm5,nm6,nm7,nm8,nm9,nm10,nm11,nm12,nm13,nm14,nm15,nm16,nm17;
    --     dbms_output.put_line(qry);
         dbms_output.put_line(nm16);
         dbms_output.put_line(nm17);
         EXCEPTION
              WHEN NO_DATA_FOUND THEN
                   dbms_output.put_line('No data found for Query '||ctr);
         END;
    END LOOP;
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
              dbms_output.put_line('No data found for Query '||ctr);
    END;
    2. So then I used REF CURSOR to create a stored procedure and return the values. That allowed me to run my query AND tokenize the tablenames with a counter so that it would loop through the different tables! However, I still could not get it to display the results without going to SQL Plus and typing 'print c;'.
    3. So, finally I tried to create a looping wrapper around the ref cursor to have some variable (ctr) increment so my query would get performed on table0_cells through table17_cells. This, too, did not work.
    If I manually go to SQL Plus and type:
    variable ctr number
    begin
    :ctr := 1;
    end;
    exec dupe_find(1,:c);
    it will execute for the first table (klx_uln_p001_cells) and I can then type 'print c' to see what was returned. But when I try putting this within a wrapper PL/SQL block with a Loop to make ctr go from 0 - 17 (to loop through table_names klx_uln_p000_cells to klx_uln_p017_cells), it does not work.
    Help! It should be very simple to loop through tables, shouldn't it? I just want a script that will loop through tables, perform a query on each table and display the results. For some reason, I can only find documentation examples on looping through columns that are all in the same table.
    Dave

    Here's a working example using your first strategy ...
    create table t1 (id number);
    create table t2 (id number);
    insert into t1 values (100);
    insert into t1 values (101);
    insert into t2 values (200);
    insert into t2 values (201);
    declare
    v_table_name user_tables.table_name%type;
    type ttab_id is table of t1.id%type index by binary_integer;
    tab_id ttab_id;
    begin
    for i in 1 .. 2 loop
    v_table_name := 't' || i;
    execute immediate 'select id from ' || v_table_name
    bulk collect into tab_id;
    dbms_output.put_line('query from ' || v_table_name);
    for j in 1 .. tab_id.count loop
    dbms_output.put_line(tab_id(j));
    end loop;
    end loop;
    end;
    There are many other ways to do this (especially if you need to do more than just print out the data).
    Richard

  • Document not posting through F-02 BDC in background.

    Hi,
    While trying to post park documents for a company code through F-02 using BDC in background mode N, when any single document is having any error then all the documents for that company code are going in error state and not getting posted.When checked in debug mode for the error document, it is showing the Profit center field is not present on screen at BDC whereas the profit center field is actually passed and is present.Please advise.
    Edited by: rohan.das on Dec 20, 2011 2:40 PM

    There is a POP-Up window in the process, that is not coming in background. identify that screen no and not pass any data, another option is pass OK_CODE for that particular screen.
    Hope it's might be useful for you.
    Thanks,
    Prarthan

  • Uploading HR Master Data through LSMW or BDC

    I want to upload the HR Master Data to the system through LSMW or BDC, I am aware that for some infotypes like 000,1 &2 BDC is more suited, whereas for other infotypes LSMW is more convenient. I would like to understand how to start the activity. Should I start with infotype 0000 first and then 0001 and so on or can I take any infotype randomly and upload? What I mean is, is there any dependency that an infotype data can be loaded only after certain other related infotype data is loaded first? e.g. can load infotype 0006 first and then infotype 0001?
    Also please guide me on for which infotype LSMW is preferred and for which infotype BDC is preferred? Can BDC be used within LSMW?
    -Shambhvi

    Hi,
    Do it like this way:- come into recording screen and give tcode PA40 now select in PA40 screen hiring action>execute> fill the details>save when 0001 screen wil open click on back button.> now in second step> give any name and discr.>save>back> third step> click on table button and give >
    PERNR     c     8
    EINDA     ddmm     10
    SELEC_01     c     1
    BEGDA     ddmm     10
    ENDDA     ddmm     10
    MASSN     c     2
    MASSG     c     2
    PLANS     c     8
    WERKS     c     4
    PERSG     c     1
    PERSK     c     2
    4) save it
    5) select PA40 click on etras> auto feild mapping press enter when date format will come select 2nd option. save
    7)specify flat file with tabular option
    8) assign it
    9, 10,11,12,13 & 14 just execute
    Thanks and regards,
    ARU

  • Table control through screens

    hello friends,
    i was informed that i would be working on table controls through dialogue program,
    if any one has a sample code for tabel control through screens,
    plz post it here, so that , i can understand which command is to use for what, and what would be most common commands.
    thank you in  advance.

    Hello,
    Check this sample
    **********      Trancsaction code-  ‘zrtc’ **********************
    ***********     Default Screen- ‘1000’   ************************
    PROGRAM ZRAVI_TABLECONTROL message-id zrtc.
    *Displaying data from VBAP,VBAK and VBKD tables using table control
    tables : VBAP,VBAK,VBKD.
    controls : tab_cntrl type tableview using screen '2000'.
    data : begin of it_sales occurs 0,
           vbeln like VBAP-vbeln,
           matnr like VBAP-matnr,
           erdat like VBAK-erdat,
           ernam like VBAK-ernam,
           auart like VBAK-auart,
           konda like VBKD-konda,
           kdgrp like VBKD-kdgrp,
           end of it_sales.
    data : l_count type i.
    *&      Module  USER_COMMAND_1000  INPUT
    *       text
    MODULE USER_COMMAND_1000 INPUT.
    case sy-ucomm.
      when 'SHOW'.
        if VBAP-MATNR ne ''.
          select vp~vbeln vp~matnr vk~erdat vk~ernam vk~auart vd~konda
          vd~kdgrp into corresponding fields of table it_sales from
          ( ( VBAP as vp inner join VBAK as vk on vp~vbeln = vk~vbeln )
          inner join VBKD as vd on vk~vbeln = vd~vbeln )
          where vp~matnr = VBAP-MATNR.
       else.
           select vp~vbeln vp~matnr vk~erdat vk~ernam vk~auart vd~konda
          vd~kdgrp into corresponding fields of table it_sales from
          ( ( VBAP as vp inner join VBAK as vk on vp~vbeln = vk~vbeln )
          inner join VBKD as vd on vk~vbeln = vd~vbeln ).
       endif.
    **   leave to list-processing.
    **   *For testing the query
    **   loop at it_sales.
    **     write : / it_sales-matnr.
    **   endloop.
    **  *End testing of query
         call screen '2000'.
       when 'EXIT'.
         leave program.
    endcase.
    ENDMODULE.                 " USER_COMMAND_1000  INPUT
    *&      Module  STATUS_2000  OUTPUT
    *       text
    MODULE STATUS_2000 OUTPUT.
    *  SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'Sales Document Information'.
    ENDMODULE.                 " STATUS_2000  OUTPUT
    *&      Module  USER_COMMAND_2000  INPUT
    *       text
    MODULE USER_COMMAND_2000 INPUT.
      case sy-ucomm.
        when 'BACK'.
          leave to screen '1000'.
        when 'P--'.
          perform paging using 'P--'.
        when 'P-'.
          perform paging using 'P-'.
        when 'P+'.
          perform paging using 'P+'.
        when 'P++'.
          perform paging using 'P++'.
      endcase.
    ENDMODULE.                 " USER_COMMAND_2000  INPUT
    *&      Module  GET_CTRL_SALES  INPUT
    *       text
    MODULE GET_CTRL_SALES INPUT.
      case sy-ucomm.
        when 'SAVE'.
        data : line_count type i value 0.
            modify it_sales index tab_cntrl-current_line.
            line_count = line_count + 1.
    *      *VBAP,VBAK and VBKD tables
    *           vbeln like VBAP-vbeln,
    *           matnr like VBAP-matnr,
    *           erdat like VBAK-erdat,
    *           ernam like VBAK-ernam,
    *           auart like VBAK-auart,
    *           konda like VBKD-konda,
    *           kdgrp like VBKD-kdgrp,
    *      update VBAP set vbeln = it_sales
    *       if sy-subrc = 0.message i001.endif.
             IF SY-SUBRC = 0 AND SY-TABIX > LINE_COUNT.
             MESSAGE E001 WITH LINE_COUNT.
    *         STOP.
             ENDIF.
    *LEAVE TO LIST-PROCESSING.
    *WRITE : 'TABIX',SY-INDEX,'LINE',LINE_COUNT.
      endcase.
    ENDMODULE.                 " GET_CTRL_SALES  INPUT
    *&      Module  FILL_TAB_CNTRL  OUTPUT
    *       text
    MODULE FILL_TAB_CNTRL OUTPUT.
      read table it_sales index tab_cntrl-current_line.
      l_count = sy-loopc.
    *  leave to list-processing.
    *  write : l_count,tab_cntrl-top_line.
      if sy-subrc ne 0.exit from step-loop.endif.
    ENDMODULE.                 " FILL_TAB_CNTRL  OUTPUT
    *&      Module  GET_MESSAGE  INPUT
    *       text
    MODULE GET_MESSAGE INPUT.
    *        if sy-subrc = 0.
    *        message i001 with line_count.
    *        endif.
    ENDMODULE.                 " GET_MESSAGE  INPUT
    *&      Form  PAGING
    *       text
    *      -->P_0189   text
    FORM PAGING USING    code.
      data : i type i,
             j type i.
      case code.
        when 'P--'.
          TAB_CNTRL-top_line = 1.
        when 'P-'.
          TAB_CNTRL-top_line = TAB_CNTRL-top_line - l_count.
          message i001.
          if TAB_CNTRL-top_line le 0.
            TAB_CNTRL-top_line = 1.
          endif.
        when 'P+'.
          i = TAB_CNTRL-top_line + l_count.
          j = TAB_CNTRL-lines - l_count + 1.
          if j le 0.j = 1.endif.
          if i le j.
            TAB_CNTRL-top_line = i.
          else.
            TAB_CNTRL-top_line = j.
          endif.
        when 'P++'.
          TAB_CNTRL-top_line  = TAB_CNTRL-lines - l_count + 1.
          if TAB_CNTRL-top_line le 0.
            TAB_CNTRL-top_line = 1.
          endif.
      endcase.
    ENDFORM.                    " PAGING
    *&      Module  INIT_CONTROL  OUTPUT
    *       text
    MODULE INIT_CONTROL OUTPUT.
      TAB_CNTRL-top_line = 1.
    ENDMODULE.                 " INIT_CONTROL  OUTPUT
    **********************    flow logic of  screen ‘2000’  ********************
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_2000.
    module init_control.
    loop with control tab_cntrl.
      module fill_tab_cntrl.
    endloop.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_2000.
    loop with control tab_cntrl.
      field SEL module get_ctrl_sales on input.
    endloop.
    *module get_message.
    ******************** End of flow logic  ************************
    If useful reward.
    VAsanth

  • How to handle dynamic screens in bdc

    HI SIR,
    i am working on BDC for CA02 in this i have probelm that if operation 10 it doesnot contains any items it showing one  screen and if operation 10 contain some items
    and its item counter increasing automatically in this case it coming to this screen through some other screen.so.plz help me how to handle this dynamic screens in bdc ,plz help.

    hi sir,
              now i am working BDC UPLOAD with tcode CA02 in this in second screen their are some rows like in table control
    opt
    10                x
    20
    30                 x
    like above in this if row one of column contains 'x' then if i want to fill sub item then it display i one screen EX 100 else if it dsplay screen 200(ie item 10 already contains subitems it display  x in one row column(i.e selected check box) else it show unselected check box.plz tell how to know wheather check box is selected or not from screen to .plz tell.
    thanking u

  • Problem when loop through a list within CollectionModel

    In my bean, I have these codes to define a node.
    Map<String, Object> node = new HashMap<String, Object>();
    node.put("Nodeid", nodeid);
    List theColors = new ArrayList();
    node.put("Colors", colors);
    node.put("Type", type);
    node.put("Desc", desc);
    Then, a list of these nodes are converted to CollectionModel using ModelUtils.toCollectionModel(nodes);
    In my jspx, I am able to loop through nodes, and get Type, Nodeid and Desc from the node to show on the screen.
    I am trying to loop through the list of colors within the node to draw circles with different diameter.
    <af:forEach var="theColor" items="#{node.Colors}" varStatus="vs">
    <dvt:pointLocation pointX="50%" pointY="50%">
    <dvt:marker id="mk2" scaleX="#{15-vs.index*2}" scaleY="#{15-vs.index*2}" shape="circle" fillColor="#{theColor}" />
    </dvt:pointLocation>
    </af:forEach>
    But above code does not work.
    Can someone help me? Any suggestions?
    Thanks.

    I want to call a javascript function inside a c:forEach loop.Nope sorry, won't work.
    Java/JSP runs on the server. At the server end, any html/script code is just template text to output to an html file.
    The server produces an html file, and sends it to the client.
    Java stops running.
    Java cannot call javascript, javascript can not call java. There is no direct communication.
    Java code can produce javascript code to run on a page.
    The only communication javascript has back with the server is if it makes a request (click a link, submit a button, Ajax call...)

  • Multi-record block (how do I loop through the block)

    I created a two canvas form. On the first canvas, the user enters data and selects 1 - 30
    reports that they want to run. When they click on <NEXT> button, I create a multi-record
    control block and display each record on the second screen using
    go_block;
    clear_block;
    move data;
    create_record;
    The user then selects on the second canvas which reports to run now and which to run later via
    a LOV. When they press the <RUN> button, I want to start at the first record and either run the
    report or schedule it. Then I want to move onto the second and the third until all selected reports
    have been handled. I know I should use a loop but can't seem to make it work.
    So my question is, How do I loop through the records in a multi-record control block, pass the information
    for that one record to a parameter form and then execute the request? Each control block record contains
    10 parameter fields.
    Thanks.
    Bob

    go_record(1);
    << do your processing >> -- This is executed only for the first record.
    if :system.last_record = 'TRUE' then -- If the 1st record is also the last record.
    RETURN;
    end if;
    LOOP
    next_record;
    << do your processing >>
    if :system.last_record = 'TRUE' then
    EXIT;
    end if;
    END LOOP;
    I created a two canvas form. On the first canvas, the user enters data and selects 1 - 30
    reports that they want to run. When they click on <NEXT> button, I create a multi-record
    control block and display each record on the second screen using
    go_block;
    clear_block;
    move data;
    create_record;
    The user then selects on the second canvas which reports to run now and which to run later via
    a LOV. When they press the <RUN> button, I want to start at the first record and either run the
    report or schedule it. Then I want to move onto the second and the third until all selected reports
    have been handled. I know I should use a loop but can't seem to make it work.
    So my question is, How do I loop through the records in a multi-record control block, pass the information
    for that one record to a parameter form and then execute the request? Each control block record contains
    10 parameter fields.
    Thanks.
    Bob

  • Cannot loop through values in Node

    Hi Everyone,
    I am using a TreeNestedInTable UI.  I have 2 columns: a Master Column with a TextView Cell Editor, and a field called "Check" whereby one of the values in the Master Column can be selected.  The "checked" attribute of the Check column is mapped to a isChecked attribute in my Node that contains all the data being displayed in the TreeNestedInTable (IncidentAgent Node).
    I would like to loop through all the Check boxes ticked in this TreeNestedInTable and get the corresponding Value to write to a Test Node (to make sure that I am in fact reading all cheked rows).
    I do not seem to, however, get all the values checked.  Please see my code below and comment.  I am testing and so I put a button on the screen that should loop through all the values and see which ones are checked.  It should then write these checked valus to a node that is also linked to a table control on the screen.  The Idea is that each time you check a few values they should be displayed in this table control when the button is pressed.  This is not happening - the table stays blank.
    public void onActionSeeIACollection(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionSeeIACollection(ServerEvent)
           IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
           //New Element added each time:
           ITEST_IA_NODEElement newElement;
           //Incident Agent element:
           IIncidentAgentElement agentElement;
           //Loop through ALL the IncidentAgent Elements and see which ones hace got the "Check" value
           //flagged:
           for(int i=0;i<wdContext.nodeIncidentAgent().size();i++)
                //Get the currently processed element:
                agentElement = wdContext.nodeIncidentAgent().getIncidentAgentElementAt(i);
                //If the Check value is flagged, add it to the TEST_IA_NODE node:
                if(agentElement.getCheck())
                     newElement = wdContext.createAndAddTEST_IA_NODEElement();
                     newElement.setVALUE(agentElement.getVALUE());
                     msgMgr.reportSuccess(agentElement.getVALUE());
                }//end if
           }//end for
        //@@end

    Sure.  Thank you for your help.
    "Data Containing" Node:
    h1  IncidentAgent(Top Level Node)
         h2 RecursiveNode(Pointing to IncidentAgent as recursiveNode)
           h4 Check (boolean attribute)
           h4 ChildrenLoaded (boolean attribute for TreeNestedInTable)
           h4 Expanded (boolean attribute for TreeNestedInTable)
           h4 IsLeaf (boolean attribute for TreeNestedInTable)
           h4 NODE_ID (attribute)
           h4 PARENT_ID (attribute)
           h4 VALUE (attribute)
    Collection Cardinality: 0...N
    Selection Cardinality: 0...N
    Singleton: TRUE
    Node that should contain VALUE attribute from node above if Check attribute above is checked
    h1 TEST_IA_NODE
           h4 VALUE
    Collection Cardinality: 0...N
    Selection Cardinality: 0...N
    Singleton: TRUE

  • Nested Loops...looping through one month of data at a time year by year

    Hi all,
    I'm trying to create an insert statement that loops through a table that has 10 years of data (2001 to 2010) month by month to minimize impact on server and commits more frequently to avoid filling up the redo logs and rollback tablespaces. The table is large, has about 40 millions records per year. Lets say the structure of the table is the following:
    Customer_ID number(9),
    Order_Item_1 number(6),
    Order_Item_2 number(6),
    Order_Item_3 number(6),
    Order_date date
    The table is in flat format but I want to normalize it so that it looks like the following:
    Customer_ID Order_Seq Order_Item Order_date
    999999999 1 555555 01-jan-2001
    999999999 2 666666 01-jan-2001
    999999999 3 444444 01-jan-2001
    888888888 1 555555 03-jan-2001
    888888888 2 666666 03-jan-2001
    But because I want to loop through month by month....I need to set it up so that it loops through month by month, year by year (Using the Order Date Field) and Order_item by Order_item. Something like:
    so my insert statements would be something like if I hardcoded instead of put the insert statement into a loop:
    insert into orders_normalized
    (Customer_id,Order_seq,Order_item,Order_date) select customer_id,1,Order_item,Order_date where Order_item_1 is not null and to_char(order_date,'yyyy') = '2001' and to_char(order_date,'mm')='01';
    insert into orders_normalized
    (Customer_id,Order_seq,Order_item,Order_date) select customer_id,2,Order_item,Order_date where Order_item_2 is not null and to_char(order_date,'yyyy') = '2001' and to_char(order_date,'mm')='01';
    insert into orders_normalized
    (Customer_id,Order_seq,Order_item,Order_date) select customer_id,3,Order_item,Order_date where Order_item_3 is not null and to_char(order_date,'yyyy') = '2001' and to_char(order_date,'mm')='01';
    insert into orders_normalized
    (Customer_id,Order_seq,Order_item,Order_date) select customer_id,1,Order_item,Order_date where Order_item_1 is not null and to_char(order_date,'yyyy') = '2001' and to_char(order_date,'mm')='02';
    insert into orders_normalized
    (Customer_id,Order_seq,Order_item,Order_date) select customer_id,2,Order_item,Order_date where Order_item_2 is not null and to_char(order_date,'yyyy') = '2001' and to_char(order_date,'mm')='02';
    insert into orders_normalized
    (Customer_id,Order_seq,Order_item,Order_date) select customer_id,3,Order_item,Order_date where Order_item_3 is not null and to_char(order_date,'yyyy') = '2001' and to_char(order_date,'mm')='03';
    Hope this makes sense.
    Thanks

    Does the sequence of items in an order really matter? In other words, do we really need to preserve that an item was in position 2 versus position 1? I bet that the sequence or position of each item in an order is not meaningful. They were probably numbered 1, 2, and 3 just to make them uniquely named columns so there would be three slots to hold up to 3 items in the denormalized table.
    You only have about 400 million rows to insert, so it could feasibly be done in a single transaction (depending on your database environment).
    You can always do a create table as select (CTAS) to help with undo / redo issues and get better performance. You could run it in parallel, and spit it out to a new table partitioned by month. Single DDL statement running in parallel making your new table--sounds good to me.
    How about something like this:
    CREATE TABLE ORDERS_NORMALIZED
    (CUSTOMER_ID, ORDER_ITEM, ORDER_DATE)
    PARTITION BY RANGE(ORDER_DATE)
    PARTITION p200901 VALUES LESS THAN (TO_DATE('200902','YYYYMM')),
    PARTITION p200902 VALUES LESS THAN (TO_DATE('200903','YYYYMM')),
    PARTITION p201012 VALUES LESS THAN (TO_DATE('201101','YYYYMM'))
    as SELECT CUSTOMER_ID, ORDER_ITEM_1, ORDER_DATE
       FROM OTHER_TABLE
       WHERE ORDER_ITEM_1 IS NOT NULL
       UNION ALL
       SELECT CUSTOMER_ID, ORDER_ITEM_2, ORDER_DATE
       FROM OTHER_TABLE
       WHERE ORDER_ITEM_2 IS NOT NULL
       UNION ALL
       SELECT CUSTOMER_ID, ORDER_ITEM_3, ORDER_DATE
       FROM OTHER_TABLE
       WHERE ORDER_ITEM_3 IS NOT NULL.....................
    Out of curiosity, why not normalize it further? You could have used two tables instead of one.
    One (ORDER) with:
    ORDER_ID
    CUSTOMER_ID
    DATE
    Order_id would be a new surrogate key / primary key.
    Another table (ORDER_ITEM) with:
    ORDER_ID
    ORDER_ITEM
    It would be a table that links ORDERS to ITEMS. You get the idea.

  • Loop at Screen problem

    Hi,
    I am facing a few hicups in my code, I needed to make certain FIelds as updateable and some as non updateable but the problem is that this is not happening. Can you tell me where i am going wrong. I have written this code in my PBO at the end. The Code should enable FIELD KAWRT for the 1st Line and disable the rest, while for the others it should enable Field KWERT. what is the problem in my code.
      LOOP AT itab.
        IF sy-tabix = 1.
          LOOP AT SCREEN.
            IF screen-name = 'ITAB-KSCHL' OR
               screen-name = 'ITAB-KBETR' OR
               screen-name = 'ITAB-KWERT'.
              screen-input = '0'.
              screen-output = '0'.
              MODIFY SCREEN.
            ELSEIF screen-name = 'ITAB-KAWRT'.
              screen-input = '1'.
              screen-output = '1'.
              MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        ENDIF.
        READ TABLE i_kschl WITH KEY kschl = itab-kschl.
        IF sy-subrc = 0.
          LOOP AT SCREEN.
            IF screen-name = 'ITAB-KSCHL' OR
               screen-name = 'ITAB-KAWRT' OR
               screen-name = 'ITAB-KBETR'.
              screen-input = '0'.
              screen-output = '0'.
              MODIFY SCREEN.
            ELSEIF screen-name = 'ITAB-KWERT'.
              screen-input = '1'.
              screen-output = '1'.
              MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDLOOP.

    Hi,
    Its happening so because as in your code:
    LOOP AT itab.
    IF sy-tabix = 1.
    LOOP AT SCREEN.                             "This is executed for the First Time That's *FINE*
    IF screen-name = 'ITAB-KSCHL' OR
    screen-name = 'ITAB-KBETR' OR
    screen-name = 'ITAB-KWERT'.
    screen-input = '0'.
    screen-output = '0'.
    MODIFY SCREEN.
    ELSEIF screen-name = 'ITAB-KAWRT'.
    screen-input = '1'.
    screen-output = '1'.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ENDIF.
    READ TABLE i_kschl WITH KEY kschl = itab-kschl.   
    *THIS PART OF CODE IS EXECUTED ALWAYS WHICH YOU DON'T  WANT SO THIS  SHUD BE IN ELSE PART OF _*IF SY-TABIX = 1**_                                             
    IF sy-subrc = 0.
    LOOP AT SCREEN.
    IF screen-name = 'ITAB-KSCHL' OR
    screen-name = 'ITAB-KAWRT' OR
    screen-name = 'ITAB-KBETR'.
    screen-input = '0'.
    screen-output = '0'.
    MODIFY SCREEN.
    ELSEIF screen-name = 'ITAB-KWERT'.
    screen-input = '1'.
    screen-output = '1'.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ENDIF.
    ENDLOOP.
    DO LIKE:
    LOOP AT itab.
    IF sy-tabix = 1.
    LOOP AT SCREEN.                     
    ENDLOOP.
    ELSE.
    READ TABLE i_kschl WITH KEY kschl = itab-kschl.   
    ENDIF.

  • Doubt in loop at screen

    i am using two dates in the selection screen one is ERDAT and another is BNDDT.
    these two fileds are obligatory.
    i am using radiobutton to enable these field. look at my coding
      IF p0 = 'X'.
        LOOP AT SCREEN.
          IF screen-name = 'S_BNDAT-LOW' OR
             screen-name = 'S_BNDAT-HIGH' OR
             screen-group1 = 'SC1'.
             screen-input = '0'.
            MODIFY SCREEN.
            CLEAR screen.
          ENDIF.
        ENDLOOP.
      ENDIF.
      IF p1 = 'X'.
        LOOP AT SCREEN.
          IF screen-name = 'S_ERDAT-LOW' OR
             screen-name = 'S_ERDAT-HIGH' OR
             screen-group1 = 'SC1'.
            screen-active = '0'.
             MODIFY SCREEN.
            CLEAR screen.
          ENDIF.
        ENDLOOP.
      ENDIF.
    if i select p1 ,the screen displays error message like fill in all required entry.
    if the fileds are not obligatory its working fine.
    how to over come this.
    Regards,
    Bala
    Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 2:48 PM

    hi..
    step 1) just use "MODIFY ID "  for the field in your selection-screen to make it into one group.
    EX:
    select-options:   s_cajo  for  tcj_documents-cajo_number
                                   modif id cas.
    step2) in your at selection-screen .
    just loop the screen and make it required..as follows:
    EX:
        loop at screen.
          if screen-group1 = 'CAS'.
            screen-required = 1.
           screen-input     = 0.
            screen-active    = 1.
            endif.
          modify screen.
        endloop.
    I think it will helps you..
    UR's
    GSANA
    Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 2:49 PM

Maybe you are looking for

  • Adobe Photoshop CS4 has stopped working

    I recently purchased and installed Adobe CS4 Design Premium for my new sony vaio LV. Right away I noticed that Photoshop and Bridge do not have the proper logos in the application list. Once I opened Photoshop (64 bit) It seemed to work fine. I opene

  • In operator

    Hi, I have doubt in "IN Operator" DECLARE COND CONSTANT VARCHAR2(100) := '''MCF_INS'',''MCF_TGP'''; COND1 VARCHAR2(100) := 'MCF_TGP,MCF_INS'; NO NUMBER; BEGIN SELECT COUNT(1) INTO NO FROM ACCOUNTS WHERE ACC_PRODUCT_CATEGORY_cD_F IN( COND1); ---Can I

  • Email Photos as Attachments from Lightroom 5

    Is it possible to email photos as attachments (jpg), not embededed within email?  Mac users report when they receive the email, photo is only embedded, there is no attachment so they cannot download.

  • Dynamic parameter with unlinked table

    Post Author: martinh CA Forum: Data Connectivity and SQL Hello, I have 2 tables in my database. One table (table A) is for selecting the data (all kind of fields) The other table (table B) is only to be used to have a parameter selection (table with

  • Federated Portal Network Implementation

    Hi All, I was trying to implement FPN between CE and SAP Netweaver 7.0 using remote role assignment. I made ce as the producer portal and the other as consumer. I am able to see all the roles in consumer portal.  But when i login with the new user on