Macro to compare CSV and Excel file

Team,
Do we have any macro to compare CSV and Excel file.
1) In Excel we should have two text boxes asking the user to select the files from the path where they have Stored
2) First Text is for CSV file
3) Second Text box is for Excel file
4) We Should have Compare button that should run the Macro and Show the Differences.
Thanks!
Kiran

Hi
Based on my understanding, we need to convert the 2 files into the same format before comparing two different formats files. 
Here are the options:
1. Convert the CSV file and Excel file into 2-dim Arrays, then compare them, about how to load a CSV file into VBA array, you can search it from
internet or ask a solution in VBA forum.
VBA forum:
http://social.msdn.microsoft.com/Forums/en-US/home?forum=isvvba
2. Also you can import CSV file to Excel sheet, and then compare them.
Here is the sample code for your reference:
‘import csv file
Sub InputCSV()
Dim Wb As Workbook
Dim Arr
Set Wb = GetObject(Application.GetOpenFilename("csv file,*.csv", , "please choose a csv file", , False))
Arr = Wb.ActiveSheet.Range("A1").CurrentRegion
Wb.Close False
Range("A1").Resize(UBound(Arr), UBound(Arr, 2)) = Arr
End Sub
‘compare sheet
Sub CompareTable()
Dim tem, tem1 As String
Dim text1, text2 As String
Dim i As Integer, hang1 As Long, hang2 As Long, lie As Long, maxhang As Long, maxlie As Long
 Sheets("Sheet1").Select
Columns("A:A").Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("A1").Select
Sheets("Sheet2").Select
Rows("1:4").Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("A1").Select
MaxRow = 250
MaxColumn = 40
For hang1 = 2 To maxhang
Dim a As Integer
a = 0
tem = Sheets(1).Cells(hang1, 1)
For hang2 = 1 To maxhang
tem1 = Sheets(2).Cells(hang2, 1)
If tem1 = tem Then
a = 1
Sheets(2).Cells(hang2, 1).Interior.ColorIndex = 6
For lie = 1 To maxlie
text1 = Sheets(1).Cells(hang1, lie)
text2 = Sheets(2).Cells(hang2, lie)
If text1 <> text2 Then
        Sheets(2).Cells(hang2, lie).Interior.ColorIndex = 8
