How to create a report based on the selection of a node of a tree

Hello,
I am new to Oracle Apex and I was trying to build a tree and also an interactive report based on the empno column of the emp table.
I have created a tree based on emp table. Now I want to display records of the employee selected in the tree.
Here is the tree query:
select case when connect_by_isleaf = 1 then 0
when level = 1 then 1
else -1
end as status,
level,
"ENAME" as title,
null as icon,
"EMPNO" as value,
null as tooltip,
null as link
from "#OWNER#"."EMP"
start with "MGR" is null
connect by prior "EMPNO" = "MGR"
order siblings by "ENAME"
Can anyone tell me step by step how to go from here?
I tried to follow the thread Re: tree question but could not understand much from it.

The approach for reloading the page and displaying the report is quite simple.
<li>You start by creating a new page item which would be used to store the selected node ID , eg. P100_SELECTED_NODE (you can make it atext item and change it hidden once everything works as expected)
<li>Modify the tree query and change the link column in the tree definition SQL query to a link to the same
for example if your page is 100 , you would make the tree node link to the same page but set the P100SELECTED_NODE with selected node's id_
This done here
{message:id=4410987}
In this case it would be
'f?p=&APP_ID.:100:'||:APP_SESSION||'::::P100_SELECTED_NODE:'||EMPNO as link Now when you click on a tree node link , it would come back to the same page, but set the P100_SELECTED_NODE with the empno of the clicked node.
<li> All that is left to do, is changing your Report so that it refers to the new item inorder to filter the records for this employee i.e empno
SELECT ...
WHERE empno= :P100_SELECTED_NODE

