How to build n Tree from Vector

Hi,
i just want to build an n Tree from Vector.
the Vector contains the elements {1,2,3,4}
the tree should be like this (actually it should not be limited to 3 child, but just as an Example)
i will be happy to use the jTree from Sun
++1
+++2
++++3
+++++4
+++++4
+++++4
++++3
+++++4
+++++4
+++++4
++++3
+++++4
+++++4
+++++4
+++2
++++3
+++++4
+++++4
+++++4
++++3
+++++4
+++++4
+++++4
++++3
+++++4
+++++4
+++++4
+++2
++++3
+++++4
+++++4
+++++4
++++3
+++++4
+++++4
+++++4
++++3
+++++4
+++++4
+++++4
any Ideas?
thanx.

Massive crosspost. Answer here if you must.
http://forum.java.sun.com/thread.jsp?forum=4&thread=444422

Similar Messages

  • How to build a String from Date?

    How to build a String from class Date?
    How to get the year, month, day, hour ... from a Date object.

    Ok to build a string use this function in java.util.Date
    toString()
    TO get year, date, etc u can use the following functions
    getYear()
    getDate()
    This link might help u more
    http://java.sun.com/products/jdk/1.1/docs/api/java.util.Date.html

  • Lightroom 2.6 trial download - how to build a catalog from scratch.

    I have downloaded Lightroom 2.6 trial version and am trying to build a small catalog for it.  I don't need my whole Photoshop Elements 8 (PSE 8) catalog, but I would like to build a small catalog out of images in the My Pictures folder so that I can experiment with this software.  It recognizes the existence of my old PSE 6 catalog, but says it is corrupt and ask about building a new catalog. It will not recognize my PSE 8 catalog.  How do I go about bypassing this "catalog recognition step" and go right to that part of the software that will let me build a catalog from the images contained in various folders in the My Pictures main folder.  Unless I can get to the part where I can build a catalog to test out LR 2.6, then I am stuffed (as the Aussies would say) as far as testing this product.  Maybe I need to download the Lightroom 3 Beta and see if it will recognize my PSE 8 catalog.  Any suggestions, insight on how to resolve this dilemma are greatly appreciated.  Thanks.
    Regards,
    WesternGuy

    When I bring up LR, it asks me if I want to buy or try...so to speak, I check off <try> and the <Next> and <Back> buttons are immediately greyed out and the only thing I can do is click on <Finish> or <Cancel>.  If I click on <Finish>,  It tells me that "the Lightroom catalog named "catalog" cannot be opened because it is not valid. Would you like to select a different catalog".  The catalog is not registered as a valid catalog."  It tells me where this invalid catalog is and then I have a choice of buttons that ask me to "choose a different catalog" or another button that says "Exit".  If  I select "choose a different catalog, then it asks for a location and gives me a button that says "Create a new catalog", it then goes to the My Pictures folder inside a panel that has at the top "Create folder with New Catalog" and then I don't seem to be able to do anything it likes. I never get to a menu that gives me the "File/New Catalog" option.(???)
    Maybe I need to uninstall and reinstall LR2.6.
    Regards,
    WesternGuy

  • How to build tag cloud from text document

    Hi,
    I want to build tag cloud from text documents.
    The text dcouments has several lines of sentence.
    The tag shows long sentense, not key words.
    Please let me know how to build.
    And Can I use CAS or text enrichment?
    Thank you very much.
    SWKO

    Hi,
    You need to extract salient terms (e.g. people or product names) from your text documents by using the text enrichment or the text tagger component.
    This step will generate new attributes, which can be used in your tag cloud.
    Mathias

  • How to build a treetable from a managed bean.

    Hi,
    How to point the tree table component value to the tree built in Managed bean. so that Value for the tree is comming from managed bean.

    Suganya,
    How does that example help? In that example, the data model for the tree table is ADF Business Components, where the original poster wants the data from a Java bean.
    I see you posted a different link which also uses ADF Business Components as the data model, so my original comment still applies
    John

  • Building netui:tree from XML

              Hi,
              I am trying to build a Tree in Workshop 8.1 using netui:tree tag (for data in
              an XML file).
              The BEA docs say that we have to assign the TreeNode object to the 'tree' attribute
              in the netui:tree tag.
              What is the best way to translate the XML doc into a TreeNode object(s)?
              Thanks,
              Ajay
              

              "Ajay Oruganti" <[email protected]> wrote:
              >
              >Hi,
              >
              >I am trying to build a Tree in Workshop 8.1 using netui:tree tag (for
              >data in
              >an XML file).
              >
              >The BEA docs say that we have to assign the TreeNode object to the 'tree'
              >attribute
              >in the netui:tree tag.
              >
              >What is the best way to translate the XML doc into a TreeNode object(s)?
              >
              >
              >Thanks,
              >Ajay
              Did you resolve your problem?
              I have the similar one.
              So. I can draw my tree for my data, but if i receive second xml document with
              new data and try repaint the tree, i have the same tree, whitout changes.
              Can you help me?
              Best regards
              Hubert.
              

  • How to create dynamic tree from db resultset?

    i have a db and sql that includes item_id, parent_id, level, description for all hierarchy.
    i want to show this resultset on the page as a adf tree component. How to convert from db resultset to adf tree?
    that is my sql -&gt;SELECT LEVEL, display_title, item_id, parent_id, sac_Hierarchy.Branch(level,description) branch FROM XXXTABLE CONNECT BY job_code = 'ABCD' AND PRIOR item_id = parent_id START WITH job_code = 'ABCD' AND parent_id IS NULL;
    What can i do on backing java or what can i do on jsp page?
    Help Please.
    thanks
    Edited by: Mehmet Özkan on Aug 30, 2008 12:19 PM

    mehmet,
    Have you seen [url http://technology.amis.nl/blog/?p=2116]this?
    John

  • How to populate a tree from .aspx file?

    Hi,
    I'm very new to flex. I have a .aspx file which has xml populated in it. I would like to populate the tree based on the values of the .aspx file. Here is my code which i have tried doing this functionality but it couldn't worked out. Could anyone help me out to resolve this problem.
    This is my sample aspx file:
    Sample.aspx:
    <?xml version="1.0" encoding="utf-8"?>
    <myTree label="Main Root">
    <node label="Root">
    <node label="Folder a">
    <node label="item 1 a"/>
    </node>
    <node label="Folder b">
    <node label="item 1 b"/>
    <node label="item 2 b"/>
    </node>
    <node label="Folder c">
    <node label="item 1 c"/>
    <node label="item 2 c"/>
    </node>
    <node label="Folder d">
    <node label="item 1 d"/>
    <node label="item 2 d"/>
    </node>
    </node>
    </myTree>
    Here is my mxml file which i was trying:
    TreefromXml.mxml:
    <?xml version="1.0" encoding="utf-8"?><mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="XmlRpc.send()">
    <mx:Script>
    <![CDATA[
    importmx.collections.ArrayCollection;
    importmx.rpc.events.FaultEvent;
    importmx.rpc.events.ResultEvent;
    importmx.controls.Alert;
    public var XmlNode:XML=newXML();
    public function HandleXml(event:ResultEvent):void
    XmlNode= new XML(event.result.myTree.node);
    tree1.dataProvider=event.result.myTree.node; 
    public function HandleFault(event:FaultEvent):void
    Alert.show(event.fault.faultString, "Error"
    ]]>
    </mx:Script>
    <mx:HTTPService id="XmlRpc" url="Sample.aspx" result="HandleXml(event)" fault="HandleFault(event)"> 
    </mx:HTTPService>
    <mx:Panel id="panel1" width="400" height="200"> 
    <mx:Label id="label1" text="Sample Label" /> 
    <mx:Tree id="tree1" labelField="@label"> 
    </mx:Tree> 
    </mx:Panel>

    Hi Wolfman,
    I do not understand what you are trying to say. My requirement is to fetch xml from .aspxfile and then use it to populate the tree structure in flex. It would be great if you could share me with the piece of code which suites my requirement. Thanks
    Regards,
    Saravana

  • How to build a Report from workflow information

    Hi Friends,
    I want to create a sales order approval and rejection steps using workflow. For this I have created User Decision Step where I have included approval and rejection decisions. And it is working fine. But the thing is that user wants a report for later analyis by giving sales order info. in selection and in output he need SO number,creation date, approver name, how many times he rejected, rejection date, approval date etc. How to achieve this? Is there any standard report programs available to get this type of info? kindly assist me.
    Rewarded...
    Thanks in advanace,
    Steve.

    Hi Stephen!
    Take a look this example I've developed a report like this.
    REPORT ZSICREP001 .
    INCLUDE ZSICREP001I.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
        PARAMETERS: S_UNAME LIKE USR02-BNAME OBLIGATORY.
    SELECTION-SCREEN: END OF BLOCK B1.
    INITIALIZATION.
      PERFORM zf_init_alv USING p_var.
    START-OF-SELECTION.
      PERFORM busca_nome USING S_UNAME CHANGING LC_NAME.
      CONCATENATE 'Tarefas de:' LC_NAME INTO TITULO SEPARATED BY SPACE.
      PERFORM: busca_dados,
               prepara_dados,
               zf_monta_tabela_alv,
               zf_monta_layout,
               ZF_SORT_SUBTOTAL,
               zf_executa_funcao_alv TABLES t_alv USING ' '.
    END-OF-SELECTION.
    Executa a busca dos dados no BD.
    Form Busca_Dados.
         CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
              EXPORTING
                 percentage = 15
                 text       = 'Buscando dados ...'.
      Busca o histório das tarefas executadas pelo usuário informado.
         Select WI_ID
                METHOD
                METH_EDATE
                METH_ETIME
         FROM SWWLOGHIST
         INTO TABLE T_SWWLOGHIST
         WHERE METHOD    EQ 'SWW_WI_STATUS_TO_COMPLETED' AND
               METH_USER EQ S_UNAME.
         IF SY-SUBRC EQ 0.
          BUSCA O LOG DE CRIAÇÃO DA TAREFA
            Select WI_ID
                   METHOD
                   METH_EDATE
                   METH_ETIME
            FROM SWWLOGHIST
            INTO TABLE T_SWWLOGHIST_CRIA
            FOR ALL ENTRIES IN T_SWWLOGHIST
            WHERE WI_ID     EQ T_SWWLOGHIST-WI_ID AND
                  METHOD    EQ 'SWW_WW_CREATE'    AND
                  METH_USER EQ 'WF-BATCH'.
         ENDIF.
         CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
              EXPORTING
                percentage = 35
                text       = 'Buscando dados ...'.
      Busca as tarefas aguardando execução do usuário.
         CONCATENATE 'US' S_UNAME INTO S_ORG_OBJ.
         Select WI_ID
         FROM SWWORGTASK
         INTO TABLE T_SWWORGTASK
         WHERE ORG_OBJ EQ S_ORG_OBJ.
    Para cada tarefa aguardando execução, busca o evento de criação da
    tarefa e appenda na tabela de histórico
         IF SY-SUBRC EQ 0.
            SORT T_SWWORGTASK BY WI_ID.
            Select WI_ID
                   METHOD
                   METH_EDATE
                   METH_ETIME
            FROM SWWLOGHIST
            APPENDING TABLE T_SWWLOGHIST_CRIA
            FOR ALL ENTRIES IN T_SWWORGTASK
            WHERE WI_ID     EQ T_SWWORGTASK-WI_ID AND
                  METHOD    EQ 'SWW_WW_CREATE'    AND
                  METH_USER EQ 'WF-BATCH'.              .
         ENDIF.
         CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
              EXPORTING
                percentage = 45
                text       = 'Buscando dados ...'.
    Endform.
    PREPARA OS DADOS
    FORM prepara_dados.
    DATA: lc_hoje  like SWWLOGHIST-METH_EDATE,
          lc_index type i.
    LC_HOJE = SY-DATUM.
    CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
         percentage = 50
         text       = 'Preparando dados ...'.
    SORT T_SWWLOGHIST      BY WI_ID METH_EDATE METH_ETIME.
    SORT T_SWWLOGHIST_CRIA BY WI_ID.
    LOOP AT T_SWWLOGHIST_CRIA.
         PERFORM BUSCA_REQUISICAO USING T_SWWLOGHIST_CRIA-WI_ID
                                                 CHANGING l_NUM_REQ l_WIPAI.
    Se o número da req. vier em branco é porque o workitem nao é do SIC.
         IF NOT l_NUM_REQ IS INITIAL.
          BUSCA O EVENTO DE EXECUCAO DA TAREFA
            READ TABLE T_SWWLOGHIST WITH KEY WI_ID = T_SWWLOGHIST_CRIA-WI_ID
                                                              BINARY SEARCH.
            IF SY-SUBRC EQ 0.
               l_DTEXECTASK = T_SWWLOGHIST-METH_EDATE.
               l_HREXECTASK = T_SWWLOGHIST-METH_ETIME.
            ELSE.
               l_DTEXECTASK = ''.
               l_HREXECTASK = ''.
            ENDIF.
            T_ALV-WORK_ITEM        = T_SWWLOGHIST_CRIA-WI_ID.
            T_ALV-EXEC_TAREFA      = l_DTEXECTASK.
            T_ALV-HORA_EXEC_TAREFA = l_HREXECTASK.
            T_ALV-CRIA_TAREFA      = T_SWWLOGHIST_CRIA-METH_EDATE.
            T_ALV-HORA_CRIA_TAREFA = T_SWWLOGHIST_CRIA-METH_ETIME.
            T_ALV-REQUISICAO       = l_NUM_REQ.
            T_ALV-WIPAI            = l_WIPAI.
          BUSCA O TIPO DO FLUXO
            SELECT SINGLE FLUXO
            FROM ZSICREQUISICAO
            INTO T_ALV-FLUXO
            WHERE BANFN EQ T_ALV-REQUISICAO.
            APPEND T_ALV.
         ENDIF.
    ENDLOOP.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
           EXPORTING
                percentage = 75
                text       = 'Preparando dados ...'.
    SORT T_ALV BY REQUISICAO.
    LOOP AT T_ALV.
         AT NEW REQUISICAO.
    BUSCA O TIPO DO FLUXO
            SELECT SINGLE FLUXO
            FROM ZSICREQUISICAO
            INTO T_ALV-FLUXO
            WHERE BANFN EQ T_ALV-REQUISICAO.
            PERFORM BUSCA_LOG USING T_ALV-REQUISICAO
                                    T_ALV-FLUXO
                              CHANGING T_LOG.
         ENDAT.
         CLEAR: T_ALV-ICONE.
    BUSCA O LOG DE CRIACAO DO WORKITEM
         READ TABLE T_LOG WITH KEY WORKITEM = T_ALV-WORK_ITEM.
         IF SY-SUBRC EQ 0.
            T_ALV-TEXTO_LOG_CRIA = T_LOG-TEXTO_LOG.
         ELSE.
            T_ALV-TEXTO_LOG_CRIA = ''.
         ENDIF.
    BUSCA O LOG DE EXECUÇÃO DO WORKITEM
         IF SY-SUBRC EQ 0.
            lc_index = SY-TABIX.
            lc_index = lc_index + 1.
            READ TABLE T_LOG INDEX lc_index.
            IF SY-SUBRC EQ 0.
               T_ALV-TEXTO_LOG_EXEC = T_LOG-TEXTO_LOG.
            ELSE.
               T_ALV-TEXTO_LOG_EXEC = ''.
            ENDIF.
         ENDIF.
    Calcula o tempo que a tarefa ficou parada
         IF NOT T_ALV-EXEC_TAREFA = ''.
            T_ALV-DIAS = T_ALV-EXEC_TAREFA - T_ALV-CRIA_TAREFA.
         ELSE.
            T_ALV-DIAS = LC_HOJE - T_ALV-CRIA_TAREFA.
           WRITE icon_red_light AS ICON TO t_alv-icone.
         ENDIF.
         MODIFY T_ALV.
    ENDLOOP.
    ENDFORM.
    BUSCA A REQUISIÇÀO ATRAVES DO WORKITEM.
    FORM BUSCA_REQUISICAO USING l_WI CHANGING NUMREC WI_PAI.
    DATA: LC_NUMREC LIKE SWW_CONTOB-OBJKEY.
    CLEAR:  l_SWR_WIHDR.
    BUSCA O WORKITEM PAI.
    CALL FUNCTION 'SAP_WAPI_GET_HEADER'
        EXPORTING
          workitem_id         = l_WI
        IMPORTING
          WORKITEM_ATTRIBUTES = l_SWR_WIHDR.
    BUSCA O NUMERO DA REQUISICAO.
    SELECT SINGLE OBJKEY
    FROM SWW_CONTOB
    INTO LC_NUMREC
    WHERE WI_ID   EQ l_SWR_WIHDR-WI_CHCKWI AND
          ELEMENT EQ 'REQUISITIONHEADER'   AND
          OBJTYPE EQ 'BUS2105'.
    IF SY-SUBRC EQ 0.
       NUMREC = LC_NUMREC.
       WI_PAI = l_SWR_WIHDR-WI_CHCKWI.
    ELSE.
       NUMREC = ''.
       WI_PAI = ''.
    ENDIF.
    ENDFORM.
    Monta a estrutura do relatório
    FORM ZF_MONTA_TABELA_ALV.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
           EXPORTING
                percentage = 80
                text       = 'Montando a estrutura do relatório...'.
    CLEAR t_fieldcat.
    t_fieldcat-fieldname        = 'ICONE'.
    t_fieldcat-tabname          = 'T_ALV'.
    t_fieldcat-reptext_ddic     = 'Status'.
    t_fieldcat-inttype          = 'C'.
    t_fieldcat-no_out           = 'X'.
    APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname        = 'REQUISICAO'.
      t_fieldcat-tabname          = 'T_ALV'.
      t_fieldcat-reptext_ddic     = 'Requisição'.
      t_fieldcat-inttype          = 'C'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname        = 'CRIA_TAREFA'.
      t_fieldcat-tabname          = 'T_ALV'.
      t_fieldcat-reptext_ddic     = 'Dt.Rec.Tarefa'.
      t_fieldcat-inttype          = 'D'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname        = 'HORA_CRIA_TAREFA'.
      t_fieldcat-tabname          = 'T_ALV'.
      t_fieldcat-reptext_ddic     = 'Hr.Rec.Tarefa'.
    t_fieldcat-inttype          = 'C'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname        = 'TEXTO_LOG_CRIA'.
      t_fieldcat-tabname          = 'T_ALV'.
      t_fieldcat-reptext_ddic     = 'Log do recebimento da tarefa'.
      t_fieldcat-inttype          = 'C'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname        = 'EXEC_TAREFA'.
      t_fieldcat-tabname          = 'T_ALV'.
      t_fieldcat-reptext_ddic     = 'Dt.Exec.Tarefa'.
      t_fieldcat-inttype          = 'D'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname        = 'HORA_EXEC_TAREFA'.
      t_fieldcat-tabname          = 'T_ALV'.
      t_fieldcat-reptext_ddic     = 'Hr.Exec.Tarefa'.
    t_fieldcat-inttype          = 'C'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname        = 'TEXTO_LOG_EXEC'.
      t_fieldcat-tabname          = 'T_ALV'.
      t_fieldcat-reptext_ddic     = 'Log da execução da tarefa'.
      t_fieldcat-inttype          = 'C'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname        = 'DIAS'.
      t_fieldcat-tabname          = 'T_ALV'.
      t_fieldcat-reptext_ddic     = 'Dias'.
      t_fieldcat-inttype          = 'I'.
      t_fieldcat-do_sum           = 'X'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname        = 'WORK_ITEM'.
      t_fieldcat-tabname          = 'T_ALV'.
      t_fieldcat-reptext_ddic     = 'Work Item'.
      t_fieldcat-inttype          = 'C'.
      t_fieldcat-no_out           = 'X'.
      APPEND t_fieldcat.
    CLEAR t_fieldcat.
    t_fieldcat-fieldname        = 'WIPAI'.
    t_fieldcat-tabname          = 'T_ALV'.
    t_fieldcat-reptext_ddic     = 'WI Pai.'.
    t_fieldcat-inttype          = 'C'.
    t_fieldcat-no_out           = 'X'.
    APPEND t_fieldcat.
    ENDFORM.
          Form  zf_sort_subtotal
          Classificação e item de subtotalização
    FORM ZF_SORT_SUBTOTAL.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
           EXPORTING
                percentage = 90
                text       = 'Montando a estrutura do relatório...'.
         CLEAR t_sort.
         t_sort-spos      = 1.
         t_sort-fieldname = 'REQUISICAO'.
         t_sort-tabname   = 'T_ALV'.
         t_sort-up        = 'X'.
         t_sort-subtot    = 'X'.
         append t_sort.
         CLEAR t_sort.
         t_sort-spos      = 2.
         t_sort-fieldname = 'CRIA_TAREFA'.
         t_sort-tabname   = 'T_ALV'.
         t_sort-up        = 'X'.
         append t_sort.
    ENDFORM.
    BUSCA A LINHA DO LOG REFERENTE AO WORKITEM
    FORM BUSCA_LOG USING NUM_REQ TIPO_WFLOW CHANGING LOG STRUCTURE T_LOG.
    DATA: lh_wis like SWWWIHEAD occurs 0 with header line,
          lc_wiatual  type TP_DADOSWI,
          lc_noant    like ZSICDESETAPA-NODE_ID,
          lc_chckwi   like swwwihead-wi_chckwi,
          lh_itemlist like SWWWIHEAD occurs 0 with header line,
          lc_wid      like swwwihead-wi_id,
          lc_objkey   like SWW_CONTOB-OBJKEY.
    BUSCA TODAS AS INSTANCIAS DO FLUXO
    lc_objkey = NUM_REQ.
    call function 'SWI_WORKITEMS_OF_OBJECT_GET'
         exporting
              objtype  = 'BUS2105'
              objkey   = lc_objkey
         tables
              itemlist = lh_itemlist.
    Elimina os Workitens que não sao de diálogo e não são de criação do
    *fluxo.
      delete lh_itemlist where not wi_chckwi is initial or wi_type <> 'F'.
    loop at lh_itemlist.
         Refresh: lh_wis.
         CLEAR:   lc_noant.
         lc_wid = lh_itemlist-wi_id.
       busca todos os workitems dependentes do WI pai
         call function 'SWI_GET_DEPENDENT_WORKITEMS'
              exporting
                wi_id         = lc_wid
              tables
                dependent_wis = lh_wis.
       elimina WI que não são de diálogo
         delete lh_wis where wi_type <> 'W'.
    Verifica se existe alguma tarefa para o usuário informado se não
    existir, né há necessidade de entrar no loop.
         READ TABLE lh_wis WITH KEY WI_AAGENT = S_UNAME.
         CHECK SY-SUBRC EQ 0.
         Loop at lh_wis.
            busca nó
              search lh_wis-wi_creator for lh_wis-WI_CHCKWI.
              lc_wiatual-node_id = lh_wis-wi_creator+sy-fdpos(22).
    busca o SUBWORKFLOW que a tarefa pertence.
              select single wi_rh_task
              into lc_wiatual-task
              from swwwihead
              where wi_id = lh_wis-WI_CHCKWI.
    Monta o log
             IF S_UNAME EQ lc_wiatual-agent.
                 LOG-WORKITEM = lh_wis-WI_ID.
                 PERFORM MONTA_LOG USING TIPO_WFLOW
                                         lc_wiatual-task
                                         lc_wiatual-node_id
                                         lc_noant
                                         lc_wiatual-agent
                                         lh_wis-WI_AAGENT
                                CHANGING LOG-TEXTO_LOG.
                 APPEND LOG TO T_LOG.
    Busca o Agente
              lc_wiatual-agent = lh_wis-WI_AAGENT.
              lc_noant         = lc_wiatual-node_id.
         endloop.
    Endloop.
    ENDFORM.
    MONTA O TEXTO DO LOG.
    FORM MONTA_LOG USING TIPO_WF TAREFA NODE NODE_ANT AGENT AGENT_DEST
                                                      CHANGING TEXTO_LOG.
    Data: lc_DESETAPA LIKE ZSICDESETAPA,
          lc_LEN      TYPE I.
    BUSCA O TEXTO DO LOG.
    SELECT * UP TO 1 ROWS
    FROM ZSICDESETAPA
    INTO lc_DESETAPA
    WHERE TASK    EQ TAREFA   AND
          NODE_ID EQ NODE     AND
          FLUXO   EQ TIPO_WF.
    ENDSELECT.
    SE FOR ETAPA RECURSIVA
    IF lc_DESETAPA-RECURSIVA = 'X'.
       SELECT SINGLE LOG
       INTO TEXTO_LOG
       FROM ZSICETAPA_RECUR
       WHERE TASK       = TAREFA   AND
             NODE_ID    = NODE     AND
             FLUXO      = TIPO_WF  AND
             NODE_IDPAI = NODE_ANT.
    ELSE.
       TEXTO_LOG = lc_DESETAPA-LOG.
    ENDIF.
    IF NOT TEXTO_LOG IS INITIAL.
    Formata Mensagem DO USUARIO ORIGEM
       PERFORM busca_nome USING AGENT CHANGING LC_NAME.
       lc_LEN  = STRLEN( lc_NAME ).
       IF NOT lc_LEN IS INITIAL.
          REPLACE 'V1' LENGTH lc_LEN with lc_name(lc_LEN)
                                              INTO TEXTO_LOG.
       ELSE.
          REPLACE 'V1' LENGTH 2 WITH SPACE INTO TEXTO_LOG.
       ENDIF.
    Formata Mensagem DO USUARIO DESTINO
       PERFORM busca_nome USING AGENT_DEST CHANGING LC_NAME.
       lc_LEN  = STRLEN( lc_NAME ).
       IF NOT lc_LEN IS INITIAL.
          REPLACE 'V2' LENGTH lc_LEN with lc_name(lc_LEN)
                                              INTO TEXTO_LOG.
       ELSE.
          REPLACE 'V2' LENGTH 2 WITH SPACE INTO TEXTO_LOG.
       ENDIF.
    ELSE.
       TEXTO_LOG = ''.
    ENDIF.
    ENDFORM.
    BUSCA O NOME DO USUÁRIO
    form busca_nome using p_usrid CHANGING p_name.
      data ln_pernr like pa0105-pernr.
      check not p_usrid is initial.
    Busca o no.pessoal do usuário
      select pernr into ln_pernr up to 1 rows
      from pa0105
      where usrty eq '0001'
        and usrid eq p_usrid.
      endselect.
      if sy-subrc = 0.
    Busca o nome completo do usuário
        select ename into p_name up to 1 rows
        from pa0001
        where pernr eq ln_pernr.
        endselect.
        translate p_name to upper case.
      endif.
    endform.
    *&      Form  zf_monta_layout
          text
    -->  p1        text
    <--  p2        text
    form zf_monta_layout.
    Preenchendo algumas opções de impressão (Não é obrigatório)
    v_layout-expand_all          = 'X'. "Abrir subitens
    v_layout-colwidth_optimize   = 'X'. "Largura melhor possível da coluna
    v_layout-edit                = 'X'. "Permitir a edição
    v_layout-zebra               = 'X'. "Zebrar o relatório
    v_layout-info_fieldname      = 'COLOR'. "Cor da linha
    v_layout-no_totalline        = 'X'. "Não imprime a linha de Total.
    v_layout-totals_before_items = 'X'. "Imprime o total antes do item
    endform.                    " zf_monta_layout
    Best Regards
    Luciano Barreto

  • Entity Frame work for Oracle 11g -how to build a database from Model

    Hi ,
    I m trying to build a data access layer for using both Sql Server and Oracle(not at the same time). I used Model-first approach for creating the entities and then generate Databse from it.
    I came to know from different blogs that oracle and Sql Server generation workflow and DDL generation template are different. Right now my application is supporting for Sql Server, I need to support it for Oracle too.
    http://www.oracle.com/technetwork/issue-archive/2011/11-sep/o51odt-453447.html i m unable to get the Oracle DDl generation template and workflow.
    please Let me know,if i missed some thing and what are the changes I need to follow and exact procedure that is reuqired to support Oracle.
    Thanks,
    ilyas.

    Try the Model-First walkthrough in the Oracle EF OBE:
    http://download.oracle.com/oll/obe/EntityFrameworkOBE/EntityFrameworkOBE.htm#t4
    It provides a more detailed step by step tutorial in generating Oracle DDL from EF.
    If you're still having problems, provide a detailed description on what errors you see and what steps you executed. Right now, it's hard to diagnose what the problem could be with so little detail.

  • How to create af:tree from single database Table

    Hi,
    i want to create tree Like this: and also we can add node anywhere.
    Parent01
    ----|parent01-child01
    --------|parent01-child01-child01
    --------|parent01-child01-child02
    -------------|parent01-child01-child02-child01
    Parent02
    ----|parent02-child01
    ----|parent02-child02
    --------|parent02-child02-child01
    and for this i have created Table like this :
    Table name Treetable
    NODEID     NUMBER(38,0) --> Primary Key
    NODENAME     VARCHAR2(50 BYTE) --> This is the name will display as a node
    DESCRIPTION     VARCHAR2(255 BYTE)     
    ROOTIND     CHAR(1 BYTE) --> to decide root node
    SEQUENCENO     NUMBER(38,0)     --> order to display node
    PARENTKEY     NUMBER(38,0) -->FK (refering to NODEID(PK) of this table)
    But when i am creating tree, its showing root node for each row in the table. but my requirement is: The Row marked as ROOTIND='Y' , show that row only as Root (Example in above tree:Parent01 & Parent02 )
    any help highly appreciated :)
    Thanks
    Pratap Rudra
    Edited by: 995114 on Apr 30, 2013 2:50 PM

    Hi,
    check this http://www.oracle.com/technetwork/developer-tools/adf/learnmore/32-tree-table-from-single-vo-169174.pdf
    Frank

  • How to build family tree using flex ?

    http://hgc46123.chinaw3.com/haha.jpg
    I want to build a panda family tree like  http://www.myheritage.com/
    for the data is large,so i want to use dynamic picture loading like google map.
    but i don't know lean what ?  i hava java programing experience
    please give me some advice .
    thank for your attention .

    or in the html file, add a timestamp to make the swf name unique each time you refresh the page
    main.swf?ts= new Date().getTime()

  • How to build a package from sources

    hi all,
    Can someone please give some advices regarding making binaries from sources. I have found that a lot of programs on Snow Leopard can be also run in terminal and are in source form and need to be build. I have installed Xcode already and I have some programming skills as well such as using MinGW (GNU GCC) and VS EE on WinXP. I have never done anything in any UNIX-like system and I know sources need to be just compiled.
    Please, give me a link if you have any =)
    Regards.

    I think you have done something in a UNIX-like system. MinGW is designed to provide a UNIX-line build system with GCC for Windows. Now, however, you have the real thing.
    In most cases, all you need to do is extract the source tarbar into a directory (or checkout via CVS or SVN). Go into that directory with the Terminal and type "configure" and, if that goes well, "make", and if that looks good "sudo make install".

  • How to build a package from local files?

    I have a couple of git projects cloned on my hd which I'd like to package. Now, it seems unneccessary to make a tarball of the files and move it to the build directory.... I've also tried to add the path to the source dir as the source line -- source=("/path/to/repo/*"), but that doesn't work either.
    what's the correct way to do this?

    Not quite, but close enough, I suppose. I have a ~/src tree and a ~/pkg tree, and my original question was -- to be more precise -- if I can tell makepkg, directly or in the PKGBUILD, to look in a certain folder in the src tree for the files to use for the pkg. I guess I can symlink to the ~/src directory. Thanks for the pointer.

  • How to build a HTML from

    hi all,
    [1] i want to build a HOSTEL ACCOMODATION HTML from.showing the ROOMS for user wheather ROOMS are available or not.
    [2] The availability of ROOMS must be updated by HOSTEL HEAD only when he click on particular room.
    The above tasks should be shown in same form.When any one want to update the status of the ROOM he should sign first.Same just like JAVA FORMS when any one want to post reply He/She should sign first..........

    Hi,
    This is not a small task. For this you need...
    1. Authentication and Authorization api.
    For this you can use
    1.JAAS
    [i]2.JDBCRealm for Tomcat (for Tomcat)[users data in database]
    3.Use tomcat-users.xml (for Tomcat)[user data in plain xml file]
    In tomcat-users.xml file data like username,password and roles will be stored.
    For more information on this visit jakarta.apache.org site.

