Workbook not refreshing dynamically through Function Module.

We have a workbook with multiple queries having common variable set.
we are trying to execute workbook from program, using the function module RSAH_LAUNCH_EXCEL. Also we are trying to assign variable values manually.
through the program, the workbook is getting executed but if i change the variable values inside the program manually, workbook is not getting refreshed. can someone help us.
the below is the code
REPORT  ztest.
DATA: v_workbookid TYPE rsrwbindex-workbookid,
      v_subrc TYPE sy-subrc,
      ls_var TYPE rrx_var,
      lt_var TYPE STANDARD TABLE OF rrx_var.
v_workbookid = 'D0C1TB5M99SDPACEG070AFU88'.
ls_var-vnam = 'ZTEST_EXPORT'.
ls_var-vartyp = '1'.
ls_var-vparsel = 'P'.
ls_var-sign = 'I'.
ls_var-opt  = 'EQ'.
ls_var-low  = '10008891'.
ls_var-iobjnm = '0BPARTNER'.
APPEND ls_var TO lt_var.
CALL FUNCTION 'RSAH_LAUNCH_EXCEL'
    EXPORTING
     i_genuniid                       = lv_genuniid
      i_workbookid                     = v_workbookid
      i_objvers                        = 'A'
     i_hide_sapgui                    = 'X'
IMPORTING
    e_subrc =           v_subrc
    TABLES
      i_t_var                          = lt_var.
Thanks

Did you create your function module without problems...assigned the Z* function group? activate the function module? i assume that you copy the function module code and the variables definition on TOP include of RSAX_BIW_GET_DATA_SIMPLE
Regards
Message was edited by:
        Oscar Díaz

