Getting Data out of MM tables

hello everyone,
I need to gather the following material details into one internal table and loop through them.
I have declared the following internal table:
tables: MARA, MAKT, MARC, STXH.
data: begin of matl_details occurs 0,
prod_id type mara-matnr,
order_unit type mara-bstme,
price type mara-vpreh,
prod_group type mara-prdha,
base_uom type mara-meins,
mnfctr_id type mara-mfrnr,
mnfctr_part_no type mara-mfrpn,
sh_desc type makt-maktx,
delvry_time type marc-plifz,
end of matl_details.
I need PURCHASE ORDER TEXT as well. How can I get it and put it in my internal table?
I tried using BAPI_MATERIAL_GET_DETAIL to get all material detail and get ORDER_UNIT, DELIVERY_TIME, and PURCHASE ORDER TEXT with BAPI_PO_GETDETAIL. But somehow I don't know how to link them so that i can get all my details into one internal table.
Would it be easier to use 'select' statement instead? How would I be able to do it?
Your help will be rewarded.
Thanks in advance.
Regards,
Eddie.

how about something like this:
data: begin of matl_details occurs 0,
prod_id type mara-matnr,
order_unit type mara-bstme,
price type mara-vpreh,
prod_group type mara-prdha,
base_uom type mara-meins,
mnfctr_id type mara-mfrnr,
mnfctr_part_no type mara-mfrpn,
sh_desc type makt-maktx,
delvry_time type marc-plifz,
ebeln type ekko-ebeln,
end of matl_details.
data t_ITEM_TEXTS type  BAPIEKPOTX.
select maramatnr marabstme maravpreh maraprdha marameins maramfrnr mara~mfrpn
maktmaktx marcplifz ekpo~ebeln
from mara
join marc on marcmatnr = maramatnr
join makt on maktmatnr = maramatnr
and spras = sy-langu
join ekpo on ekpomatnr = maramatnr
         and ekpowerks = marcwerks
into table matl_details
where.......
delete adjacent duplicates from matl_details comparing ebeln.
loop at matl_details.
CALL FUNCTION 'BAPI_PO_GETDETAIL'
  EXPORTING
    purchaseorder                    = matl_details-ebeln
   ITEM_TEXTS                       = 'X'
TABLES
   PO_ITEM_TEXTS                    = t_item_texts
process here.......
endloop.

