How  to link between these tables and get the bom explosion

tables : mast,stpo,makt
  SELECT AMATNR BMAKTX CIDNRK CMENGE C~MEINS  INTO CORRESPONDING FIELDS OF TABLE IT_COMP_IDEL FROM
                   MAST AS A INNER JOIN MAKT AS B ON AMATNR = BMATNR
                             INNER JOIN STPO AS C ON ASTLNR = CSTLNR
                   WHERE AMATNR IN S_MATNR AND AWERKS IN S_WERKS.
using cs13 to get the bom summary
using these table to but i got only few materials only,
but cs13 got more materials
how can i solve that one
Regards
ds

Hi,
Just go through this program i think it will help u out.
TABLES: MARA, MARC.
TYPE-POOLS : fibs,stree.
TYPES: BEGIN OF STRUCT_BOM,
        MATNR TYPE MATNR,          " Material Number
        WERKS TYPE WERKS_D,        " Plant
        IDNRK TYPE IDNRK,          " BOM Item
        STLAL TYPE STLAL,          " Alternative BOM
        STUFE TYPE HISTU,          " BOM Level
        OJTXB TYPE OJTXB,          " Object description (assembly)
       END OF STRUCT_BOM.
*- table types
types: t_bom type table of struct_bom.
*Internal Tables to hold the BOM data.
DATA: ITAB_BOM type table of STRUCT_BOM.
DATA: WA_BOM TYPE STRUCT_BOM,
      wa_stb type stpox,
      wa_matcat type stpox.
DATA: IT_STB       type standard table of STPOX,
      IT_STBC      type standard table of STPOX,
      IT_MATCAT    type standard table of CSCMAT.
*-- to enter BOM DATA
*Selection Options
select-options: s_matnr for V_matnr,       "BOM Material
                s_plant for V_werks.       "BOM Plant
*Input Parameters
parameters:     p_alter type stko-stlal,      "Alternate BOM
                p_usage type stzu-stlan,      "BOM usage
                p_appli type tc04-capid,      "BOM Application
                P_CATE  TYPE STKO-STLTY DEFAULT 'M'.      "BOM Category
INITIALIZATION.
REFRESH ITAB_BOM.
CLEAR WA_BOM.
REFRESH IT_STB.
REFRESH IT_MATCAT.
START-OF-SELECTION.
SELECT matnr
       werks
       stlal
       INTO CORRESPONDING FIELDS OF TABLE itab_bom
       FROM mast
       WHERE matnr IN s_matnr
       AND werks IN s_plant
       AND stlan = p_usage
       AND stlal = p_alter.
CLEAR V_MATNR.
CLEAR V_WERKS.
DATA: WA_STB TYPE STPOX,
      WA_MATCAT TYPE CSCMAT.
    v_matnr = wa_bom-matnr.
    v_werks = wa_bom-werks.
    CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
      EXPORTING
        capid                 = p_appli
        datuv                 = sy-datum
        mktls                 = 'X'
        mehrs                 = 'X'
        mtnrv                 = v_matnr
        stlal                 = p_alter
        stlan                 = p_usage
        werks                 = v_werks
      TABLES
        stb                   = it_stb
        matcat                = it_matcat
      EXCEPTIONS
        alt_not_found         = 1
        call_invalid          = 2
        material_not_found    = 3
        missing_authorization = 4
        no_bom_found          = 5
        no_plant_data         = 6
        no_suitable_bom_found = 7
        conversion_error      = 8
        OTHERS                = 9.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
Then just print whatever data u want it_stb, it_matcat tables.
reward points if u find my answer helpfull.