Similar Messages

  • Printing ALV Report output through Function Modules

    Hi All,
    I want to print my ALV Grid output through function modules/statement (not through print option in menu).
    This is because, i am generating a PDF from spool when user clicks on a button. If any changes happened in the ALV output layout, they will be captured in spool through printing it.
    So can you please tell me how to print the ALV Output through FMs or sending the ALV output to spool.
    Thanks & Regards,
    Senthil.
    Edited by: senthil nathan on May 17, 2010 2:49 PM

    Hi Dev,
    Thanks for the reply.
    I want to print the ALV when the user clicks on a button in toolbar. Lets say the user has made some changes to the layout, (E.g hiding a field) and when i print that output it should use the changed layout, If i use the FM suggested by you, i cant acheive this.
    If you try to print this manually, the system uses the changed layout and not the original. Thats why i want to know FMs/statement to print.
    Regards,
    Senthil.

  • Save EAN11 field while creating POrder creation through Function module

    Hi All,
    I want to update EAN11 field in material master while creating Purchase Order through function module. I am using function module BAPI_PO_CREATE1 for creating purchase order. There are no structures in the PO creation FM in which EAN11 field is there. I have also tried using function module MEPO_DOC_ITEM_PROCESS for updating EAN11 field. It is not working. Please suggest some method to do that.
    Note: I am receiving EAN11 through an external system by proxy.
    Thanks,
    Chinmay

    Hi,
    Use BAPI_MATERIAL_SAVEDATA to updat ean numbers for materials.
    tables INTERNATIONALARTNOS is used to update EAN.
    Regards,
    Shanmugavel Chandrasekaran

  • Possible to trigger output type through Function module?

    Hi,
    Is it possible to trigger output type through Function modules or through some codings or any standard FM's?
    Regards
    Bala.

    You did not specify what area you need to retrigger an output type for, but here is a sample to retrigger a delivery output.
      CALL FUNCTION 'BAPI_LIKP_PROCESS_MSG_DIRECT'
        EXPORTING
      DYNAMICOUTPUTDEVICE       =
          processing                       = PROCESSING
      SORTMESSAGE               = 1
        TABLES
          deliverynumber                 = delnbrs
          outputtype                       = outputs
          messageprotocol              = bapimsgprot
          return                              = bapiret2.
    Thanks

  • Generic Extraction business Requirement, through function module,

    Generic Extraction business Requirement, specifically through function module and source code in function module.

    Dear Karthik,
    Go to transaction SBIW -> Generic Datasource -> Maintain Generic Datasources -> Choose Master/Transaction Data -> Maintain proper entries (Application Component, Descriptions) -> Extraction by FM if you want to extract using FM.
    Maintaining Generic DataSources - Independently of application, you can create and maintain generic DataSources for transaction data, master data attributes or texts from any kinds of transparent tables, database views, InfoSets of the SAP query or using a function module. As a result, you can make use of the generic extraction of data.
    Creating a Generic DataSource
           1.      Select the DataSource type and give it a technical name.
           2.      Choose Create. The creating a generic DataSource screen appears.
           3.      Choose an application component to which the DataSource is to be assigned.
           4.      Enter the descriptive texts. You can choose any text.
           5.      Choose from which datasets the generic DataSource is to be filled.
                                a.      Choose Extraction from View, if you want to extract data from a transparent table or a database view. Enter the name of the table or the database view.
    After generation, you get a DataSource whose extract structure is congruent with the database view or the transparent table view.
    For more information about creating and maintaining database views and tables, see the ABAP Dictionary Documentation.
                                b.      Choose Extraction from Query, if you want to use a SAP query InfoSet as the data source. Select the required InfoSet from the InfoSet catalog.
    After generation, you now have a DataSource whose extract structure matches the InfoSet.
    For more information about maintaining the InfoSet, see the System Administration documentation.
                                c.      Choose Extraction using FM, if you want to extract data using a function module. Enter the function module and extract structure.
    The data must be transferred by the function module in an interface table E_T_DATA.
    For information about the function library, see the ABAP Workbench: Tools documentation.
                                d.      With texts, you also have the option of extraction from domain fixed values.
    Maintain the settings for delta transfer where appropriate.
           7.      Choose Save.
    Note when extracting from a transparent table or view:
    If the extract structure contains a key figure field, that references to a unit of measure or currency unit field, this unit field must appear in the same extract structure as the key figure field.
    A screen appears in which you can edit the fields of the extract structure.
           8.      Editing the DataSource:
           Selection
    When scheduling a data  request in the BW Scheduler, you can enter the selection criteria for the data transfer. For example, you may want to determine that data requests are only to apply to data from the previous month.
    If you set the Selection indicator for a field within the extract structure, the data for this field is transferred in correspondence with the selection criteria in the scheduler.
           Hide field
    You should set this indicator to exclude an extract structure field from the data transfer. As a result of your action, the field is no longer made available in BW when setting the transfer rules and generating the transfer structure.
           Inversion
    Reverse postings are possible for customer-defined key figures. For this reason, inversion is only possible for certain transaction data DataSources. These include DataSources that have a field that is indicated as an inversion field, for example, the field update mode in the DataSource 0FI_AP_3. If this field has a value, then the data records are interpreted as reverse records in BW.
    Set the Inversion indicator if you want to carry out a reverse posting for a customer-defined field (key figure). The value of the key figure is then transferred in inverted form (multiplied by –1) into BW.
           Field only known in exit
    You can enhance data by extending the extract structure for a DataSource using fields in append structures.
    The indicator Field only known in Exit is set for fields of an append structure. In other words, by default these fields are not passed onto the extractor from the field list and selection table.
    Deselect the indicator Field Only Known in Exit to enable the Service API to pass on the append structure field to the extractor together with the fields of the delivered extract structures in the field list as well as in the selection table.
    9. Choose DataSource -> Generate.
    The DataSource is now saved in the source system.
    Maintaining Generic DataSources
    ·        Change the DataSource
    To change a generic DataSource, in the initial screen of DataSource maintenance, enter the name of the DataSource and choose Change.
    You can change the assignment of a DataSource to an application component as well as the texts of a DataSource. Double-clicking on the name of the table, view, InfoSet or extract structure takes you to the appropriate maintenance screen. Here you can make changes required to add new fields. You can fully swap transparent tables and database views, but not InfoSets. If you return to the DataSource maintenance and choose Create, the screen for editing a DataSource appears. To save the DataSource in the SAP source system, choose DataSource  -> Generate.
    If you want to test extraction in the source system independently of a BW system, choose DataSource  ->  Test Extraction.
    ·        Delta DataSource
    In the Change Generic DataSource screen, you can delete any DataSources that are no longer relevant. If you are extracting data from an InfoSet, delete the associated query. If you want to delete a DataSource, this must not be connected to a BW system.
    Also visit :[Data Extraction from SAP Source System | http://help.sap.com/saphelp_nw04/helpdata/en/28/4c553c42360a40e10000000a114084/content.htm]
    Regards,
    Naveen.

  • How Procurement cost can be captured in product master through functional module?

    Hi
    I have following Queries
    1) How Procurement cost can be captured in product master through functional module in SAP APO?
    2) How we can transfer procurement cost to product master in SAP APO through BAPI?
    Thanks
    Poorna

    Hi Poorna,
    Could you please check FM /SAPAPO/DM_PRODUCTS_POST.
    Table it_matloc of this FM can used to update Cost .

  • Binding Data through function module in adobe to display charts

    Hello Gurus,
    This is the requirement :-
    Through function module output i have to display the chart.
    For ex:-In sales order transaction there is a field called status.For every order there is status (open, complete, inprocess). Display the chart based on the order status that how many open, complete and inprocess are there.
    Thanks,
    Karan

    post Adobe related questions to RIA forum at
    User Interface Technology

  • Exporting Custom table through function module

    <b>How can i Export Custom table through function module.</b> when we add some table in the function module table tab it asks for a ref. table which is some table in database .. but i want to add some custom table with some user defined column names..how can i do this
    <b>n plz tell me how to loop thru select options</b>
    i have to loop thru select option and assign all the values to a variable.
    plz help me out
    Message was edited by:
            Karan Chopra

    Hi Karan,
    Do one thing, Just in the tables tab give the name of the table and don't write anything else. no TYPE and no ANY.
    Hope it will resolve issue.
    reward points if useful.
    Regards,
    Atish

  • Modify TRIP through function module( HRTRV_IF_MODIFY_TRIP )

    Hi Experts,
    I am trying to modify existing trip for employee through function module HRTRV_IF_MODIFY_TRIP in se37 in this i am passing employee no, trip no, framedata and in changing parameter fcode as "MOD". There is also a field as trip_guid whos value i don't know so left it blank. When i execute it in return table show message as "No suitable trip schema could be found".
    Can any one help me in this case. Our java developer using this fmi to change a trip.
    Thanks And Regards
    Ranjeet Singh

    Hi,
    The system tries to read a valid trip schema in table T706S and no relevant entry found.
    Sujay
    PS: Please don't post all bold
    Edited by: Sujay Venkateswaran Krishnakumar on Oct 15, 2010 4:54 PM

  • Delete a Infocube Request  through Function module

    Hi Experts,
    I need to delete a request in Infocube through Function module. i have written a logic which request we have to delete, but i'm unable to find the exact function module to delete particular request.
    Quick response would be appriciated greatly and points will be assigned.
    Regards,
    Navin Achanta

    Hi,
    All the requests of InfoCube are available in table RSICCONT, so u create a function module to delete a records from this table.
    Hope this helps u a lot.........
    Assigning points is the way of saying Thanks in SDN
    Regards
    Ramakrishna Kamurthy

  • Workbook not refresh after running Planning Function (BI-IP)

    Hi! Folks,
         I have a problem with the Bex Analyser which not refresh the data after running Planning Function.
    Step 1: Run Planning Function (There are some changes in records)
    Step 2: I have to Run Process Variables again and input the same selection in the pop-up variables
    Step 3: The changed records will be shown...
    Can I have some coding in the Layouts of Bex Analyzer to refresh the data after running Planning Function?
    Brgds,
    Supasake

    Hi,
    I had a similar problem that the resuls of my planning function were not automatically shown. Only if I did "something else" like saving or running another function the results were displayed.
    I think I solved it by upgrading my SAP GUI6.4 with patch 14. the results of planning functions should be automatically displayed.
    D

  • Dynamically call function module in the date rule

    Hi Experts
    I am currently working on service request.I am facing a problem in the date management there.In my service request i have 5 statuses .One of my status is "Pending with consumer".I am using duration settings of service request.By duration settings , i am calculating the duration for which its pending with consumer.I am having 2 response profile one is 24*7 and other is having 9 working hours.In the service request from the SLA configuration i am calculating the escalation date & Time .I need to add the pending with consumer duration with the escalation date and time.I am facing a problem , i am explaining whole problem ..
    Let say if the pending with consumer duration is  1440 minutes(that is 24 hours) .I am adding the minutes to the escalation date through the date rule.
    I am facing problem that if the service profile is 24*7 then there is no problem but if it is having the 9 hours working service profile then after adding the minutes to it the escalation date is changing to 4 days ahead which is wrong.
    I need to add only those minutes for which it is pending with consumer in working hours for the 9 hours service profile
    I need to dynamically determine the working hours from the duration then add it to escalation dates when the status is changed from pending with consumer.
    Please suggest a badi will work or how to do it.
    Is there any way so that while adding duration's in the date rule i can determine if the service profile is 24*7 then i will directly add the durations or else if service profile is 9 hours then i will determine the working hours from the duration" pending with consumer" then i will add.
    Is there any way so that i can call any custom function module then write my logic there
    Its urgent as i need to give demo.I will appreciate a quick reply.Please reply
    I will assign points as soon as i will get reply.

    Hi sridhar,
    the explanation already given is correct and good. Small add-on:
    All functions called during one LUW with addition IN UPDATE TASK are stored together with their actual parameters in a temporary memory area. The moment a COMMIT WORK is issued, the functions are released to be executed by a so-called update task which is running in the background. This explains why functions called in update task never return anything, no SY-SUBRC and no export or table parameters If a function called in update task raises an exception or runs into an error the calling user will get an express message informing about this. Also, all database updates done by this update process are rolled back to keep consistency.
    This proceeding helps to keep database tables consistent and allows the user to keep on doing his work before all database updates are complete. You may have seen messages like "material will be changed" after saving. If you open the same material immediately, you'll get a message "object locked by...<yourself>". This means the update task is still running.
    Regards,
    Clemens

  • Send mail using CL_BCS through function module, run in background task.

    Hi,
    I am running a function module in Background task. in this function module I am sending mail using CL_BCS class.
    but mail is not generated. if I run the same function Module in foreground mail generated successfully....
    can anyone please tell me the reason behind this.

    Hi i realise that The LIST_TO_ASCII thing is not working correctly in background because the the list-processing in beckground is working not the same as in dialog i think.
    I can only get the last page of the list out when running in background. Any solution to this?
    my code:
        CALL FUNCTION 'LIST_TO_ASCI'
             EXPORTING
                  list_index         = sy-lsind
             TABLES
                 list_dyn_ascii = downtab
             EXCEPTIONS
                  empty_list         = 1
                  list_index_invalid = 2
                  OTHERS             = 3.
        IF sy-subrc NE 0.
          EXIT.
        ENDIF.
    Thanks ,
    LH

  • Importing master data from R/3 through functional modules

    I am facing the below error when I try to import master data from R/3 through the inbound functional module /DMF/MDIF_PRODUCT_INBOUND to the PMR component (PMR - Promotion Management for Retail).
    "Runtime error CALL_FUNCTION_NOT_FOUND has occurred"
    Landscape - I have RTLDMF 1.1 and RTLPROMO 7.0 installed on top of Netweaver with EHP1 in a server which also has BI system. While the R/3 is present in another system.
    Appreciate any help. Thanks!

    Hi Khan,
    You can create your own datasource source, by Tcode RSA2. In this link you find more information:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/28/4c553c42360a40e10000000a114084/content.htm
    Also please check this link, that provides the steps to create/maintain the generic datasource:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/3f/548c9ec754ee4d90188a4f108e0121/content.htm
    I hope it contributes.
    Regards,
    Sinara Moraes

  • Dynamic select / function module for select queries

    Hello experts,
    Is there any function module to build dynamic select queries and also to build standard select queries .
    Thanks,
    krishnakumar

    What are you meaning by 'to build' ???
    BR, JAcek
    Message was edited by: Jacek Slowikowski

Maybe you are looking for