Similar Messages

  • How to get data from hierachy lookup table

    there is a hierachy lookup table A, and I want to get data from A.
    but the following code does work properly:
    WebTreeNode result = catalog..GetHierarchy(tableName,nodeID);
    could anybody give some suggestion or solution of getting data from hierachy lookup table,
    3x

    Hi fei,
    Please look at the following code.
    I hope it will give you some clues...
    private void showHierarchy() throws StringException
        ResultSetDefinition rsd = new ResultSetDefinition(<code name of your hierarchy table>);
        rsd.GetFields().Add(<code name of a field in your hierarchy table>);
        Search search = new Search(<code name of your main table>);
        WebTreeNode treeNode = catalogData.GetResultTree(search, rsd, 0);
        printHierNameRecursive(treeNode, 0);
    private void printHierNameRecursive(WebTreeNode root, int level) throws StringException
        WebTreeNodeArray arr = root.GetChildren();
        for (int i = 0; i < arr.GetSize(); i++)
            for (int tab = 0; tab < level; tab++)
            System.out.print("t");
            String catName = arr.GetWebTreeNodeAt(i).GetValueAt(<code name of a field in your hierarchy table>).GetStringValue();
            System.out.println(catName);
            printHierNameRecursive(arr.GetWebTreeNodeAt(i), level + 1);
    Regards,
    Nir

  • How to get data from crosstab or table?

    hi !
    i develop my app with bib 9.0.3.1 . To customize my report,i must get data from crosstab or table component (presentation bean) and generate defined XML file ,can you tell me how to do ?

    hi paul
    the sample code like this:
    try{
         DataAccess dataAccess = thinDataview.getModel().getDataAccess();
    int rowCount = dataAccess.getEdgeExtent(DataDirector.ROW_EDGE);
    int colCount = dataAccess.getEdgeExtent( DataDirector.COLUMN_EDGE );
         for ( int i=0; i<rowCount; i++ )
         for( int j=0; j<colCount; j++ )
                   String dataValue = dataAccess.getValue( i,j,DataMap.DATA_UNFORMATTED).toString();
    }catch( Exception e ){
    System.out.println( e.getMessage() );

  • How to get data  from an internal table in some other program

    I would like to get data from the internal table in the other program. When I using FM "LIST_FROM_MEMORY" to get the data, it doesn't work and the exception is not fount.
    If any special code need in the other program, like write data to memory .
    Many thx .
    From Ross Wang

    Hi
    <li>You need to have interaction if you want to use EXPORT/IMPORT statments.
    <li>The internal tables in both programs must be same
    <li>Program one ..Calling program
    REPORT ZTEST_NOTEPAD.
    DATA: BEGIN OF it_t001 OCCURS 0,
            bukrs TYPE t001-bukrs,
            butxt TYPE t001-butxt,
          END OF it_t001.
    START-OF-SELECTION.
      SUBMIT ztest_notepad1 AND RETURN.
      IMPORT it_t001 FROM MEMORY ID 'ZTEST_T100'.
      LOOP AT it_t001.
        WRITE:/ it_t001.
      ENDLOOP.
    <li>Program two ...Called program
    REPORT ztest_notepad1.
    DATA: BEGIN OF it_t001 OCCURS 0,
            bukrs TYPE t001-bukrs,
            butxt TYPE t001-butxt,
          END OF it_t001.
    START-OF-SELECTION.
      SELECT * FROM t001 INTO CORRESPONDING FIELDS OF TABLE it_t001 UP TO 10 ROWS.
      IF sy-dbcnt > 1.
        EXPORT it_t001 TO MEMORY ID 'ZTEST_T100'.
      ENDIF.
    I hope that it gets you some idea.
    Thanks
    Venkat.O

  • Why so much code getting data out of DB & into web services

    I am new to Java and I am experimenting with web services.
    I am trying to get data out of a database and into a web service
    This is the code I had to build just to get a little bit of data out of a DB and into a web service.
    // Open a database connection and statement.
    Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").newInstance();
    Connection dbConn = DriverManager.getConnection("jdbc:db2:sample","myuser","mypass");
    Statement statement = dbConn.createStatement();
    // Build the message.
    SOAPMessageContext ctx = (SOAPMessageContext) messageContext;
    try {
    MessageFactory messageFactory = MessageFactory.newInstance();
    SOAPMessage m = messageFactory.createMessage();
    SOAPEnvelope env = m.getSOAPPart().getEnvelope();
    SOAPBody body = env.getBody();
    SOAPElement elem =
    body.addBodyElement(env.createName("ns1:getEmployees"));
    elem.addNamespaceDeclaration("ns1",
    "http://www.abc.com/SampleApplication/Employee.wsdl");
    elem.addNamespaceDeclaration("ns2",
    "http://www.abc.com/SampleApplication/Employee.xsd");
    SOAPElement elem1 = new SOAPElementImpl("Response", null, null);
    // Execute the query.
    String sql = "SELECT EMPNO, FIRSTNME, MIDINIT, LASTNAME, HIREDATE FROM EMPLOYEE";
    ResultSet result = statement.executeQuery(sql);
    Isn't there a way with less code to get data out and stick into a web service?

    I left the part of the code out that is bugging me - I was talking about all of the code to get the data into XML..
    here's the whole code..
    // Open a database connection and statement.
    Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").newInstance();
    Connection dbConn = DriverManager.getConnection("jdbc:db2:sample","myuser","mypass");
    Statement statement = dbConn.createStatement();
    // Build the message.
    SOAPMessageContext ctx = (SOAPMessageContext) messageContext;
    try {
    MessageFactory messageFactory = MessageFactory.newInstance();
    SOAPMessage m = messageFactory.createMessage();
    SOAPEnvelope env = m.getSOAPPart().getEnvelope();
    SOAPBody body = env.getBody();
    SOAPElement elem =
    body.addBodyElement(env.createName("ns1:getEmployees"));
    elem.addNamespaceDeclaration("ns1",
    "http://www.abc.com/SampleApplication/Employee.wsdl");
    elem.addNamespaceDeclaration("ns2",
    "http://www.abc.com/SampleApplication/Employee.xsd");
    SOAPElement elem1 = new SOAPElementImpl("Response", null, null);
    // Execute the query.
    String sql = "SELECT EMPNO, FIRSTNME, MIDINIT, LASTNAME, HIREDATE FROM EMPLOYEE";
    ResultSet result = statement.executeQuery(sql);
    SOAPElement employee = new SOAPElementImpl("Employees", "ns2", "http://www.abc.com/SampleApplication/Employee.xsd");
    employee.addChildElement("ns2:EMPNO").addTextNode(result.getString("EMPNO"));
    employee.addChildElement("ns2:FIRSTNME").addTextNode(result.getString("FIRSTNME"));
    employee.addChildElement("ns2:FIRSTNME").addTextNode(result.getString("MIDINIT"));
    employee.addChildElement("ns2:LASTNAME").addTextNode(result.getString("LASTNAME"));
    employee.addChildElement("ns2:FIRSTNME").addTextNode(result.getString("HIREDATE"));
    elem1.addChildElement(employee);
    elem.addChildElement(elem1);
    ctx.setMessage(m);
    dbConn.close();
    } catch (Throwable e) {
    weblogic.utils.Debug.say("(hbs):e " + e);
    e.printStackTrace(System.out);
    putting the data in the node seems excessive to me.
    thanks
    AP

  • Getting data out of Oracle to SQL Server 2005

    Hello,
    I am new in Oracle and I have this question.
    I need to transfer lots of data frequently at day from a large Oracle DB to a SQL Server 2005 Database.
    Could you tell me what tools (including PL/SQL) ORACLE offers to reach this goal?
    *.Dat files are still a way to perform this job or other method more performance (quickly and efficiently) are available?
    Using MS SSIS is better ?
    Thank for your help

    I've done getting data out of Oracle to MS Access DB using heterogenous servicing.I hope that that would be the best way for your case too..
    Check this out.
    http://www.datadirect.com/developer/odbc/oracle_heterogeneous/index.ssp
    Regards,
    Bhagat

  • I want to get data from only RESB table without loss of any deltas

    i have to fetch the reservation details for the production orders.
    we are using descrete manufacturing method to keep track the Work in process and cost .
    for addition of components manually in the production order we can track thru change date i.e From AUFK table with field name AEDAT. for each time when we are adding the components the system will create a new line item In tableRESB-OBJNR(field)
    i need very few fields from RESB table to be pulled into SAP BW.
    how should i proceed creating a generic exractor without any loss of deltas.
    i want to get data from only resb table into sap bw.
    how should i proceed with Generice extractor with single table RESB and what would be the delta field . could any one throw some light .
    all answers would be rewarded with points

    I have few reports for BOM data is to be pull into bw
    all the reports contain the same tables Mentione below
    MAST- material to BOM LINK
    STKO- BOM header
    STPO- BOM ITEM
    STAS- BOM ITEM SELECTION
    how should i create ageneric datsource satisfying that all the data comes from these tables without fail of deltas,
    my doubts.1. Do i have to create a separate data sources (generic) for all these individually and load into separate ODS'S AND CLUB THEM into single ODS further.?
    if i create i dont know what should be delta field that has to be picked for each datasource
    2. Do i have to create a view on all these tables and create a generic datasource.if created what would be the delta field i have to select.
    could you pls let me know how should i pull the data without loosing any deltas
    could you pls let me know the flow with delta fields mentioned
    regards,
    P

  • Get data source schema - List tables has failed

    Hi, I am trying to expose tables from a SQL Azure Database to OData feed on power bi's data source setting and I got the following alert:
    Get data source schema - List tables and views has failed.  Please check Windows Event Log for Gateway Instance (InstanceName1) errors.
    Thanks in advance.

    Hi,
    Thank you for your question.
    I am trying to involve someone familiar with this topic to further look at this issue.
    In the meantime please have a check on the below link and check if it helps.
    http://whitepages.unlimitedviz.com/2013/09/power-bi-working-with-the-data-management-gateway/
    https://support.office.com/en-us/article/Create-a-Data-Source-and-Enable-OData-Feed-in-Power-BI-Admin-Center-9dbd3091-8961-4564-adf6-2a3aeff0b2b4?ui=en-US&rs=en-US&ad=US
    Regards,
    Mekh.

  • How to get data out of XML?

    Hi,All.
    I am running SAX (JAXP1.01) in Applet to process XML file. My question is how to get data out of xml format according to the field name (@age,@rank etc)
    and write into string buffer seperated by comma.
    Should I use SAX or DOM? (file size is big)
    My xml as follow :
    <ROOT>
    <FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@team/relay}">
         <ObjectName>Field124</ObjectName>
         <FormattedValue>HUNTER</FormattedValue>
         <Value>HUNTER</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@age}">
         <ObjectName>Field125</ObjectName>
         <FormattedValue> 19</FormattedValue>
         <Value> 19</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@Rank}">
         <ObjectName>Field126</ObjectName>
         <FormattedValue>43</FormattedValue>
         <Value>43</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{results.athrel_name}">
         <ObjectName>Field127</ObjectName>
         <FormattedValue>1-1 NORRIE</FormattedValue>
         <Value>1-1 NORRIE</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield2}">
         <ObjectName>Field128</ObjectName>
         <FormattedValue>1:54.75</FormattedValue>
         <Value>1:54.75</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield1course}">
         <ObjectName>Field129</ObjectName>
         <FormattedValue/>
         <Value/>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield1std}">
         <ObjectName>Field130</ObjectName>
         <FormattedValue/>
         <Value/>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield2course}">
         <ObjectName>Field131</ObjectName>
         <FormattedValue/>
         <Value/>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield2std}">
         <ObjectName>Field132</ObjectName>
         <FormattedValue>QT</FormattedValue>
         <Value>QT</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@points(left)}">
         <ObjectName>Field133</ObjectName>
         <FormattedValue/>
         <Value/>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@pointsdecimal}">
         <ObjectName>Field134</ObjectName>
         <FormattedValue/>
         <Value/>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:decimal" FieldName="{@points(right)}">
         <ObjectName>Field135</ObjectName>
         <FormattedValue>0</FormattedValue>
         <Value>0.00</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield1}">
         <ObjectName>Field136</ObjectName>
         <FormattedValue>1:55.98</FormattedValue>
         <Value>1:55.98</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@Rank}">
         <ObjectName>Field137</ObjectName>
         <FormattedValue>43</FormattedValue>
         <Value>43</Value>
    </FormattedReportObject>
    Repeat...
    </FormattedReportObject>
    </ROOT>
    ------------------------------------------------

    For big files use SAX: quicker and less memory usage.
    The xerces parser from Apache has some examples. Basically what you do is scan the XML, remembering what tag you are and once you find the right tag, read the contents.

  • Unexpected results getting data from two fact tables through conformed dim

    Hi all,
    We are getting an unexpected behaviour in our OBIEE 10.1.3.3.3. We have this scenario:
    We have {color:#0000ff}2 fact tables{color}{color:#000000} called F1 and F2. F1 has one measure, f1m1 and F2 has another one, f2m1.
    We have {color:#0000ff}4 conformed dimensions{color}, called D1, D2, D3, Date.
    When we are requesting for individual fact tables, we are getting:
    date d1 d2 d3 f1m1
    dt1 - x - y - z - m1
    dt1 - x - y - z' - m2
    date d1 d2 d3 f2m1
    dt1 - x - y - z - m3
    dt1 - x - y - z'' - m4
    But, trying to obtain a compare scenario, we are getting
    date d1 d2 d3 f1m1 f2m1
    dt1 x y z m1 m4
    Instead of
    date d1 d2 d3 f1m1 f2m1
    dt1 x y z m1 m3
    Looking at query log, we have catched the reason. That's why BI Server is using to solve this request using ROW_COUNT() to join SAWITH0 and SAWITH1 in SAWITH2 result set. So, the order may not be the same in the results sets in every fact table. More or less, generated query is like:
    WITH
    SAWITH0 AS
    (select ....
    from F1),
    SAWITH1 AS
    (select ...
    from F2),
    SAWITH2 AS
    select from (select ...
    ROW_NUMBER() OVER PARTITION (....) c10
    from SAWITH0.d1 full outer join SAWITH1.d1 ....) D1
    {color:#ff0000}where (D1.c10 = 1){color}
    select SAWITH2. ....
    from SAWITH2
    order by c1..c10
    The problems seems to be that BI server is ordering the result sets SAWITH0 and SAWITH1 and getting row number to join this results sets, but this is not getting the correct result.
    Any ideas?
    TIA
    Javier
    {color}
    Edited by: jirazazábal on Mar 13, 2009 2:46 PM

    I have done a logical fact table with two fact table source on it.
    The Sql performed against the database was this one.
    -------------------- Sending query to database named PRODS_AIX (id: <<153418>>):
    WITH
    SAWITH0 AS (select sum(T21296.CONSUMERS_SALES_EURO) as c1,
         T21309.DIVISION_CODE as c2
    from
         DIVISION T21309,
         C_CONSUMERS_SALES T21296
    where  ( T21296.DIVISION = T21309.DIMENSION_KEY )
    group by T21309.DIVISION_CODE),
    SAWITH1 AS (select sum(T21356.ORDER_VALUE) as c1,
         T21309.DIVISION_CODE as c2
    from
         DIVISION T21309,
         DWH_SALES_ORDER_OVERVIEW T21356
    where  ( T21309.DIMENSION_KEY = T21356.DIVISION_KEY )
    group by T21309.DIVISION_CODE)
    select distinct case  when SAWITH0.c2 is not null then SAWITH0.c2 when SAWITH1.c2 is not null then SAWITH1.c2 end  as c1,
         SAWITH0.c1 as c2,
         SAWITH1.c1 as c3
    from
         SAWITH0 full outer join SAWITH1 On nvl(SAWITH0.c2 , 'q') = nvl(SAWITH1.c2 , 'q') and nvl(SAWITH0.c2 , 'z') = nvl(SAWITH1.c2 , 'z')
    order by c1As you can see one select (SAWITH0) for the first fact table C_CONSUMERS_SALES and one select for the second fact table DWH_SALES_ORDER_OVERVIEW (SAWITH1 ) and the two statement are joined with a full outer join.
    I ask me why you have the three select (SAWITH0,SAWITH1 and SAWITH2). Can you please paste the complete SQL performed ?
    Can you tell us also which SQL is performed if you select only the columns from one fact table and not for the other ?
    Regards
    Nico
    http://gerardnico.com

  • Getting data out of ALV Grid

    Hi,
    i have an editable instance of cl_gui_alv_grid. Is there an easy way of getting out the data or do i really need to implement an event handler catching handle_data_changed? I'm not interested in the event itself, and cause the column is a kind of free text i dont need to check the data, so it is sufficient to get the data out when the user is clicking the ok button.

    hi
    refer this sample code... for non oops concept
    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
      field_style  TYPE lvc_t_styl, "FOR DISABLE
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    DATA: it_fieldcat TYPE lvc_t_fcat,     "slis_t_fieldcat_alv WITH HEADER LINE,
          wa_fieldcat TYPE lvc_s_fcat,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE lvc_s_layo,     "slis_layout_alv,
          gd_repid     LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM set_specific_field_attributes.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      wa_fieldcat-fieldname   = 'EBELN'.
      wa_fieldcat-scrtext_m   = 'Purchase Order'.
      wa_fieldcat-col_pos     = 0.
      wa_fieldcat-outputlen   = 10.
      wa_fieldcat-emphasize   = 'X'.
      wa_fieldcat-key         = 'X'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'EBELP'.
      wa_fieldcat-scrtext_m   = 'PO Item'.
      wa_fieldcat-col_pos     = 1.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'STATU'.
      wa_fieldcat-scrtext_m   = 'Status'.
      wa_fieldcat-col_pos     = 2.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'AEDAT'.
      wa_fieldcat-scrtext_m   = 'Item change date'.
      wa_fieldcat-col_pos     = 3.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'MATNR'.
      wa_fieldcat-scrtext_m   = 'Material Number'.
      wa_fieldcat-col_pos     = 4.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'MENGE'.
      wa_fieldcat-scrtext_m   = 'PO quantity'.
      wa_fieldcat-col_pos     = 5.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'MEINS'.
      wa_fieldcat-scrtext_m   = 'Order Unit'.
      wa_fieldcat-col_pos     = 6.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'NETPR'.
      wa_fieldcat-scrtext_m   = 'Net Price'.
      wa_fieldcat-edit        = 'X'. "sets whole column to be editable
      wa_fieldcat-col_pos     = 7.
      wa_fieldcat-outputlen   = 15.
      wa_fieldcat-datatype     = 'CURR'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'PEINH'.
      wa_fieldcat-scrtext_m   = 'Price Unit'.
      wa_fieldcat-col_pos     = 8.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM build_layout.
    Set layout field for field attributes(i.e. input/output)
      gd_layout-stylefname = 'FIELD_STYLE'.
      gd_layout-zebra             = 'X'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
    call function 'REUSE_ALV_GRID_DISPLAY'
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
           EXPORTING
                i_callback_program      = gd_repid
               i_callback_user_command = 'USER_COMMAND'
                is_layout_lvc               = gd_layout
                it_fieldcat_lvc             = it_fieldcat
                i_save                  = 'X'
           TABLES
                t_outtab                = it_ekko
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO  CORRESPONDING FIELDS OF TABLE it_ekko.
    ENDFORM.                    " DATA_RETRIEVAL
    *&      Form  set_specific_field_attributes
          populate FIELD_STYLE table with specific field attributes
    form set_specific_field_attributes .
      DATA ls_stylerow TYPE lvc_s_styl .
      DATA lt_styletab TYPE lvc_t_styl .
    Populate style variable (FIELD_STYLE) with style properties
    The NETPR field/column has been set to editable in the fieldcatalog...
    The following code sets it to be disabled(display only) if 'NETPR'
    is gt than 10.
      LOOP AT it_ekko INTO wa_ekko.
        IF wa_ekko-netpr GT 10.
          ls_stylerow-fieldname = 'NETPR' .
          ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
                                                 "set field to disabled
          APPEND ls_stylerow  TO wa_ekko-field_style.
          MODIFY it_ekko FROM wa_ekko.
        ENDIF.
      ENDLOOP.
    endform.                    " set_specific_field_attributes

  • I need to get data out of Oracle 8i??!!

    I am working for a company that is moving from one old application to a new application.
    The Old application is using Oracle 8i for a backend. I know SQL Server very well. However, I don't know Oracle.
    1) One guy on the forum helped me to find the SIDs and see the databases being run.
    2) I have also changed the password file and can now get in as internal.
    Great, but I need data.
    1) How can I get the data out of Oracle 8i?
    2) Is there a way to export the data to CSV or spreadsheet?
    3) There are 1400 tables with cryptic table names. How can I see the tables and their column names?
    (this is easy to do with SQL Server, but again, I am just starting to use Oracle).
    Thanks in advance for any and all help!!! This is crazy!

    Hello,
    No one likes a thread that goes on and on. I really appreciate those that try to help.
    I now this database is being used. However, we are trying to read the database and create reports before switching over to a new application.
    The database is in use.
    I've tried
    select table_name, column_name from user_tab_columns;
    I get over 15,000 rows of this
    TABLE_NAME COLUMN_NAME
    EXU81REFC ROWNER
    EXU81REFC RTNAME
    EXU81REFC CNAME
    EXU81REFC CNO
    EXU81REFC RCNO
    EXU81REFC ACTION
    EXU81REFC ENABLED
    EXU81REFC DEFER
    EXU81REFC PROPERTY
    EXU81REFC ROBJID
    EXU81REFC ROWNERID
    EXU81REFC REFTYPE
    EXU81REFI OBJID
    EXU81REFI OWNER
    EXU81REFI OWNERID
    EXU81REFI TNAME
    EXU81REFI ROWNER
    EXU81REFI RTNAME
    EXU81REFI CNAME
    EXU81REFI CNO
    EXU81REFI RCNO
    (none of which looks like user tables, but rather system tables)
    when I tried
    SELECT TABLE_NAME, NUM_ROWS FROM ALL_TABLES;
    I get over 1400 rows of this:
    TABLE_NAME NUM_ROWS
    CNBIL1
    CNBIL2
    CNBJR
    CNBJT
    CNBLC
    CNBLDE
    CNBLES
    CNBLK1
    CNBLK4
    CNBLLOG
    CNBLNET
    CNBLQ
    CNBLR
    CNBLR1
    CNBLRD
    CNBLRR
    CNBLRT
    CNBLRW
    CNBLTF5
    CNBLX
    CNBPC
    I've tried to do a select on a few table_names and I get "no rows selected".
    Isn't there a way in Oracle to see what tables have a rowcount > 0 and then get the table_names and column_names from those tables?
    I found the free download of TOAD, but not sure how much more that would help me than using SQL Plus at this stage of the game when I don't even see data. Maybe TOAD would help getting the data once I know where to look...I guess.
    Thanks for helping to straighten out with the confusion.

  • Get data out of Pagemaker

    I am a database person.  I don't know the Adobe product set.  The users are in Pagemaker (sorry don't know what version). The plan is to move to database assisted publishing.  The users are definitely not technical - and know what they are doing in Pagemaker by rote only.
    I want to get the current data out of Pagemaker.  Put it into a database, probably Microsoft Access.  Have them upgrade to InDesign.  And then use the datamerge feature of InDesign.
    Can one export data out of Pagemaker to excel or text file?  They will be resistant to re-keystroking all that data.

    just a note; will use excel/csv for the future datamerge;  Access exports to this no problem.  But there is a huge efficiency in having the data in a database rather than in excel in terms of routine updates.  All the data is cross referenced.  The catalog is organized by name, by county, by industry, etc.  Each is a section.  A person changes location or industry - - and one doesn't want to have to go to each section and make the change.  Besides being x5 the amount of work, they are having errors when they fail to remember to manually update every section in a change.
    In a database format - you just change the person's data once; and then each section is automatically changed.   The publication is annual but the updates & changes occur daily.  So we will export it from Access to excel / csv at the time of publication for import by InDesign.  It would be even more efficient if InDesign handled direct links to Access tables or queries - as does Microsoft's Word merge - but at 1x per year it isn't a biggie.  If one was publishing frequently then that direct link into the database might be quite important.
    But in any case I would think anyone in the catalog type publishing - where the info is presented sorted & resorted in various formats/categories like described here - really wants to use a database as the fundamental data holder.

  • How to get data of Oracle Applications tables in APEX

    Hi all,
    My requirement is to Develop Oracle apps Order Management Reports in APEX.
    But when i am trying to query the table or view i am unable to get data in APEX.
    Ex: If i query the Sales order form view OE_ORDER_HEADERS_V in toad i am able to get data as i am running this
    begin
    dbms_application_info.set_client_info('204');
    end;
    i.e for particular org_id. i am able to get data.
    But in apex how do i get data. Are there any settings to be done. Please let me know if anyone have worked on the same.
    Regards.
    Chandu

    My Query is like this :
    SELECT DECODE (ship_loc.city, NULL, NULL, ship_loc.city || ', ')
    || DECODE (ship_loc.state, NULL, NULL, ship_loc.state ) Destination,
         party.party_name "Sold To",
         l.ordered_item Product,
         l.ACTUAL_SHIPMENT_DATE "Ship Date",
         Nvl(l.ordered_quantity,0) "Act. Tons",
         '$'||Nvl(l.ordered_quantity,0)* l.unit_selling_price||'.00' "Price"
    FROM mtl_parameters ship_from_org,
         oe_order_lines_all l,
    hz_cust_site_uses_all ship_su,
    hz_party_sites ship_ps,
    hz_locations ship_loc,
    hz_cust_acct_sites_all ship_cas,
    hz_cust_site_uses_all bill_su,
    hz_party_sites bill_ps,
    hz_locations bill_loc,
    hz_cust_acct_sites_all bill_cas,
    hz_parties party,
    hz_cust_accounts cust_acct,
    ra_terms_tl term,
    oe_order_headers h,
    hz_cust_account_roles sold_roles,
    hz_parties sold_party,
    hz_org_contacts sold_cont,
    hz_party_relationships sold_rel,
    ar_lookups sold_arl,
    hz_cust_account_roles ship_roles,
    hz_parties ship_party,
    hz_org_contacts ship_cont,
    hz_party_relationships ship_rel,
    ar_lookups ship_arl,
    hz_cust_account_roles invoice_roles,
    hz_parties invoice_party,
    hz_org_contacts invoice_cont,
    hz_party_relationships invoice_rel,
    ar_lookups invoice_arl,
    fnd_currencies fndcur,
    oe_transaction_types_tl ot,
    qp_list_headers_tl pl,
    ra_rules invrule,
    ra_rules accrule
    WHERE h.order_type_id = ot.transaction_type_id
    AND ot.LANGUAGE = USERENV ('LANG')
    AND h.price_list_id = pl.list_header_id(+)
    AND pl.LANGUAGE(+) = USERENV ('LANG')
    AND h.invoicing_rule_id = invrule.rule_id(+)
    AND h.accounting_rule_id = accrule.rule_id(+)
    AND h.payment_term_id = term.term_id(+)
    AND term.LANGUAGE(+) = USERENV ('LANG')
    AND h.transactional_curr_code = fndcur.currency_code
    AND h.sold_to_org_id = cust_acct.cust_account_id(+)
    AND cust_acct.party_id = party.party_id(+)
    AND h.ship_from_org_id = ship_from_org.organization_id(+)
    AND h.ship_to_org_id = ship_su.site_use_id(+)
    AND ship_su.cust_acct_site_id = ship_cas.cust_acct_site_id(+)
    AND ship_cas.party_site_id = ship_ps.party_site_id(+)
    AND ship_loc.location_id(+) = ship_ps.location_id
    AND h.invoice_to_org_id = bill_su.site_use_id(+)
    AND bill_su.cust_acct_site_id = bill_cas.cust_acct_site_id(+)
    AND bill_cas.party_site_id = bill_ps.party_site_id(+)
    AND bill_loc.location_id(+) = bill_ps.location_id
    AND h.sold_to_contact_id = sold_roles.cust_account_role_id(+)
    AND sold_roles.party_id = sold_rel.party_id(+)
    AND sold_roles.role_type(+) = 'CONTACT'
    AND sold_cont.party_relationship_id(+) = sold_rel.party_relationship_id
    AND sold_rel.subject_id = sold_party.party_id(+)
    AND sold_arl.lookup_type(+) = 'CONTACT_TITLE'
    AND sold_arl.lookup_code(+) = sold_cont.title
    AND h.ship_to_contact_id = ship_roles.cust_account_role_id(+)
    AND ship_roles.party_id = ship_rel.party_id(+)
    AND ship_roles.role_type(+) = 'CONTACT'
    AND ship_cont.party_relationship_id(+) = ship_rel.party_relationship_id
    AND ship_rel.subject_id = ship_party.party_id(+)
    AND ship_arl.lookup_type(+) = 'CONTACT_TITLE'
    AND ship_arl.lookup_code(+) = ship_cont.title
    AND h.invoice_to_contact_id = invoice_roles.cust_account_role_id(+)
    AND invoice_roles.party_id = invoice_rel.party_id(+)
    AND invoice_roles.role_type(+) = 'CONTACT'
    AND invoice_cont.party_relationship_id(+) = invoice_rel.party_relationship_id
    AND invoice_rel.subject_id = invoice_party.party_id(+)
    AND invoice_arl.lookup_type(+) = 'CONTACT_TITLE'
    AND invoice_arl.lookup_code(+) = invoice_cont.title
    AND h.header_id = l.header_id

  • Need help getting data out of a itemrenderer component

    I have a datagrid populated via a dataprovider (arrayCollection). No issue there
    I have a dateField Custom itemRenderer (as a component) and this is populated fine, so no issue there either.
    However I can't seem to find any way of getting the data out (it can be edited, so it is no longer the original data). I can get the original data, but not the new data.
    I can't use an event as there are hundreds of rows that I need to manipulate to write back to the database. I just want to get all the values as displayed in the datagrid.
    I just want to loop through the datagrid and pull out the data as entered in the itemrenderer component object. In debug mode I can see
    event --> itemrenderer --> [inherited] --> mycustomecomponent --> text. I just can't seem to get at it.
    Any Ideas. It's got to be simple and I am just missing it I guess.

    In your ItemRenderer, assign your data.yourDataFieldHere to the new value after editing is complete. This will allow you to then loop through the dataProvider in the main application and get all the values needed.
    function onEdit(evt:Event):void {
    data.yourDataField = evt.currentTarget.text; // Or use whatever property of the edited item you need here.
    Chris

Maybe you are looking for

  • HP 3050 - Cant Connect To Anything Via Wireless

    I am very baffled as to what is going on this is how my computers are connected.... My main PC is connected to my router via an ethernet cable My 2 laptops are connected via wireless They arn't in a network so to speak as in they see and share files

  • Adjust posting order of new/modified entities in ADF BC

    Hi, I have any ADF application which has two tables: BUDGET BUDGET_ID: NUMBER(12) -- Which is a sequence from DB sequence BUDGET_SEQ BUDGET_DETAIL BUDGET_ID: NUMBER(12) -- Foreign key to BUDGET(BUDGET_ID) LINE: NUMBER(7) -- A sequential number based

  • Adobe Premiere Elements and Photoshop Elements 10

    I purchased a hard copy of Adobe Premiere Elements and Photoshop Elements 10 and recently got a new computer and i cannot find the 1st install cd. how can I download version 10 on my computer without the cd?

  • Acrobat 9 Professional Import Annotation failed

    Hi guys, I am using Acrobat 9 professional to import annotations from different pdfs to another pdf. However for a certain PDF comments are not being imported at all.  I only get a message saying that "No Comments were Imported" . The file is not rea

  • Document size/resolution

    Is there any way to increase the size or DPI of a document in Adobe Comp - or a workaround that can be accomplished on an iPad? I'm currently doing some volunteer design work but only have my iPad with me, and no access to the Adobe desktop applicati