Calling a function module out of a web template

Hi experts,
I need to call an ABAP function module out of a web template including a query with the variable values of the query as input parameters. There shall be button, which starts the funtion module, if the user clicks it. I don't need to transfer any other data just the variables. I have no idea how to accomplish that.
I experimented with implementing interface IF_BICS_CONS_WEBITEM_CUST_EXIT but this does not seem to help me, as the initialize method is called when starting the web template and I did not manage to bind it or the execute method to that button. Besides I was getting shortdumps when starting the web template with the customer extension web item. I declared it as ABAP_CLASS_NAME exit and set the right class name. Variable Container Access and Navigational State Access is on, Result Set Access is off.
Is there any other possibility to do this? Perhaps with BSP?
Can I call an ABAP function module with Javascript out of the template? If yes, which command can I use to do it?
Thank you very much in advance
Edited by: Markus Maier on Aug 17, 2009 4:15 PM
Edited by: Markus Maier on Aug 17, 2009 4:32 PM

Hi Markus,
if you are on BI 7.0 or higher I recommend using Integrated Planning for this requirement. If you implement a fox formula you can easily get the current variable value and execute the function module. You can execute the fox formula upon button click.
If you need more information just let us know.
Brgds,
Marcel

Similar Messages

  • How to call ABAP function module/ class method through web service?

    Hi Colleagues,
    I need to write an iphone version of current ABAP program. I want to call ABAP method and function module through my iphone so that I can re-use the ABAP APIs.So I choose web service. Can you give me any details information about how to do that?
    Thank you very much

    Hi,
    you need to create webservice out of FM. goto SE80 and follow the webservice creation wizard. Finally use webservice url for calling FM (remote enabled) from your iPhone.
    Regards,
    Gourav

  • How to call a function module from the Web Template?

    Hi all,
    how can I call a function module from a BI 7.x web template and then show the result of the FM on the web template?
    Many thanks for your hints.
    Regards, Nils

    Hi!
    I am too working on a similar issue.
    Probably this helps:
    Re: Calling a function module from a Web Template
    Regards,
    Sri

  • Calling a function module from a Web Template

    Hi,
    I need to call a function module from a web template. Any pointers on how i can do this ? Is this even possible ?
    Thanks
    Shailesh

    Hi Rael,
    We were finally able to call a FM module from the Web. The trick as Heike suggested was to create an ABAP class which inherits from CL_RSR_WWW_HELP_WINDOW. Then you should modify the process_cmd method of this new class in order to call the FM. Now use this class to create a help service. In case you need to pass any parameters to the FM, you will need to pass them as additional parameters while calling the help service.
    An example is below.
    CMD=PROCESS_HELP_WINDOW&HELP_SERVICE=ZBOOKMARKING&TEXT=mytext&URL=myurl
    Where mytext and myurl were the parameters i pass to my FM and ZBOOKMARKING is my help service.
    Thanks a Lot to Heike for his help on this !!
    Shailesh

  • How do you call a function module in a web dynpro application ?

    Why do you delete my postings ?????????????????????????????
    pls see subject
    Edited by: Ilhan Ertas on Apr 1, 2009 4:51 PM
    Edited by: Ilhan Ertas on Apr 1, 2009 4:52 PM

    Its not me deleting them.  Perhaps a different moderator or a technical problem within SCN itself.
    Someone might be concerned about your question because it is very basic.
    You can call a function module from WD the same way you did in any ABAP program - with the CALL FUNCTION syntax.  There is a service call wizard that will generate a matching context and calling code for you - but it is just a helper, code generator.  Everything it does can be done by hand as well (and often better than the generator).

  • Program making a RFC call to Function Module not working in background

    Hi All,
    I have an ABAP Program which is used to do a reconciliation check between the R/3 and BI system for Invoice Data. Please find below the details of the program flow:
    1.     Program counts the number of records in the DSO table and aggregates the Net_Value based on the date range (passed as parameters)
    2.     Program calls a Function Module (RFC Call) which counts the number of records in the R/3 table and aggregates the Net_Value for the same date range
    3.     Function Module Passes back the count values and aggregated Net_Value to the program
    4.     Program compares the count and aggregated Net_Value from EDWH and MSP systems and sends an email mentioning whether the counts match or not
    However we are facing an issue.
    Whenever, we execute the program in dialog mode, it works fine and fetches results within 5-6 minutes. However if we schedule the program to run in background (parameters through a variant), it gives no results even after running for over 3-4 hours. We tried figuring it out yesterday but could not come to any conclusion. Since there is a RFC call being to the function module, we were wondering if we need to specify some other parameter as well.
    Thanks & Regards
    Dharmendra

    RFC Call is a procedure for executing remote enables function modules. It is done via the 'Remote Enabled' radio button on the function module's attribute screen.

  • System failure, during call of function module RSWR_RFC_SERVICE_TEST

    Hi Team,
         I am working with BW and Portal Integration, with the Netweaver
    2004s SP 11 version. I have a issue when i run the RSPOR_SETUP program
    to test the configuration.
    The error is on status 5 and 12, i get the following error:
    System failure, during call of function module RSWR_RFC_SERVICE_TEST,
    and when i enter at the dev_jrfc.trc log file, i have the following
    error:
    Exception thrown [Tue Jul 10 16:12:16,687]:Exception thrown by
    application running in JCo Server
    java.lang.RuntimeException: call FM RSWR_RFC_SERVICE_TEST to ProgId
    smxpedvc_PORTAL_EPD on host smxpedvc.grupoempresarialangeles.com.mx
    with SSO not authorized: No login module succeeded.
            at
    com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest
    (RFCDefaultRequestHandler.java:79)
            at com.sap.engine.services.rfcengine.RFCJCOServer.handleRequest
    (RFCJCOServer.java:156)
            at com.sap.mw.jco.JCO$Server.dispatchRequest(JCO.java:7785)
            at com.sap.mw.jco.MiddlewareJRfc$Server.dispatchRequest
    (MiddlewareJRfc.java:2405)
            at com.sap.mw.jco.MiddlewareJRfc$Server.listen
    (MiddlewareJRfc.java:1728)
            at com.sap.mw.jco.JCO$Server.listen(JCO.java:8145)
            at com.sap.mw.jco.JCO$Server.work(JCO.java:8265)
            at com.sap.mw.jco.JCO$Server.loop(JCO.java:8212)
            at com.sap.mw.jco.JCO$Server.run(JCO.java:8128)
            at com.sap.engine.core.thread.impl3.ActionObject.run
    (ActionObject.java:37)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sap.engine.core.thread.impl3.SingleThread.execute
    (SingleThread.java:100)
            at com.sap.engine.core.thread.impl3.SingleThread.run
    (SingleThread.java:170)
    Could you help me to solve this issue.
    Thanks so much.

    Have you checked the user that is used to connect from J2EE back to ABAP?
    I had a similar problem, went into the Visual Administrator and found the incorrect password (or possibly outdated password) was being used to communicate back to ABAP, and updating that sorted out my problem.
    Hope this helps.
    Cheers,
    Andrew

  • ERROR: -Type conflict when calling a function module

    hi to all,
    when iam executing the program in browser   Type conflict when calling a function module  error is showing, i have bind all the attribute correctly still iam getting error, WHEN I  CLICK ON THE SEARCH BUTTON DATA IS NOT COMING  TO MY TABLE ITAB1 plz help me....
      DATA:
          NODE_IP_SELECTION                   TYPE REF TO IF_WD_CONTEXT_NODE,
          ELEM_IP_SELECTION                   TYPE REF TO IF_WD_CONTEXT_ELEMENT,
          STRU_IP_SELECTION                   TYPE IF_PLANNING_HISTORY=>ELEMENT_IP_SELECTION ,
          ITAB TYPE TABLE OF ZSL_PL_UPDATE1,
          WA TYPE ZSL_PL_UPDATE1.
      navigate from <CONTEXT> to <IP_SELECTION> via lead selection
        NODE_IP_SELECTION = WD_CONTEXT->GET_CHILD_NODE( NAME = `IP_SELECTION` ).
      get element via lead selection
        ELEM_IP_SELECTION = NODE_IP_SELECTION->GET_ELEMENT(  ).
      get all declared attributes
        ELEM_IP_SELECTION->GET_STATIC_ATTRIBUTES(
          IMPORTING
            STATIC_ATTRIBUTES = STRU_IP_SELECTION ).
    CALL FUNCTION 'ZBAPI_PL_UPDATE'
            EXPORTING
              GV_LIFNR           =  STRU_IP_SELECTION-LIFNR
              GV_MATNR           = STRU_IP_SELECTION-LIFNR
              GV_GJAHR           = ' '
            GV_WEEK_LOW        =   STRU_IP_SELECTION-FROM_WEEK
             GV_WEEK_HIGH       =  STRU_IP_SELECTION-TO_WEEK
          IMPORTING
            RETURN             =
            TABLES
              GT_PL_UPDATE       = ITAB
             DATA:
               NODE_PLANN_NODE                     TYPE REF TO IF_WD_CONTEXT_NODE,
               ELEM_PLANN_NODE                     TYPE REF TO IF_WD_CONTEXT_ELEMENT,
               STRU_PLANN_NODE                     TYPE IF_PLANNING_HISTORY=>ELEMENT_PLANN_NODE,
               WA1 TYPE IF_PLANNING_HISTORY=>ELEMENT_PLANN_NODE,
               ITAB1 TYPE TABLE OF IF_PLANNING_HISTORY=>ELEMENT_PLANN_NODE.
              LOOP AT ITAB INTO WA.
               MOVE-CORRESPONDING WA TO WA1.
               APPEND WA1 TO ITAB1.
              ENDLOOP.
           navigate from <CONTEXT> to <PLANN_NODE> via lead selection
             NODE_PLANN_NODE = WD_CONTEXT->GET_CHILD_NODE( NAME = `PLANN_NODE` ).
             CALL METHOD NODE_PLANN_NODE->BIND_TABLE
               EXPORTING
                 NEW_ITEMS            = ITAB1
                SET_INITIAL_ELEMENTS = ABAP_TRUE
                INDEX                =
    ENDMETHOD.

    CALL FUNCTION 'ZBAPI_PL_UPDATE'
    EXPORTING
    GV_LIFNR = STRU_IP_SELECTION-LIFNR
    GV_MATNR = STRU_IP_SELECTION-LIFNR
    GV_GJAHR = ' '
    GV_WEEK_LOW = STRU_IP_SELECTION-FROM_WEEK
    GV_WEEK_HIGH = STRU_IP_SELECTION-TO_WEEK
    IMPORTING
    RETURN =
    TABLES
    GT_PL_UPDATE = ITAB
    Problem is here
    check out the type GV_GJAHR whether it accepts string type.
    thanks
    sarbjeet singh

  • Standard Component in CRM that will call RFC Function Module

    HI all,
    Is there any Standard Component in CRM that will call RFC Function Module from ECC and that called RFC FM should Fetch the data from ECC.

    You can call RFC from different places, like programs, function modules, web dynpros, classes...
    So you just have to have appropriate RFC on ERP side and call it from CRM side. To call it you use the following statement...
          CALL FUNCTION 'YOUR RFC FUNCTION'
            DESTINATION i_dest "name of server
            EXPORTING
              your export parameters
            IMPORTING
              your import parameters
    Regards.

  • Can i call a function module of SAP?

    Hi, i have a question... Can i call a function module of SAP... I need print a document from a device, can i call the function module of SAP in order that me it prints it?
    Thanks,

    Hi Victor,
    you can use the GenericSync Example of the MDK. This calls the Module to verify the user directly. Generic Sync is exactly for that purpose: call a BADI directly and no usage of SyncBO. Be aware, that you - out of the box- sync your app data as well at that moment, because a sync runs both - generic and smartsync. Even worse: even when you have nothing to sync in Generic Sync - so nothing to print - it will call the function module for generic sync as long as it is registered.
    Well,  anyway, this is the way to call a function module separate.
    If it works with you rparticular print module? I have no idea, but if this is a normal function module - well, it should be ok.
    Hope this helps.
    Regards,
    Oliver

  • Call a function module from CRM 5.0 via ITS to FICA

    Hi
    I want to call a function module in FICA (FICA is using sapgui) from CRM (IC-web) via ITS (Not integrated in FICA)
    Is it possible and how should this be done???
    If someone know how, please help
    BR//JL

    generally RFCs should not have user dialogs.
    any how to handle your case, you need ITS and since FICA is a WAS 6.20 system, you need to have a ITS installed for FICA system, without which you cannot do that.
    alternatively you can mimic the functionality of the RFC by programming the same in a BSP and call this from CRM system
    Regards
    Raja

  • Calling generic function modules

    Hi all!
    As .NET connector doesn't support the call of function modules or bapis that are not known at design time, I found another tool on the web (see www.erpconnect.net).
    Does anyone have any experience with this library? My first test programs work very well.
    Kind Regards,
    Markus

    Have you looked at the SAP Connector for Microsoft .NET (NCo, also known as "SAP .NET Connector")? This is made exactly for that and comes with documentation and samples. SAP customers can download it from http://service.sap.com/connectors .

  • Service call to function module not fetching data

    Hello Experts,
    Today, I have started facing one more weird issue of the similar kind, I faced few weeks back.
    Once my web dynpro application is loaded, on the click of button I make a service call to function module which brings me some data and that is being shown on the UI.
    After doing few more service calls on the click of other buttons, when I click on the button initially clicked, service call is being made but no data is being returned.
    I already debugged the code, made sure the parameters is being passed correctly to function module.
    Regards,
    Harsh

    Hello Katrice,
    I debugged to the hilt and found that standard function module 'ME_REL_ACTIVE' was returning sy-subrc non zero.
    I cleared one variable after identifying it. Below is the code snippet:
        ld_read_t16fg = '(SAPLEBNF)READ_T16FG'.
        ASSIGN (ld_read_t16fg) TO <lst_read_t16fg>.
        IF <lst_read_t16fg> IS ASSIGNED AND <lst_read_t16fg> IS NOT INITIAL.
          CLEAR <lst_read_t16fg>.
        ENDIF.
        UNASSIGN <lst_read_t16fg>.
    Regards,
    Harsh

  • Call an Function Module from BSP page to import an CSV file to internal tab

    Hi Experts,
    I am working on creating a web application in BSP which will call the function module  ALSM_EXCEL_TO_INTERNAL_TABLE.
    This function module imports an excel file into an internal table.
    Since this is the first time I am working on BSP I am not sure how to call this FM from event handler tab in BSP page.
    What I could gather from previous posts is that we need to create an attribute which should take the value of the export parameter of the function module.But I am kind of messed up on this.
    Could u guys please help ,I would be extremely grateful.Points will be assigned for sure
    Thanking in anticipation
    Ankit

    Could you please let me know how I can call an abap function module from a transformation? (from abap xslt program). I know how we can call methods of a class from the transformations, but no idea how we can call function modules. Any suggestions or a sample code snippet towards this will be very useful for me.
    Thanks,
    Shashi.

  • CNTL_ERROR while calling a function module from Java webdynpro

    I am calling a RFC function module from javawebdynpro app
    which inturn calls a function module performing BDC on CAPP transaction. When I run this from SE37 of the same system or a different system everything works fine. But when called from Java webdynpro app, it raises a CNTL_ERROR exception and creates a short dump.
    Any help on this is highly appreciated

    Good catch, BI Learner. This was exactly it: when assigning the values from SOURCEFIELDS directly to the import/export parameters, you have to make sure that the types are EXACTLY the same, otherwise it will not work (the routine stops with an error when calling the FM, but there is no dump).
    Therefore, to solve my problem, I created the declarations precisely as expected by the FM and assigned the values to these fields:
    DATA:
          SOURCEVAL TYPE  /BIC/OIINVQTY,
          SOURCEUOM TYPE  /BIC/OIUSUOM,
          USITM TYPE  /BIC/OIUSITM,
          TARGETUOM TYPE  /BIC/OIUSUOM,
          CONVERTED_COST TYPE  /BIC/OIINVQTY.
    DATA PRODUCTION_UOM TYPE /BIC/OIUSUOM.
    " get the Production UOM
        SELECT SINGLE I~/BIC/USPRDUOM
          FROM /BIC/PUSITM AS I
          INTO PRODUCTION_UOM
          WHERE I~/BIC/USITM = SOURCE_FIELDS-/BIC/USITM AND I~OBJVERS = 'A'.
        IF ( SY-SUBRC = 4 ). " no records found
          "RAISE PARTNO_NOT_FOUND.
          RAISE EXCEPTION TYPE CX_RSROUT_SKIP_RECORD.
        ENDIF.
    " load the parameters
        SOURCEVAL = SOURCE_FIELDS-/BIC/USFRZMFC.
        SOURCEUOM = SOURCE_FIELDS-BASE_UOM.
        USITM = SOURCE_FIELDS-/BIC/USITM.
    " then you can call the FM
        CALL FUNCTION 'Z_CA_CONVERT_US_COST'
          EXPORTING
            PSOURCEVAL                = SOURCEVAL
            PSOURCEUOM                = SOURCEUOM
            PUSITM                    = USITM
            PTARGETUOM                = PRODUCTION_UOM
          IMPORTING
            PTARGETVAL                = CONVERTED_COST
          EXCEPTIONS
            CONVERSION_NOT_MAINTAINED = 1
            PARTNO_NOT_FOUND          = 2
            OTHERS                    = 3.
    " ... [do the rest]
    Thanks for your help,
    Dennis