Maybe you are looking for

  • I can't install, repair, or remove BootCamp drivers from my Windows installation

    I have Windows XP SP3 installed on my Macbook Pro. When I installed Windows originally it failed to completely install BootCamp drivers, so I don't have advanced trackpad and keyboard features. I've downloaded the latest BootCamp drivers v3.2 that st

  • IgnoreRecordsetName not working in Sender JMS channel- PI 7.1

    Hello All, In Sender JMS content conversion I have used xml.ignoreRecordsetName=true                                                                                    ignoreRecordsetName=TRUE But still I am getting "Recordset" in the XML due to whic

  • How do I set a variable within a 'for' loop grid array

    I'm afraid I'm stuck again! The next stage in the animation that I'm working on,  is to set up a boolean, 'drilled = false', so that all instances of the attachMovie ('openCircle') have a boolean 'drilled = false' associated with them. Then when some

  • VME PCI-6200 hard drive interface cable identification

    Hopefully someone on this forum still uses the VME PCI-6200.  I'm looking for a replacement hard drive interface cable, 50-pin female-female, connecting a 2.5" PATA hard drive to the PCI-6200 board.  Does anyone know the cable standard or where a rep

  • Witcher 3 steelbook

    I wonder how lucky some of you are who ordered at Best Buy.  I went in to pick up the game at store 555 in Florida and the steelbooks have not come in. The girl working the store pickup counter is cool and knows me from picking up other games.  She t