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

Similar Messages

  • 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 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 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 all the recipients of a server queue with powershell

    Hello,
    I have a queue who remains "full" because there was a bounce email sent to invalid addresses. I am looking for an easy way to list all the recipients with invalid addresses.
    I can have the list of emails in the queue with this command :
    get-queue -identity ServerName\Shadow\37057 | get-message
    But I am unable to list the recipient address with this one :
    get-queue -identity POST1MTY\Shadow\37057 | get-message -IncludeRecipient
    Can somebody help me with this ?
    Thank you in advance for your help.
    zigune

    Hi zigune,
    Thank you for your question.
    We could try to the following command to get the recipient address:
    Get-MessageTrackingLog –server “servername” | FL sender,Event-id,recipients | export-csv C:\test\test.csv
    Then, we could use log parser to view csv file for invalid recipient address, we could download log parser tool by the following link:
    http://www.microsoft.com/en-us/download/details.aspx?id=24659
    In other way, we could also try adding the “-IncludeRecipientInfo” in command:
    http://technet.microsoft.com/en-us/library/bb124738(v=exchg.150).aspx
    If there are any questions regarding this issue, please be free to let me know. 
    Best Regard,
    Jim

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

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

  • Please help me how concatenate all the error messages and send it as out parameter value.

    Hi Experts,
    Please help me how concatenate all the error messages and send it as out parameter value.
    Thanks.

    Agree with Billy, exception handling is not something that is done by passing parameters around.
    PL/SQL, like other languages, provides a suitable exception handling mechanism which, if used properly, works completely fine.  Avoid misuing PL/SQL by trying to implement some other way of handling them.

  • How to copy all the javascript of a page to another, including the fields javascript

    I have a PDF form with fields that have validation and formating scripts done in Javascript. I have another PDF form with equal fields: the fields are the same, same name same everything.....
    I want to copy all the fields scripts from 1 document to the other so that I doint have to retype all the javascript in all the fields. How can I do this????
    I am using Acrobat Pro 8.1.2
    Thanks
    Marc

    How do I copy them all with Edit All Javascripts?
    I tried adding new scripts to the file produced and saving it, but the new scripts were not in the PDF with I was done. At least I couldn't see them when I edited again.

  • How to fetch all the contact fields using Office365 REST API

    When I request for Contacts using webservices URL, Office365 returns only some specific fields (even though contact record has lot more fields). Is there any way so that I can fetch all the fields in contact record?

    Currently the REST APIs are limited to the fields you see now. We're constantly working to add more features though, so that might come in the future.

  • Get all the field's value of addressbook entry using c++ api

    How can i get all the field values of address book entry in groupwise using c++ api.

    You should be able to do that via the Token API. There is an AddressBookGetEntry method. You could createsome sort of AddressbookEntry class that fetches (via iteration over the defined ABFields) all the innformation.

  • How to get all the fieldnames from a tcResultSet

    Hi, im coding a connector to write to a file all the fields of the process form.
    to be like this:
    User ID: value for UserID
    FirstName: Value for first Name
    LastNAme: Value for LastName
    Im using the Process instance Key to get the tcResultSet.
    I know if I give an array or a hardcoded list of fieldnames, i can get the field values.
    like this
    String fieldname = "FORM_UDF_USR_ID";
    String Response = formData.getStringValue(fieldName);
    my question is, how can i get a list of fieldnames from the tcResultSet so i dont need to provide it
    something like
    formdata.getFieldlist(); ?
    Thank You.

    Here is the algo
    * Description : Prints the tcResultSet
    * @param rs tcResultSet
    * @throws tcAPIException
    * @throws tcColumnNotFoundException
    * @throws Exception
    public void printResultSet(tcResultSet rs) throws tcAPIException, tcColumnNotFoundException {
    String methodName = "printResultSet";
    print "COUNT = " + rs.getRowCount());
    String[] cols = rs.getColumnNames();
    for (int i = 0; i < rs.getRowCount(); ++i) {
    rs.goToRow(i);
    for (int j = 0; j < cols.length; j++) {
    if (cols[j].indexOf("Row Version") == -1) {
    print cols[j] + "\t\t:"
    + rs.getStringValue(cols[j]));
    Try this , replace print by System.out.println

Maybe you are looking for