Removing useless contents of an unsorted text file in excel 2013

hi friends
i am new to excel & there is an urgent need for me, that's why i pose this question which may appear simple.
in my server i have redirected the output of a command help into a text file (c:\myhelp.txt)
i have pasted some initial lines of that text file here:
The following is a list of unattend parameters for promotion (default values are enclosed in <>):
/AllowDomainControllerReinstall:{Yes | <No> | NoAndNoPromptEither}
Specifies whether to continue installing this domain controller despite that a domain controller account with the same name is detected. Specify Yes only if you are sure that the account is no longer in use.
/AllowDomainReinstall:{Yes | <No> | NoAndNoPromptEither}
Specifies whether an existing domain is recreated.
/ApplicationPartitionsToReplicate:""
Specifies application partitions to be replicated in the format of "partition1" "partition2". If * is specified, all application partitions will be replicated.
now i need to import this text file into excel 2013 so that i be able to remove comments & descriptions ( in fact anything except command switches, which their characteristics is that they begin with an
slash & there is no space between their words).
in other words i need to preserver strings which start with an slash.
for example i need only the following strings remain in the file:
/AllowDomainControllerReinstall:
/AllowDomainReinstall:
/ApplicationPartitionsToReplicate:
so that then i be able to export that file & then execute my command & specify the path to this answer file (c:\myhelp.txt)
how can i achieve this in excel?
can i easily do the entire process when importing that file into excel, using importing options? if not, how can i do that after opened in excel?
in the following screenshots i have shown what import options i used when importing this help file into excel & the result:
really thanks in advanced, i really need this help.

Hi John,
Bit unclear on your requirment.
Let me put it this way.
1.You are running some command which generates output c:\myhelp.txt in multiple lines.
2. You want to reformat the contents of c:\myhelp.txt so that only parameter name remains in each line, without the values.
3. Reuse the updated c:\myhelp-clean.txt file into some other script\command.
I can help you with quick excel formatting on point 2.
Points noted:- the parameter are seperated from the rest of the data by ":" colon
Hence once data is opened in excel, use Text-Col ->Delimited->Other-> Type : (colon) as the delimitor.
This will result in only the 1st column with the long text in some rows and /parameters seperated
Then Select all the data in the first column, Filter->Drop Down, Text Filters->Begins with-> /
Only text with the parameters remain, as desc rows don't have / in beginning.
Copy this and save it in another text file for re-use.
Regards,
Satyajit
Please“Vote As Helpful”
if you find my contribution useful or “MarkAs Answer” if it does answer your question. That will encourage me - and others - to take time out to help you.
Hi Satyajit.
worked that's Great !
thank you very very much for your great help
best regards  ;-)