End If
Next
End If
Next
If a = 0 Then
Sheets(1).Cells(hang1, 1).Interior.ColorIndex = 5
End If
Next
Hope this will help.
Best Regards
Lan
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Distinguishing between CSV and Excel file formats

    I am trying to distinguish between CSV and Excel files.   Most of the files I need to process are CSV, but some have been opened and re-saved in Excel format.  I know about the Excel toolbox available, but haven't used it yet. 
    I need to be able to open a spreadsheet file regardless of if it is in CSV or Excel format.  Any help would be greatly appreciated.
    Here are two example files, one CSV and one Excel.  Both have .XLS file extensions. 
    Attachments:
    20-4-XLS.xls ‏21 KB
    20-5-CSV.xls ‏8 KB

    Hi Paul,
    I think the matter is not the extention (xls or csv or whatever) but the format of the data written in your file.
    To see what I mean, open the xls file you posted with notepad... What does it look like ?
    You have tobe sure of the format of the file you want to read so that you can develop an appropriate VI... if you want to be able to read different type of data format, do a test before reading the file and then use an appropriate routine for each format.
    Hope this helps you...
    BTW, to read the one named CSV, a simple "read from spreadsheet file" VI will do the job
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

  • Best way to transfer csv or excel file ??

    Hi
    Can anyone recommend the best way for a customer emailing a csv or excel file to me - how can i guarantee it came from them and hasn't been tampered with. This file is generated from the application i develped if this helps.
    Have looked at public private keys and signatures etc,
    Thx
    Stephen

    1. your customer should have generated a key pair (public/private).
    2. you should have a copy of his public key.
    3. the customer creates a hash (using MD5 for example) from the file he wants to send.
    4. the customer encrypts the resulting hash with his secret key (this is a signature).
    5. the customer sends the file and the encrypted hash.
    After you receive both files:
    1. you create a hash from the excel file received (using the same algorithm the customer used to create the hash).
    2. you decrypt the encrypted hash the customer sent.
    3. you compare both hashes, if both are the same, then the excel file you received is Ok = has not been tampered.
    Hope this helps.

  • Save as pdf and excel file

    Hi All,
    Can anyone tell me how to save data available in a node(model or value) as pdf and excel files?
    Thanks in advance.....
    Bhushan Reddy.

    Bhushan,
    check these links for saving as excel
    Excel Export - Funky Column Headers
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/webDynproJava-ExportingTableDataUsingOn-DemandStreams-SAPNW+7.0
    Exporting table data to MS-Excel Sheet(enhanced Web Dynpro Binary Cache)
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/webDynproJava-ExportingTableDataUsingOn-DemandStreams-SAPNW+7.0
    Handling FileUpload and FileDownload in NetWeaver Developer Studio(NWDS) 2004S
    New Web Dynpro Java Tutorials - Uploading and Downloading Files in SAP NetWeaver 7.0
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71
    Thanks
    Bala Duvvuri

  • Acrobat 9 - we are unable to merge word and excel files into a pdf.

    Acrobat 9 - we are unable to merge word and excel files into
    a pdf. Any advice?

    To be expected if you are working in a contemporary OS and contemporary MS Office suite.
    The Acrobat 9.x product family passed into End of Support mid-year of 2013.
    The product isn't compatible with contemporary OSs or Office suite.
    You may have to step up into the Acrobat XI product family.
    Be well...

  • Where does workspace store the pdf and excel file ?

    Hi,
    I'm working on a Web Analysis project and I have created a dynamic web menu based on the workspace repository to improve the poor capacities of WA in terms of menu. I use the javascript API to control the WA applet from the menu.
    Now my problem is that my customer created a folder in workspace (which is translated into a sub menu of my dynamic menu), and that folder contains pdf and excel files. The function openFile which I use to open report in the applet doesn't work on pdf and excel files. So I've been looking for the files on the server, to know where they are stored, so that I could just modify the java class that generates the menu.
    I couldn't find those files on the server. Where are they ? Are they stored in the database as an xml string like the report s ? If yes then I might have a problem.
    Has anyone already done this ?
    Thanks for your help.
    Cyril

    Tomcat stores it in the work dir under $TOMCAT_HOME.
    There'll be directories like localhost%2f<urcontext>..
    As for as JSP changes being recognized, try refreshing ur browser....

  • Problem in opening of word and excell files downloaded from email attachment in MS office professional 2013 paper licence

    Hi,
    I am facing the problem in opening the word and excel files received through email in my MS office professional 2013 paper licence, Microsoft Windows 8.1 enviornment. please help in this matter
    regards
    Rajeev Bhagwat
    Administrative Officer-I
    Purchase and Store Section
    UGC-DAE Consortium for Scientific Research,
    University Campus, Khandwa Road, Indore (M.P.), India.
    Telefax-+917312361546

    I should further say the files I sent are .xlsx and .docx files.  They look fine my end and I send such files all the time without problems.
    However, I did try to cheat by going in via the Safari onto my 'live' online email account and the Safari automatically transfers them to winmail.dat files with the same result.
    Ahh - have just been on using my PC this time and you are right, it seems that the service provider does the transfer and then when my outlook opens the file (on the PC), it must reconvert to .xlsx etc again.
    Very strange.
    Ergo, I guess the question should be how I open wimail.dat files ??

  • Are operating files only within Windows (C:) or are Word and Excel files ok in Documents and (C:) folders in 8.1?

    A Microsoft tech said "oh-oh" when he saw Word and Excel files, and I think other files, in Windows (C:). He said only operating files should be in that folder or a user might delete an operating file by mistake. I have Word and Excel files in
    both (C:) and Documents folders. There is some overlap but there are different files in each. When I open a Word file it defaults to (C:) not Documents. Sometimes default location is SkyDrive. So unpredictability is my experience. The questions are what is
    correct default and how to make it so.
    Microsoft store in San Diego transferred files from old computer to new one and this default is how the computer was set up.

    Hi, Tyro.
    What a mess. Usually system files in the Windows folder are protected from being deleted by users, but not all of them.
    Here are some ideas:
    Go back to the Microsoft store and tell them to fix it. They caused it, it was their mistake, they are responsible to fix it.
    If that is not possible because they are too far away... find another Microsoft Store if possible and have them fix it.
    Last resort: If it was me, I'd just back up all the files that I care about onto my SkyDrive (now OneDrive) account or a reliable thumb drive. Then do a factory re-image. Maybe back up the files and make the MS store do it. If I had purchased Office
    2013 (it sounds like you have Office 2013), then I would have them reinstall that as well.
    Keep the store involved because it is their fault.
    At least call the MS store in San Diego and ask them what they suggest. Put them on the spot. They are the ones that screwed up and are responsible for the copying process.
    Good luck!
    Best wishes, Davin Mickelson

  • How can I see and excel file in my iphone 4s  THANKS

    how can I see and excel file in my iphone 4s  THANKS

    either export it as a pdf if you dont need to work in it or if you do use an app called numbers from apple it supports excel as far as i know

  • 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

  • Maximum number of lines in Al11 for csv and txt files

    Hello Experts,
    I need to extract millions of records to a file in AL11 from several DSO - based on fiscal period and year. Can anyone tell me about the maximun number of lines a csv and txt file can hold in AL11.
    Points will be assigned.
    Kevin.

    Hi.
    As per my knowledge there is no limit for text files but for csv file its 1048576 rows.
    Hope this helps.
    Regards
    Sai

  • Best way to view and edit OpenOffice files on my new iPad Mini (originally Word and Excel files). Thanks!

    Can someone tell me the best way to view and edit OpenOffice files on my new iPad Mini (originally Word and Excel files)? Thanks!

    wmf files is a MS Windows video file, you will need a tool to covert the wmf files to another file format OS X will read. Simply Google to find a converter you are interested in and use it.

  • My mac is converting Word and Excel files into Pages and Numbers files when I click to open them (or download and open them) from an email. I do I get this to stop? It's really aggravating.

    My mac is converting Word and Excel files into Pages and Numbers files when I click to open them from an email. Downloading them and opening them doesn't help. How do I make this stop? I don't use iLife and don't want to; my clients are using Office and it's easier for me, except when I have to copy and paste everything they send me from an iLife file back to Word and Excel. Help!!! It's like Apple has become Microsoft, forcing us to use their apps.

    Do you have Word & Excel installed, if yes, navigate in the finder to an example of each, right click and select 'Get Info' scroll down to 'Open With' and select the appropriate program, check the box that says 'Change All'

  • When about to install Yosemite onto my Imac it tells me I wont be able to access old Word and Excel files.Is there a solution to this ?

    When about to install Yosemite onto my Imac it tells me I wont be able to access old Word and Excel files.Is there a solution to this ?

    Use Office 2008 or 2011, LibreOffice, or similar software to access them.
    (118700)

  • Access Word and Excel files stored on 8820 SD Card?

    Need to be able to access many Word and Excel files stored on an 8820 SSD card - Media Center does not have a category for "business files" only pics and video etc. Is there a way to do that like Documents to Go on the Palm systems? Roxio's filters do not allow Word and Excel files either but Mass Storage accepts the OK. How to access on the SSD card?

    On Android OS 4.1 - 4.3 (Jelly Bean) or older, Adobe Reader for Android version 11.2.x has a known defect in the "All PDFs" view. The All PDFs view does not show the files and folders on an external SD card. A workaround is to use the Folder View instead of the All PDFs view. We have fixed the defect and plan to include the fix in the next release of Reader for Android.
    On Android OS 4.4 (KitKat) only, neither All PDFs view nor Folder View shows any files or folders on an external SD card.  Reader cannot save any changes to the files on an external SD card, either.  We are still working on fixing the problems.  In the meantime, please copy the files from your external SD card to your device's internal storage (e.g. /storage/emulated/0/Documents/...) using a File Manager/Browser app or use a cloud storage service (Acrobat.com, Dropbox, Google Drive, etc.) to store files.
    Your case is the latter because your Samsung Galaxy S4 phone is running 4.4.2 (KitKat).
    Sorry for the inconvenience.

