Download to excel with multiple lines in header

Hi experts,
Is there any Funtion module available to download an internal table contents into Local directory of PC with multiple lines in header.
i.e.  let us say i hv internal table of 5 entries with 3 columns...
i need to download this 5 entries into an excel file with some texts above the table contents...
For eg : in the below format...
Sample line 1
sample line 2
sample line 3
colheader1     colheader2     colheader3
item1                              
item2
item3
item4
item5
Please help.
Edited by: Lakshmiraj on Jul 15, 2010 3:26 AM

There is another option of using OLE automation Please check the link below
http://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-OLEAutomationusing+MS-Excel
OR
chek for the example program in Tcode DWDM ( OLE example )
OR
Use FM KCD_EXCEL_OLE_TO_INT_CONVERT ( Fm Uses the same OLE automation)
Hope it helps
Anup

Similar Messages

  • Download to Excel with Header but one field data is repeating

    Hi All,
    I'm downloading to Excel with Header. But One field is repeating and another is not. This is happening only when I use   'CONCATENATE ' . With Out this key usage data download to excel is correct. But   CONCATENATE is required as constant need to add before the one field.
    My coding is as below.
    DATA: BEGIN OF IT_FINAL OCCURS 0,
          P1(10) TYPE C,
          SI(19) type c, 
            END OF IT_FINAL.
    DATA : BEGIN OF IT_HEADER OCCURS 0,
    TITLE(100) TYPE C,
    END OF IT_HEADER,WA_HEADER LIKE IT_HEADER.
    loop at it_final.
      CONCATENATE '894412' it_final-SI INTO IT_FINAL.
    modify it_final.
    endloop.
    CLEAR:WA_HEADER.
      WA_HEADER-TITLE = 'Mat No'.
      APPEND WA_HEADER TO IT_HEADER.
      CLEAR:WA_HEADER.
      WA_HEADER-TITLE = 'Serial'.
      APPEND WA_HEADER TO IT_HEADER.
    CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
        EXPORTING
          FILE_NAME  = P_FILE " path offile where u need to download
        TABLES
          DATA_TAB   = IT_FINAL
          FIELDNAMES = IT_HEADER.
    CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
        EXPORTING
          FILE_NAME  = P_FILE " path offile where u need to download
        TABLES
          DATA_TAB   = IT_FINAL
          FIELDNAMES = IT_HEADER.
    Excel OUT PUT:
    Mat No            Serial
    11Z52321     8944126000
    11Z52394     8944126000
    11Z52395     8944126000
    Thank You,
    Pranitha

    hi,
    it would have been better if u hve opt for creating workarea for ur internal table.
    Try to use "clear it_final" after
    CONCATENATE '894412' it_final-SI INTO IT_FINAL.
    n also change the modify statement :
    modify it_final transporting SI .
    hope this will surely help you
    Regards,
    Punit
    Edited by: punit raval on Aug 26, 2011 2:55 PM

  • Unable to create PO with multiple line items through LSMW-BAPI method

    Hi All,
    I have a requirement of creating PO through LSMW. I can't use LSMW standard batch input program since there are some fileds not available and also it has many limitations. I'm using LSMW-BAPI method ( Business object BUS2012) which create IDOC and uses BAPI_PO_CREATE1 to ultimately post the PO in the system. I am trying to create PO from a single file which contains both Header and Item data.
    Now my problem is that everytime PO is being created with Single line item only. Everytime I am giving multiple item data in the source file LSMW is preparing multiple IDOCs for multiple line items. As per my understanding this is happenng since header and item is in the same hierarchy level of IDOC type PORDCR102 and the control record is inserted for every line item in the source file.
    It seems that through LSMW-BAPI  it is not possible to create PO with multiple line items. Can anybody provide some input regarding this? Thanks in advance.
    BR,
    Atanu Mukherjee

    Solved by myself.
    Earlier the problem was that LSMW was not being able to recognize items under same header. It was creating new IDOCs every time it gets a new item. To enable this we need to create two structure HEADERDATA and ITEMDATA.  Two additional identifier fields with identifier value 'H' and 'I' should be added in these two structures respectively. Then we need one sequential file with the identifiers field followed by the header and Item data. Example:
    H~header data
    I~item data
    I~item data 
    This would help the standard program to understand what are the items under same header and ultimately create PO with multiple line items.
    BR,
    Atanu Mukherjee

  • Creating SVG Chart with multiple lines

    Hi All,
    I want to create a chart with multiple lines.
    Ex: I have one emp table with empno, sal and deptno columns.
    I want to print deptno in x axis and no of employees on y axis.
    I want to print one line for employees with sal > 15000 and one more line for employee with sal =< 15000
    So one line will show no of employees with sal more than 15000 for each dept. Similar case for the other line and these 2 lines should be in different colors.
    For one line the query will go as
    select link, deptno, count(empno)
    from emp where sal > 15000 group by null, deptno
    Is this possible to draw this chart?
    Thanks,
    Manoj

    I wasn't able to do something like what you describe, but I was able to do this:
    I defined column A of the table as a Header Row, selected the cells in the table, and chose this chart type (2D 2 Axis):
    Then I clicked the chart and in the pane at the right checked 'Axis Name' in the Axis tab and added the axis names.
    Maybe this can give you an idea of how you can illustrate the relationships that you want to show.
    SG

  • Text Field with multiple lines

    I am trying to create a text field in the selection screen where it can insert a text with multiple lines for instance those text fields which you can see online where you can key in text lines after lines.
    How do you do that in ABAP?

    Hi
    See any Std program code for CREATING long Text lines
    See any application document HEADER or ITEM text and copy that code
    first declare a field with some table field
    like
    PARAMETERS: p_text like Tline-tdname.
    then keep a button (for Long text) and in the program write a code such that when you press on that line it will take you to text ediotr
    using the CREATE_TEXT fun module
    copy it from a std program text..
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Creating POs with multiple line items

    Hi,
    Is it possible to create a PO with multiple line items from the Sharepoint. The developer guide shows sales order creation with a single line item. If yes, please let me know how it can be done.
    Thanks,
    Pranil

    Hi Pranil,
    You can achieve the user case to create a PO with multiple line items in 1 step by creating a custom solution UI in SharePoint. This is not possible if you simply use the out of box UI (as depicted in the guide).
    It depends on how to define the ESR data type. You can create a data type with header details of PO and collection of items with cardinality as 0..n and create a complex BDC model using SPD --> then create a custom UI.
    Other option would be keep it as 2 lists (2 step action). First create a PO header and then add item by item in 2 steps as foreign key relationship. You can see the example of Account and Activity in pre-shipped contents to get an idea.
    Thanks,
    Girimurugan

  • LSMW program to upload the sales order with multiple line items.

    Dear SD and PP Gurus,
    I am new to creating LSMW Program.
    I want to create a LSMW program to upload the sales order with multiple line items. I have read on SDN that it can be done on two phases. First Create Header Data than line items. IS IT TRUE??, Or
    Is there any procedure by which we can load the sales orders with multiple line items in a single run (part).
    I want to use Batch process, not a BAPI or IDOC procedure.
    I have created a program with
    object 0090
    Method 0000
    Program Name RVINVB10
    Program Type D
    Source Structure 1 - For Header and Source Structure 2  for Line Items.
    Mapped Field INDET (With Fix Value 1), ORDERTYPE, SALESORG, DISTCHANNEL, DIVISION, CUSTOMER, PONUMBER , DELVDATE, PRCGDATE, PMTTERM
    INCOT1 INCOT2 with Source Structure - 1 and
    Field INDENT (With Fix Value 2),  ITEMNO, MATCODE, MATQTY, SUOM, PLANT, BATCH, AMOUNT with Structure-2
    than maintained Structure relation ship, field Mapping, Specified Files, Assigned files, Read Data and other process,
    At final stage (Start Direct Input program RVINVB10) it is giving a message - Table name not allowed.
    Please tell me where I am wrong.
    Thanks in advance.
    DSC

    Dear SD Gurus n Experts,
    I have solved the above problem. But there is another problem appearing regarding the date format. Now system generating a message: Date . . is not valid.
    While I am using Date: YYYYMMDD format in flat file, which is SAP's Standard Format.
    In SDN Link: LSMW upload Sales Order using VA01/VA02     I have found that there are some date fields which are mandatory to filled. Here I have mapped
    VDATU - Requested delivery date,  BSTDK - Customer purchase order date,  PRSDT - Date for pricing and exchange rate,  BSTDK_E - Ship-to party's PO date, FKDAT - Billing Date, KORDT - Delivery Date,
    and PRGRS - Date type is Constant = D
    Can any one tell me, where is the priblem.
    With thanks,
    DSC

  • ALV Hierarichal display with multiple line headings

    Hi,
          I have designed an ALV report with Hierarichal display with multiple line headings...
    When i change the layout of this report,the headings which we enter manually will not take effect.The column we can hide in the report using the layout management.But the heading remains the same since it was written manually in top of page.
    Is there any possiblity to work out the Manual headings based on the layout fields.

    Hi,
    Do you use REUSE_ALV_HIERSEQ_LIST_DISPLAY? Why do you write heading manually? You can use IT_FIELDCAT parameter for defining a field catalog.

  • Report printing in excel with multiple sheets

    Hi Experts,
         I am working in Oracle Reports 10g.  I need to print the report in Excel....
    For this i have created .JSP file and now printing in Excel(Sheet1).
    My requirement is i need to print the report in multiple sheets.
    For example if i run the departments report then the generated excel file should be as below
    (Sheet1 - HR, Sheet2 - FINANCE, Sheet3 - MARKETING, etc.,)
    How can i do this?
    Thanks in Advance.

    Hi All,
       Is this possible  Report printing in excel with multiple sheets??
    Please give solution for my above post Report printing in excel with multiple sheets..
    Thanks,
    Su.gi

  • How to generate a report in Excel with multiple sheets using oracle10g

    Hi,
    I need a small help...
    we are using Oracle 10g...
    How to generate a report in Excel with multiple sheets.
    Thanks in advance.
    Regards,
    Ram

    Thanks Denis.
    I am using Oraclereports 10g version, i know desformat=spreadsheet will create single worksheet with out pagination, but my requirment is like the output should be generated in .xls file, and each worksheet will have both data and graphs.
    rdf paperlayout format will not workout for generating multiple worksheets.
    Is it possible to create multiple worksheets by using .jsp weblayout(web source) in oracle reports10g. If possible please provide me some examples
    Regards,
    Ram

  • How to Restrict Single Delivery Date for PO with Multiple Line Items

    Dear Experts,
    How to Restrict Single Delivery Date for PO with Multiple Line Items.
    System needs to through Error Message if User Inputs Different Delivery Dates for PO with Multiple Line Items in ME21N Tcode.
    Can we achive this by Some Enhancement in SAP or Not ???
    If so how to do it.
    Any Inputs is highly appreciated.
    Thanks and Regards,
    Selvakumar. M

    Hi Selvakumar,
    we can resrict the PO to have a single delivery date in all the line items by means of giving a error message or overwiting the delivery date keyed/determined in the line item.
    You can use the BADI -> ME_PROCESS_PO_CUST. In which you need to implement the method PROCESS_SCHEDULE.
    (for technical aid - This method will be called for each and every PO line item, From the imporing parameter im_schedule we can get all the details of current PO line, even we can change the data in the current PO line. )
    Regards,
    Madhu.

  • Error Message with multiple line

    Hi
    How to display a error message with multiple line?
    Example
         Goods movement not possible for material 101
         Goods movement not possible for material 102
         Goods movement not possible for material 103
    is it possible is ABAP? If so please advice me.
    Best Regards
    Asheek

    Hi Anoop,
    You can use same thing like this
    I suggest write ur message through this.
    First set the obecj.
    CALL FUNCTION 'APPL_LOG_SET_OBJECT'
    for local memory
    FUNCTION 'APPL_LOG_WRITE_MESSAGES'
             EXPORTING
                  OBJECT              = OBJECT
                  SUBOBJECT           = SUBOBJECT
                  UPDATE_OR_INSERT    = UPDATE_INSERT_FLAG
             TABLES
                  MESSAGES            = MESSAGE_TABLE
             EXCEPTIONS
                  OBJECT_NOT_FOUND    = 1
                  SUBOBJECT_NOT_FOUND = 2
                  OTHERS              = 3.
    the call for physical memory
    CALL FUNCTION 'APPL_LOG_WRITE_DB'
    In this process you only need to provide the Itab with error messages.
    Reg,
    Arpit

  • Partial goods receipt for PO with multiple line items

    Hello All,
    While doing MIGO, for a PO with multiple line items, if one line item is having error, will we be able to go ahead with goods receipt? Or entire material document is blocked for doing MIGO?
    We will be doing a development - in case if there is problem in goods receipt (checking of any parameter, and if it is missing - we will be posting error message)...is it possible to ahead with next line item and still post the material document?
    If partial goods receipt if possible for PO with multiple line items, how do we do it?
    Regards,
    RJS

    Hi
    While doing MIGO, for a PO with multiple line items, if one line item is having error, will we be able to go ahead with goods receipt? Or entire material document is blocked for doing MIGO?
    No. You cannot post the MIGO, if even one of the PO line item is having problem or giving error.
    We will be doing a development - in case if there is problem in goods receipt (checking of any parameter, and if it is missing - we will be posting error message)...is it possible to ahead with next line item and still post the material document?
    If you skip a line irem and do GR with next line item, how will you match quantity & value with the vendor Invoice at LIV ?
    If partial goods receipt if possible for PO with multiple line items, how do we do it?
    Partial goods receipt is possible for PO line items. That means, if PO has 100 qty for line item 1 then you can do GR for 50 now and 50 later depending on the vendors delivery.
    Hope this is what you mean by "Partial Goods Receipt".
    Edited by: Arun R on May 10, 2010 2:03 PM

  • Word property with multiple lines

    Good Morning,
    I have a Document Library with an Word template, I fill some properties of the library so I can put this properties in the template. I am trying to write a line break, Any idea?
    Thanks.

    Hi,
    According to your post, my understanding is that you want to use Word property with multiple lines.
    Per my knowledge, you can remove two updates: KB2760769 and
    KB2760758.
    The working version of office is 14.0.6129.5000.
    Here is a similar thread for your reference:
    http://sharepoint.stackexchange.com/questions/77759/inserting-multi-line-text-field-quick-part-from-sharepoint-crashes-word
    More information:
    Office 2010 Update KB2760758 Incorrectly Checks Multi-Line Columns
    As this question is more relate to Word, I suggest you post it to the corresponding forum, you will get more help and confirmed answers from there.
    http://social.technet.microsoft.com/Forums/en-US/home?forum=officesetupdeployprevious
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Create ecatt script for one sales order creation with multiple line items

    Hi ,
    I want to create a ecatt script for one sales order creation with multiple line items. Preferably SAP GUI.
    This selection of data will be from an external file/ variants which will have only one row of data in it.
    Firstly: I have to sort the external file having same PO Numbers in an order.Group them together.
    Second: I have to create sales order for those many line items having same PO Number.
    Best Regard
    Taranum

    Hi Micky
    Firstl you should upload the Line items for a particular sales Order in an Internal table
    and then pass that internal table to your BAPI during your coding corresponding to a particu;lar sales order
    In case of any issues pls revert back
    Reward points if helpful
    Regards
    Hitesh

