How to call method excel subtotal in ABAP program

I'm trying to call excel method subtotal, but i get an error (sy-subrc <> 0). How to correctly call this method? One of the parameters is an array. I've tried to use an internal table as the array, but ABAP syntax checker shows error.

Hi Vytautas,
The best way is to start recording a Macro(Tools->Macro->Record New Macro), and then do the operations (like entering data into cells, summing up, calculations,etc...)
once you are done, display the macro and you will find all the needful information regarding what metohds are to be called and how...
Regards,
Raj

Similar Messages

  • How to call a FrontEnd DLL in ABAP Program

    In one of our ECC 5 projects, we are requested to call a DLL locates on frontend with SAPGUI 640 installed to read/write a IC card with connected to Frontend. I searched the forum, seems every one refer to Object CL_GUI_FRONTEND_SERVICE and Method 'Execute'. Does Anyone has successful proven story to share? Can any other motheds can be implemented such as GUIXT, COM4ABAP or DotNet Connector? This scenario is meanful in many frontend integration cases. I hope experienced guys can share your valuable points. Thanks a lot.

    Hello,
    the last post give you the way.
    At first build a COM Wraper about your dll, that simple
    export the needed functions via a COM (or ACTIVEX) object.
    To do this with VB6 as example take a look to
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconcreatinganinprocesscomponent.asp
    After this you can use the ActiveX Controls in the ABAP tutorial.
    Matthias

  • Calling two smartforms in one Abap program

    Hi ABAPers,
    Can anybody know how to call 2 smartforms in 1 abap program?actually i used the FM SSF_FUNCTION_MODULE_NAME...and two smart forms are called...but my main problem is...the first smartforms is called and the print dialog box appeared...once i click the button back ...the second smartforms is called and print dialog box appeared again..
    I want to correct this...i want this  to be happen once i click the print button...the two smart forms will be combined in a one printing...meaning the first page is the first smartforms and the next page will be the second smart forms...no matter how many pages will be the first smartforms...the second smartforms will concatenate or will append to the last page of the first smartforms..how can i do this?
    Please help...this is my sample code..kindly correct the error.
    Will reward points...
    suppressing the dialog box****************************
        outop-tddest = 'LP01'.
        cparam-no_dialog = 'X'.
        cparam-preview = space.
        cparam-getotf = 'X'.
    Call the First Smartforms *******************
       CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            formname           = 'ZSF_CHEQUE'
          IMPORTING
            fm_name            = ly_formname
          EXCEPTIONS
            no_form            = 1
            no_function_module = 2
            OTHERS             = 3.
        CALL FUNCTION ly_formname
          EXPORTING
            prepared_by      = p_prepb
            approved_by      = p_apprb
          TABLES
            it_cheque        = it_final
          EXCEPTIONS
            formatting_error = 1
            internal_error   = 2
            send_error       = 3
            user_canceled    = 4
            OTHERS           = 5.
    Call the Second Smartforms *******************
          CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            formname           = 'ZSF_TSHEET'
          IMPORTING
            fm_name            = ly_formname
          EXCEPTIONS
            no_form            = 1
            no_function_module = 2
            OTHERS             = 3.
        CALL FUNCTION ly_formname
          EXPORTING
            prepared_by      = p_prepb
            approved_by      = p_apprb
          TABLES
            it_cheque        = it_final
          EXCEPTIONS
            formatting_error = 1
            internal_error   = 2
            send_error       = 3
            user_canceled    = 4
            OTHERS           = 5.
    Thanks in advance
    aVaDuDz

    hi,
    i never used these function but i've found this link.
    [http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/62ae7fcd-0b01-0010-3e9d-a54f26944450]
    [http://help.sap.com/saphelp_nw2004s/helpdata/en/64/bf2f12ed1711d4b655006094192fe3/content.htm]
    [http://help.sap.com/saphelp_nw04/helpdata/en/64/bf2f12ed1711d4b655006094192fe3/frameset.htm]
    [SMartform printing;
    hope that is useful.
    bye
    Marco
    Edited by: nicolai marco on Jan 14, 2008 12:36 AM

  • How to upload an excel file using ABAP.

    Hi,
    Can anyone please help me in understanding how to upload an excel file using ABAP.
    Thanks!!

    http://diocio.wordpress.com/2007/02/12/sap-upload-excel-document-into-internal-table/
    check the link
    TYPES: Begin of t_record,
    name1 like itab-value,
    name2 like itab-value,
    age   like itab-value,
    End of t_record.
    DATA: it_record type standard table of t_record initial size 0,
    wa_record type t_record.
    DATA: gd_currentrow type i.
    *Selection Screen Declaration
    PARAMETER p_infile like rlgrap-filename.
    *START OF SELECTION
    call function ‘ALSM_EXCEL_TO_INTERNAL_TABLE’
    exporting
    filename                = p_infile
    i_begin_col             = ‘1&#8242;
    i_begin_row             = ‘2&#8242;  “Do not require headings
    i_end_col               = ‘14&#8242;
    i_end_row               = ‘31&#8242;
    tables
    intern                  = itab
    exceptions
    inconsistent_parameters = 1
    upload_ole              = 2
    others                  = 3.
    if sy-subrc <> 0.
    message e010(zz) with text-001. “Problem uploading Excel Spreadsheet
    endif.
    Sort table by rows and colums
    sort itab by row col.
    Get first row retrieved
    read table itab index 1.
    Set first row retrieved to current row
    gd_currentrow = itab-row.
    loop at itab.
      Reset values for next row
    if itab-row ne gd_currentrow.
    append wa_record to it_record.
    clear wa_record.
    gd_currentrow = itab-row.
    endif.
    case itab-col.
    when ‘0001&#8242;.                              “First name
    wa_record-name1 = itab-value.
    when ‘0002&#8242;.                              “Surname
    wa_record-name2 = itab-value.
    when ‘0003&#8242;.                              “Age
    wa_record-age   = itab-value.
    endcase.
    endloop.
    append wa_record to it_record.
    *!! Excel data is now contained within the internal table IT_RECORD
    Display report data for illustration purposes
    loop at it_record into wa_record.
    write:/     sy-vline,
    (10) wa_record-name1, sy-vline,
    (10) wa_record-name2, sy-vline,
    (10) wa_record-age, sy-vline.
    endloop.

  • How to Call Methods in Ecatt?

    Hello Gurus,
    I dont find CALLMETHOD or CALLSTATIC commands in Ecatt. I am using R/3 4.7 version of SAP.
    My question also is how to call methods. I have a scenario where my test script execution depends on the return type of method. Say if the return type of method is A only then I should run the script else the script should not be executed.
    Your help in this regard is highly appreciated.
    Regards,
    GS.

    >
    Get Started wrote:
    > Hello Gurus,
    >
    > I dont find CALLMETHOD or CALLSTATIC commands in Ecatt. I am using R/3 4.7 version of SAP.
    >
    > My question also is how to call methods. I have a scenario where my test script execution depends on the return type of method. Say if the return type of method is A only then I should run the script else the script should not be executed.
    >
    > Your help in this regard is highly appreciated.
    >
    > Regards,
    > GS.
    Hi GS,
    Please use the command "CallMethod" and it is available with latest SAP version.
    You have to provide the Object Instance Parameter and Instance Method.
    Regards,
    SSN.

  • How to call method of Component A in Component B

    Hi Friends,
    I want to use Method A of Component A in Component B. Can some one tell me how to call method A on action of a button in component B.
    Regards
    Sankar

    Hi,
      DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
      lo_cmp_usage =   wd_this->wd_cpuse_method( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_cmp_usage->create_component( ).
      ENDIF.
    DATA lo_interfacecontroller TYPE REF TO yiwci_sg_method .
    lo_interfacecontroller =   wd_this->wd_cpifc_method( ).
      lo_interfacecontroller->execute_method(
           i was able to do the above process successfully but how to bind data to the node of component 2.
    In the component 1 : method A i defiend to get records upto 25 rows. now i tried using same method . but how to bind data using this method
    Regards
    sankar

  • How to call methode on remot computer

    I have 2 Applcations on 2 computers in Network
    App 1 on PC1 send xml file to App2 on PC2
    how to call Methods in App2 on PC2 to read the file
    // clss A on PC1
    class A
    sendFile(){
    // clss B on PC2
    class A
    readFile(){
    how to cal method readFile from Class A on PC1

    By using Remote Method Invocation, the topic of this forum.
    See the Javadoc and the RMI tutorials.

  • Fixed column length in excel sheet thru abap program

    HI Experts ,
    I am sending 2 excel attachments from abap program to external email Id's  .
    Excel attachments are successfully sending but the columns in the excel attachmet are compressed .
    I want to fix some width for excel columns .
    Please provide your help and suggest .
    Thanks,
    Nusrat

    Hi All  ,
    Thanks for the reply ,..
    I am using below function module to send a mail with excel attachment , I would like to use the same code instead of OLE  .. Could you please let me know how to modify the column lenght using this module  .
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = gd_doc_data
                put_in_outbox              = 'X'
                sender_address             = 'Traking System'
                sender_address_type        = 'INT'
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = gd_sent_all
           TABLES
                packing_list               = it_packing_list
                contents_bin               = it_attachment
                contents_txt               = it_message
                receivers                  = it_receivers
           EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8.
    Thanks ,
    Nusrat

  • How to call a maintenance view  from a program

    Hello Abapers,
    Can anybody explain with some examples. How to call a mainetenance view from a program.
    Thanks
    Ranjith.

    Use FM 'VIEW_MAINTENANCE_CALL'.
    REPORT  zmaintaintest.
    VARIABLES / CONSTANTS                          
    CONSTANTS: 
                    c_action(1) TYPE c VALUE 'U',                                 "Update
              c_viewname TYPE tabname value 'ZEMP_EXAMPLE', "View Name
              c_field(6) TYPE c VALUE 'EMPNO'.                            "Field Name
    INTERNAL TABLES
    DATA: itab_rangetab TYPE STANDARD TABLE OF vimsellist,
              v_empno TYPE zempno,
              wa_rangetab TYPE vimsellist.
    SELECTION SCREEN
    PARAMETERS:     p_empno TYPE   zempno   OBLIGATORY.  "Emplyee ID
    AT SELECTION-SCREEN                                                 
    AT SELECTION-SCREEN.
    Chcking the existence of the user in EMPLOYEE table
      PERFORM validate_employee.
    START_OF_SELECTION                                                  
    START-OF-SELECTION.
    This will restrict the user view so that user can only view/change
    Table data corresponding to his/her Employee ID
      PERFORM define_limited_data_area.
    Displaying table maintenance view for a particular employee ID
      PERFORM call_view_maintenance.
    *&      Form validate_employee
    Validate plant entered in the selection screen
    FORM validate_employee.
      SELECT SINGLE empno     u201CEmployee ID
        FROM zemp_example     u201CEmployee Table
        INTO v_empno
        WHERE empno = p_empno.
      IF sy-subrc <> 0.
        MESSAGE 'Not an Valid User' TYPE 'I'.
      ENDIF.
    ENDFORM.                    "validate_employee
    *&      Form DEFINE_LIMITED_DATA_AREA
    To restrict the user view so that user can see/change table data
    corresponding to his employee ID. Here one internal table is
    getting populated with field name as u201CEMPNOu201D (Key field of the table)
    And value as given by user in Selection Screen and this is passed as
    Parameter in function module 'VIEW_MAINTENANCE_CALL'
    FORM define_limited_data_area.
      CLEAR wa_rangetab.
      wa_rangetab-viewfield  = c_field.
      wa_rangetab-operator  = 'EQ'.
      wa_rangetab-value       = p_empno.
      APPEND wa_rangetab TO itab_rangetab.
    ENDFORM.                    "define_limited_data_area
    *&      Form CALL_VIEW_MAINTENANCE.
    Displaying table maintenance view for a particular employee ID
    FORM call_view_maintenance.
      CALL FUNCTION 'VIEW_MAINTENANCE_CALL'      
        EXPORTING
          action           = c_action
          view_name   = c_viewname
        TABLES
          dba_sellist     = itab_rangetab.
    ENDFORM.                    "call_view_maintenance
    Regards,
    Joy.

  • Is it possible to call ms-dos command in abap program?

    Hi,
    is it possible to call ms-dos command in abap program?
    Thanks.

    Hi Cemil,
    You probably have your answer here:
    [Re: DOS/Windows command in app server;
    You create your external command with SM69 (you can test it with SM49).
    Then you call this command with function module "SXPG_COMMAND_EXECUTE".
    (See function group SXPT for all the calls to external commands).
    Regards,
    Thomas

  • How to call SAP Webservice in standalone java program

    Hi,
    In our Java application, we want to use the SAP Webservices. I dont know much about authentication mechanism used by SAP. Can any one please help me with any sample code how to Call SAP webservice in Standalone Jave Program. I searched alot on the web regarding this, but helpless. Please help me.
    Thanks,
    Mohan

    Hi Mohan,
    You need an account for the ES Workplace. I'm afraid this is not free, e.g. check [SAP NetWeaver, Composition Subscription|https://www.sdn.sap.com/irj/sdn/subscriptions/composition].
    But I thought you wanted to play with a WSDL [you already had at hand|Sample code to access BAPI Web services from JAVA required;?

  • How to avoid time out error in abap program

    How to avoid time out error in abap program
    based on performance wise i want please help

    Timeout occurs when a statement exceeds its time limit.To avoid this we need to tune the statements.
    I can give give you few tips for tune a select stament.
    1.The order of the feilds in the select statement should be same as the order of fields in the database table.
    2.It is always advisible to use the key fields when you are using the where clause.
    3. Sort the internal table while using the for all entreis statements.
    4.Use index in where clause if necessary.
    5.When you have a read statement user binary search but before this a sort statement should be there.
    6. Check your program with the Tcode ST05 and check which statement takes much time based on that tune that.

  • How to translate the key words in ABAp program from lower case to upper cas

    How to translate the key words in ABAp program from lower case to upper case?

    Hi Kittu,
    You need to set the Pretty Printer settings to achieve key words in ABAP program from lower case to upper case.
    Utilities -> Settings -> Pretty Printer (tab) -> Select third radio button.
    Thats all.
    <b>Reward points if this helps.
    Manish</b>

  • How to improve the performance of the abap program

    hi all,
    I have created an abap program. And it taking long time since the number of records are more. And can anyone let me know how to improve the performance of my abap program.
    Using se30 and st05 transaction.
    can anyone help me out step by step
    regds
    haritha

    Hi Haritha,
    ->Run Any program using SE30 (performance analysis)
    Note: Click on the Tips & Tricks button from SE30 to get performance improving tips.
    Using this you can improve the performance by analyzing your code part by part.
    ->To turn runtim analysis on within ABAP code insert the following code
    SET RUN TIME ANALYZER ON.
    ->To turn runtim analysis off within ABAP code insert the following code
    SET RUN TIME ANALYZER OFF.
    ->Always check the driver internal tables is not empty, while using FOR ALL ENTRIES
    ->Avoid for all entries in JOINS
    ->Try to avoid joins and use FOR ALL ENTRIES.
    ->Try to restrict the joins to 1 level only ie only for tables
    ->Avoid using Select *.
    ->Avoid having multiple Selects from the same table in the same object.
    ->Try to minimize the number of variables to save memory.
    ->The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)
    ->Avoid creation of index as far as possible
    ->Avoid operators like <>, > , < & like % in where clause conditions
    ->Avoid select/select single statements in loops.
    ->Try to use 'binary search' in READ internal table. -->Ensure table is sorted before using BINARY SEARCH.
    ->Avoid using aggregate functions (SUM, MAX etc) in selects ( GROUP BY , HAVING,)
    ->Avoid using ORDER BY in selects
    ->Avoid Nested Selects
    ->Avoid Nested Loops of Internal Tables
    ->Try to use FIELD SYMBOLS.
    ->Try to avoid into Corresponding Fields of
    ->Avoid using Select Distinct, Use DELETE ADJACENT
    Check the following Links
    Re: performance tuning
    Re: Performance tuning of program
    http://www.sapgenie.com/abap/performance.htm
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    check the below link
    http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
    See the following link if it's any help:
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    Check also http://service.sap.com/performance
    and
    books like
    http://www.sap-press.com/product.cfm?account=&product=H951
    http://www.sap-press.com/product.cfm?account=&product=H973
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    Performance tuning for Data Selection Statement
    http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
    Debugger
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
    Run Time Analyser
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617cafe68c11d2b2ab080009b43351/content.htm
    SQL trace
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/801f7c454211d189710000e8322d00/content.htm
    CATT - Computer Aided Testing Too
    http://help.sap.com/saphelp_47x200/helpdata/en/b3/410b37233f7c6fe10000009b38f936/frameset.htm
    Test Workbench
    http://help.sap.com/saphelp_47x200/helpdata/en/a8/157235d0fa8742e10000009b38f889/frameset.htm
    Coverage Analyser
    http://help.sap.com/saphelp_47x200/helpdata/en/c7/af9a79061a11d4b3d4080009b43351/content.htm
    Runtime Monitor
    http://help.sap.com/saphelp_47x200/helpdata/en/b5/fa121cc15911d5993d00508b6b8b11/content.htm
    Memory Inspector
    http://help.sap.com/saphelp_47x200/helpdata/en/a2/e5fc84cc87964cb2c29f584152d74e/content.htm
    ECATT - Extended Computer Aided testing tool.
    http://help.sap.com/saphelp_47x200/helpdata/en/20/e81c3b84e65e7be10000000a11402f/frameset.htm
    Just refer to these links...
    performance
    Performance
    Performance Guide
    performance issues...
    Performance Tuning
    Performance issues
    performance tuning
    performance tuning
    You can go to the transaction SE30 to have the runtime analysis of your program.Also try the transaction SCI , which is SAP Code Inspector.
    edited by,
    Naveenan

  • How to read a word in a abap program for syntax check

    program for finding keywords:
    into a given program name in selection screen.
    e.g Parameters Keyword in YXABC propgram.
    How to find a word in a abap program for syntax check

    Hi!
    Read table TNAPR for the program names.
    Then use the READ REPORT  statement for it and load the program into an internal table.
    Then loop at the table.
    Regards
    Tamá

Maybe you are looking for

  • Can i recieve service in Guatemala? Have problem home button and front camera

    Hi guys I'm user of ipod touch 4th generation i bought this in may 2011 And i paid apple care in applestore Glendale L. A CA. Now i live in Guatemala and my ipod have problem of home button And front camera(camera problem started when i bought) What

  • J!INQEFILE report TDS section wise

    Hi Gurus, In T-code J1INQEFILE, Report is not generated based on TDS section wise. Niether section code is provided in Selection screen nor in the report, as provided in selection screen of T-code J1INCHLN. While filing Quarterly TDS return, it is re

  • Identifying statement which throws error

    Hi Experts, I have an ad-hoc query having multiple DML statements. Is is possible to get the command or say statement which throws error using try .. catch block? Thanks, Naveen Naveen J V

  • How do I install the updates from Java on my MacBookPro?

    Everytime I have an update for Java it won't work.   What can I do?   I am fighting with this about every month.

  • Region Display Selector - 2nd tab selected

    Hello I have implemented the Region Display Selector plugin and modified my APEX 4.02 page so that the 2nd tab is selected on page load (i.e. not the Show All tab). The code I used to achieve this is: $('div.apex-rds-container li:eq(1) a').click()thi