How to split all the fields of output ls-l from an internal table

Hi all,
Using ls-l command i have brought the file attributes of a file like its read and write permissions,creation date ,path etc in a internal table.
Now how to split all these fields from the internal table or what should be the splitting criteria.
The field contents of internal table are like this:
-rw-rw----    1  devadm     sapsys     18360    apr  29......so on
I want to split this into different fields.
Kindly suggest.
Thank You.

Hi,
I think the delimiter will be space. For date alone (Apr 29) you need to concatenate after the string has been split.
Thanks and regards,
S. Chandramouli

Similar Messages

  • How to include all the fields of a Table into a Structure.

    How to include a Complete Table into a Structure.
    I want to include all the fields of KNA1 into a structure say W_KNA1(A local structure declared within a program)....How this can b acheived.
    Thanks in Advance.

    if i want to use INCLUDE STRUCTURE.....how will it work.
    TYPES : begin of ty_kna1,
                      INCLUDE STRUCTURE KNA1,
                  end of ty_kna1.
    tell me this is correct stmt.

  • How to list all the Fields for an Active Directory Object

    How do I list all the fields that an Active Directory object contains? I know the most common ones, but would like to enumerate through all the fields and obtain the type of fields and their values...

    Here is my complete code - I only put snippets so that the post was not too huge...
    Option Explicit
    Const ADS_SCOPE_SUBTREE = 2
    Const ForReading = 1, ForWriting = 2, ForAppending = 8
    Dim adoCommand, adoConnection, adoRecordSet
    Dim dtmDate, dtmValue
    Dim j
    Dim lngBias, lngBiasKey, lngHigh, lngLow, lngValue
    Dim objADObject, objClass, objDate, objFile, objFSO, objRootDSE, objShell
    Dim pathToScript
    Dim strAdsPath, strConfig, strDNSDomain, strHex, strItem, strProperty, strValue
    Dim strFilter, strQuery
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objShell = CreateObject("Wscript.Shell")
    pathToScript = objShell.CurrentDirectory
    Set objFile = objFSO.CreateTextFile(pathToScript & "\TestAD.csv")
    ' Determine Time Zone bias in local registry.
    ' This bias changes with Daylight Savings Time.
    lngBiasKey = objShell.RegRead("HKLM\System\CurrentControlSet\Control\TimeZoneInformation\ActiveTimeBias")
    If (UCase(TypeName(lngBiasKey)) = "LONG") Then
    lngBias = lngBiasKey
    ElseIf (UCase(TypeName(lngBiasKey)) = "VARIANT()") Then
    lngBias = 0
    For j = 0 To UBound(lngBiasKey)
    lngBias = lngBias + (lngBiasKey(j) * 256^j)
    Next
    End If
    ' Determine configuration context and DNS domain from RootDSE object.
    Set objRootDSE = GetObject("LDAP://RootDSE")
    strConfig = objRootDSE.Get("configurationNamingContext")
    strDNSDomain = objRootDSE.Get("defaultNamingContext")
    Set adoCommand = CreateObject("ADODB.Command")
    Set adoConnection = CreateObject("ADODB.Connection")
    adoConnection.Provider = "ADsDSOObject"
    adoConnection.Open "Active Directory Provider"
    adoCommand.ActiveConnection = adoConnection
    adoCommand.CommandText = "SELECT * FROM 'LDAP://" & strDNSDomain & "'WHERE objectClass=user'"
    adoCommand.Properties("Page Size") = 1000
    adoCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
    Set adoRecordSet = adoCommand.Execute
    Set adoRecordSet = adoCommand.Execute
    adoRecordSet.MoveFirst
    Do Until adoRecordSet.EOF
    strAdsPath = adoRecordSet.Fields("ADsPath").Value
    ' Bind to Active Directory object specified.
    Set objADObject = GetObject(strAdsPath)
    Set objClass = GetObject(objADObject.Schema)
    ' Write which object is grabbed from AD
    objFile.Write(Replace(strAdsPath, ",", ";;;"))
    ' Enumerate mandatory object properties.
    For Each strProperty In objClass.MandatoryProperties
    On Error Resume Next
    strValue = objADObject.Get(strProperty)
    If (Err.Number = 0) Then
    On Error GoTo 0
    If (TypeName(strValue) = "String") Or (TypeName(strValue) = "Long") Or (TypeName(strValue) = "Date") Then
    objFile.Write("," & strProperty & "|||" & Replace(CStr(strValue), ",", ";;;"))
    ElseIf (TypeName(strValue) = "Byte()") Then
    strHex = OctetToHexStr(strValue)
    objFile.Write("," & strProperty & "|||" & CStr(strHex))
    ElseIf (TypeName(strValue) = "Variant()") Then
    For Each strItem In strValue
    On Error Resume Next
    objFile.Write("," & strProperty & "|||" & Replace(CStr(strItem), ",", ";;;"))
    If (Err.Number <> 0) Then
    On Error GoTo 0
    objFile.Write("," & strProperty & "|||Value cannot be displayed")
    End If
    On Error GoTo 0
    Next
    ElseIf (TypeName(strValue) = "Boolean") Then
    objFile.Write("," & strProperty & "|||" & CBool(strValue))
    Else
    objFile.Write("," & strProperty & "|||Type:" & TypeName(strValue))
    End If
    Else
    Err.Clear
    sColl = objADObject.GetEx(strProperty)
    If (Err.Number = 0) Then
    For Each strItem In sColl
    objFile.Write("," & strProperty & "|||" & CStr(strItem))
    If (Err.Number <> 0) Then
    objFile.Write("," & strProperty & "|||Value cannot be displayed")
    End If
    Next
    On Error GoTo 0
    Else
    Err.Clear
    Set objDate = objADObject.Get(strProperty)
    If (Err.Number = 0) Then
    lngHigh = objDate.HighPart
    If (Err.Number = 0) Then
    lngLow = objDate.LowPart
    If (lngLow < 0) Then
    lngHigh = lngHigh + 1
    End If
    lngValue = (lngHigh * (2 ^ 32)) + lngLow
    If (lngValue > 120000000000000000) Then
    dtmValue = #1/1/1601# + (lngValue / 600000000 - lngBias) / 1440
    On Error Resume Next
    dtmDate = CDate(dtmValue)
    If (Err.Number <> 0) Then
    objFile.Write("," & strProperty & "|||<Never>")
    Else
    objFile.Write("," & strProperty & "|||" & CStr(dtmDate))
    End If
    Else
    objFile.Write("," & strProperty & "|||" & FormatNumber(lngValue, 0))
    End If
    Else
    objFile.Write("," & strProperty & "|||Value cannot be displayed")
    End If
    Else
    On Error GoTo 0
    objFile.Write("," & strProperty)
    End If
    On Error GoTo 0
    End If
    End If
    Next
    ' Enumerate optional object properties.
    For Each strProperty In objClass.OptionalProperties
    On Error Resume Next
    strValue = objADObject.Get(strProperty)
    If (Err.Number = 0) Then
    On Error GoTo 0
    If (TypeName(strValue) = "String") Then
    objFile.Write("," & strProperty & "|||" & Replace(CStr(strValue), ",", ";;;"))
    ElseIf (TypeName(strValue) = "Long") Then
    objFile.Write("," & strProperty & "|||" & Replace(CStr(strValue), ",", ";;;"))
    ElseIf (TypeName(strValue) = "Date") Then
    objFile.Write("," & strProperty & "|||" & Replace(CStr(strValue), ",", ";;;"))
    ElseIf (TypeName(strValue) = "Byte()") Then
    strHex = OctetToHexStr(strValue)
    objFile.Write("," & strProperty & "|||" & CStr(strHex))
    ElseIf (TypeName(strValue) = "Variant()") Then
    For Each strItem In strValue
    On Error Resume Next
    objFile.Write("," & strProperty & "|||" & Replace(CStr(strItem), ",", ";;;"))
    If (Err.Number <> 0) Then
    On Error GoTo 0
    objFile.Write("," & strProperty & "|||Value cannot be displayed")
    End If
    On Error GoTo 0
    Next
    ElseIf (TypeName(strValue) = "Boolean") Then
    objFile.Write("," & strProperty & "|||" & CBool(strValue))
    Else
    objFile.Write("," & strProperty & "|||Type:" & TypeName(strValue))
    End If
    Else
    Err.Clear
    sColl = objADObject.GetEx(strProperty)
    If (Err.Number = 0) Then
    For Each strItem In sColl
    objFile.Write("," & strProperty & "|||" & CStr(strItem))
    If (Err.Number <> 0) Then
    objFile.Write("," & strProperty & "|||Value cannot be displayed")
    End If
    Next
    On Error GoTo 0
    Else
    Err.Clear
    Set objDate = objADObject.Get(strProperty)
    If (Err.Number = 0) Then
    lngHigh = objDate.HighPart
    If (Err.Number = 0) Then
    lngLow = objDate.LowPart
    If (lngLow < 0) Then
    lngHigh = lngHigh + 1
    End If
    lngValue = (lngHigh * (2 ^ 32)) + lngLow
    If (lngValue > 120000000000000000) Then
    dtmValue = #1/1/1601# + (lngValue / 600000000 - lngBias) / 1440
    On Error Resume Next
    dtmDate = CDate(dtmValue)
    If (Err.Number <> 0) Then
    objFile.Write("," & strProperty & "|||<Never>")
    Else
    objFile.Write("," & strProperty & "|||" & CStr(dtmDate))
    End If
    Else
    objFile.Write("," & strProperty & "|||" & lngValue)
    End If
    Else
    objFile.Write("," & strProperty & "|||Value cannot be displayed")
    End If
    Else
    On Error GoTo 0
    objFile.Write("," & strProperty & "||| ")
    End If
    On Error GoTo 0
    End If
    End If
    Next
    objFile.WriteLine("")
    adoRecordSet.MoveNext
    Loop
    objFile.Close
    ' Function to convert OctetString (Byte Array) to a hex string.
    Function OctetToHexStr(arrbytOctet)
    Dim k
    OctetToHexStr = ""
    For k = 1 To Lenb(arrbytOctet)
    OctetToHexStr = OctetToHexStr _
    & Right("0" & Hex(Ascb(Midb(arrbytOctet, k, 1))), 2)
    Next
    End Function
    I have been able to obtain all the Computer, Contact, Group and OU objects without issue with this code...

  • How to list all the fields under an Infotype!

    Hi
    I need a list of fields under an Infotype, used the following link to list them but unsuccesful, is there any other way I can list the infotype feilds.
    Re: Infotype 0002 all fields
    Thanks

    Hi Tara,
    The FM 'DDIF_FIELDINFO_GET' gives you all the fields of the table in the Exporting IT 'DFIES_TAB' that you mention under the parameter 'TABNAME'. I am not sure why it doesnt work for you. Alternatively you can also try this FM 'DDIF_NAMETAB_GET' (This FM is actually used in the FM 'DDIF_FIELDINFO_GET' ) .
    If you are still unsuccesful in meeting your requirement then please paste your piece of code.
    Regards
    Nanda

  • Form Guide: How to hide all the field of a  subform

    Hello,
    I'm an experienced LC Designer user for PDF Forms. I need to work on my first Form guide today.
    The first thing I cannot realize is to hide all the fields in a subform, based on some conditions. Is it possible to make that in a sort of script that work fine for both the pdf and the form guide?
    I have noticed that subform doen't exists into form guide. What append with theire event scripts?
    Thanks
    Denis

    DECLARE
      LC$Block   Varchar2(40) := get_form_property( NAME_IN('System.Current_Form'), FIRST_BLOCK ) ;
    BEGIN
      Loop -- For each block of the form
         Set_Block_Property( LC$Block, INSERT_ALLOWED, PROPERTY_FALSE );
         Set_Block_Property( LC$Block, UPDATE_ALLOWED, PROPERTY_FALSE );
         Set_Block_Property( LC$Block, DELETE_ALLOWED, PROPERTY_FALSE );
         LC$Block := get_block_property( LC$Block, NEXTBLOCK ) ; -- next block
         Exit when LC$Block is null ;
      End loop ;
    END;Francois

  • How to retrieve all the users along with their password from LDAP

    Hello,
    Can anyone let me know how to retrieve and list all the user along with their password from LDAP.
    Thanks

    Hi Prashant,
    I have limited experience with Synchronization, but I agree with you - if you need to synchronize Passwords, you need to have the Password in clear Text.
    If you trying to build your own Synchronization Solution using any of the avaliable LDAP APIs, I don't think you can ever retrieve a user's Password in clear text.
    However, I did come across an interesting article & I hope you find it useful :-
    http://www.oracle.com/technology/obe/obe_as_10g/im/configssl/configssl.htm
    I am not sure if SSL is necessary - If you have a look at Metalink Note 277382.1 ( How to Configure OID External Authentication Plug-In for Authentication Via Microsoft Active Directory (MS AD) ), teh question asked by oidspadi.sh for the same is asnwered as "N".
    Regards,
    Sandeep

  • How to concatenate all the fields in a single statement with tilda..

    hi, i have 10 fields, i have to concatenate those fields seperated with tilda... and put into the application server...in a single statement,
    kindly suggest me hw to write..?
    Thanx in Advance.
    Akshitha.

    Hi.....
    Just see the following code...
    It solves your requirement.....
    REPORT  ZCSV_SPFLI_APP.
    TABLES :
      SPFLI.                               " Flight
      FIELD-SYMBOLS : <FS>. "TYPE C.
    DATA T_SPFLI LIKE STANDARD TABLE OF SPFLI .
    DATA W_CHAR(20) TYPE C.
    DATA W_TYPE .
    DATA:
      BEGIN OF T_TABLE OCCURS 0,
        LINE TYPE STRING,
      END OF T_TABLE.
    SELECT * FROM SPFLI INTO TABLE T_SPFLI.
    LOOP AT T_SPFLI INTO SPFLI.
      DO.
        ASSIGN COMPONENT SY-INDEX OF STRUCTURE SPFLI TO <FS>.
        IF SY-SUBRC NE 0.
          EXIT.
        ELSE.
          MOVE <FS> TO W_CHAR.
          IF SY-INDEX EQ 1.
            T_TABLE-LINE = <FS>.
          ELSE.
            CONCATENATE T_TABLE-LINE '~' W_CHAR INTO T_TABLE-LINE.
          ENDIF.
        ENDIF.
      ENDDO.
      CONDENSE T_TABLE-LINE.
      APPEND T_TABLE.
    ENDLOOP.
    LOOP AT T_TABLE.
      WRITE / T_TABLE-LINE.
    ENDLOOP.
    OPEN DATASET 'YH647_SPFLI' FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    IF SY-SUBRC NE 0.
      MESSAGE ' File is Not Opend' TYPE 'S'.
    ENDIF.
    LOOP AT T_TABLE.
      TRANSFER T_TABLE-LINE TO 'YH647_SPFLI'.
    ENDLOOP.
    CLOSE DATASET 'YH647_SPFLI'.
    This reads flight detail and makes the separated by '~' and  stores in the application server (<b>OPEN_DATASET, TRANAFER , CLOSE DATASET</b>)
    Reward points if useful.........
    Suresh........

  • How to remove all the fields added to CI_Include in Sap Standard table

    Hi, 
    I have added a new custom field in the CI_include structure in a standard SAP table. However now I want to remove that field but it not allowing me to remove the field as there is no field left in that CI_Include.
    Has anybody tried this before?

    Hi,
    I think you have to delete the whole CI. Go to SE11 enter the name of the CI and press delete.
    Not sure, but maybe this is the solution
    Regards Rudi

  • How to get both, the ResultSet and Output (return value) from Oracle Stored Procedure

    Hi! I am doing a conversion from MSSQL to Oracle with C++ and MFC ODBC. Any comment is appreciated!! I have Oracle 8i and Oracle ODBC 8.1.6 installed.
    My question is how to retrieve the return value AND ALSO the resultSet at the same time by using Oracle function without modifying my souce codes (except puttting mypackage. string infron of my procedure name, see below).
    -- My source code in C++ with MSSQL ....
    sqlStr.Format("{? = call ListOfCustomers(%i)}", nNameID);
    RcOpen = CustomerList.Open(CRecordset::forwardOnly, sqlStr, CRecordset::readOnly );
    Where CustoemrList is a Crecordset object...
    IN DoFieldExchange(CFieldExchange* pFX) I have ...
    //{{AFX_FIELD_MAP(CQOSDB_Group)
    pFX->SetFieldType(CFieldExchange::outputColumn);
    RFX_Long(pFX, T("Name"), mCustoemrName);
    //}}AFX_FIELD_MAP
    // output parameter
    pFX->SetFieldType( CFieldExchange::outputParam );
    RFX_Int( pFX, T("IndexCount"), mCustomerNumber);
    -- m_CustomerNumber is where i store the return value!!!
    -- In Oracle Version, i have similar codes with ...
    sqlStr.Format("{? = call mypackage.ListOfCustomers(%i)}", nNameID);
    RcOpen = CustomerList.Open(CRecordset::forwardOnly, sqlStr, CRecordset::readOnly );
    -- I have oracle package/Body codes as following...
    create or replace package mypackage
    as
    type group_rct is ref cursor;
    Function listgroups(
    nameID NUMBER ,
    RC1 IN OUT Mypackage.group_rct ) return int;
    end;
    Create or replace package body mypackage
    as
    Function listgroups(
    NameID NUMBER ,
    RC1 IN OUT Mypackage.group_rct )return int
    IS
    BEGIN
    OPEN RC1 FOR SELECT Name
    from Customer
    WHERE ID = NameIDEND ListGroups;
    END
    return 7;
    END listgroups;
    END MyPackage;
    Ive simplified my codes a bit....
    null

    yes, it is exactly what i want to do and I am using Oracle ODBC driver.
    I tried using procedure with 1 OUT var fo numeric value and the other IN OUT ref cursor var instead of function, but error occurs when I called it from the application. It give me a memory ecxception error!!
    sqlStr.Format("{? = call ListOfCustomers(%i)}", nNameID);
    RcOpen = CustomerList.Open(CRecordset::forwardOnly, sqlStr, CRecordset::readOnly );
    it seems to me that the ? marker var is making all the trouble... can you please give me any more comment on this?? thanks!
    null

  • How to delete all the events and create new events from scratch?

    I have all my photos separated into albums and I would like these albums to be considered events in iPhoto. The problem is that there are already lots of events in my iPhoto library that are not "real" events. It just so happens they were uploaded at a certain time and during one of my upgrades of iPhoto all these different uploads became different events. Of course, there are some albums I would like to become a single event as well...but I am not sure how to strip all of my photos of events and then add the photos to new events?

    Select all the pics in an Album and Flag them.
    Then go Events Menu -> Create Event from Flagged Photos
    A new Event is created that moves the pics from their existing Event
    Unflag the Photos then move to the next album. Repeat.
    Regards
    TD

  • Whether the fields of a single row in an internal table has got value.

    I am doing an archiving report in PS Module.
    The table RPSCO has 12 fields which represent each month.The records in the table are based on OBJNR  and YEAR
    Now i need to check for the latest year which month has some value .If any of the month  has got some value i need to take that month.
    Sample table given below.
    OBJNR           year    Month1    month2      month3    so on
    1)PR00002409  2006     0.00     0.00     664.70-     0.00 0.00     0.00     0.00     0.00     0.00                                                                      
    0.00     0.00     0.00     0.00
    2)PR00002409  2005     0.00     0.00     0.00     0.00     0.00     0.00     0.00 0.00     0.00     0.00     48.70     127.20     0.00
    In this case the output should be Month3.Because the latest year is 2006 and Month is Month3.

    Hi Susmita,
    You have to use DO VARYING option from field 3 onwards.
    Below is the sample program to check whether the field has a value or not.
    tables: rpsco.
    data: it_rpsco like rpsco occurs 0 with header line.
    data: v_wlp type rpsco-wlp00,
          v_wtp type rpsco-wtp00,
          v_pos type i.
    select * from rpsco into table it_rpsco where gjahr = '2007'.
    if lines( it_rpsco ) gt 0.
    loop at it_rpsco.
      clear v_pos.
      do 16 times varying v_wlp from it_rpsco-wlp00 next it_rpsco-wlp01
                  varying v_wtp from it_rpsco-wtp00 next it_rpsco-wtp01.
       v_pos = v_pos + 1.
       if not v_wlp is initial.
         write:/5 v_pos , 35 v_wlp, 70 v_wtp.
         exit.
       endif.
      enddo.
    endloop.
    endif.
    Regards,
    Kumar Bandanadham
    Edited by: Velangini Showry Maria Kumar Bandanadham on Jun 1, 2009 9:30 AM

  • How to read from an internal table with multiple key fields.

    Hi All!!
    I want to read from an internal table having keys as k1,k2,k3.
    How can I use read statement to read an entry having this as the key fields.
    Thanks in adavance..
    Prabhas Jha

    hi there
    use:
    sort itab by K1 K2 K3.
    read table itab into wa with key K1 = value 1
                                                  K2 = value2
                                                  K3 = value 3
                                                   BINARY SEARCH.
    where:
    itab is ur internal table
    wa is the work area with the same line type as the itab
    cheers
    shivika

  • How do we know what are all the fields  updated in a screen?

    Hi all,
             If i am making modifications in row details of sales order screen .for eg, <b>i am changing the quantity or price for a row</b> 
             I want to write log file for the updated fields for that particular sales order.
             <b> How do we know what are all the fields are updated ?</b>     
             If we can use SBOTransaction_Notification procedure.How to write code inside that.
             Please provide code example for that.I have downloaded the sample.But i donot know how to use 'Add code to here ' part.
             Please help me to solve this.Hope  your  reply soon
    Regards,
    V.Rangarajan

    Hi, V.Rangarajan!
    When the field in the matrix is filled with some value and the user moves to another field, the et_LOST_FOCUS event occurs. So, i think you can try to handle ItemEvents and use such code (for example):
    if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_LOST_FOCUS && pVal.ItemUID == "38" && pVal.BeforeAction == false && pVal.FormType == 139)
    string ChangedColumnID = pVal.ColUID;
    int ChangedRowNumber = pVal.Row;
    and write the values to your log.
    "38" - is the matrix ID in the Orders form
    "139" - is the Orders form
    Also you can access to the value, that user had put into the field.
    Hope this helps!

  • In the component overview screen of CO01 I want  to disable all  the field in  screen of table control.I want to make it as output screen only.

    Hi all
      In the component overview screen of CO01 I want  to disable all  the field in  screen of table control.I want to make it as output screen only.
    Thanks & Regards,
    Rajib.

    Isn't that just exactly what transaction CO02 does? CO01 is for creating production orders so what sense does it make to have it display mode only?
    Maybe your goal is to stop then end user changing the component assignment that is automatically  detected by the system. If so, personally I think a better starting point would be PP configuration or user authorizations rather than looking to change the screen by whatever method. As we don't know what you are trying to achieve it's hard to offer much more advice maybe all you need is to change transaction to CO02

  • To create apple US account i followed all the steps including none in the payment option. i dont have US address how should i fill the fields.

    to create apple US account i followed all the steps including none in the payment option. i dont have US address how should i fill the fields.

    You need to be in a country to use its store - if you are not in the US with a US billing address then you cannot use the US store.
    From the US store's terms of use :
    The iTunes Service is available to you only in the United States, its territories, and possessions. You agree not to use or attempt to use the iTunes Service from outside these locations. Apple may use technologies to verify your compliance.

Maybe you are looking for