Regarding excel file

Hi,
         my reqirement on excelsheet.one of the condition is that file will be rejected when more than one company code or more than 200 line item per document...the comapny code in the excelsheet is col06,and the line item is col24.how can we write code for this ..?wht am i checking the coding is not working so,send me useful code.it isreally very urgent..
<b>I repeat per document not per file</b> .
Thanks In advance

Hi,
          what i can understand from your question that only you want to write those records which have lt 200 items for the document.
sort it_datatab by col06.
itab[] = it_dbtab[].
loop at it_datatab into wa_datatab.
at new col06.
*<or you can use on change of it_dbtab-col06 if col06 is not your first field>
v_bukrs = wa_datatab-col06. " take the company code into a variable
clear count.
endat.
cnt = cnt + 1 .
if cnt Gt 200 .
delete itab where col06 = v_bukrs.
endif.
endloop.
now your itab contains the value which document no have lt 200 line items.
if it is also not satisfying your requirement then let me know.
regards

Similar Messages

  • IBot Issue regarding excel files

    Hello All,
    I am facing an iBot Problem .
    Problem description:
    Application running in Oracle Business Intelligence 11.1.1.6.0
    OBI scheduler server is working fine, so scheduled iBots are being delivered successfully. However, whenever the agent is supposed to send an excel file attached, it results truncated or corrupted. In contrast, the pdf report is delivered correctly. On the other hand, in other all cases, the exports to excel are working fine.
    I restarted the server twice, but I am facing the same error.
    Please suggest any solution.
    Thanks & regards,
    Yessenia

    from html to xls format.
    Try with this
    http://prasadmadhasi.com/2012/08/02/reduce-file-size-by-downloading-a-requestanalysis-to-native-excel-format-directly-instead-of-mhtml-obiee-11-1-1-6-0/
    Pls mark if helps

  • Regarding Excel file creation.

    Hi experts,
    I retrieved the ALV output into an internal Table which is containing Text(1024) as member.
    After getting Data I need to pass this data to Excel file.
    Excel file should contain exact format of ALV.
    Please suggest me..............
    Regards,
    Subash

    hi,
    after getting data into EXCEL File and i need to pass this one as attachment to mail. If i use  GUI_DOWNLOAD is saved into presentation server and i need to pick that file from presentation server  and i will send. But this one won't work in BACK Ground. That is the reason after getting data from ALV report into Text Variable and i need to pass this data to excel file, and that excel file as to go an attachemnt to mail,.Everything in Background only.

  • Help Regarding excel file download

    Hi,
    I have developed a object with alv list display aand in the selection screen maintained a checkbox for EXPORT TO EXCEL..
    and for each and every field in the field catlog  wriiten the code like
    IF P_EX = 'X'.
          LS_FIELDCAT-ROW_POS    = '1'.
          LS_FIELDCAT-COL_POS  = 1.
    But this output is not flowing into excel file when executing...can anyone help me how to download the output data into excel file when we execute.because this report runs in the background and after execution data should be flown into excel file.
    Regards,
    Venkat.

    Hi Venkat,
    use this Function module to download the file
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME                        = 'C:\Documents and Settings\sap\Desktop\Hierarchy.xls'
       WRITE_FIELD_SEPARATOR           = '#'
        TABLES
          DATA_TAB                        = gt_target.
    Here gt_target is the internal table which holds the data.
    Hope this solves your purpose...
    Regards
    Sajid

  • Regarding Excel file generation from xml

    Hi all,
    I want export my JTable information to an excel when a specified action is occured.
    I already completed this task using some third party api.
    Some body told me, there is api in j2sdk itself for export data to excel file. but i didnt find that.
    Could anybody help me out , if sun java api is providing any api for dealing excel files.

    hi
    i've found this:
    http://jexcelapi.sourceforge.net/
    but i had trouble trying to make it works!
    pratically my textpad, we�hen i import the package, tell me tha the package doesn't exists!
    bye! ;)

  • Regarding Excel file generation from java

    Hi all,
    I want export my JTable information to an excel when a specified action is occured.
    I already completed this task using some third party api.
    Some body told me, there is api in j2sdk itself for export data to excel file. but i didnt find that.
    Could anybody help me out , if sun java api is providing any api for dealing excel files.

    hi
    i've found this:
    http://jexcelapi.sourceforge.net/
    but i had trouble trying to make it works!
    pratically my textpad, we�hen i import the package, tell me tha the package doesn't exists!
    bye! ;)

  • Regarding Excel file reading

    HI All,
    I am trying to read a EXCEL file from Jakarta POI Excel Api.All works fine.But When the reading file if the cell value is like 74100000000000 I am getting the output like this 7.41E13.Even i formatted the cell to the number,Text etc But no luck

    All right, I'm the first to admit things need to be "dumbed down" for me.
    One of my problems with technology in general is that too often it is assumed one is born with some specialized knowledge.
    When I clicked on the above link, my first thought was, "What does POI stand for?"
    I searched the site for a definition and also "googled" it.
    Nothing.
    My second thought was that it seems another layer of software, which looks just as complex as Java itself, is required to be able to read a spreadsheet. Why is there no package equivalent to java.sql? Is this just another result of the old battle between Sun and Microsoft and the browser wars of the nineties?

  • Regarding excel file download from webdynpro table element

    Hi All,
            I want steps to do excel download from webdynpro table element.
    Thanks in advance.
    Regards,
    Muneesh Gitta.

    Hi Gitta,
    There are 2 ways in doing it, one is using GUI DOWNLOAD FM or using class clwd_runtime_services.
    DATA:
        node_node_alv                       TYPE REF TO if_wd_context_node,
        elem_node_alv                       TYPE REF TO if_wd_context_element,
        stru_node_alv                       TYPE wd_this->element_node_alv,
        itab_node_alv                       TYPE TABLE OF wd_this->element_node_alv..
    navigate from <CONTEXT> to <NODE_ALV> via lead selection
    @TODO handle not set lead selection
      IF ( node_node_alv IS INITIAL ).
      ENDIF.
    get all declared attributes
      node_node_alv->get_static_attributes_table(
        IMPORTING
          table = itab_node_alv ).
      DATA:
        node_file_download                  TYPE REF TO if_wd_context_node,
        elem_file_download                  TYPE REF TO if_wd_context_element,
        stru_file_download                  TYPE wd_this->element_file_download ,
        item_fname                          LIKE stru_file_download-fname.
      navigate from <CONTEXT> to <FILE_DOWNLOAD> via lead selection
      node_file_download = wd_context->get_child_node( name = wd_this->wdctx_file_download ).
      get element via lead selection
      elem_file_download = node_file_download->get_element(  ).
      get single attribute
      elem_file_download->get_attribute(
        EXPORTING
          name =  `FNAME`
        IMPORTING
          value = item_fname ).
      CALL FUNCTION  'GUI_DOWNLOAD'
        EXPORTING
          filename                        = item_fname
        FILETYPE                        = 'ASC'
        TABLES
          data_tab                        = itab_node_alv.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    OR
    check this blog for
    Re: Export to Excel Sheet functionality

  • Excel File Upload In Webdynpro For ABAP

    Hi All,
    I have a doubt regarding EXCEL file upload for Webdynpro for ABAP.
    I am able to get the path of file using 'FILEUPLOAD' UI element.Now I need to upload the EXCEL file into ALV.I have tried out with GUI_UPLOAD and other excel upload function module.But these Function Module throws Dump.
    Can you please suggest how to go about it.It will be a great help if u can suggest any function module or method.

    Hi Amita,
    Insetad of using GUI_UPLOAD use 'HR_KR_XSTRING_TO_STRING'
    Here is the sample code,
    TYPES :BEGIN OF str_itab,
                  name(10) TYPE c,
                  age(10) TYPE c,
                 END OF str_itab.
    DATA : t_table1 TYPE STANDARD TABLE OF str_itab,
           i_data TYPE STANDARD TABLE OF string,
                   lo_nd_sflight TYPE REF TO if_wd_context_node,
                    lo_el_sflight TYPE REF TO if_wd_context_element,
                    l_string TYPE string,
            fs_table TYPE str_itab,
                    l_xstring TYPE xstring,
    fields TYPE string_table,
    lv_field TYPE string.
    DATA : t_table TYPE if_main=>elements_data_tab,
    data_table TYPE if_main=>elements_data_tab.
      * get single attribute
    wd_context->get_attribute(EXPORTING name =  `DATASOURCE`  
                              IMPORTING value = l_xstring ).
    CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
    EXPORTING
    in_xstring = l_xstring
    IMPORTING
    out_string = l_string.
    SPLIT l_string  AT
    cl_abap_char_utilities=>newline INTO TABLE i_data.
      * Bind With table Element.
    LOOP AT i_data INTO l_string.
    SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE
    fields.
    READ TABLE fields INTO lv_field INDEX 1.
    fs_table-name = lv_field.
    READ TABLE fields INTO lv_field INDEX 2.
    fs_table-age = lv_field.
    APPEND fs_table TO t_table1.
    ENDLOOP.
    lo_nd_sflight = wd_context->get_child_node( 'DATA_TAB' ).
    lo_nd_sflight->bind_table( t_table1 ).
      ENDMETHOD.
    if correct give correct answer
    Thanks & Regards,
    Meenachi.R

  • Regarding ALV output  to Excel file download

    Hi all,
    i had a requirement when downloading the ALV output to the Excel file it should ask for the password.if the user enters the password then this pass word shuld be assigned to the  Excel file that was downloaded.
    Can i know how this can be implemented

    Hi,
    Using EXCEL_OLE_STANDARD_DAT you can specify the PASSWORD & PASSWORD OPTION.
    Regards,
    Sharat

  • Regarding ME2L - Download output to Excel File

    Hi Friends,
    In ME2L, I have requirement to download the Purchasing Documents Per Vendor Report Output to a Excel File.
    Could be helpful is there any UserExit or Enhancement point to modified or Can let me know how to do this.
    Regards,
    sg.

    Hi,
    Go to me2l tcode.....then change the "Scope of List" into "ALV".....and execute it.....now on the tool bar...click on "LOCAL FILE"....now select the radio button "Spreadsheet".....and perform your work..
    Arunima

  • Regarding Copying of Data From Excel file to Web Dynpro Java Table

    Hi
    Can any body give Suggestions that is how to copy or import Row and Column Values in the Excel file to the Java Web Dynpro Table
    Regards
    Chandran S

    Hi,
    First u should include jxl.jar API in ur classpath.
    ind a Resource variable to FileUpload UI. Then from the Fileupload UI, u can get the Sheet variable as
    InputStream fis=wdContext.currentFileUploadElement().getResource().read(true);
    Workbook wb=Workbook.getWorkbook(fis);
    Sheet sh=wb.getSheet(0);
    This can be easily read to a table by
    for(int i=14;i<34;i++)
         String bId=sh.getCell(2,i).getContents();
         String cId=sh.getCell(3,i).getContents();
         String subj=sh.getCell(4,i).getContents();
                    IPrivate<View>.I<Table>Element el=wdContext.node<Table>().create<Table>Element();
                    wdContext.node<Table>().addElement(el);
                    el.setBID(bid);
                    el.setCID(cid);
                    el.setSUB(subj);
    This example reads the excel from row 13 to 32 and column 3 to 5 and uploaded to a table
    Regards
    Fahad Hamsa

  • Regarding ABAP program to read and manipulate data from Excel file....

    Hi,
    I want to write a ABAP program which will read Excel file which has three columns viz: Col A, Col B and Col C.
    If there is no data in Col B and Col C for a given record in Column A, then progam should print all those records on screen with write statement.
    Regards,
    Rajesh.

    Hi
    Check
    PARAMETERS: filename LIKE rlgrap-filename MEMORY ID M01,
    begcol TYPE i DEFAULT 1 NO-DISPLAY,
    begrow TYPE i DEFAULT 1 NO-DISPLAY,
    endcol TYPE i DEFAULT 100 NO-DISPLAY,
    endrow TYPE i DEFAULT 32000 NO-DISPLAY.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
    filename = filename
    i_begin_col = begcol
    i_begin_row = begrow
    i_end_col = endcol
    i_end_row = endrow
    TABLES
    intern = intern
    EXCEPTIONS
    inconsistent_parameters = 1
    upload_ole = 2
    OTHERS = 3.
    After getting Records in INTERN TABLE  You can loop it to check where columns B & C are empty  and store them in another table .
    LOOP AT intern.
    IF INTERN  B and C has value  .
    CONTINUE
    ELSE .
    MOVE THEM INTO ANOTHER TABLE ITAB .
    ENDIF .
    ENDLOOP.
    THEN LOOP ITAB .
    WRITE : ' '
    ENDLOP .
    Hope this Helps .
    Praveen

  • Regarding getting data from excel file and need to generate  inbound idoc

    Hi guys,
    Please can u give some example how to get excel file data and need to generate the inbound idoc my questation ? Is it possible to generate inbound idoc with the same logical system ( it seems to be not possible using same logic to generate idoc ) can u suggest me any posssibule way to generate idoc.) if possible give me some example.
    Regardng
    anil
    Edited by: anil kumar on Aug 8, 2008 1:35 PM

    If you want someone to do your work, please have the courtesy to provide payment.
    http://www.rentacoder.com

  • Its regarding Hiding / Making the specific excel file invisible or hidden

    I have used the following VBA code :
    'Workbooks("Budget.xlsm").Windows(1).Visible = False
    'Windows("Budget.xlsm").Visible = False
    Application.Visible = False
    The problem with the above code is that it makes all the opened excel file invisible and not the one I required.
    Also neither I can work nor I can open any other excel file using those commands.
    Could you please help me out on this.

    Keep in mind, I don't know your application and I could be on the wrong track.
    I made a sample file at the link below, it was made fast, just to see and I can't see your problem.
    The workbook as two userform, you can open a new workbook, close the first userform that will open the second userform, work on the second workbook,close the second userform, and I'm out of idea. It works for me. Have a look at the sample file.
    http://dropcanvas.com/oy4gw
    Have a look at Jim Cone's post also
    P.S. I'm often out and not sure when I'm back.
    Cimjet

Maybe you are looking for

  • Dual boot win7 & 8 on t430

    Newbie here needing some help. Just got my t430 fresh out of the box and I want to dual boot win 7 and 8. The installed system was 7, but came with windows 8 recovery disks in the box. I thought dual boot would be pretty straightforward, but I haven'

  • Can't log into iTunes store account

    So I can no longer log into my iTunes store account. When I try to log in, I get an error message in red letters saying: FieldName: null. java.lang.Exception I have tried resetting my password mutliple times with no luck. I can log into my Apple Stor

  • HELP - Buffered Reader

    Below is a portion of my program, its a simple app, that is supposed to read a policy number, and then display the results. I can't get it to read the file, or output onto the app. Any help would be appreciated. the file is called loans.txt and a lin

  • Problem with Characteristic of type NUMC

    Hi, I have a characteristic field with data type NUMC and length 6. When I load data for that field as "1" it gets updated as 10000. What might be the reason for the same? How to solve it?

  • Problem when running webdynpro from Internet explorer 8

    Hello Dear all, I created a webdynpro and everything i created is right. when i load the webdynpro (F8) to internet explorer 8 i can see the webdynpro . But the IE 8 screen shows no reaction. I thought that my webdynpro was wrong. But i ran the webdy