Call ABAP function module from script?

Hi,
I have an ABAP function module, which works fine when I call it in a transformation.
Since I don't need to execute this function for each record but rather for each file I process, I would like to move the call from the DataFlow to a script in the WorkFlow. When I click on the 'functions' button the ABAP FM is available in my SAP Datastore, so I drag and drop it into my script. I also make sure to populate all required variables.
There are no error messages or warning when I check my job definition.
When I execute it, I get the following RFC error:
Function call <xxx  ( abcd ) > failed, due to error <150413>: <RFC CallReceive exception <FUNCTION_NOT_FOUND>.>.
Is it just not possible to call an RFC enabled function module in SAP from a script or am I doing something wrong here?
Thanks,
Jan.

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.

Similar Messages

  • How to call a function module from a transformation

    Hi,
    Could somebody please let me know how I can call an abap function module from a transformation (abap xslt program). I know how to call the class methods from transformation, but how do i call a function module..?
    Thanks,
    Shashi.
    Edited by: Shashi Kanth Kasam on Apr 8, 2010 12:45 PM

    Ya. I can do that. But I don't want to use a class and a method to call that function module. Want to directly call function module from transformation. Is that possible..?
    Thanks,
    Shashi

  • Can you call a function module from within a smartform?

    I was told that yu can not call a function module from a smartform - that does not make sense to me because you can do tons of ABAP within a smartform.
    Well - can you?
    Thanks.
    Scott

    Yes, you can call function modules.

  • 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.

  • 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 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

  • How to call a function module from a workflow ? ?

    hi all,
    i have to call a function module from an workflow, i got a hint from someone that i have to enhance an object and then write and methode, in this methode i can call that function module. I dont know even how to go for it.
    Can anyone suggest that how to go for it ?
    thanks.
    raman khurana.

    Hi Raman Khurana,
    Please  go through the links it might be helpful , notsure
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/e4af8b453d11d189430000e829fbbd/content.htm
    http://www.abapcode.info/2007/07/standard-function-module-text.html
    http://it.toolbox.com/wiki/index.php/SAP_Workflow
    Regards,
    Sreekar.Kadiri.

  • How to call a function module from debugger?

    Hi all,
           i just wanted to know whether we can call a function module from a debugger ,
           if yes how ?

    Hi Laxmikanth,
    How ur going to call a function module which is not present in program???
    In debugging mode u can change the values of variables,put break points and watch points,but i thnk its not possible to call a function module(not present in program) while debugging .
    Please share with us if u have any solution...
    Regards,
    lakshman.

  • Calling a function module from APO Macro

    Hi,
    Can I call a function module from a macro directly without going through the user exit? If so, how should I pass the parameters to the function module? I don't have to get the results back to macro.
    Regards

    Hi Asokan - you can call a function module directly from a macro providing it is designed to be called from a macro. For example if you are in the Macrobuilder and use the menu path Edit -> Edit User Function then you will get a list of existing function modules that you can call directly by inserting a Operator/function into your macro. If you want to call a function module not listed in the User Function drop down list then you will either need the user exit or create a custom function module as a wrapper and register the wrapper function module in the Edit User Function menu path. Calling a function module will always return a value - but you can choose to ignore that value depending on how you build your macro.
    Regards
    Andy

  • Calling a function module from within a transformation routine

    I created a routine within a transformation and experience the following weird behavior now:
    When I call a function module within that routine, the load fails with the following error message:
    Exceptions in Substep: Rules
    When I click on the button next to this text, it point me to my function module call.
    What I do not understand is, that the following two scenarios work fine:
    - Having the same function call (with fake values) in a plain ABAP program works beautilfully
    - If I copy the content of my function module directly into my transformation routine, everything works fine as well
    I am now wondering whether the routine does not "see" the function module I am calling. The module resides in a different package. Is that a problem? Do I have to include something first?
    Here is the code that calls my FM (
    CALL FUNCTION 'Z_CA_CONVERT_US_COST'
         EXPORTING
            PSOURCEVAL                      = SOURCE_FIELDS-/BIC/USFRZMFC
            PSOURCEUOM                      = SOURCE_FIELDS-BASE_UOM
            PUSITM                          = SOURCE_FIELDS-/BIC/USITM
            PTARGETUOM                      = PRODUCTION_UOM
         IMPORTING
            PTARGETVAL                = RESULT
         EXCEPTIONS
           CONVERSION_NOT_MAINTAINED = 1
           PARTNO_NOT_FOUND          = 2
           OTHERS                    = 3.
    Thanks a lot for your help. Points will be assigned.
    Dennis

    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

  • Is it possible to call Normal function Module from WD4A , Not RFCs

    Is it possible to call Normal function Module(FM) from WebDynPro for ABAP , Not RFCs

    There is no difference, unless you are specifically calling the RFC to connect to another system. If so, then you need to add the DESTINATION keyword to the function call and specify the destination name. This name must be defined in SM59.  But, if you are not going to another system, you can call the RFC the same way you call the regular function module.
    REgards,
    Rich Heilman

  • 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

  • Calling Z function module from BSP page

    hi,
      i am calling a z function module from BSP application ROS_SELF_REG ,The z function module is inside a z function group,It does not give any sytnax error..but while running BSP application ,it is going into dump saying that Z function module is not found..Any idea why this is happening???

    Hi,
    Check whether the Z function module is spelled correctly. Also try activating the whole function group and function module in se80 transaction.
    Check whether the BSP application is calling the Z FM from the correct server/client where it is available.
    Regards,
    Harish

  • 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 ABAP Function Module in BODS, but not RFC_enabled

    Hello Experts
    We have an ECC ABAP Function Module takes 5 input parameters and returns Division Name for an Employee and Employee PERNR is one of the input parameters for the Function Module.
    I tried adding a function call in the target schema of Query Transform and the output parm passes out as an Output column. But getting an error that ABAP FM is not RFC_enabled. I checked attributes, and it is not RFC_enabled.
    So is there way to invoke this FM as part of BODS ABAP Dataflow?. Becuase the code executes on ECC, it does not need to be RFC enabled, I believe. But on the Query Transform, the option "New Function Call" isn't enabled or it is greyed out, I can't select it.
    What is the solution to invoke this ABAP FM with enabling RFC on it ?
    Please provide me your inputs.
    thank you

    Hi,
    Create a custom wrapper FM which is Remote enabled & call the FM DD_DOMA_GET inside your custom Remote FM. Changing the std. FM would be a core code mod. hence above approach would be safe.
    Thanks,
    Best regards,
    Prashant

Maybe you are looking for

  • Apple Universal Dock doesn't work after full charge

    last night, I put my ipod nano into the Apple Universal Dock. I worked just find with the apple remote. I stopped the music using the remote, then watched TV about 2 hours. After that, I saw my ipod was full charged, and the dock station hasn't worke

  • Problem while converting Spool to PDF

    Hi, I am sending ALV report output to Spool then converting the Spool to PDF using  'CONVERT_ABAPSPOOLJOB_2_PDF'. I am able to send the mail but in the PDF, the first page contains data statistics(no. of records passed) but I want to supress it. I ne

  • Using flash to open a program

    Is there any way of making a button in flash open a programs on my pc. It is not for the internet i would like to create my own user interface over the old windows one with my favourite programs! Thanks Liam

  • Prints multiple copies in Vista

    C8180 when we click print from any computer in the network always prints 3 copies. Doesn't matter if a website or from Lotus or any program. I Reference Chat Activity ID:3765683 in May and followed everything I was told and same problems.

  • ITunes double click problem (query bug)

    With the recent iTunes update 7.7.1(11), I noticed that when switching between iTunes (esp. when it is in the compact mode) and other apps, a single mouse click in iTunes is often interpreted as a double click. This leads to distress when I try to pa