Similar Messages

  • How to create a report based on the portal30.wwsbr_all_items?

    Hi,
    I created items in a folder in a content area. I would like to create a portal report and display the items of the folder of the content area.
    I logged in the database as portala30 and issued the following statement:
    SELECT ID,NAME FROM WWSBR_ALL_ITEMS WHERE CAID = 331
    AND FOLDER_ID = 49959;
    (I found out the caid for content area and folder_id for folders
    from the portal30.wwsbr_all_content_areas, and portal30.wwsbr_all_folders.)
    I have a row returned from my query in sqlplus (which is correct).
    Then I go into portal as portal30-> application(based on portal30 schema) -> create a report,
    use the same sql statement that I used above, and I got the following error message at run time:
    Error: ORA-01445: cannot select ROWID from a join view without a key-preserved table (WWV-11230)
    Failed to parse as PORTAL30_PUBLIC - SELECT ID,NAME FROM PORTAL30.WWSBR_ALL_ITEMS order by rowid (WWV-08300)
    Note: I did run the sbrapi.sql to grant access to the content area api to portal30_public.
    What else I am missing?
    Thanks;
    Kelly.

    Hi,
    I created items in a folder in a content area. I would like to create a portal report and display the items of the folder of the content area.
    I logged in the database as portala30 and issued the following statement:
    SELECT ID,NAME FROM WWSBR_ALL_ITEMS WHERE CAID = 331
    AND FOLDER_ID = 49959;Hy i've done the same thing on my Portal and it works.
    The things i've seen is that you must remove the ';' character because you don't need it with the report component.
    Error: ORA-01445: cannot select ROWID from a join view without a key-preserved table (WWV-11230)
    Failed to parse as PORTAL30_PUBLIC - SELECT ID,NAME FROM PORTAL30.WWSBR_ALL_ITEMS order by rowid (WWV-08300)The second thing is that i've got the same error on other report and the solution is to simply add and order by at the end of the statement like this :
    SELECT ID,NAME
    FROM WWSBR_ALL_ITEMS
    WHERE CAID = 331
    AND FOLDER_ID = 49959
    ORDER BY 2
    I've done this when i've got this error and it solve the problem.
    Best regards
    Arnaud Bontemps
    mail : [email protected]
    web : http://www.labo-oracle.com

  • How to create a report based on radia selection

    Hi,
    I am new bie to Appex, I have a requiment to generate a report based on existing table with the select creditaria. I mean, the select creditaria wil be the radio button, if i click any option the report will change accordingly.
    It is nothing but filter condition but i need to do with the radio button/items. Please give the detail steps
    Thanks in advance.
    Kumar.

    Kumar,
    First you will need to create the radio group on the page with the report and determine the list of values you would like to filter the report on (dynamic or static). ie:
    select CUST_STATE as display_value, CUST_STATE as return_value
      from DEMO_CUSTOMERS
    order by 1Then you will need to update the report's where clause (demo application page 2 example):
    select customer_id, cust_last_name || ', ' || cust_first_name customer_name, CUST_STREET_ADDRESS1 || decode(CUST_STREET_ADDRESS2, null, null, ', ' || CUST_STREET_ADDRESS2) customer_address, cust_city, cust_state, cust_postal_code
    from demo_customers
    where cust_state = :P2_RADIOWith an Interactive Report, make sure you list the radio group item (P2_RADIO) in the "Page Items to Submit" fields in the report region.
    The you can create an on change dynamic action based on the radio group to refresh the Report region. I made a quick example on apex.oracle.com
    http://apex.oracle.com/pls/apex/f?p=34760:2
    Depending on the number of items in the radio group, you may want to think about using a select list also.
    V/R
    Ricker

  • How to create a report  based on selected item from Select list?

    Hi,
    I have created a tables_LOV based on:
    select table_name d, table_name r from user_tab_cols
    where column_name like '%_type%'
    Then I created a page item ListOfTables,  Display as select list and pointing to tables_LOV.
    I run the page, and i can select the table i want from the drop down list.
    How to create a report  based on the selected item? (ex: select * from selected_table)
    many thanks in advance
    Salah

    Hi Salah,
    Allright, have a look at this page: http://apex.oracle.com/pls/apex/f?p=vincentdeelen:collection_report
    I think that simulates what you're trying to accomplish. I've set up the simplest method I could think of.
    The report is based on an apex collection. If you are not familiar with that, you should study the documentation: APEX_COLLECTION
    To recreate my example you should:
    1) create an (interactive) report on your collection
    SELECT *
       FROM APEX_collections
    WHERE collection_name = 'MY_COLLECTION'
    2) create a page_item select list for the tables you want to display (in my case this is called "P38_TABLES" )
    3) create a dynamic action that triggers on change of your select list page_item. The dynamic action must be a PL/SQL procedure perfoming the following code:
    declare
      l_query varchar2(4000);
    begin
      l_query := 'select * from '||:P38_TABLES;
      if apex_collection.collection_exists
            ( p_collection_name => 'MY_COLLECTION' )
      then
        apex_collection.delete_collection
          ( p_collection_name => 'MY_COLLECTION' );
      end if;
      apex_collection.create_collection_from_query
        ( p_collection_name => 'MY_COLLECTION'
        , p_query           => l_query
    end;
    Make sure you add your page_item to the "Page Items to Submit" section.
    4) Add an extra true action that does a refresh of the report region.
    Here are two pictures describing the da:
    http://www.vincentdeelen.com/images/otn/OTN_COLLECTION_REPORT_DA1.png
    http://www.vincentdeelen.com/images/otn/OTN_COLLECTION_REPORT_DA2.png
    Good luck and regards,
    Vincent
    http://vincentdeelen.blogspot.com

  • How to create a report based on a DataSet programatically

    I'm working on a CR 2008 Add-in.
    Usage of this add-in is: Let the user choose from a list of predefined datasets, and create a totally empty report with this dataset attached to is. So the user can create a report based on this dataset.
    I have a dataset in memory, and want to create a new report in cr2008.
    The new report is a blank report (with no connection information).
    If I set the ReportDocument.SetDataSource(Dataset dataSet) property, I get the error:
    The report has no tables.
    So I must programmatically define the table definition in my blank report.
    I found the following article: https://boc.sdn.sap.com/node/869, and came up with something like this:
    internal class NewReportWorker : Worker
          public NewReportWorker(string reportFileName)
             : base(reportFileName)
    public override void Process()
             DatabaseController databaseController = ClientDoc.DatabaseController;
             Table table = new Table();
             string tabelName = "Table140";
             table.Name = tabelName;
             table.Alias = tabelName;
             table.QualifiedName = tabelName;
             table.Description = tabelName;
             var fields = new Fields();
             var dbField = new DBField();
             var fieldName = "ID";
             dbField.Description = fieldName;
             dbField.HeadingText = fieldName;
             dbField.Name = fieldName;
             dbField.Type = CrFieldValueTypeEnum.crFieldValueTypeInt64sField;
             fields.Add(dbField);
             dbField = new DBField();
             fieldName = "IDLEGITIMATIEBEWIJS";
             dbField.Description = fieldName;
             dbField.HeadingText = fieldName;
             dbField.Name = fieldName;
             dbField.Type = CrFieldValueTypeEnum.crFieldValueTypeInt64sField;
             fields.Add(dbField);
             // More code for more tables to add.
             table.DataFields = fields;
             //CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo info =
             //   new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
             //info.Attributes.Add("Databse DLL", "xxx.dll");
             //table.ConnectionInfo = info;
             // Here an error occurs.
             databaseController.AddTable(table, null);
             ReportDoc.SetDataSource( [MyFilledDataSet] );
             //object path = @"d:\logfiles\";
             //ClientDoc.SaveAs("test.rpt", ref path, 0);
    The object ClientDoc referes to a ISCDReportClientDocument in a base class:
       internal abstract class Worker
          private ReportDocument _ReportDoc;
          private ISCDReportClientDocument _ClientDoc;
          private string _ReportFileName;
          public Worker(string reportFileName)
             _ReportFileName = reportFileName;
             _ReportDoc = new ReportDocument();
             // Load the report from file path passed by the designer.
             _ReportDoc.Load(reportFileName);
             // Create a RAS Document through In-Proc RAS through the RPTDoc.
             _ClientDoc = _ReportDoc.ReportClientDocument;
          public string ReportFileName
             get
                return _ReportFileName;
          public ReportDocument ReportDoc
             get
                return _ReportDoc;
          public ISCDReportClientDocument ClientDoc
             get
                return _ClientDoc;
    But I get an "Unspecified error" on the line databaseController.AddTable(table, null);
    What am i doing wrong? Or is there another way to create a new report based on a DataSet in C# code?

    Hi,
    Have a look at the snippet code below written for version 9 that you might accommodate to CR 2008, it demonstrates how to create a report based on a DataSet programmatically.
    //=========================================================================
    +           * the following two string values can be modified to reflect your system+
    +          ************************************************************************************************/+
    +          string mdb_path = "C:
    program files
    crystal decisions
    crystal reports 9
    samples
    en
    databases
    xtreme.mdb";    // path to xtreme.mdb file+
    +          string xsd_path = "C:
    Crystal
    rasnet
    ras9_csharp_win_datasetreport
    customer.xsd";  // path to customer schema file+
    +          // Dataset+
    +          OleDbConnection m_connection;                         // ado.net connection+
    +          OleDbDataAdapter m_adapter;                              // ado.net adapter+
    +          System.Data.DataSet m_dataset;                         // ado.net dataset+
    +          // CR variables+
    +          ReportClientDocument m_crReportDocument;          // report client document+
    +          Field m_crFieldCustomer;+
    +          Field m_crFieldCountry;+
    +          void CreateData()+
    +          {+
    +               // Create OLEDB connection+
    +               m_connection = new OleDbConnection();+
    +               m_connection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + mdb_path;+
    +               // Create Data Adapter+
    +               m_adapter = new OleDbDataAdapter("select * from Customer where Country='Canada'", m_connection);+
    +               // create dataset and fill+
    +               m_dataset = new System.Data.DataSet();+
    +               m_adapter.Fill(m_dataset, "Customer");+
    +               // create a schema file+
    +               m_dataset.WriteXmlSchema(xsd_path);+
    +          }+
    +          // Adds a DataSource using dataset. Since this does not require intermediate schema file, this method+
    +          // will work in a distributed environment where you have IIS box on server A and RAS Server on server B.+
    +          void AddDataSourceUsingDataSet(+
    +               ReportClientDocument rcDoc,          // report client document+
    +               System.Data.DataSet data)          // dataset+
    +          {+
    +               // add a datasource+
    +               DataSetConverter.AddDataSource(rcDoc, data);+
    +          }+
    +          // Adds a DataSource using a physical schema file. This method require you to have schema file in RAS Server+
    +          // box (NOT ON SDK BOX). In distributed environment where you have IIS on server A and RAS on server B,+
    +          // and you execute CreateData above, schema file is created in IIS box, and this method will fail, because+
    +          // RAS server cannot see that schema file on its local machine. In such environment, you must use method+
    +          // above.+
    +          void AddDataSourceUsingSchemaFile(+
    +               ReportClientDocument rcDoc,          // report client document+
    +               string schema_file_name,          // xml schema file location+
    +               string table_name,                    // table to be added+
    +               System.Data.DataSet data)          // dataset+
    +          {+
    +               PropertyBag crLogonInfo;               // logon info+
    +               PropertyBag crAttributes;               // logon attributes+
    +               ConnectionInfo crConnectionInfo;     // connection info+
    +               CrystalDecisions.ReportAppServer.DataDefModel.Table crTable;+
    +               // database table+
    +               // create logon property+
    +               crLogonInfo = new PropertyBag();+
    +               crLogonInfo["XML File Path"] = schema_file_name;+
    +               // create logon attributes+
    +               crAttributes = new PropertyBag();+
    +               crAttributes["Database DLL"] = "crdb_adoplus.dll";+
    +               crAttributes["QE_DatabaseType"] = "ADO.NET (XML)";+
    +               crAttributes["QE_ServerDescription"] = "NewDataSet";+
    +               crAttributes["QE_SQLDB"] = true;+
    +               crAttributes["QE_LogonProperties"] = crLogonInfo;+
    +               // create connection info+
    +               crConnectionInfo = new ConnectionInfo();+
    +               crConnectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;+
    +               crConnectionInfo.Attributes = crAttributes;+
    +               // create a table+
    +               crTable = new CrystalDecisions.ReportAppServer.DataDefModel.Table();+
    +               crTable.ConnectionInfo = crConnectionInfo;+
    +               crTable.Name = table_name;+
    +               crTable.Alias = table_name;+
    +               // add a table+
    +               rcDoc.DatabaseController.AddTable(crTable, null);+
    +               // pass dataset+
    +               rcDoc.DatabaseController.SetDataSource(DataSetConverter.Convert(data), table_name, table_name);+
    +          }+
    +          void CreateReport()+
    +          {+
    +               int iField;+
    +               // create ado.net dataset+
    +               CreateData();+
    +               // create report client document+
    +               m_crReportDocument = new ReportClientDocument();+
    +               m_crReportDocument.ReportAppServer = "127.0.0.1";+
    +               // new report document+
    +               m_crReportDocument.New();+
    +               // add a datasource using a schema file+
    +               // note that if you have distributed environment, you should use AddDataSourceUsingDataSet method instead.+
    +               // for more information, refer to comments on these methods.+
    +               AddDataSourceUsingSchemaFile(m_crReportDocument, xsd_path, "Customer", m_dataset);+
    +                              +
    +               // get Customer Name and Country fields+
    +               iField = m_crReportDocument.Database.Tables[0].DataFields.Find("Customer Name", CrFieldDisplayNameTypeEnum.crFieldDisplayNameName, CeLocale.ceLocaleUserDefault);+
    +               m_crFieldCustomer = (Field)m_crReportDocument.Database.Tables[0].DataFields[iField];+
    +               iField = m_crReportDocument.Database.Tables[0].DataFields.Find("Country", CrFieldDisplayNameTypeEnum.crFieldDisplayNameName, CeLocale.ceLocaleUserDefault);+
    +               m_crFieldCountry = (Field)m_crReportDocument.Database.Tables[0].DataFields[iField];+
    +               // add Customer Name and Country fields+
    +               m_crReportDocument.DataDefController.ResultFieldController.Add(-1, m_crFieldCustomer);+
    +               m_crReportDocument.DataDefController.ResultFieldController.Add(-1, m_crFieldCountry);+
    +               // view report+
    +               crystalReportViewer1.ReportSource = m_crReportDocument;+
    +          }+
    +          public Form1()+
    +          {+
    +               //+
    +               // Required for Windows Form Designer support+
    +               //+
    +               InitializeComponent();+
    +               // Create Report+
    +               CreateReport();+
    +               //+
    +               // TODO: Add any constructor code after InitializeComponent call+
    +               //+
    +          }+//=========================================================================

  • How to create a record based on the name of a file in the file-system?

    Hi,
    With a lot of pictures I want to have a database to gather some information about these pictures.
    First question is how to generate a record based on a file in the file system?
    e.g. the pictures are "c:\fotos\2009\01\disc_001.jpg" to "c:\foto\2009\01\dis_98.jpg" .
    now i want to create records with as one of the attributes the name of the picture (not the picture itself). how to create these records (based on the information of the file-ssytem). i.e. the number of records should be the same as the number of pictures.
    any suggestions?
    any reaction will be appreciated.
    Leo

    Link to Create directory
    http://www.adp-gmbh.ch/ora/sql/create_directory.html
    You can create a list of files in the directory and read the list files from that directory.
    [UTL_FILE Documentation |http://download.oracle.com/docs/cd/B14117_01/appdev.101/b10802/u_file.htm#996728]
    [Solution using Java|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584]
    SS

  • How to Create Interactive report lists for the gross sales, credit ....

    How to Create Interactive report lists for the gross sales, credit returns, and gross weight for the               customer for the current year and comparing the same with that of the previous year for the same period.....
    plz tell me steps to accomplish this....plz ...give me the detail description..plz......many many thnx in advance...

    Hi raja,
    Display a checkbox , customer number on the basic list and also set a GUI STATUS  on the basic list.....
    Select the customer by checking the checkbox and click on the button you create in the GUI status....
    Write the desired code to be displayed in
    AT USER-COMMAND even checking the sy-ucomm....
    so this would make you to into interactive list...
    Hope this would help you.
    Regards
    Narin Nandivada

  • Is there a way to hide some reports based on the selected values in prompt.

    Hi Experts,
    Is there a way to hide some reports based on the selected values in prompt.
    For ex. if a year is selected in the prompt then the report should display year wise report.
    If a year and half year both are selected in the drop down from prompt section then 2 reports should come.. One for year wise and another for half year wise.Kindly look into this.
    Regards
    Ashish

    Hi,
    Use presentation values in prompts for year,half,qtr and month.Example- For year-y is presentation variable in the same way for halfyear-h,qtr-q and month-m.
    create four intermediate reports.Example-Report r1 with only year column,r2 with only halfyear column,r3 with qtr column and r4 with month column.
    Make column in each report(r1,r2,r3,r4) is equal to their presentation variables(y,h,q,m).
    Use four sections.
    Section1-Place report that should come when only year.
    section2-Place report that should come for year and halfyear.
    Section3-Place report that should come for year,halfyear and qtr.
    Section4-Place report that should come for year,halfyear,qtr and month.
    Apply guided navigation for each section selecting guided navigation-
    For section1-
    properties->Guided navigation->check this Reference Source Request(Yes)->select report r1(year)->check this Show Section(if request returns row)
    In the same way do for remaining section2(select r2),section3(select r3) and section4(select r4)
    Thanks,
    Srikanth
    http://bintelligencegroup.wordpress.com/

  • Can any body tell me how to create a layout variant in the selection

    hi friends i would like to know how to create a layout variant in the selection screen and how to select the variant to display the ouptut using the layout using disvariant.please if possible give me example. thanks in advance.

    hi,
    I shall give you the code. It will definitely work.
    <u><b>Declerations you need to make</b></u>
    data:      WK_VARIANT      LIKE DISVARIANT,
               WX_VARIANT      LIKE DISVARIANT,
               WK_REPID        LIKE SY-REPID,
               WK_VARIANT_SAVE(1) TYPE C,
               WK_EXIT(1) TYPE C.
    <b><u>Things you need to do in the initialization event:</u></b>
    INITIALIZATION.
      PERFORM F_INIT_VARIANT.
      PERFORM F_VARIANT_DEFAULT USING PR_VARI.
    *&      Form  f_init_variant
    FORM F_INIT_VARIANT .
      CLEAR WK_VARIANT.
      WK_REPID = SY-REPID.
      WK_VARIANT-REPORT = WK_REPID.
      WK_VARIANT-USERNAME = SY-UNAME.
      WK_VARIANT_SAVE = 'A'.
    ENDFORM.                    " f_init_variant
    *&      Form  f_variant_default
    FORM F_VARIANT_DEFAULT  USING    P_PR_VARI.
      WX_VARIANT = WK_VARIANT.
      IF NOT P_PR_VARI IS INITIAL.
        WX_VARIANT-VARIANT = P_PR_VARI.
      ENDIF.
      CALL FUNCTION 'LVC_VARIANT_DEFAULT_GET'
        EXPORTING
          I_SAVE        = WK_VARIANT_SAVE
        CHANGING
          CS_VARIANT    = WX_VARIANT
        EXCEPTIONS
          WRONG_INPUT   = 1
          NOT_FOUND     = 2
          PROGRAM_ERROR = 3
          OTHERS        = 4.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CASE SY-SUBRC.
        WHEN 0.
          P_PR_VARI = WX_VARIANT-VARIANT.
        WHEN 2.
          CLEAR P_PR_VARI.
      ENDCASE.
    ENDFORM.                    " f_variant_default
    <b><u> After this Things you need to do in the At selection screen event:</u></b>
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR PR_VARI.
      PERFORM F_VARIANT_F4 USING PR_VARI.
    *&      Form  f_variant_f4
    FORM F_VARIANT_F4  USING    P_PR_VARI.
      CALL FUNCTION 'LVC_VARIANT_F4'
        EXPORTING
          IS_VARIANT    = WK_VARIANT
          I_SAVE        = WK_VARIANT_SAVE
        IMPORTING
          E_EXIT        = WK_EXIT
          ES_VARIANT    = WX_VARIANT
        EXCEPTIONS
          NOT_FOUND     = 1
          PROGRAM_ERROR = 2
          OTHERS        = 3.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF WK_EXIT IS INITIAL.
        WK_VARIANT-VARIANT = WX_VARIANT-VARIANT.
        P_PR_VARI = WX_VARIANT-VARIANT.
      ENDIF.
    ENDFORM.                    " f_variant_f4
    After this finally when you call the output using REUSE_ALV_GRID_DISPLAY YOU NEED TO mention this parameter in the function module
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          <i><u><b>IS_LAYOUT          = WA_LAYOUT</b></u></i>
          <i><u><b>I_SAVE             = 'X'</b></u></i>
          <u><i>I_DEFAULT          = 'X'</i></u>
          <u><b>IS_VARIANT         = WK_VARIANT</b></u>
        TABLES
          T_OUTTAB           = ITAB1
        EXCEPTIONS
          PROGRAM_ERROR      = 1
          OTHERS             = 2.
    Once you do this,,, you can create a layout variant.
    P.S. Mark all helpful answers for points.
    JLN

  • How to create Drop down menu in the selection screen

    Hi all,
    How to create Drop down menu in the selection screen.
    Fast answer will be highly rewarded
    Regards
    Bikas

    hi ,
    TYPE-POOLS : vrm.
    TABLES:vbak,vbap.
    DATA : v(80) TYPE c.
    DATA: wa_vbak TYPE vbak,
          it_vbak TYPE vbak OCCURS 0 WITH HEADER LINE,
          wa_vbap TYPE vbap,
          it_vbap TYPE vbap OCCURS 0 WITH HEADER LINE.
      DATA: l_name TYPE vrm_id,
            li_list TYPE vrm_values ,
            v_count  TYPE i,
            l_value LIKE LINE OF li_list.
    PARAMETERS: p_test(20) AS LISTBOX VISIBLE LENGTH 60 MODIF ID DAT.
    INITIALIZATION.
    AT SELECTION-SCREEN OUTPUT.
      PERFORM get_data.
      LOOP AT it_vbak.
        l_value-key =  it_vbak-vbeln .
        l_value-text = it_vbak-vbeln .
        APPEND l_value TO li_list.
      ENDLOOP.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = 'P_TEST'
          values          = li_list
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
    AT SELECTION-SCREEN ON P_TEST.
      clear : li_list , li_list[].
      SELECT vbeln
             matnr
             meins
             FROM vbap
             INTO CORRESPONDING FIELDS OF TABLE it_vbap
             WHERE vbeln = p_test.
    START-OF-SELECTION.
      SELECT vbeln
             matnr
             meins
             FROM vbap
             INTO CORRESPONDING FIELDS OF TABLE it_vbap
             WHERE vbeln = p_test.
      LOOP AT it_vbap.
        WRITE :/ it_vbap-vbeln, it_vbap-matnr,it_vbap-meins.
      ENDLOOP.
    *&      Form  get_Data
          text
    -->  p1        text
    <--  p2        text
    FORM get_data .
      SELECT  vbeln
              FROM vbak
              INTO  CORRESPONDING FIELDS OF TABLE it_vbak.
    ENDFORM.                    " get_Data
    regards,
    venkat.

  • How to create activity workflow based on the Web API 2 services

    Hi,
    We have Web API 2 services and we want create activity workflow based on the Web API 2 services.
    Web API 2 services provide some application operations and based on this operations we would like to create custom activity workflow.
    Question:
    Is that possible?
    Could you please give best practices to create activity workflow based on the Web API 2 services ?
    Thanks for your support.

    HI Max_P,
    Welcome to workflow forum.
    ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework.
    I researched relevant topic about creating workflow application using Web API 2, I just found these resources about it.
    Learn About ASP.NET Web API
    Hope it helps.
    Best regards,
    Angie
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to create a condition based on a select that retrieve dynamically a LOV

    Hi all, I need to create a condition based on a select that retrieve dynamically a LOV.
    So, the condition have to be:
    inventory_item_id NOT IN (SELECT inventory_item_id FROM apps.mtl_system_items_kfv WHERE concatenated_segments = 'GENERAL_FAULTS_IPTV')
    I need to create a LOV based on this select without making any join with the folder which contains the field inventory_item_id, because otherwise I have the contradiction:
    and o124757.INVENTORY_ITEM_ID = o118741.INVENTORY_ITEM_ID -- join between the main custom folder (o118741) and the LOV custom folder (o124757)
    and o118741.INVENTORY_ITEM_ID NOT IN (o124757.INVENTORY_ITEM_ID) -- condition
    These two condition together don't show any data, obviously....This means also, that I can't use a calculated field, because if I want to see this field, I have to create a join, another time, with the main custom folder.
    I tried to create a LOV on the Administrator, but when I create the condition I have to check manually the values....and if in the future this LOV will increase I need every time to re-check all the values.....instead I need that the inventory_item_id have to be NOT IN dinamically in the list of values retrieved by the select.
    Anybody has inplemented something similar ??
    Thanks in advance
    Alex

    Hi alex,
    SELECT incidents.INVENTORY_ITEM_ID,
    pcodes.PROBLEM_NAME
    FROM apps.cs_incidents_all_b incidents,apps.jtf_rs_problem_codes_v pcodes
    WHERE incidents.category_id IN (SELECT category_id
    FROM mtl_categories_kfv
    WHERE concatenated_segments = 'IPTV')
    AND incidents.PROBLEM_CODE = pcodes.PROBLEM_CODE
    where incidents.INVENTORY_ITEM_ID NOT IN SELECT inventory_item_id
    FROM apps.mtl_system_items_kfv
    WHERE concatenated_segments = 'GENERAL_FAULTS_IPTV'
    You want to add this condition to the first query it holds good for this scenerio.All the items which are NOT IN will be retrieved.Here you are selecting other than "General_faults_iptv"
    But again your trying to select in the second query where you want "General_faults_iptv"
    SELECT inventory_item_id
    FROM apps.mtl_system_items_kfv
    WHERE concatenated_segments = 'GENERAL_FAULTS_IPTV'
    If you carefully go through what your doing,you will understand.In the above explantion ,there will be no records generated.First query your saying NOT IN and again your saying for the same IN,how will records retrieve its meaningless.
    I dont know what you want to get from second query.I would suggest you to do is dont use the second query and just use the first query and you will get.Here is the query and this will give you result.
    SELECT incidents.INVENTORY_ITEM_ID,
    pcodes.PROBLEM_NAME
    FROM apps.cs_incidents_all_b incidents,apps.jtf_rs_problem_codes_v pcodes
    WHERE incidents.category_id IN (SELECT category_id
    FROM mtl_categories_kfv
    WHERE concatenated_segments = 'IPTV')
    AND incidents.PROBLEM_CODE = pcodes.PROBLEM_CODE
    AND incidents.INVENTORY_ITEM_ID NOT IN SELECT inventory_item_id
    FROM apps.mtl_system_items_kfv
    WHERE concatenated_segments = 'GENERAL_FAULTS_IPTV'
    Regards,
    Kranthi.

  • How to show the columns dynamically in OBIEE report based on the selection?

    Hi,
    I have a requirement where the columns should be dynamically shown in report based on what we select in propmt page.
    I'm creating a report in OBIEE where i want to give an option to the end user to select the columns whichever he wants to see in the report.
    For example I have the following columns in the report already:
    Customer Name,
    Customer Number,
    Bank Account,
    Address
    I want to give an option to the user to select 'Customer Mail ID' dynamically and see the column to be displyed in the report along with the existing columns.
    Through 'Column Selector' user can select a single column at a time, but if he want to select more than one column, how can we do this ?
    Please help me out in resolving this issue.
    Thanks,
    Chaithanya.

    Hi Chaithanya,
    there's not a straight solution for this. You can create different analysis containing different number of columns and then directing the user to this analysis using Action Links or you can also use View Selector to switch from one view (analysis) to the other. But it's not going to be very flexible nor dynamic.
    J.

  • How to create a report region which the first colomn is row selector column

    I want to create a report region and its first column is a row selector column. I have used select sentence to select some columns. But I do not know how set the first column to row selector column. I mean I want to do as follow. When a radio which is first column is chosen, it will return it's value of the column in the chosen row. Please help me! Thanks

    Hi unnamed,
    Suppose you have an id that identifies your record.
    Go to Report definiton, tab report attirbutes.
    Select the id of your record.
    Create a link to the page you want to go to.
    Hope this helps.
    If not, I suggest you to create a from with report, and analyze the way the wizard has generated it.
    Leo

  • How to create a shape based on the shape of an image

    I want to erase a portion of a mask based on the shape of an image. how can i do this? btw how to create a circle? thx

    Both your questions leave room for imagining what you might really mean, but here's a shot at answering them.
    If you have a mask that you want to erase portions of based on an image... assuming the mask is a simple rectangle you drew with the rectangle tool, change the opacity of the rectangle's fill in the color panel to make it see-thru, place the mask over the image, and using the eraser tool, erase the portions of the mask that you do not intend to retain using the image below it as a guide.
    As for drawing a circle, hover over the rectangle tool and a menu should appear.  Select the oval/ellipse tool.  To draw a circle, hold down the shift key and draw just as you did for the rectangle.  The shift key forces it to retain equal width and height.

Maybe you are looking for