Similar Messages

  • Removing the Control Characters from a text file

    Hi,
    I am using the java.util.regex.* package to removing the control characters from a text file. I got below programming from the java.sun site.
    I am able to successfully compile the file and the when I try to run the file I got the error as
    ------------------------------------------------------------------------D:\Debi\datamigration>java Control
    Exception in thread "main" java.util.regex.PatternSyntaxException: Illegal repet
    ition
    {cntrl}
    at java.util.regex.Pattern.error(Pattern.java:1472)
    at java.util.regex.Pattern.closure(Pattern.java:2473)
    at java.util.regex.Pattern.sequence(Pattern.java:1597)
    at java.util.regex.Pattern.expr(Pattern.java:1489)
    at java.util.regex.Pattern.compile(Pattern.java:1257)
    at java.util.regex.Pattern.<init>(Pattern.java:1013)
    at java.util.regex.Pattern.compile(Pattern.java:760)
    at Control.main(Control.java:24)
    Please help me on this issue.
    Thanks&Regards
    Debi
    import java.util.regex.*;
    import java.io.*;
    public class Control {
    public static void main(String[] args)
    throws Exception {
    //Create a file object with the file name
    //in the argument:
    File fin = new File("fileName1");
    File fout = new File("fileName2");
    //Open and input and output stream
    FileInputStream fis =
    new FileInputStream(fin);
    FileOutputStream fos =
    new FileOutputStream(fout);
    BufferedReader in = new BufferedReader(
    new InputStreamReader(fis));
    BufferedWriter out = new BufferedWriter(
    new OutputStreamWriter(fos));
         // The pattern matches control characters
    Pattern p = Pattern.compile("{cntrl}");
    Matcher m = p.matcher("");
    String aLine = null;
    while((aLine = in.readLine()) != null) {
    m.reset(aLine);
    //Replaces control characters with an empty
    //string.
    String result = m.replaceAll("");
    out.write(result);
    out.newLine();
    in.close();
    out.close();

    Hi,
    I used the code below with the \p, but I didn't able to complie the file. It gave me an
    D:\Debi\datamigration>javac Control.java
    Control.java:24: illegal escape character
    Pattern p = Pattern.compile("\p{cntrl}");
    ^
    1 error
    Please help me on this issue.
    Thanks&Regards
    Debi
    // The pattern matches control characters
    Pattern p = Pattern.compile("\p{cntrl}");
    Matcher m = p.matcher("");
    String aLine = null;

  • Configuration of text file to excel file

    How to post data from text file to excel file.
    this means sender side i have text file here fields are separated by commas, that data take and put in the MS-Excel sheet format, here the pages are like boxes, how to put data in that boxes.

    Plz send me the sample code how to configure
    Thanks and Regards
    Ramesh

  • How to export a  ABAP Report as both a Text file and Excel file?

    Hi Gurus,
    I need to develop a report which can be exported as both Text file  and Excel file.
    Can you guys sugest me the FM's which I have to use? and parameters to be passed.
    Post one example so that I can get better idea.
    Standard ABAP editor directly have the options to save file as .xls or .txt file. User wants to export the report as required.
    I know it is simple but need the efficient way.
    So thanks to all of you.
    Regards,
    Ravi

    Hi,
    Try in the below Example:
    *& DATA DECLARATION *
    TABLES: MARA, "GENERAL MASTER DATA
    MARC, "PLANT DATA FOR MATERIAL
    MARD, "STORAGE LOCATION DATA FOR MATERIAL
    MBEW, "MATERIAL VALUATION
    MVKE, "SALES DATA FOR MATERIAL
    MAKT, "MATERIAL DESCRIPTION
    EKKO, "PURCHASING DOCUMENT HEADER
    EKPO, "PURCHASING DOCUMENT ITEM
    VBAK, "SALES DOCUMENT HEADER DATA
    VBAP. "SALES DOCUMENT ITEM DATA
    TYPE-POOLS : SLIS.
    DATA: VT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV,
    V_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
    V_LAYOUT TYPE SLIS_LAYOUT_ALV,
    BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
    BEGIN OF I_MARA OCCURS 0,
    MATNR LIKE MARA-MATNR, "MATERIAL NUMBER
    MBRSH LIKE MARA-MBRSH, "INDUSTRY SECTOR
    MEINS LIKE MARA-MEINS, "BASE UNIT OF MEASURE
    MATKL LIKE MARA-MATKL, "MATERIAL GROUP
    END OF I_MARA,
    BEGIN OF I_MARC OCCURS 0,
    MATNR LIKE MARC-MATNR, "MATERIAL NUMBER
    WERKS LIKE MARC-WERKS, "PLANT
    LVORM LIKE MARC-LVORM, "FLAG MATERIAL FOR DELETION AT PLANT
    "LEVEL
    DISPO LIKE MARC-DISPO, "MRP CONTROLLER
    END OF I_MARC,
    BEGIN OF I_MAKT OCCURS 0,
    MATNR LIKE MAKT-MATNR, "MATERIAL NUMBER
    MAKTX LIKE MAKT-MAKTX, "MATERIAL DESCRIPTION
    SPRAS LIKE MAKT-SPRAS, "LANGUAGE KEY
    END OF I_MAKT,
    BEGIN OF I_MVKE OCCURS 0,
    MATNR LIKE MVKE-MATNR, "MATERIAL NUMBER
    VKORG LIKE MVKE-VKORG, "SALES ORGANIZATION
    VTWEG LIKE MVKE-VTWEG, "DISTRIBUTION CHANNEL
    END OF I_MVKE,
    BEGIN OF I_MARD OCCURS 0,
    MATNR LIKE MARD-MATNR, "MATERIAL NUMBER
    LGORT LIKE MARD-LGORT, "STORAGE LOCATION
    LABST LIKE MARD-LABST, "VALUATED STOCK WITH UNRESTRICTED USE
    END OF I_MARD,
    BEGIN OF I_EKPO OCCURS 0,
    EBELN LIKE EKPO-EBELN, "PURCHASING DOCUMENT NUMBER
    EBELP LIKE EKPO-EBELP, "ITEM NUMBER OF PURCHASING DOCUMENT
    MATNR LIKE EKPO-MATNR, "MATERIAL NUMBER
    END OF I_EKPO,
    BEGIN OF I_VBAP OCCURS 0,
    VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
    POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
    MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
    END OF I_VBAP,
    BEGIN OF I_OUT OCCURS 0,
    MATNR LIKE MARC-MATNR,
    WERKS LIKE MARC-WERKS,
    LVORM LIKE MARC-LVORM,
    DISPO LIKE MARC-DISPO,
    MBRSH LIKE MARA-MBRSH,
    MEINS LIKE MARA-MEINS,
    MATKL LIKE MARA-MATKL,
    VKORG LIKE MVKE-VKORG,
    VTWEG LIKE MVKE-VTWEG,
    SPRAS LIKE MAKT-SPRAS,
    MAKTX LIKE MAKT-MAKTX,
    LGORT LIKE MARD-LGORT,
    LABST LIKE MARD-LABST,
    EBELN LIKE EKPO-EBELN,
    EBELP LIKE EKPO-EBELP,
    VBELN LIKE VBAP-VBELN,
    POSNR LIKE VBAP-POSNR,
    END OF I_OUT,
    BEGIN OF I_HEADING OCCURS 0,
    TEXT1(20),
    TEXT2(20),
    TEXT3(20),
    TEXT4(20),
    TEXT5(20),
    TEXT6(20),
    TEXT7(20),
    TEXT8(20),
    TEXT9(20),
    TEXT10(20),
    TEXT11(40),
    TEXT12(20),
    TEXT13(20),
    TEXT14(20),
    TEXT15(20),
    TEXT16(20),
    TEXT17(20),
    END OF I_HEADING.
    *& S E L E C T I O N - S C R E E N *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-100.
    SELECT-OPTIONS: S_MATNR FOR MARA-MATNR. "OBLIGATORY.
    PARAMETERS: P_WERKS LIKE MARC-WERKS. "OBLIGATORY.
    SELECT-OPTIONS: S_LGORT FOR MARD-LGORT,
    S_DISPO FOR MARC-DISPO,
    S_EBELN FOR EKPO-EBELN .
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-101.
    PARAMETERS : RB1 RADIOBUTTON GROUP G1,
    RB2 RADIOBUTTON GROUP G1,
    RB3 RADIOBUTTON GROUP G1.
    SELECTION-SCREEN END OF BLOCK B2.
    *& S T A R T - O F - S E L E C T I O N *
    START-OF-SELECTION.
    SELECT MATNR WERKS LVORM DISPO FROM MARC
    INTO CORRESPONDING FIELDS OF TABLE I_MARC
    WHERE MATNR IN S_MATNR
    AND DISPO IN S_DISPO
    AND WERKS = P_WERKS.
    IF I_MARC[] IS INITIAL.
    WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MARC'.
    EXIT.
    ENDIF.
    PERFORM PURCHASEDATA_VALIDATION.
    PERFORM SALESDATA_VALIDATION.
    SELECT MATNR LGORT LABST FROM MARD INTO TABLE I_MARD
    FOR ALL ENTRIES IN I_MARC
    WHERE MATNR = I_MARC-MATNR
    AND WERKS EQ P_WERKS
    AND LGORT IN S_LGORT.
    IF I_MARD[] IS INITIAL.
    WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MARD'.
    EXIT.
    ENDIF.
    SELECT MATNR VKORG VTWEG FROM MVKE INTO TABLE I_MVKE
    FOR ALL ENTRIES IN I_MARC
    WHERE MATNR = I_MARC-MATNR.
    IF I_MVKE[] IS INITIAL.
    WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MVKE'.
    EXIT.
    ENDIF.
    LOOP AT I_MARC.
    MOVE-CORRESPONDING I_MARC TO I_OUT.
    CLEAR MARC.
    SELECT SINGLE MATNR MBRSH MEINS MATKL FROM MARA
    INTO CORRESPONDING FIELDS OF MARA
    WHERE MATNR = I_OUT-MATNR.
    IF SY-SUBRC = 0.
    MOVE: MARA-MBRSH TO I_OUT-MBRSH,
    MARA-MEINS TO I_OUT-MEINS,
    MARA-MATKL TO I_OUT-MATKL.
    ELSE.
    CONTINUE.
    ENDIF.
    SELECT SINGLE MATNR MAKTX SPRAS FROM MAKT
    INTO CORRESPONDING FIELDS OF MAKT
    WHERE MATNR = I_OUT-MATNR.
    IF SY-SUBRC = 0.
    MOVE: MAKT-MAKTX TO I_OUT-MAKTX,
    MAKT-SPRAS TO I_OUT-SPRAS.
    ELSE.
    CONTINUE.
    ENDIF.
    LOOP AT I_EKPO WHERE MATNR = I_MARC-MATNR.
    MOVE: I_EKPO-EBELN TO I_OUT-EBELN,
    I_EKPO-EBELP TO I_OUT-EBELP.
    ENDLOOP.
    LOOP AT I_VBAP WHERE MATNR = I_MARC-MATNR.
    MOVE: I_VBAP-VBELN TO I_OUT-VBELN,
    I_VBAP-POSNR TO I_OUT-POSNR.
    ENDLOOP.
    LOOP AT I_MARD WHERE MATNR = I_MARC-MATNR.
    MOVE: I_MARD-LABST TO I_OUT-LABST,
    I_MARD-LGORT TO I_OUT-LGORT.
    ENDLOOP.
    LOOP AT I_MVKE WHERE MATNR = I_MARC-MATNR.
    MOVE: I_MVKE-VKORG TO I_OUT-VKORG,
    I_MVKE-VTWEG TO I_OUT-VTWEG.
    APPEND I_OUT.
    ENDLOOP.
    CLEAR I_OUT.
    ENDLOOP.
    PERFORM OPTIONS.
    FORM OPTIONS *
    FORM OPTIONS.
    IF RB2 = 'X'.
    PERFORM FIELDCAT.
    PERFORM OUTPUT.
    ELSE.
    IF RB1 = 'X'.
    PERFORM HEADINGS.
    PERFORM DLOAD.
    ELSE.
    IF RB3 = 'X'.
    PERFORM HEADINGS.
    PERFORM DLOAD.
    PERFORM FIELDCAT.
    PERFORM OUTPUT.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDFORM. "OPTIONS
    FORM HEADINGS *
    FORM HEADINGS.
    I_HEADING-TEXT1 = 'MATNR'.
    I_HEADING-TEXT2 = 'WERKS'.
    I_HEADING-TEXT3 = 'LVORM'.
    I_HEADING-TEXT4 = 'DISPO'.
    I_HEADING-TEXT5 = 'MBRSH'.
    I_HEADING-TEXT6 = 'MEINS'.
    I_HEADING-TEXT7 = 'MATKL'.
    I_HEADING-TEXT8 = 'VKORG'.
    I_HEADING-TEXT9 = 'VTWEG'.
    I_HEADING-TEXT10 = 'SPRAS'.
    I_HEADING-TEXT11 = 'MAKTX'.
    I_HEADING-TEXT12 = 'LGORT'.
    I_HEADING-TEXT13 = 'LABST'.
    I_HEADING-TEXT14 = 'EBELN'.
    I_HEADING-TEXT15 = 'EBELP'.
    I_HEADING-TEXT16 = 'VBELN'.
    I_HEADING-TEXT17 = 'POSNR'.
    APPEND I_HEADING.
    ENDFORM. "HEADINGS
    FORM DLOAD *
    FORM DLOAD.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    FILENAME = 'C:\MATSTK.XLS'
    FILETYPE = 'DAT'
    WRITE_FIELD_SEPARATOR = 'X'
    TABLES
    DATA_TAB = I_HEADING
    EXCEPTIONS
    FILE_WRITE_ERROR = 1.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    FILENAME = 'C:\MATSTK.XLS'
    FILETYPE = 'DAT'
    APPEND = 'X'
    WRITE_FIELD_SEPARATOR = 'X'
    TABLES
    DATA_TAB = I_OUT.
    ENDFORM. "DLOAD
    FORM FIELDCAT *
    FORM FIELDCAT.
    V_FIELDCAT-COL_POS = '1'.
    V_FIELDCAT-FIELDNAME = 'MATNR'.
    V_FIELDCAT-TABNAME = 'I_OUT'.
    V_FIELDCAT-HOTSPOT = 'X'.
    V_FIELDCAT-REF_FIELDNAME = 'MATNR'.
    V_FIELDCAT-REF_TABNAME = 'MARC'.
    APPEND V_FIELDCAT TO VT_FIELDCAT1.
    CLEAR V_FIELDCAT.
    V_FIELDCAT-COL_POS = '2'.
    V_FIELDCAT-FIELDNAME = 'WERKS'.
    V_FIELDCAT-TABNAME = 'I_OUT'.
    V_FIELDCAT-REF_FIELDNAME = 'WERKS'.
    V_FIELDCAT-REF_TABNAME = 'MARC'.
    APPEND V_FIELDCAT TO VT_FIELDCAT1.
    CLEAR V_FIELDCAT.
    V_FIELDCAT-COL_POS = '3'.
    V_FIELDCAT-FIELDNAME = 'LVORM'.
    V_FIELDCAT-TABNAME = 'I_OUT'.
    V_FIELDCAT-REF_FIELDNAME = 'LVORM'.
    V_FIELDCAT-REF_TABNAME = 'MARC'.
    APPEND V_FIELDCAT TO VT_FIELDCAT1.
    CLEAR V_FIELDCAT.
    V_FIELDCAT-COL_POS = '4'.
    V_FIELDCAT-FIELDNAME = 'DISPO'.
    V_FIELDCAT-TABNAME = 'I_OUT'.
    V_FIELDCAT-REF_FIELDNAME = 'DISPO'.
    V_FIELDCAT-REF_TABNAME = 'MARC'.
    APPEND V_FIELDCAT TO VT_FIELDCAT1.
    CLEAR V_FIELDCAT.
    V_FIELDCAT-COL_POS = '5'.
    V_FIELDCAT-FIELDNAME = 'MBRSH'.
    V_FIELDCAT-TABNAME = 'I_OUT'.
    V_FIELDCAT-REF_FIELDNAME = 'MBRSH'.
    V_FIELDCAT-REF_TABNAME = 'MARA'.
    APPEND V_FIELDCAT TO VT_FIELDCAT1.
    CLEAR V_FIELDCAT.
    V_FIELDCAT-COL_POS = '6'.
    V_FIELDCAT-FIELDNAME = 'MEINS'.
    V_FIELDCAT-TABNAME = 'I_OUT'.
    V_FIELDCAT-REF_FIELDNAME = 'MEINS'.
    V_FIELDCAT-REF_TABNAME = 'MARA'.
    APPEND V_FIELDCAT TO VT_FIELDCAT1.
    CLEAR V_FIELDCAT.
    V_FIELDCAT-COL_POS = '7'.
    V_FIELDCAT-FIELDNAME = 'MATKL'.
    V_FIELDCAT-TABNAME = 'I_OUT'.
    V_FIELDCAT-REF_FIELDNAME = 'MATKL'.
    V_FIELDCAT-REF_TABNAME = 'MARA'.
    APPEND V_FIELDCAT TO VT_FIELDCAT1.
    CLEAR V_FIELDCAT.
    V_FIELDCAT-COL_POS = '8'.
    V_FIELDCAT-FIELDNAME = 'VKORG'.
    V_FIELDCAT-TABNAME = 'I_OUT'.
    V_FIELDCAT-REF_FIELDNAME = 'VKORG'.
    V_FIELDCAT-REF_TABNAME = 'MVKE'.
    APPEND V_FIELDCAT TO VT_FIELDCAT1.
    CLEAR V_FIELDCAT.
    V_FIELDCAT-COL_POS = '9'.
    V_FIELDCAT-FIELDNAME = 'VTWEG'.
    V_FIELDCAT-TABNAME = 'I_OUT'.
    V_FIELDCAT-REF_FIELDNAME = 'VTWEG'.
    V_FIELDCAT-REF_TABNAME = 'MVKE'.
    APPEND V_FIELDCAT TO VT_FIELDCAT1.
    CLEAR V_FIELDCAT.
    V_FIELDCAT-COL_POS = '10'.
    V_FIELDCAT-FIELDNAME = 'SPRAS'.
    V_FIELDCAT-TABNAME = 'I_OUT'.
    V_FIELDCAT-REF_FIELDNAME = 'SPRAS'.
    V_FIELDCAT-REF_TABNAME = 'MAKT'.
    APPEND V_FIELDCAT TO VT_FIELDCAT1.
    CLEAR V_FIELDCAT.
    V_FIELDCAT-COL_POS = '11'.
    V_FIELDCAT-FIELDNAME = 'MAKTX'.
    V_FIELDCAT-TABNAME = 'I_OUT'.
    V_FIELDCAT-REF_FIELDNAME = 'MAKTX'.
    V_FIELDCAT-REF_TABNAME = 'MAKT'.
    APPEND V_FIELDCAT TO VT_FIELDCAT1.
    CLEAR V_FIELDCAT.
    V_FIELDCAT-COL_POS = '12'.
    V_FIELDCAT-FIELDNAME = 'LGORT'.
    V_FIELDCAT-TABNAME = 'I_OUT'.
    V_FIELDCAT-REF_FIELDNAME = 'LGORT'.
    V_FIELDCAT-REF_TABNAME = 'MARD'.
    V_FIELDCAT-SELTEXT_L = 'STRG LOCT'.
    V_FIELDCAT-OUTPUTLEN = 10.
    APPEND V_FIELDCAT TO VT_FIELDCAT1.
    CLEAR V_FIELDCAT.
    V_FIELDCAT-COL_POS = '13'.
    V_FIELDCAT-FIELDNAME = 'LABST'.
    V_FIELDCAT-TABNAME = 'I_OUT'.
    V_FIELDCAT-SELTEXT_M = 'STOCK'.
    V_FIELDCAT-OUTPUTLEN = 15.
    V_FIELDCAT-REF_FIELDNAME = 'LABST'.
    V_FIELDCAT-REF_TABNAME = 'MARD'.
    V_FIELDCAT-DO_SUM = 'X'.
    V_LAYOUT-TOTALS_TEXT = 'TOTAL STOCK:'.
    V_FIELDCAT-HOTSPOT = 'X'.
    APPEND V_FIELDCAT TO VT_FIELDCAT1.
    CLEAR V_FIELDCAT.
    V_FIELDCAT-COL_POS = '14'.
    V_FIELDCAT-FIELDNAME = 'EBELN'.
    V_FIELDCAT-TABNAME = 'I_OUT'.
    V_FIELDCAT-HOTSPOT = 'X'.
    V_FIELDCAT-REF_FIELDNAME = 'EBELN'.
    V_FIELDCAT-REF_TABNAME = 'EKPO'.
    APPEND V_FIELDCAT TO VT_FIELDCAT1.
    CLEAR V_FIELDCAT.
    V_FIELDCAT-COL_POS = '15'.
    V_FIELDCAT-FIELDNAME = 'EBELP'.
    V_FIELDCAT-TABNAME = 'I_OUT'.
    V_FIELDCAT-REF_FIELDNAME = 'EBELP'.
    V_FIELDCAT-REF_TABNAME = 'EKPO'.
    APPEND V_FIELDCAT TO VT_FIELDCAT1.
    CLEAR V_FIELDCAT.
    V_FIELDCAT-COL_POS = '16'.
    V_FIELDCAT-FIELDNAME = 'VBELN'.
    V_FIELDCAT-TABNAME = 'I_OUT'.
    V_FIELDCAT-HOTSPOT = 'X'.
    V_FIELDCAT-REF_FIELDNAME = 'VBELN'.
    V_FIELDCAT-REF_TABNAME = 'VBAP'.
    APPEND V_FIELDCAT TO VT_FIELDCAT1.
    CLEAR V_FIELDCAT.
    V_FIELDCAT-COL_POS = '17'.
    V_FIELDCAT-FIELDNAME = 'POSNR'.
    V_FIELDCAT-TABNAME = 'I_OUT'.
    V_FIELDCAT-REF_FIELDNAME = 'POSNR'.
    V_FIELDCAT-REF_TABNAME = 'VBAP'.
    APPEND V_FIELDCAT TO VT_FIELDCAT1.
    CLEAR V_FIELDCAT.
    ENDFORM. "FIELDCAT
    FORM OUTPUT *
    FORM OUTPUT.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'
    I_GRID_TITLE = 'CLICK ON MATERIAL/PURDOC/SALESDOC FOR DETAILS'
    I_CALLBACK_USER_COMMAND = 'DISPLAYDETAILS'
    IS_LAYOUT = V_LAYOUT
    IT_FIELDCAT = VT_FIELDCAT1
    TABLES
    T_OUTTAB = I_OUT.
    IF SY-SUBRC 0.
    ENDIF.
    ENDFORM. "OUTPUT
    FORM TOP-OF-PAGE *
    FORM TOP-OF-PAGE.
    DATA: T_HEADER TYPE SLIS_T_LISTHEADER,
    WA_HEADER TYPE SLIS_LISTHEADER.
    WA_HEADER-TYP = 'H'.
    WA_HEADER-INFO = 'REPORT FOR : '.
    APPEND WA_HEADER TO T_HEADER.
    CLEAR WA_HEADER.
    WA_HEADER-TYP = 'S'.
    WA_HEADER-INFO = 'MATERIAL DETAILS'.
    APPEND WA_HEADER TO T_HEADER.
    CLEAR WA_HEADER.
    WA_HEADER-TYP = 'S'.
    WA_HEADER-INFO = 'PURCHASE ORDER DETAILS'.
    APPEND WA_HEADER TO T_HEADER.
    CLEAR WA_HEADER.
    WA_HEADER-TYP = 'S'.
    WA_HEADER-INFO = 'SALES ORDER DETAILS'.
    APPEND WA_HEADER TO T_HEADER.
    CLEAR WA_HEADER.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    I_LOGO = 'GEAR'
    IT_LIST_COMMENTARY = T_HEADER.
    ENDFORM. "TOP-OF-PAGE
    *& FORM PURCHASEDATA_VALIDATION *
    FORM PURCHASEDATA_VALIDATION.
    SELECT EBELN EBELP MATNR
    FROM EKPO
    INTO TABLE I_EKPO
    FOR ALL ENTRIES IN I_MARC
    WHERE MATNR = I_MARC-MATNR
    AND EBELN IN S_EBELN
    AND WERKS EQ P_WERKS.
    IF I_EKPO[] IS INITIAL.
    WRITE:/ 'NO MATCHING DATA IS SELECTED FROM TABLE EKPO'.
    EXIT.
    ENDIF.
    DATA: T_EKPO LIKE I_EKPO OCCURS 0 WITH HEADER LINE.
    T_EKPO] = I_EKPO[.
    REFRESH I_EKPO.
    FREE I_EKPO.
    LOOP AT T_EKPO.
    SELECT SINGLE EBELN FROM EKKO INTO EKPO-EBELN
    WHERE EBELN = T_EKPO-EBELN.
    IF SY-SUBRC = 0.
    MOVE-CORRESPONDING T_EKPO TO I_EKPO.
    APPEND I_EKPO.
    CLEAR I_EKPO.
    ELSE.
    CONTINUE.
    ENDIF.
    ENDLOOP.
    SORT I_EKPO.
    ENDFORM. "PURCHASEDATA_VALIDATION
    *& FORM SALESDATA_VALIDATION *
    FORM SALESDATA_VALIDATION.
    SELECT VBELN POSNR MATNR
    FROM VBAP
    INTO CORRESPONDING FIELDS OF TABLE
    I_VBAP FOR ALL ENTRIES IN I_MARC
    WHERE MATNR = I_MARC-MATNR.
    DATA: T_VBAP LIKE I_VBAP OCCURS 0 WITH HEADER LINE.
    T_VBAP] = I_VBAP[.
    REFRESH I_VBAP.
    FREE I_VBAP.
    LOOP AT T_VBAP.
    SELECT SINGLE VBELN FROM VBAK INTO VBAK-VBELN
    WHERE VBELN = T_VBAP-VBELN.
    IF SY-SUBRC = 0.
    MOVE-CORRESPONDING T_VBAP TO I_VBAP.
    APPEND I_VBAP.
    CLEAR I_VBAP.
    ELSE.
    CONTINUE.
    ENDIF.
    ENDLOOP.
    SORT I_VBAP.
    ENDFORM. "SALESDATA_VALIDATION
    Regards ,
    Nishant

  • Number format changed after opening a plain text file in Excel

    Hi,
    I have an urget need to understand about how to open a plain text file in Excel with numbers displayed as is. The text file is tab delimited. Right now, extra digits (0, or 00 ) are added. For example, 31:16 from text file is displayed as 31:16:00,
    15:0 becomes 15:00, 6:5 becomes 6:05. How to display the numbers as they are in the original text file?
    Thank you very much for the help.
    Amy

    This is a annoying problem.
    Excel will try to guess the data type if you leave the cell formatting as general.This happens a lot with specific numerical entries that could be confused as dates.e.g. 12:0,1-5 etc.Unfortunatley We can't tell Excel to stop reading it as a date, but what you
    can do is tell it to display the date how you want it.
    In addtion,in order to avoid confusion and keep track of troubleshooting steps, we usually troubleshoot one issue per thread. So if you need any further help, please create a new post.Thanks for your understanding.

  • Why can't I open .csv files in Excel 2013?

    We purchased (20) new machines all with Office 2013 (OEM) version.  We can no longer open .csv files with Excel 2013.  When we go to a machine with Office 2010 it opens perfectly.  The issue is with some change to Excel.  I see a lot
    of complaints on the internet about this issue.  Since we have OEM versions of Office, I am not entitled to a downgrade to 2010.  I need to know what Microsoft is doing to fix this issue, or need them to grant us rights to downgrade. 

    Hi,
    In regarding the issue, I had tested in Excel 2013 of my PC. It seems worked fine. Thus, I suggest you try to do the following methods to test.
    1. Import the CSV file into Excel 2013. Click Data tab>From Text
    http://superuser.com/questions/407082/easiest-way-to-open-csv-with-commas-in-excel
    2. Did you get en error message "SYLK: File format is not valid" when you open CSV file?
    If it was, please try to follow the link to fix the issue:
    http://support.microsoft.com/kb/323626
    3. Please try copy one of the CSV file to notepad and save it as a new name to test.
    4. You'd better upgrade the lastest patches.
    Regards,
    George Zhao
    TechNet Community Support

  • When opening files in excel 2013, it is showing contacting.... makes it very slow

    When I open a file in excel 2013 , it is shown that the file is contacting so many files (ONE EXAMPLE IS ATTACHED HEREWITH) that it takes nearly 2-3 minutes to open.But the same file is opened in Excel 2010 immediately.
    However this file doesn't have any links or references or formulae and the files which are being contacted, I think, have nothing to do with this file.
    How to solve this problem? We have around 1000 PCs of Windows 7 in our organization and this makes the users very annoying. Please help me...

    For the questions you raised the answers are,
    1. No, the excel files which excel 2013 is contacting are not in the same folder.
    2 . both, local workbook and received through mail.
    3. before I tell the outcome of your suggestion, I have attached the few lines which I got fromone of the users.
    The following are the problem experienced in Newly Installed Office 2013 Excel Software
    While opening file containing links to external link, relatively longer time (approx. 2-3 min) is taken for opening the file.
    Even if the links to external sources are
    delinked, all the references are being contacted while opening the file. This is also taking the same time like the old file.
    When more than two excel files are opened, only last file is available in the tab. Rest of the files are hidden in the minimized tab.
    As per the user, he has linked some files to this excel file(problematic file). But even after the links are removed and the problematic file is opened it is still contacting the old linked files.
    Please suggest something.
    Balamurugan Sakthivel.

  • Select and open multiple files in Excel 2013

    In older versions of Excel, I can open several previous files at once by clicking File==> Open and then using the "look in" ==> History option to see my recently openend files. Using the Ctrl key, I can then select three or four recent files
    and then click Open to open them all simultaneously.
    I can't find a similar option for doing this in Office 2013 and it's driving me crazy! Can anyone help?

    Hi,
    As your description, my understanding is that you want to select and open the multiple files in Excel 2013.
    Thus, I tested to use Excel 2010. Click File tab>Click Open Tab or Recent Tab. I could not find "Look in" and "History option ".
    If I want to open the the multiple files, I only conld use open tab and choose one folder to use Ctrl to choose  the multiple files.
    And if I click Recent Tab, I could open one file when I select it. I could not reproduce your steps.
    If you could upload some pictures or more steps informarion in the forum, I’ll be appreciated for you.
    Next, If you want to select and open the multiple files in Excel 2013. I recommend you select the
    Quickly Access This Number of Recent Workbooks check box on the
    Advanced tab of the Excel Options dialog box (right below the Show This Number of Recent Workbooks option) to have Excel display the four most recently opened workbooks as menu items at the bottom of the File menu in the Backstage
    view.
    It'll help you find the 4 recent files quickly.
    George Zhao
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click here

  • Repair xlsx file of Excel 2013?

    How to repair xlsx file of Excel 2013?

    When a Microsoft Excel file is corrupt or damaged, then you can try several methods to repair and recover data from it:
    1. First of all, try to repair the corrupt file manually. Follow below steps:
    A. On the File menu, click Open.
    B. In the Open dialog box, select the file that you want to open, and click the arrow next to the Open button.
    C. Click Open and Repair, and then choose which method you want to use to recover your workbook.
    Check-out following articles for more information about at:
    http://office.microsoft.com/en-us/excel-help/repairing-corrupted-files-in-excel-HA001034656.aspx (for MS Excel
    2003)
    http://office.microsoft.com/en-us/excel-help/repairing-a-corrupted-workbook-HA010097017.aspx?CTT=1 (for MS Excel
    2007)
    http://office.microsoft.com/en-us/excel-help/repairing-a-corrupted-workbook-HA010342840.aspx?CTT=1 (for MS Excel
    2010)
    http://office.microsoft.com/en-us/excel-help/repair-a-corrupted-workbook-HA102749554.aspx?CTT=1 (for MS Excel
    2013)
    2. Second, since MS Excel 2003, it provides a "Document Recovery" mechanism so that when Excel is shutdown abnormally, the Excel file being edited will be recovered when Excel is launched next time, which makes the file recovery possible.
    Read below article for more details:
    http://office.microsoft.com/en-us/excel-help/recover-your-office-files-HP010354299.aspx?CTT=1
    3. If method 1 and 2 do not work, then you may try 3rd party Microsoft certified tools such as Stellar Phoenix Excel Repair at
    http://www.repair-excel-file.com/
    Software is available as both free demo & full user license versions. You can try demo version to see the preview of your file. 

  • Remove duplicates while loading data from text file

    Hi,
    Data in text file (some times has duplicates) is being loaded into Oracle 9i database using Informatica. To improve performance, we would like to remove duplicates at the time of each load using Oracle procedure. Could you please help me with this?
    Thanks,
    Lakshmi

    No, our table doesn't have that. Most of the functionality is managed at the informatica level. Is there any other way? Thanks,

  • How to append content in begining of text file?

    i want to append content in the begining of text file.
    (usually append flag will append content in end of the file)
    is there any class in java support this need?
    if there is no class for this...anybody can give logic to implement
    venu

    Duplicate post
    http://forum.java.sun.com/thread.jspa?threadID=577639

  • What's the easiest way to remove/append a line of a text file???

    The line to remove can be any line in the file - not only the first or last one.
    Is there any good tutorial for file operations?
    Thanks a million,
    Serano.

    To remove a line from a text file, the easiest way is to read it in one line at a time and write out all lines except the one you want to remove to a new version of the file. Likewise, to insert a line, you read the file one line at a time and write the lines to a new version, inserting the new line at its correct spot.

  • Import text files into excel spreadsheet using automator

    Hello,
    I am trying to import a number of different text files into a single spreadsheet.  The content of each of the text files is the same (i.e. Same number of columns to be made) and each item is spac delimited.  I am trying to make it so that each of these text files will be entered into a single spreadsheet.  That is, one text file corresponds to one row of data and the second text file would correspond to the second row of data in the excel sheet.  Any ideas on how to do this?  I imagine this will require some sort of applescript but I'm not familiar with applescript at all!
    Thanks for your help!

    By the way, if anybody else has the same question I had:
    After trying this on my own, I recommend against doing what I did. I used the Excel macro language, Visual Basic for Applications. There are documented features in the Mac version that simply do nothing. I wasted a lot of time trying to find out why they wouldn't work. In other words, the online help told me they worked, but they didn't. I ended up with a combination of Automator and VBA and had to write my own code in VBA to duplicate the functionality that was supposed to be there.
    Also, it's my understanding that VBA on the Mac is a dead language and that Microsoft is concentrating on Excel's Applescript support, which appears to contain most (or all) of the functionality of VBA.
    I hope this helps someone else avoid making the same mistake I did!

  • How to output strings to an text file and excel file

    Hi guys,
    I am writing a simple application taht process some string inputs from user using a simple GUI. The GUI consists of a series of
    textfields which the user can enter names, age, addresses....etc
    Once they complete filling up that GUI form, they click SUBMIT. All the values will then be read. These strings are then required to be output to 2 files
    1. To a text file which I can open it and read it anytime I wish.
    2. To an excel file which follows a specific format. That is, all names will be written to column B, all ages will be written to column C...etc
    The programme is expected to keep running allow the user to enter details of multiple persons(some 300 sets of data of different persons) until he clicks on End program.
    Please advise how I can output the strings to
    1. Text file
    2. Excel file.
    Many many thanks. I need this for one of my project which is due so so soon...... :((
    Regards
    David

    1. Text file
    See link to "Documentation - Tutorials" on the left
    side of this page.
    2. Excel file
    Dont try to write the real excel format (if you want
    to do it soon).
    - write data to a plain text file.
    - Use tab stops for separation of values.
    - Name file as excel file. (*.xls)
    If you double click this file, excel will import data
    and insert it to a table in the right order by
    itself.
    Excel can save this as real .xls now.
    Anyone here with a better idea? (Try to learn by
    myself)good thing to know for the excel tip :)
    thx

  • Text file to Excel file

    Hi Friends,
    here am uploading text file from desktop into int tab using GUI_upload. then  i want to down load that data from int tab into other file formate like Excel sheet.
    how to do? what is the FM for that?
    Thanks in advance,
    murali.

    hi,
    check this code
    REPORT zmm_basic_data .
    Report to View Detail Of Material Master BASIC DATA.
    Start Date 07.05.2007
    Request No.-GR3K931783
    TABLES: mara,marc,makt.
    DATA: gi_mara LIKE mara OCCURS 1 WITH HEADER LINE,
          gi_marc LIKE marc OCCURS 1 WITH HEADER LINE,
          gi_makt LIKE makt OCCURS 1 WITH HEADER LINE.
    DATA:  BEGIN OF gi_download OCCURS 1,
           matnr  LIKE   mara-matnr,"material no
           maktx     LIKE     makt-maktx,"material description
           matkl     LIKE     mara-matkl,"material group
           werks  LIKE   marc-werks,"plant
           ekgrp  LIKE   marc-ekgrp,"purchasing group
           spart     LIKE     mara-spart,"division
           meins     LIKE     mara-meins,"base uit of measure
           bismt     LIKE     mara-bismt,"old material no.
           prdha     LIKE     mara-prdha,"product hierarchy
           brgew     LIKE     mara-brgew,"gross weight
           ntgew     LIKE     mara-ntgew,"net weight
           gewei     LIKE     mara-gewei,"weight unit
           volum     LIKE     mara-volum,"volume
           voleh     LIKE     mara-voleh,"volume unit
           zeinr     LIKE     mara-zeinr,"document no.
           zeiar     LIKE     mara-zeiar,"document type
           zeivr     LIKE     mara-zeivr,"document version
           zeifo     LIKE     mara-zeifo,"page format of document
           blanz     LIKE     mara-blanz,"number of sheets
           spras     LIKE     makt-spras,"language key
    END OF gi_download.
    <b>DATA: BEGIN OF   gi_fieldnames OCCURS 1,
         mandt(50),
    END OF gi_fieldnames.</b>
    *file path and file name data declaration.
    DATA: stripped_name LIKE rlgrap-filename,
          file_path     LIKE rlgrap-filename.
    DATA: inpath LIKE ltran-path01,
          file   LIKE ltran-file01,
          outpath LIKE ltran-path02.
    Field Symbols ************
    FIELD-SYMBOLS <mara> LIKE gi_mara.
    FIELD-SYMBOLS <marc> LIKE gi_marc.
    FIELD-SYMBOLS <makt> LIKE gi_makt.
    FIELD-SYMBOLS <download> LIKE gi_download.
    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN: SKIP.
    SELECT-OPTIONS: s_werks FOR marc-werks.
    SELECT-OPTIONS: s_ekgrp FOR marc-ekgrp.
    SELECT-OPTIONS: s_matnr FOR mara-matnr.
    SELECT-OPTIONS: s_matkl FOR mara-matkl.
    SELECT-OPTIONS: s_spart FOR mara-spart.
    SELECTION-SCREEN: SKIP.
    PARAMETER fnm TYPE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN: SKIP.
    SELECTION-SCREEN: END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR fnm.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
                static        = 'X'
           CHANGING
                file_name     = fnm
           EXCEPTIONS
                mask_too_long = 1
                OTHERS        = 2.
      IF sy-subrc  <>  0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    *For fetching the baisc data.
    START-OF-SELECTION.
    *Getting the general data based on material no,division and material
    *group.
      SELECT * FROM mara INTO TABLE gi_mara
                 WHERE matnr IN s_matnr
                  AND  spart IN s_spart
                  AND  matkl IN s_matkl.
    *Getting the plant data based on material no,plant and purchasing
    *group.
      IF NOT gi_mara[] IS INITIAL.
        SELECT * FROM marc INTO TABLE gi_marc
                            FOR ALL ENTRIES IN gi_mara
                             WHERE matnr EQ gi_mara-matnr
                             AND   werks IN s_werks
                             AND   ekgrp IN s_ekgrp.
      ENDIF.
    *Getting the material description based on material no
      IF NOT gi_mara[] IS INITIAL.
        SELECT * FROM makt INTO TABLE gi_makt
         FOR ALL ENTRIES IN gi_mara
         WHERE matnr = gi_mara-matnr.
      ENDIF.
    Fetching all data into single internal table ********
      SORT gi_mara BY matnr.
      SORT gi_makt BY matnr.
      SORT gi_marc BY matnr.
    *****Transfering the data into gi_download*******
      IF s_werks[] IS INITIAL and s_ekgrp[] IS INITIAL.
        LOOP AT gi_mara ASSIGNING <mara>.
          MOVE-CORRESPONDING <mara> TO gi_download.
          READ TABLE gi_marc ASSIGNING <marc>
                     WITH KEY matnr = <mara>-matnr
                     BINARY SEARCH.
          IF sy-subrc = 0.
            MOVE <marc>-werks TO gi_download-werks.
            MOVE <marc>-ekgrp TO gi_download-ekgrp.
          ENDIF.
          READ TABLE gi_makt ASSIGNING <makt>
                     WITH KEY matnr = <mara>-matnr
                     BINARY SEARCH.
          IF sy-subrc = 0.
            MOVE <makt>-maktx TO gi_download-maktx.
            MOVE <makt>-spras TO gi_download-spras.
          ENDIF.
          APPEND gi_download.
          CLEAR gi_download.
        ENDLOOP.
      ELSE.
        LOOP AT gi_marc ASSIGNING <marc>.
          READ TABLE gi_mara ASSIGNING <mara>
                 WITH KEY matnr = <marc>-matnr
                 BINARY SEARCH.
          IF sy-subrc = 0.
            MOVE-CORRESPONDING <mara> TO gi_download.
          ENDIF.
          READ TABLE gi_makt ASSIGNING <makt>
                     WITH KEY matnr = <marc>-matnr
                     BINARY SEARCH.
          IF sy-subrc = 0.
            MOVE <makt>-maktx TO gi_download-maktx.
            MOVE <makt>-spras TO gi_download-spras.
          ENDIF.
          MOVE <marc>-werks TO gi_download-werks.
          MOVE <marc>-ekgrp TO gi_download-ekgrp.
          APPEND gi_download.
          CLEAR gi_download.
        ENDLOOP.
      ENDIF.
      IF gi_download[] IS INITIAL.
        MESSAGE i001(sa) WITH 'Data not found'.
        LEAVE LIST-PROCESSING.
      ENDIF.
    *******Downloading the basic data********
    <b> gi_fieldnames-mandt = 'Material no'.
      APPEND gi_fieldnames.
      CLEAR  gi_fieldnames.
      gi_fieldnames-mandt = 'Material description'.
      APPEND gi_fieldnames.
      CLEAR  gi_fieldnames.
      gi_fieldnames-mandt = 'Material group'.
      APPEND gi_fieldnames.
      CLEAR  gi_fieldnames.
      gi_fieldnames-mandt = 'Plant'.
      APPEND gi_fieldnames.
      CLEAR  gi_fieldnames.
      gi_fieldnames-mandt = 'Purchasing group'.
      APPEND gi_fieldnames.
      CLEAR  gi_fieldnames.
      gi_fieldnames-mandt = 'Division'.
      APPEND gi_fieldnames.
      CLEAR  gi_fieldnames.
      gi_fieldnames-mandt = 'Base uit of measure'.
      APPEND gi_fieldnames.
      CLEAR  gi_fieldnames.
      gi_fieldnames-mandt = 'Old material no.'.
      APPEND gi_fieldnames.
      CLEAR  gi_fieldnames.
      gi_fieldnames-mandt = 'Product hierarchy'.
      APPEND gi_fieldnames.
      CLEAR  gi_fieldnames.
      gi_fieldnames-mandt = 'Gross weight'.
      APPEND gi_fieldnames.
      CLEAR  gi_fieldnames.
      gi_fieldnames-mandt = 'Net weight'.
      APPEND gi_fieldnames.
      CLEAR  gi_fieldnames.
      gi_fieldnames-mandt = 'Weight unit'.
      APPEND gi_fieldnames.
      CLEAR  gi_fieldnames.
      gi_fieldnames-mandt = 'Volume'.
      APPEND gi_fieldnames.
      CLEAR  gi_fieldnames.
      gi_fieldnames-mandt = 'Volume unit'.
      APPEND gi_fieldnames.
      CLEAR  gi_fieldnames.
      gi_fieldnames-mandt = 'Document no.'.
      APPEND gi_fieldnames.
      CLEAR  gi_fieldnames.
      gi_fieldnames-mandt = 'Document type'.
      APPEND gi_fieldnames.
      CLEAR  gi_fieldnames.
      gi_fieldnames-mandt = 'Document version'.
      APPEND gi_fieldnames.
      CLEAR  gi_fieldnames.
      gi_fieldnames-mandt = 'Page format of document'.
      APPEND gi_fieldnames.
      CLEAR  gi_fieldnames.
      gi_fieldnames-mandt = 'Number of sheets'.
      APPEND gi_fieldnames.
      CLEAR  gi_fieldnames.
      gi_fieldnames-mandt = 'Language key'.
      APPEND gi_fieldnames.
      CLEAR  gi_fieldnames.</b>  CALL FUNCTION 'SO_SPLIT_FILE_AND_PATH'
           EXPORTING
                full_name     = fnm
           IMPORTING
                stripped_name = stripped_name
                file_path     = file_path
           EXCEPTIONS
                x_error       = 1
                OTHERS        = 2.
    IF sy-subrc <> 0.
       MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
      CLEAR fnm.
      CONCATENATE file_path stripped_name INTO fnm.
      CLEAR: inpath,file,stripped_name,file_path,outpath.
      <b>CALL FUNCTION 'WS_DOWNLOAD'
           EXPORTING
                filename                = fnm
                filetype                = 'DAT'
           TABLES
                data_tab                = gi_download
                fieldnames              = gi_fieldnames
           EXCEPTIONS
                file_open_error         = 1
                file_write_error        = 2
                invalid_filesize        = 3
                invalid_type            = 4
                no_batch                = 5
                unknown_error           = 6
                invalid_table_width     = 7
                gui_refuse_filetransfer = 8
                customer_error          = 9
                OTHERS                  = 10.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        MESSAGE i003(sa) WITH 'File downloaded successfuly' fnm.</b>
      ENDIF.
      REFRESH: gi_download,gi_mara,gi_marc,gi_makt.
      CLEAR:   gi_download,gi_mara,gi_marc,gi_makt.
    regards
    siva
    Message was edited by:
            siva prasad

Maybe you are looking for