Similar Messages

  • Link Between OINV Table And OBTN Table

    I want to create relationship b/w A/R Invoice and Batch Number transaction Reports table.
    sap point out two tables of Batch Number Transaction Report RBTN and OBTN,Problem is that i never found any  table with name of RBTN.
    plz tell me what is RBTN table???why its not in sql database  and how i can create link b/w A/R invoice and Issue for production  .

    Hi Vinu.........
    Welcome to SAP Business One Forum............
    Please check the link between these tables........
    SELECT Distinct T1.BatchNum
    FROM IBT1 T0
    Inner Join OIBT T1 On T0.BatchNum=T1.BatchNum AND T1.ItemCode=T0.ItemCode
    INNER JOIN DLN1 T2 ON T2.DocEntry=T0.BaseEntry AND T2.ItemCode=T0.ItemCode
    inner join ODLN T3 on T2.DocEntry = T3.DocEntry LEFT JOIN INV1 T4 On T4.BaseEntry=T2.DocEntry Left Outer Join OINV T5 On T5.DocEntry=T4.DocEntry
    WHERE T0.BaseType = 15
    Hope this will help you........
    Regards,
    Rahul

  • Can anybody provide me the link between these tables

    Hello,
    Can anybody provide me with the link between these tables.
    Is there any link for the CTSNUMC and PNTPR
    1) /SAPSLL/CTSNUMC
             Fields: STCTS
                       CCNGN
    2) /SAPSLL/PRGEN
            Fields : ATTR20A
                      ATTR05A
                      ATTR10A
                      ATTR05B
    Common field -
    GUID PR
    3) /SAPSLL/PNTPR
            Fields : PRVSY
                    : GRVSY
    Common field -
    GUID PR
    4) /SAPSLL/PRODUCT_SELECT_UI_S  "This is Structure
             Fields : QUAL_STA  " Product Status
                   Common field : CCNGN, STCTS
    5) /SAPSLL/PR
               Fields : CRTSP  " Product Created on
                        : CHTSP " Product Changed on
    Common field -
    GUID PR
    6) /SAPSLL/PRT
          Fields : PRTXT  " Materail Desc
    Common field -
    GUID PR
    I have common fileds for all the tables to join them except for the tables /SAPSLL/CTSNUMC and
    SAPSLL/PRGEN.
    Any suggestions will be apprecaited.
    Regards,
    Kittu

    Hi,
    Thank you every body for your time...
    I am closing this thread as there was no response and I think I solved it.
    Regards,
    Kittu

  • How to run commands like "ipconfig" and get the output in adobe AIR in windows?

    import flash.desktop.NativeProcess; 
    import flash.desktop.NativeProcessStartupInfo;   
    if (NativeProcess.isSupported) {     
         var npsi:NativeProcessStartupInfo = new NativeProcessStartupInfo();     
         var processpath:File = File.applicationDirectory.resolvePath("MyApplication.whatever");     
         var process:NativeProcess = new NativeProcess();       
         npsi.executable = processpath;     
         process.start(npsi); 
    The above can only run a sub-application, but how to run an independent  application(command) like ipconfig and get the result?

    Hi,
    here is an example of running a net Use command line from AIR, unig the new NativeProcess. Hope it will help !
    function launchProcess()
      var file = air.File.applicationDirectory;
      // set command path
      file = file.resolvePath("C:/Windows/system32/net.exe");
      var nativeProcessStartupInfo = new air.NativeProcessStartupInfo();
      nativeProcessStartupInfo.executable = file;
      // prepare command parameters
      var args = new runtime.Vector["<String>"]();
      args.push('USE');
      args.push('W:');
      args.push('/delete');
      args.push('/y');
      // set arguments
      nativeProcessStartupInfo.arguments = args;
      // add listeners to catch command outputs
      process.addEventListener(air.ProgressEvent.STANDARD_OUTPUT_DATA, onOutputData);
      process.addEventListener(air.ProgressEvent.STANDARD_ERROR_DATA, onErrorData);
      process.addEventListener(air.NativeProcessExitEvent.EXIT, onExit);
      // create and run Native process
      process = new air.NativeProcess();
      process.start(nativeProcessStartupInfo);
    function onOutputData(ProgressEvent)
      var processResults = process.standardOutput.readUTFBytes(process.standardOutput.bytesAvailable);
      air.trace("Results: \n" + processResults);
    function onErrorData(ProgressEvent)
      var processResults = process.standardError.readUTFBytes(process.standardError.bytesAvailable);
      if(processResults.search('password') > -1){
        window.alert('Bad password');
      air.trace("Errors: \n" + processResults);
    function onExit(NativeProcessExitEvent)
      air.trace("Process ended with code: " + NativeProcessExitEvent.exitCode);

  • Link between XML table and a resource

    I have registered an XML Schema in Oracle and the tables were automatically generated. I can access the data in these tables via "SELECT extractValue(value(i),'/factureExterne/codeTypeFacturation')
    FROM &lt;xml_table&gt; i". I use WebDAV + ftp to upload my XML-files.
    How can I retrieve the name of the file in the WebDAV folder that corresponds with the row in my table?
    Regards,
    Vincent Botteman

    Vincent:
    I found a way to get de conexion using the undocumented funcion sys_op_r2o.
    sys_op_r2o transforms an XMLRef to the object_id of the target row, then its possible to join the XML Schema based table to the resource_view or path_view information.
    The XDB$RESOURCE, store an XMLRef to the target row of the table and is available using extractValue(res,'/Resource/XMLRef') function.
    Here the example:
    SELECT r.path,extractValue(value(i),'/factureExterne/codeTypeFacturation')
    FROM <xml_table> i,path_view r
    where ref(i)=extractValue(res,'/Resource/XMLRef');
    If you need to do this inside a trigger of the target table look at the example of the thread:
    Undocumented function sys_op_r2o
    Best reagards, Marcelo.

  • How to join two tables and get the supply delivery date next to order?

    So there are two tables. One has customer's order no, ordered date, order quantity, available quantity and code of article-
    The other table comes form supply side where we have supply order no, article number, ordered qty, and delivery date.
    We keep stock so this can not be MOT (made to order) system.
    What i need is correct date of arrival to appear next to cusotmers spoecirfic order. The older cusotmers order get's the parts first, second oldest order is next in line etc.
    here is any example
    customer's order
    ref order
    art. code
    ordered qty
    available qty
    order date
    1809202491
    700497
    60
    0
    3.7.2014
    1809200528
    700497
    13
    0
    20.6.2014
    1809198640
    700497
    7
    0
    9.6.2014
    supply order
    supply order
    art. code
    qty orderd
    date of arrival
    4501243378
    700497
    50
    4.8.2014
    4501263437
    700497
    20
    6.10.2014
    There is actually a 3rd "table" and that sort of connects the two and that is stock on hand per art. code.
    The main issue is that stock is assigned to purchase orders only when it actually arrives in the warehouse.
    A human can easilly connect the dates of when the stock will arrive and quantities with correct customer's order. In this case the firts order will get 50 pcs in August while 10 pcs will remain on backorders. The missing 10 pcs Will arrive in October. The second order will get 10 pcs in october and 3 will remain on backorders with no delivery date. While the third customer orders does not have a delivery date.
    So how to make the SAP do this calculations and display the arrival date next to date of customer's order?

    I checked the instructions as i do not have access to this part. It seem this is a query. We had issues with queries in the past as not all codes from orders would appear in them. They never found the reason why that is happening.
    However, I think the main issue is that the information here is not connected and is separately provided for supply and for sales. So i doubt it can be connected in this query.
    edit: as you can see the only connection is stock on hand.
    and total number of various items we have is close to 100.000 of various article codes.

  • How to fetch the data from databse table and get the required output

    Hi,
    I have made a project that connects CEP to database table but i m getting some problem in fetching the data from database.
    From the following code :
    If the where condition is removed then the application runs fine but i am still not able to fetch the data from the table because it is not showing any output.
    Can anyone please suggest me that how to write WHERE statement correctly and how i will be able to see the output.
    Following is the config.xml for processor:
    ======================================
    <?xml version="1.0" encoding="UTF-8"?>
    <wlevs:config xmlns:wlevs="http://www.bea.com/ns/wlevs/config/application"
         xmlns:jdbc="http://www.oracle.com/ns/ocep/config/jdbc">
         <processor>
              <name>JDBC_Processor</name>
              <rules>
                   <query id="q1"><![CDATA[
                             SELECT STOCK.SYMBOL as symbol, STOCK.EXCHANGE as exchange
                             FROM ExchangeStream [Now] as datastream, STOCK
                             WHERE datastream.SYMBOL = datastream.SYMBOL ]]></query>
              </rules>
         </processor>
         <jms-adapter>
              <name>JMS_IN_Adapter</name>
              <jndi-provider-url>t3://CHDSEZ135400D:7001</jndi-provider-url>
              <destination-jndi-name>jms.TestKanikaQueue</destination-jndi-name>
              <user>weblogic</user>
              <password>welcome1</password>
         </jms-adapter>
    </wlevs:config>
    Following is the assembly file:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osgi="http://www.springframework.org/schema/osgi"
         xmlns:wlevs="http://www.bea.com/ns/wlevs/spring" xmlns:jdbc="http://www.oracle.com/ns/ocep/jdbc"
         xmlns:spatial="http://www.oracle.com/ns/ocep/spatial"
         xsi:schemaLocation="
              http://www.springframework.org/schema/beans
              http://www.springframework.org/schema/beans/spring-beans.xsd
              http://www.springframework.org/schema/osgi
              http://www.springframework.org/schema/osgi/spring-osgi.xsd
              http://www.bea.com/ns/wlevs/spring
              http://www.bea.com/ns/wlevs/spring/spring-wlevs-v11_1_1_3.xsd
              http://www.oracle.com/ns/ocep/jdbc
              http://www.oracle.com/ns/ocep/jdbc/ocep-jdbc.xsd
              http://www.oracle.com/ns/ocep/spatial
              http://www.oracle.com/ns/ocep/spatial/ocep-spatial.xsd">
         <wlevs:event-type-repository>
              <wlevs:event-type type-name="StockEvent">
                   <wlevs:properties>
                        <wlevs:property name="SYMBOL" type="byte[]" length="16" />
                        <wlevs:property name="EXCHANGE" type="byte[]" length="16" />
                   </wlevs:properties>
              </wlevs:event-type>
              <wlevs:event-type type-name="ExchangeEvent">
                   <wlevs:class>com.bea.wlevs.event.example.JDBC_CEP.ExchangeEvent</wlevs:class>
              </wlevs:event-type>
              <wlevs:event-type type-name="StockExchangeEvent">
                   <wlevs:properties>
                        <wlevs:property name="symbol" type="byte[]" length="16" />
                        <wlevs:property name="price" type="byte[]" length="16" />
                        <wlevs:property name="exchange" type="byte[]" length="16" />
                   </wlevs:properties>
              </wlevs:event-type>
         </wlevs:event-type-repository>
         <bean id="readConverter" class="com.bea.wlevs.adapter.example.JDBC_CEP.Adapter_JDBC" />
         <bean id="outputJDBCBean" class="com.bea.wlevs.bean.example.JDBC_CEP.OutputBean_JDBC">
         </bean>
         <wlevs:adapter id="JMS_IN_Adapter" provider="jms-inbound">
              <wlevs:listener ref="ExchangeStream" />
              <wlevs:instance-property name="converterBean"
                   ref="readConverter" />
         </wlevs:adapter>
         <wlevs:processor id="JDBC_Processor" advertise="true">
              <wlevs:listener ref="OutputChannel" />
              <wlevs:table-source ref="STOCK" />
         </wlevs:processor>
         <wlevs:channel id="ExchangeStream" event-type="ExchangeEvent" advertise="true">
              <wlevs:listener ref="JDBC_Processor" />
         </wlevs:channel>
         <wlevs:channel id="OutputChannel" event-type="StockExchangeEvent"
              advertise="true">
              <wlevs:listener ref="outputJDBCBean" />
         </wlevs:channel>
         <wlevs:table id="STOCK" event-type="StockEvent"
              data-source="StockDs" table-name="STOCK" />
         <wlevs:table id="STOCK_EXCHANGE" event-type="StockExchangeEvent"
              data-source="StockDs" table-name="STOCK_EXCHANGE" />
    </beans>
    ExchangeEvent.java:
    package com.bea.wlevs.event.example.JDBC_CEP;
    public class ExchangeEvent {
         public String SYMBOL;
         public String symbol;
         public String exchange;
         public ExchangeEvent() {
         public String getSYMBOL() {
              return SYMBOL;
         public void setSYMBOL(String sYMBOL) {
              SYMBOL = sYMBOL;
         public String getSymbol() {
              return symbol;
         public void setSymbol(String symbol) {
              this.symbol = symbol;
         public String getExchange() {
              return exchange;
         public void setExchange(String price) {
              this.exchange = price;
    Adapter Class:
    package com.bea.wlevs.adapter.example.JDBC_CEP;
    import com.bea.wlevs.adapter.example.JDBC_CEP.MyLogger;
    import com.bea.wlevs.adapters.jms.api.InboundMessageConverter;
    import java.text.DateFormat;
    import java.util.Date;
    import com.bea.wlevs.adapters.jms.api.MessageConverterException;
    import com.bea.wlevs.event.example.JDBC_CEP.ExchangeEvent;
    import javax.jms.JMSException;
    import javax.jms.Message;
    import javax.jms.TextMessage;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.Random;
         public class Adapter_JDBC implements InboundMessageConverter{
         @SuppressWarnings("unchecked")
         public List convert(Message message) throws MessageConverterException, JMSException {
              Random rand = new Random();
              int unique_id = rand.nextInt();
              DateFormat dateFormat;
              dateFormat = DateFormat.getTimeInstance();
              dateFormat.format(new Date());
              MyLogger.info(unique_id + " CEP Start Time is: " + dateFormat.format(new Date()));
              System.out.println("Message from the Queue is :"+ message);
              TextMessage textMessage = (TextMessage) message;
              String stringMessage = textMessage.getText().toString();
              System.out.println("Message after getting converted into String is :"+ stringMessage);
                   String[] results = stringMessage.split(",\\s*"); // split on commas
                   ExchangeEvent event1 = new ExchangeEvent();
                   event1.setSYMBOL(results[0]);
         List events = new ArrayList(2);
         events.add(event1);
         return events;
    Output Bean Class :
    package com.bea.wlevs.bean.example.JDBC_CEP;
    import com.bea.wlevs.ede.api.StreamSink;
    import com.bea.wlevs.event.example.JDBC_CEP.ExchangeEvent;
    import com.bea.core.datasource.DataSourceService;
    public class OutputBean_JDBC implements StreamSink{
         public void onInsertEvent(Object event) {
         if (event instanceof ExchangeEvent) {
              ExchangeEvent cacheEvent = (ExchangeEvent) event;
         System.out.println("Symbol is: " + cacheEvent.getSymbol());
         System.out.println("Exchange is: " + cacheEvent.getExchange());
         System.out.println(DataSourceService.class.getClass());
    Kindly let me know if you need further info.

    Do you have StockDs configured in your server config.xml?
    I think the query should look more like this:
    SELECT stocks.SYMBOL, stocks.EXCHANGE
    FROM STOCK as stocks, ExchangeStream [Now] as datastream WHERE stocks.SYMBOL = datastream.SYMBOL
    Thanks
    andy

  • Link between technical table and datasource - SE16

    Hi,
    I'm looking for the table in SE16 that gives me the association between my technical tables and my datasources/infosources:
    for example:
    I have table /BIC/B0000161000 and I want to know for which datasource this is the PSA table...
    Kind regards
    Joke

    already found the link: rstsods

  • How to link Azure database tables and fields to VS2012 C++ entry form

    We are using Visual Studio 2012 C++ and have successfully connected to the database on Azure, but do no know how to associate the database tables and fields with the C++ application data entry forms.  Can anyone help?  Thanks

    Hello Roxanne,
    You could use Entity framework to map classes to Azure tables. Please refer http://www.codeproject.com/Articles/363040/An-Introduction-to-Entity-Framework-for-Absolute-B to
    learn more. Hope this helps.
    Regards,
    Kumar Bijayanta

  • Link between COMM_PRODUCT table and Pricing Reference Material

    Hello
      In CRM we have in transaction COMMPR01 the material, and in the Sales and Distribution tab, the field Pricing Ref. Prod. fille with a reference material. We are looking in the tables for this link, but have not found it. We have table CRMM_PRODUCT for the 1st material, and have looked in others, such as CRMV_PROD_SALESG, CRMM_PR_SALESA, but have been unable so far to find the link. Any answers on this?
    Thanks,
      George

    Hello George,
    Check PRICE_PRODUCT field of table CRMM_PR_SALESA .
    Also you can refer to table CRMM_PR_SALESG.
    Hope this helps!
    Best Regards,
    Shanthala Kudva.

  • Link information from tables and show the "best " box.

    Hello! I'm totally new to this great software and the truth is I'm lost D:
    I try to explain in more detail what I have to do, I hope you can help me please it's urgent T_T
    I must make 3 tables should be linked to each other , ie a table where the name of a user will be manually enter, another where you manually enter the last name of a user and the third which will automatically enter the power of each user (for the automatic entry i will use a random data ) . Each table will have a box number , for example :
    Table 1, Box 1: Paul
    Table 2, Box 1: Gate
    Table 3, Box 1: 3.74
    Table 1, Box 2: Miguel
    Table 2, Box 2: Ramos
    Table 3, Box 2: 4.99
    Table 1, Box 3: Maelle
    Table 2, Box 3: Branco
    Table 3, Box 3 : 4.98
    I mean, I link the box to a table with the other three . And given that the program must compare the data in Table 3 (power ) and display data from the best user ( who has the highest power). In this example, the program should display :
    BEST USER :
    NAME: MIGUEL RAMOS
    POWER: 4.99
    (Is not nessesary save the information when i will close the program)
    I do not know if I 'm asking a lot , I have a very clear idea in my head of what I have to do , but being a new software for my not know how to implement it .
    Thank you in advance for your help and quick and ilustrative response! xD
    Solved!
    Go to Solution.

    Hi Miguel_Exe
    -Please check the snippet it does exactly what you said.
    -The Box 1,2,3 you mentioned are array indices.For example if you use table_1 and index it with 0(Yes, arrays index starts from 0), you will get first element which is Miguel-Vi used is Index Array.
    -For linking you can use string concatenation. Get each element from array using proper index and use Concatenate Strings.
    -I am getting the last Numerical Table and passing it to Array Max and Min to get where maximum value is and using same index (Box value) am getting full name.
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13
    Attachments:
    Nearest_name.png ‏30 KB

  • In ActionScript 2.0 , How can I send HTTP request and get the response in JSON format.

    I am using ActionScript 2.0 for my app development. I have checked XML and LoadVars class. These classes by default send/receive data either in XML or name/value pair format. I want to send data in JSON format and receive the response in JSON format. How can I achieve this behavior using AS2.0. I have noticed that AS3.0 has the capabilities to do so. My client platform doesn't support AS3.0. Can anybody suggest a way to achieve this?
    Thanks in Advance.

    Atlast I am able to find the solution for this problem. In the end solutioin is very simple.
    Following steps will help in sending request in JSON format.
    1. extend LoadVars class
    2. override toString method. (It should return JSON format )
    3. Use subclass to send the request.

  • How can I parse GPO settings and get the GPOApplyOrder?

    I have created a script that will search all GPO's in the domain and parse only those which have Drive Map settings and writes the information to a .csv file.  I have tried to figure out a way to get the GPOApplyOrder to no avail.  The closest
    I have come to any sort of reasonable output is
    "@{GPOSettingOrder=}", which is better than the nothing I had been getting.  I think it would be really helpful if I could sort on the appy order so I could see the flow of the applied settings.  Here is what I have.
    # ==============================================================================================
    # NAME: GetGPO_DriveMappings.ps1
    # AUTHOR: Mike
    # DATE: 6/17/2014
    # Updated: 7/29/2014
    # COMMENT: This script will get all the GPO's in the domain. It will parse only the GPO's that have drive map settings.
    # The results are written to GetGPO_DriveMappings.csv
    # This script is written to be run from the domain that the GPO(s) is in.
    # NOTE: The script will not perform any group provisioning.
    # ==============================================================================================
    # set Variables and load assemblies
    ImportSystemModules
    Import-Module GroupPolicy
    [void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
    $ScriptPath = "R:\Procedural Instructions\Scripts\Get AD Object Info"
    # Get drive map settings from all GPOs.
    Function Get-DriveMappings
    # File listing the drive mappings via GPO.
    $ExportFile = "GetGPO_DriveMappings.csv"
    # Creates .csv file for logging.
    $Header = "GPO Name,Drive Letter,Action,Apply Order,Drive Path,Group,OU,User"
    Set-Content -Path $ScriptPath\$ExportFile -Value $Header
    $GPO = Get-GPO -All
    ForEach ($Policy in $GPO)
    $GPOID = $Policy.Id
    $GPODom = $Policy.DomainName
    $GPODisp = $Policy.DisplayName
    If (Test-Path "\\$($GPODom)\SYSVOL\$($GPODom)\Policies\{$($GPOID)}\User\Preferences\Drives\Drives.xml")
    [xml]$DriveXML = Get-Content "\\$($GPODom)\SYSVOL\$($GPODom)\Policies\{$($GPOID)}\User\Preferences\Drives\Drives.xml"
    ForEach ( $MapDrive in $DriveXML.Drives.Drive )
    $GPOName = $GPODisp
    $DriveLetter = $MapDrive.Properties.Letter + ":"
    $DrivePath = $MapDrive.Properties.Path
    $DriveAction = $MapDrive.Properties.action.Replace("U","Update").Replace("C","Create").Replace("D","Delete").Replace("R","Replace")
    $GPOApplyOrder = $MapDrive | Select GPOSettingOrder
    $Filters = $MapDrive.Filters
    $FilterOrgUnit = $null
    $FilterGroup = $null
    $FilterUser = $null
    ForEach ($FilterGroup in $Filters.FilterGroup)
    $FilterGroupName = $FilterGroup.Name
    ForEach ($FilterOrgUnit in $Filters.FilterOrgUnit)
    $FilterOrgUnitName = $FilterOrgUnit.Name
    $FilterOrgUnitName = $FilterOrgUnitName -Replace (",",";")
    ForEach ($FilterUser in $Filters.FilterUser)
    $FilterUserName = $FilterUser.Name
    $ExportText = "$GPOName,$DriveLetter,$DriveAction,$GPOApplyOrder,$DrivePath,$FilterGroupName,$FilterOrgUnitName,$FilterUserName"
    Add-Content -Path $ScriptPath\$ExportFile -value $ExportText
    # --End of Function: Get-DriveMappings--------------------------
    # Notifying that the scripted finished.
    Function Script-Finished
    [System.Reflection.Assembly]::LoadWithPartialName(“System.Windows.Forms”)
    [Windows.Forms.MessageBox]::Show(“Script completed successfully”,"GetGPO_DriveMappings.ps", [Windows.Forms.MessageBoxButtons]::OK, [Windows.Forms.MessageBoxIcon]::Information)
    # --End of Function: Script-Finished--------------------------
    # Main Code:
    # Execute the functions
    $ErrorActionPreference="SilentlyContinue"
    Get-DriveMappings
    Script-Finished
    $ErrorActionPreference="Stop"
    Thanks to all in advance.

    I am looking for the order in which the drive map settings are applied. Truly the GPOSettingOrder value. I guess was thinking that it was the order that the drives were mapped so that is what
    I named the variable. In the middle of it all it made sense, now with your question, from the outside looking in, it doesn't. My apologies.
    -<ExtensionData>
    -<Extension xsi:type="q3:DriveMapSettings" xmlns:q3="http://www.microsoft.com/GroupPolicy/Settings/DriveMaps">
    -<q3:DriveMapSettings clsid="{8FDDCC1A-0C3C-43cd-A6B4-71A6DF20DA8C}">
    -<q3:Drive clsid="{935D1B74-9CB8-4e3c-9914-7DD559B7A417}" bypassErrors="1" uid="{B7F4229B-9A38-4A52-A987-7FB0CA53BF26}" changed="2013-11-19 18:03:50" image="3" status="P:" name="P:">
    <q3:GPOSettingOrder>1</q3:GPOSettingOrder>
    <q3:Properties letter="P" useLetter="1" persistent="1" label="" path="\\---------------------\APPS" userName="" allDrives="NOCHANGE" thisDrive="NOCHANGE" action="D"/>
    -<q3:Filters>
    <q3:FilterOrgUnit name="OU=---------------,DC=com" directMember="0" userContext="1" not="0" bool="AND"/>
    <q3:FilterOrgUnit name="OU=---------------,DC=com" directMember="0" userContext="1" not="0" bool="OR"/>
    <q3:FilterOrgUnit name="OU=---------------,DC=com" directMember="0" userContext="1" not="0" bool="OR"/>
    <q3:FilterOrgUnit name="OU=---------------,DC=com" directMember="0" userContext="1" not="0" bool="OR"/>
    <q3:FilterOrgUnit name="OU=---------------,DC=com" directMember="0" userContext="1" not="0" bool="OR"/>
    <q3:FilterOrgUnit name="OU=---------------,DC=com" directMember="0" userContext="1" not="0" bool="OR"/>
    </q3:Filters>
    </q3:Drive>

  • My old acer laptop will not re install I tunes.  How can I sync my iPad and get the tunes in my iTunes library?

    My old acer laptop will not re install I tunes.  I want to sync my iPad and get my tunes on it from iTunes.  Any ideas?

    See Troubleshooting issues with iTunes for Windows updates.
    tt2

  • Loop at internal table and get the right line

    Hi,
    I've a table like this sorted by material1 and date.
    Material 1...Date..........Material 2...Stock 
    A1.............01/01/08........A2..........100
    A1.............01/01/07........A2..........150
    B1.............01/05/08........B1..........50
    B1.............01/03/07........B2..........100
    B1.............01/02/07........B3..........75
    I need to put in another table only the line for material1 which has the highest date.
    For this example, line 1 and 3 should be selected.
    Can anyone tell me how to code this??
    Thanks.

    Hi tarick,
    Try this,,
    Create another internal table  itab2 of type itab1 and copy all entries of itab1 to itab2.
    itab2[] = itab1[].
    Now delete adjacent duplicates from itab2 comparing material1.
    DELETE ADJACENT DUPLICATES FROM itab2 comparing material1.
    Effect
    Deletes adjacent duplicate entries from the internal table itab2. If there are n duplicate entries in succession, the first entry is retained, and the following n-1 entries are deleted.
    Reward Points if Helpful.
    Regards,
    Sachin M M

Maybe you are looking for

  • How do I get virtualbox to work on an older kernel?

    I'm currently on 3.4.9-1-ARCH due to some bugs with newer versions of the kernel that affects my laptop. I'd like to install virtualbox that works with my current kernel, but I'm not sure how to do it. I suppose if I can use older version that doesn'

  • 3rd party billing - Invoice referenced to multiple invoices/ orders

    Hey there SD gurus, This is a sales process from Argentina, and SHOULD work as follows: My company should be able to sell to our customers on behalf of a 3rd party, which will create many invoices "on behalf of XXX company". Then, like once a month w

  • How to insert bulk data into ms-access

    Hi, I am trying to insert bulk data into ms-access. I used Statement it is working fine but not allowing to insert single quote. Then I tryed with PreparedStatement which is allowing single quote but not allowing bulk data. The following error i am g

  • Shapshot Replication to Master

    I would like to make a snapshot replication from a third party database (any type of database anywhere) to a Master. How hard would it be to set this up for several 100 db and to maintain it?

  • After Bop run the delivery dates differs in STO tables.

    Hi, I have created a STO with multiple line items with multiple delivery dates in the same STO. We have APO also E.G. 1st and 3rd line item have todays delivery date(01.03.12) and 2nd and 4th line item have 05.03.12. for the 1st and 3rd line item the