Maybe you are looking for

  • Please help "http status 404 - the requested resource is not available"

    After restarting apache and tomcat all pages under webapps/ROOT became unavailable, but pages in other webapps are still available. Almost looks like there is filter somewhere. Does anyone has any idea where should I look? Thanks!

  • How to set random math?

    Flash game link:http://myglife.org/usa/wv/gehswiki/images/e/e3/Herominigame_10-7-08.swf Ok I am making a very simple flash game for a class. I have all the coding working but I was wondering if any of you know how to do a certain thing. Where the pow

  • Configure/Access remote Message Queue (Open MQ)

    Hi, I am new to JMS and Message Queue. I have installed Sun's Open Message Queue on my system.I have created ObjectStore and Destination(Queue) and using java program to insert and fetch messages. Following are the details: 1. Created ObjectStore MyO

  • Loading metadata via iptc core using Bridge

    I've noticed that after loading metadata into photos opened in PS (cs5) that when checking the "file info" for that photo, the metadata isn't showing up. Wonder what I should do differently?

  • Java Iview runtime error at enterprise portal while accessing BW reports

    Hi Expaerts , We are facing an issue while navigating through one of the BW reports at Portal, as it is showing Java Iview run time errror. Earlier we had the issue of Webass engine restart, but after increasing the heap dump we are facing the issue