Maybe you are looking for

  • SWFLoader in Air can't access Camera/Mic?

    I have a Flex swf file I'm loading into an Air 1.5 app that does a video chat. Flex app standalone in a browser works fine, but when loaded into the Air app  by SWFLoader, it can not stream cam/mic. logging shows it successfully connecting streams an

  • CSV File upload in SharePoint 2013

    Hi, We need to upload the CSV file in document library and need to call the java service in the event receiver and read the uploaded CSV file content and parse it as JSON and pass to the java service.  Is there anyway we can compare the already uploa

  • Tabs fail and address bar is glitched

    Hi, I just downloaded safari 3 now, and when I try to open new tabs, it shows a loading symbol on the side (where the tabs is supposed to open up) but then it just disappears. In addition to that there seems to be a problem with the address bar; when

  • Performance problem with query

    Hi, I have a query. SELECT CDW_DIM_DATUM_VW.DATUM ,sum(CDW_FT031_DISCO_VW.RATE_CHARGEABLE_DURATION/60) FROM CDW_FT031_DISCO_VW, CDW_DIM_DATUM_VW WHERE CDW_DIM_DATUM_VW.DATUM >= to_date('20110901','yyyymmdd') AND CDW_DIM_DATUM_VW.DATUM < to_date('2011

  • Many problems with Imac

    I've had my iMac for a little over a year and now I am having problems with programs not opening, but then not being able to close. the arrow is under them but no matter how many times I force quit it won't close. Happens mainly with Toast and Itunes