Maybe you are looking for

  • How to change subsequent URL

    Hello My-portal-to-understanding, I am running EP6.0 SP14. I have a portal role named Logoff and a iView named Logoff that runs the parameter "logout_submit=true".  The user clicks this tab when wanting to Logoff the portal.  This works great in that

  • Juggling Acrobat "slide time" that has Flash video on a page

    I am trying to build a corporate slideshow from InDesign Mac over to Acrobat Pro 9. Once I get inside Acrobat Pro 9 "fullscreen" mode, I want each slide to play 5 seconds. (So far no problem.) But I have one page that has a properly placed Flash vide

  • Terminal - sending find output to cp

    I'm trying to do: find /Volumes/TMBackup/ -name *.eml It finds what I need, however, I'm trying to get this output sent to cp so I can copy all the .eml files it finds to another folder. HOWEVER, the results returned have spaces in some of the folder

  • Data / Hosting Center design advice…

    Need advice, on how to build a Data- Hosting Center infrastructure, (Best practices)… I need to deliver costumer access on Ethernet, where costumers can get access on variable access rates (CAR ingress/Egress), some costumers are connected with no re

  • Flash player just quits working fix

    Recent malware infection causes flash player to fail?  The kill-bit problem noted in this posthttp://forums.adobe.com/message/3432049#3432049  fixed it for me. Just thought I'd share.