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.

Similar Messages

  • How to include all the child OU groups of a master OU group in LDAP authentication

    Dear All,
    I am using Apex 4.2 on windows server 2012 on internet explorer with database 11g R2 all 64 bit.
    we are using Microsoft Active Directory Authentication in our domain.
    I have created two protals, Staff Portal and Student Portal
    I have two groups, Staff and Students. these two groups coming under HCT group.
    I want to configure LDAP authentication for these groups, so that student cannot login to staff portal and vice versa.
    I had created on authentication schema in apex.
    inititally I configured as below
    for example I have a group ETC, inside ETC I have CSS in active directory,
    DN String=cn=%LDAP_USER%,dc=hct,dc=org
    Use Exact distinguish name=YES
    LDAP Username edit function=
    return apex_escape.ldap_dn (
                 p_string => :USERNAME,
                 p_escape_non_ascii => false ) || ',ou=users,ou=css,ou=etc,ou=staff,ou=hct'   ;
    Username Escaping=NO ESCAPING
    and it is working,
    now I have another group under ETC, which is ESS. how to include ESS also? I mean how to include all the child groups of a master group?
    because I will then only include the STAFF ou and the rest of the ou which coming under staff will come automatically.
    please refer to this thread for more details.
    Re: Re: Different LDAP authentication for Student and Staff Active directory groups
    Thank you.

    Powershell (or vbscript if you want to be old school).
    You can trigger a powershell script which will remove the offending user(s) easily enough with out resorting to a TOLDAP pass.  Nearly any script type thing would work but powershell is preferred.  It can be triggered separately from the TO AD stuff and will take multiple objects to run in one pass if you can construct the command line (or create a text file and feed it in).
    Otherwise, TOLDAP is the way to write to AD...
    Peter

  • How to include in the sub-menu a table specifies of the user - UDO

    hi, forum  
    how to include in the sub-menu a table specifies of the user 
    I created a table '@ IA_RELAT' in User-Defined Obejcts but I don't know as including in the sub-menu that I created  
    it follows my code
      Private Sub SBO_Application_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.MenuEvent
            If (pVal.MenuUID = "MySubMenu") And (pVal.BeforeAction = False) Then
                Try
                           <u201DmyTableName->@IA_RELATu201D>
               Catch
                    SBO_Application.MessageBox("The Form already exists")
                End Try
            End If
    thank you
        End Sub

    Hi David
    Excuse me but I didn't find in MenuCreationParams Objects how to do this call of the table '@ IA_RELAT' created in User-Defined Obejcts 
    It follows my code 
    in AddMenuItems I set up the Menu and Submenu 
    in SBO_Application_MenuEvent it is where I am having difficulties of showing the table '@ IA_RELAT' created in User-Defined Obejcts 
    Thank you for any help
        Private Sub AddMenuItems()
            Dim oCreationPackage As SAPbouiCOM.MenuCreationParams
            oCreationPackage = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)
            oMenuItem = SBO_Application.Menus.Item("43520") 'moudles'
            Dim sPath As String
            sPath = Application.StartupPath
            sPath = sPath.Remove(sPath.Length - 3, 3)
            oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_POPUP
            oCreationPackage.UniqueID = "MyMenu01"
            oCreationPackage.String = "Standard cost"
            oCreationPackage.Enabled = True
            oCreationPackage.Image = sPath & "UI.bmp"
            oCreationPackage.Position = 15
            oMenus = oMenuItem.SubMenus
            Try ' If the manu already exists this code will fail
                oMenus.AddEx(oCreationPackage)
                '// Get the menu collection of the newly added pop-up item
                oMenuItem = SBO_Application.Menus.Item("MyMenu01")
                oMenus = oMenuItem.SubMenus
                '// Create s sub menu
                oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING
                oCreationPackage.UniqueID = "MySubMenu"
                oCreationPackage.String = "Auxiliary Table"
                oMenus.AddEx(oCreationPackage)
            Catch er As Exception ' Menu already exists
                SBO_Application.MessageBox("Menu Already Exists")
            End Try
        End Sub
    Private Sub SBO_Application_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.MenuEvent
    If (pVal.MenuUID = "MySubMenu") And (pVal.BeforeAction = False) Then
        Try
    SBO_Application.ActivateMenuItem(menus.Item(1).UID.IndexOf("@IA_RELAT"))
        Catch
                    SBO_Application.MessageBox("error")
        End Try
    End If
    End Sub

  • 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

  • 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

  • Report - to show sum of all the fields in a table

    Hi,
    I have a requirement that for a particular materil ex: SALT i should show the sum of  qunatity i.e TMENGE , LMENGE, MMENGE.
    for a particular material  there is a condition on bais of  which the values will be divided.
    IF IT_PROD2-BWART  = '103','104','
    IT_PROD2-MENE GOES TO TMENGE,
    SIMILARLY FOR  201','202','261','262',
    IT_PORD2-MENGE GOES TO LMENGE
    FOR IT-PROD2-BWART = 551','562'
    IT_PROD2-MENGE GOES TO MMENGE.
    So i should insert sum of all the qunatiy lmege, tmenge, mmenge into it_prod3 and display it.
    i should disply only single reocrd for a particular material.
    but i am getting all the reocrods for mutiple dates i.e for date 2007.05.01 i am getting 10 records for SALT and for date 2007.05.02 again different records whre single date is repeating and materil is repating and so on   i want only single material and all the values should be sum.
    below is my code.
    SELECT werks_i AS werks
             SUM( menge_i ) AS menge
             matnr_i AS matnr
             budat  bwart_i AS bwart
             FROM  wb2_v_mkpf_mseg2
             INTO CORRESPONDING FIELDS OF TABLE it_prod2
             WHERE budat IN s_budat
             AND matnr_i IN ('PULPIMPORT','PULPLOCAL','SULPHUR','ZINC',
    'ZINCOXIDE','CHARCOAL','SALT','LIGNITE','STEAMCOALLCV','STEAMCOALHCV',
    'LDO','FURNACEOIL')
             AND bwart_i IN ('103','104','201','202','261','262','551',
    '552')
             GROUP BY werks_i menge_i matnr_i budat  bwart_i.
    SORT it_prod2 BY budat matnr.
      date1 = s_budat-low.
      date2 = s_budat-high.
      WHILE date1 LE date2.
        it_totstk1-month1 = date1.
        date1 = date1 + 1.
        APPEND it_totstk1.
      ENDWHILE.
    sort it_prod2 by matnr budat.
    LOOP AT it_totstk1.
        LOOP AT it_prod2. " WHERE budat EQ it_totstk1-month1.
          tdat = it_prod2-budat.
       if ( it_prod2-matnr = 'PULPIMPORT' OR it_prod2-matnr = 'PULPLOCAL') .
    elseif ( it_prod2-matnr ='STEAMCOALLCV' OR it_prod2-matnr =
    'STEAMCOALHCV' ).
            tmatnr = 'STEAM COAL HCV'.
          else. tmatnr = it_prod2-matnr.
          endif.
          IF it_prod2-bwart EQ '103'.
            tmenge = tmenge + it_prod2-menge.
          ELSEIF it_prod2-bwart EQ '104'.
            tmenge = tmenge - it_prod2-menge.
          ELSEIF it_prod2-bwart EQ '201'.
            Lmenge = Lmenge + it_prod2-menge.
          ELSEIF it_prod2-bwart EQ '202'.
            Lmenge = Lmenge - it_prod2-menge.
          ELSEIF it_prod2-bwart EQ '261'.
            Lmenge = Lmenge + it_prod2-menge.
          ELSEIF it_prod2-bwart EQ '262'.
            Lmenge = Lmenge - it_prod2-menge.
          ELSEIF it_prod2-bwart EQ '551'.
            Mmenge = Mmenge + it_prod2-menge.
          ELSEIF it_prod2-bwart EQ '552'.
            Mmenge = Mmenge - it_prod2-menge.
          ENDIF.
       ENDLOOP.
        it_prod3-budat = tdat.
        it_prod3-matnr = tmatnr.
        it_prod3-tmenge = tmenge.
        it_prod3-lmenge = lmenge.
        it_prod3-mmenge = mmenge.
        APPEND it_prod3.
        CLEAR : tmenge,tdat,tmatnr,lmenge, mmenge.
      ENDLOOP.
    <b>points will be rewarded</b>
    Thanks & Regards,
    Sunil kumar.

    data: sumf type i.
    select sum( kbetr ) from  konv into sumf where kinak <> 'A' group by konv.
    write: sumf.
    Message was edited by:
            Ramu

  • How to select all the colomns_names from a table, with their datatypes ..

    hi :)
    i would like to know, how to select in SQL all the columns names from a table with their datatypes so that i get something like this :
    Table 1 : table_name
    the column ID has the Datatype NUMBER
    the column name has the Datatype Varchar2
    Table 2 : table_name
    the column check has the Datatype NUMBER
    the column air has the Datatype Varchar2
    and that has to be for all the tables that i own ! ..
    P. S : i m trying to do this with java, so it s would be enough if you just tell me how to select all the tables_names with all their colums_names and with all their datatypes ! ..
    thank you :)
    i ve heard it can be done with USER_TABLES .. but i have no idea how :( ..
    Edited by: user8865125 on 17.05.2011 12:22

    Hi,
    The data dictionary view USER_TAB_COLUMNS has one row for every column in every table in your schema. The columns TABLE_NAME, COLUMN_NAME and DATA_TYPE have all the information you need.
    Another data dictionary view, USER_TABLES, may be useful, too. It has one row pre table.

  • 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 backup all the views in a table

    I want export all the view in a schema.
    I used the below command:
    expdp A12/A12 schemas=USER INCLUDE=VIEW directory=pump_dir dumpfile=expdp_VIEW.dmp
    The command executed successfully but,
    Estimate in progress using BLOCKS method...
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 0 KB
    Processing object type SCHEMA_EXPORT/VIEW
    Master table "SYS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
    It seems nothing have been backed up..
    I don't want to export specifically. Is there any way to upload all the views using export or any other way.
    Kindly help me..
    Thanks in advance
    nonuday

    Dean Gagne wrote:
    This job exported views. You would not have seen this line:
    Processing object type SCHEMA_EXPORT/VIEW
    If the views were not exported. What were you expecting to see.
    DeanYes, it even showed the export was successful, but the blocks size was 0kb.
    If I import the dump which I took with the *"include=view"* export command, will the views imported?
    And, can you please tell me when I googled about this it was mentioned *"Metadata of the objects(view,procedure,etc) will be exported"* can you explain it?
    Thanks in advance,
    Karthik

  • How to display All the rows in a Table

    Hi All,
    Our requirement is, we need to display all the records of an VO in a table. We should not have navigation bar with previous and next. Runtime only will come to know how many records the VO has. Is it possible to achieve our requirement using setNumberOfRowsDisplayed() method in OATableBean ?

    Do u want to do it declaratively or programmatically.
    Declaratively You can set no of rows property of table bean. If u want to set it programmatically then u can do it as discussed in the thread..
    Regards,
    Ram

  • How to make all the rows of a table editable

    I have a table in a view, with visibileRowCount property as 5. The internal table which is bound to the context has 2 rows.
    I want to make all the 5 rows of this table as editable. As of now, as there are just 2 rows in the internal table, only the first 2 rows of the table in the view are editable.
    My idea is to avoid the use of a 'Add row' button for this table. Is it possible to do this?
    Points will be rewarded. thanks.

    hi john....
                just insert 3 more empty records into your internal table... so it becomes editable.
    ---regards,
       alexb justin

  • I want to download the fields of my table into an excel sheet ?

    hi all,
    i would like to download the ztable that i have created along with the fields in the ztable.
    how do i download it.
    can anyone throw light on this
    regds
    haritha

    Hii..
    PLS CHECK THE SIMPLE CODE BELOW...
    data: begin OF itab occurs 0,
    matnr like mara-matnr,
    end of itab.
    data : begin of it_fieldnames occurs 0,
    name(100),
    end of it_fieldnames.
    it_fieldnames-name = 'MATNR'.
    APPEND IT_FIELDNAMES.
    select matnr from mara into table itab UP TO 10 ROWS.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE =
    FILENAME = 'C:\Documents and Settings\sampath\Desktop\flatfile.txt'
    FILETYPE = 'ASC'
    APPEND = ' '
    WRITE_FIELD_SEPARATOR = ' '
    HEADER = '00'
    TRUNC_TRAILING_BLANKS = ' '
    WRITE_LF = 'X'
    COL_SELECT = ' '
    COL_SELECT_MASK = ' '
    DAT_MODE = ' '
    CONFIRM_OVERWRITE = ' '
    NO_AUTH_CHECK = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    WRITE_BOM = ' '
    TRUNC_TRAILING_BLANKS_EOL = 'X'
    WK1_N_FORMAT = ' '
    WK1_N_SIZE = ' '
    WK1_T_FORMAT = ' '
    WK1_T_SIZE = ' '
    IMPORTING
    FILELENGTH =
    <b>TABLES
    DATA_TAB = itab
    FIELDNAMES = IT_FIELDNAMES</b>
    EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    SEPARATOR_NOT_ALLOWED = 8
    FILESIZE_NOT_ALLOWED = 9
    HEADER_TOO_LONG = 10
    DP_ERROR_CREATE = 11
    DP_ERROR_SEND = 12
    DP_ERROR_WRITE = 13
    UNKNOWN_DP_ERROR = 14
    ACCESS_DENIED = 15
    DP_OUT_OF_MEMORY = 16
    DISK_FULL = 17
    DP_TIMEOUT = 18
    FILE_NOT_FOUND = 19
    DATAPROVIDER_EXCEPTION = 20
    CONTROL_FLUSH_ERROR = 21
    OTHERS = 22
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Reward if Helpful

  • 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........

Maybe you are looking for

  • When will the Bonjour protocols be updated for use in an Enterprise?

    Bonjour protocols really need an upgrade. Usage of iOS devices in a large VPN'd network is difficult to say the least.  These limitations are making it impossible to recommend usage of iOS equipment.  In some cases I have found a work around to get i

  • Enormous amounts of pagein/outs with the addition of another HD

    hi, I recently added a new 1tb drive in my machine and split it into 3 partitions (1 @ 500, 2 @ 250) and ever since menumeters has started showing upwards of a thousand pageins at any given time where before I never noticed more than 2 or 3 at a time

  • Setting up a grid using SGE(sun Grid engine)

    Hi everyone, We are trying to set up a grid in our university.We are taking the help of SGE(sun grid engine).We have successfully installed the master host. But we are encountering a problem when trying to install the execution host. When we type #qc

  • How to block reprinting option in ME22N.

    Hi All, Is there a way i can block users from using the repeat output  option in me22n -> Messages. I am finding users making multiple printouts of Purchase orders and confusing the vendors. Kavish

  • Using Table or ALV

    Hi , While using Table ui or ALV table elements , is it possible select multiple lines with out using CTRL button. Or we have to use CTRL button or it is standard functionality. If we want to delete multiple lines in Table is it better to use check b