Execution of a Function module ?

Hi,
Could you please tell me how to execute a custom function module in which the import parameters are a couple of tables which has lot of fields. Do i need to give entries in all of the fields to execute or to debug the Function Module..??
Thanks in Advance.. !!

Hi,
  To call function module from program
slect the pattern button on APPlication toolbar of ABAP editor enter your FM name.
Regarding parameters...
  You have to pass all mandatory field values of FM.
To check whether mandatory or not
GOTO tcode SE37  enter Fm name  press display
import parametres--->check call OPTION if check means Mandatory else. not.
Don't forget to reward if useful....

Similar Messages

  • Runtime Error in execution of 'SO_OBJECT_SEND' function module

    Hi friends,
    We are going for upgradation from 4.6c to ECC6.0. There is one program which is used to send external mails thru 'SO_OBJECT_SEND', but the function module is giving runtime error(line no:515) in ECC6.
    what could be the reason?
    rewarded,
    Steve

    Hi,
    Plz check if any latest release notes of SAP for the function module 'SO_OBJECT_SEND' are available. If so you may apply those.
    If you have valid SAP service username and password you can get the notes from service.sap.com. Else your BASIS people can help you.
    Which is the highest patch level you have applied?
    Regards,
    Renjith Michael.

  • Adobe Forms function module - downloading the xstring output in PDF file

    Hi Guys,
    I'm using Adobe forms and fetching its output in an XSTRING PDF format. How can I download this XSTRING output to a PDF file and store on the local file system?
    I'm using the following approach to getting a PDF output:
    ls_outputparams-getpdf = 'X'.
    CALL FUNCTION 'FP_JOB_OPEN'
      CHANGING
        ie_outputparams = ls_outputparams.
    * Get the name of the generated function module
      CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
        EXPORTING
          i_name     = 'ZADOBEFORM'
        IMPORTING
          e_funcname = lv_fmname.
      IF sy-subrc <> 0.
      ELSE.
    *   Call the Adobe Form function module
        CALL FUNCTION lv_fmname
          EXPORTING
            /1bcdwb/docparams  = ls_docparams
          IMPORTING
            /1bcdwb/formoutput = ls_form_output
          EXCEPTIONS
            usage_error        = 1
            system_error       = 2
            internal_error     = 3.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
    * Close the spool job
    CALL FUNCTION 'FP_JOB_CLOSE'.
    Now, the variable LS_FORM_OUTPUT-PDF contains the PDF output in XSTRING. My question is how can I download this as a PDF file to my local machine.
    Kind Regards,
    Shailesh.

    hi guys,
    im using all FM to download my PDF adobe but in this part :
    ls_spfli-carrid = 'AA'.
    ls_spfli-connid = '0017'.
    APPEND ls_spfli TO it_spfli.
    flag                     = 'X'.
    is_address_type          = '1'.
    is_address_number        = '22515'.
    is_person_number         = '22517'.
    is_country               = 'IN'.
    *&--- Call the generated function module
    CALL FUNCTION '/1BCDWB/SM00000200'
       EXPORTING
    *   /1BCDWB/DOCPARAMS        =
         it_spfli                 = it_spfli
         flag                     = flag
         is_address_type          = is_address_type
         is_address_number        = is_address_number
         is_person_number         = is_person_number
         is_country               = is_country
      IMPORTING
        /1bcdwb/formoutput       = fp_formoutput
      EXCEPTIONS
        usage_error              = 1
        system_error             = 2
        internal_error           = 3
        OTHERS                   = 4
    I have usage_error knowing that the execution of the function module in SE37 pass successfuly and also the execution of the forms .
    in your opinion what can be the problem?
    Kind Regards,

  • Question about destination parameter in RFC function module

    Greetings,
    For execution of RFC function module such as MD_STOCK_REQUIREMENTS_LIST_API  on local server, the destination parameter is not required or it can be DESTINATION 'NONE'. I observe that the second option is much slower than the first option. My question is why the second is much slower.
    Thanks,
    Hung

    I've tested it with se37 by leaving RFC target system blank or filling it with 'NONE' , I saw 53000 microseconds versus 45000 microseconds.
    Hung

  • Scheduling function module execution in background jobs

    Hi,
    I have requirement where in after obtaining all the required inputs from the user we will call an function module to execute it.
    The requirement is that the execution of fm shld happen in background and a log must be created showing the user whther it was successful or if it failed with the list of errors.
    Can you kindly give some input on how to schedule the execution of function module in background job and if scheduled how to create the logs to display the success or error message.
    Warm Regards,
    Naveen M

    Hi,
    Just create a simple program where you have to call this FM.
    Pass the values to FM either by declaring some internal table of selection screen and execute the program in background.
    For Message Log, you can use structurre BDCMSGCOLL
    DATA:   MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    After Call to FM, read from this internal table as follows
    READ TABLE MESSTAB WITH KEY MSGTYP = <Message Type>
                                            MSGNR  = <Message Number>.
    regds,
    Anil

  • Need to know how to find the last execution time for a function module

    HI all
    I need to know
    1) How to find out the last execution time of the function module ?
      say for eg. I have executed a func. module at 1:39pm. How to retrieve this time  (1:39pm)
    2) I have created 3 billing document in tcode VF01 i.e 3 billing doucment no. would be created in SAP TABLE "VBRP" b/w 12am to 12:30 am.
    How to capture the latest SAP database update b/w time intervals?
    3) Suppose I am downloading TXT file using "GUI_DOWNLOAD" and say in 20th record some error has happened. I can capture the error using the exception.
    Is it possible to run the program once again from 21st records ? All this will be running in background...
    Kindly clarify....
    Points will be rewarded
    Thanks in advance

    1.Use tcode STAT input as Tcode of Fm and execute .
    2. See the billing documents are created in table VBRk header and there will always be Creation date and time.
    VBRk-Erdat "date ., u can check the time field also
    So now if u talk the date and time we can filter then display the records in intervals.
    3. with an error exeption how is my txt download finished .
    once exception is raised there will not be a download .
    regards,
    vijay

  • Function Module to find the Last Execution date of Back ground Job

    Hi,
    Is there any function module to find the <b>last execution date of back ground job</b>.
    So that I can transfer the data from SAP to Legacy system based on the document creation date should be in between last execution date and current date.
    thanks in advance.
    Eswar.

    Don't know of a function module, but you should be able to use the information in table TBTCO to get the last start date and time of the job you are interested in.

  • Tcode for the execution of function module

    Hi!
    A very simple question:
    What is the Tcode for the execution of function module? (Se38,???)
    I have to execute  the function module RRSI_INITIAL_LINE_INSERT with import parameter I_CHABASNM = 0REQUID.
    Thank you very much!
    regards
    Thom

    hi,
    You create new or edit Fm in SE37. You also put the code for that FM in SE37.
    You can call it through pattern button in SE38, where u pass the importing and exporting parameters of that Fm
    Hope this helps, Do rewad.

  • Tracking the execution of Function Modules

    Hi there,
    for ABAP reports there is an enhancement S38MREP1 'Exit at Start report' in transaction CMOD available which could be used e. g. to track the execution at least of executable programs (TRDIR-SUBC = 1); limitation: it is executed before the selection screen, so no guarantee that a certain program is really submitted afterwards.
    Is there something similar available in release 4.5B (or in any higher release?) or how can I track the execution of function modules in the customer name space in a smart way?
    Thanks in advance for any support,
    Peter

    Expanding a bit on Seigfried's post,  you could write a little function module with with a parameter which would be function module name and it would update a custom table everytime it is executed.
    Put this function call at the end of the function module that you want to log.
    call function 'Z_LOG_FUNCTION_EXECUTION'
          exporting
             fcname = 'Z_THE_NAME_OF_THE FUNCTION'.
    The code inside this function module could be something like this.
    ztable-fcname = fcname.
    ztable-uname  = sy-uname.
    ztable-datum  = sy-datum.
    ztable-uzeit  = sy-uzeit.
    insert ztable.
    Regards,
    Rich Heilman

  • How to exit the execution in middle of a function module

    Hi Fox,
    I have a function which sometime needs more than 10 minutes to deliver a result.
    This is not acceptable thus this function will be given a time-out value in a second format after which the function should be stopped or killed. Do you have an idea how to do it. The function has to process a lot  of records within a table, so maybe a solution with a counter
    Cheers!
    Kami

    CALL FUNCTION func DESTINATION 'NONE' ...
    The destination NONE refers to the calling system. Function
    modules called with are executed in the system of the calling program, but in their own program context.
    As you know RFC uses dialog work process and the timeout for dialog work process will be in the range of 10 -15 mins not beyond that , so once the time the function module gets killed !!!
    I m sure about this process because i did a similary requirement like yours.
    Thanks.

  • Function Modules for Campaigns Execution

    Hi Experts,
    I have an query, I am executing a Campaigns based on this campaign creating a Leads as transaction. I need some function module or BAPI , using which i can download the Lead Numbers , Business Partner Details like name , address, marketing attribute etc.
    Regards
    Arun Kumar

    Hi,
    use this function module:
    <b>RSS_UNIQUE_CONVERT_TO_HEX</b>
    regards
    Debjani
    Rewards point for helpful answer

  • Function Module error in query execution

    Hi SDN Gurus,
    When I run this query in Dev it gives me an error: "Function Module RSD_ZK_ACCT_TEXT_GET does not exist." When I look up in SE37 in both DEV and QAS, there is no such function module though I don't get this message in QAS.
    ZK_ACCT is one of our important infoobjects and is in the query.
    Thanks for your help.
    SAF

    Hi Saf,
    Try with Tcode RSRT and with the following option:
    Buttom:Genrate Report.
    Menù: Repair.
    And then execute once again the report.
    Ciao.
    Riccardo.

  • How to give only one function module execution Auth for a User ?

    Dear Experts
    I have reviewed S_DEVELOP auth object. It is not ful filling my requirement
    Any Ideas !!
    Rgds

    Rakesh...Firstly thanks for reply.
    As i said i reviewed these and found it is not meeting my requirement.
    As we aware We can control auth to Function modules thru object type
    Filed OBJTYPE----
    FUGR --> 1st control
    and with Function Group Name
    Field OBJNAME----
    <Function Group Name>  --> 2nd control
    In my scenario - I have given the authroizations as below
    ++++++++++++++++++++++++++++++++++++++++++++++++++++
    ACTVT            Activity                                                 Display, Execute
    DEVCLAS       Package                                               *
    OBJNAME      Object name                                         ZECC_FG
    OBJTYPE       Object type                                           FUGR
    P_GROUP       Authorization group ABAP/4 pro              *
    ++++++++++++++++++++++++++++++++++++++++++++++++++++
    The above authroization is giving all Function modules authrozation under ZECC_FG Function Group.
    My Requirement
    I shoudl be able to give only one Function Module of a Function group where multiple function modules exist under the same Function Group.
    How can i acheiveit. Any Custom Control can be place to acheive this.
    I am sure S_DEVELOP will not solve my requirement (I Beleive)
    Regards

  • How to call function module in BPS for step by step execution.??

    Hi All,
    I used the Exit(function module) in char relation ship for derivation,combination check and proposal defined the source char and target char and function module for Derivation,every thing working fine.But how can i call the function module once i entered the data in my planning layout.Just i need to validate my function module working fine or not???
    How can i debug the function modules in BPS ,because we are using the exits in different places,please any one can explain each place how we can do the debug??Where we have to put the break points?? .
    Just give the path i can try in my system BPS 4.0 version we are using.
    Note:I know how to debug the function module only.but I don't know Using BPS screen's .
    Thanks,

    Hi ,
    Thanks for replies about my question??.
    If i am using the exit in my char relation ship how can i debugg that exit???
    if i am using BPS0 how to do it???If i am using BPS_WB how to do it??
    Case1.Variable (type Exit) I known how to do debugg this one in BPS0 but i'm not sure in BPS_WB??
    Case2:Char Relation Ship(Type Exit) how to do in BPS0 and BPS_WB??.
    Thanks.

  • Function Module (Execution)

    Hi All,
    Kindly help me out with the below scenario
    Scenario:
    1) I have to "CHEKIN" a file into DMS system using XI from file system, here DOC info is already present in the DMS system.Now only CHECKIN of file has to happen in correspond to particular DOCnum,DOCtype,DOCversion.
    2) To make it to work we use FM "BAPI_DOCUMENT_CHECKIN2"
    3) Now When i use this FM IN se38 and run it executes sucessfully by putting in the file ito DMS system,there is a paramter asking for file path : (We have given it the XI Server path)
    For instance : "
    xx.x.x.xxx\mdmtest\srinivas"
    3) Now i have imported this FM into XI and done mapping for these paramters , for some elements i have put conatnt mapping , for docpath etc.
    4) This is on Target (Receiver RFC Adapter) , but when i run the scenario, the Sender RFC is not picking up the same XI file path and putting it into DMS.
    Doubt:
    Target has : Element (Docpath) which is XI server path, will this work or donot work, suggest p.lz,When i run there is no error but file is not seen,
    Kindly revert back if there is no clarity.
    With regards
    Srinivas

    Hi,
    When i run the FM on the ERP backend system using se38 (ABAP Editor) , the function module has a parameter called "BAPI_DOCUMENT_CHECKIN2"
      lt_files-docfile  = for this parameter i have given
    local path of system             ( Ex: c:\temp\doc.txt )
    XI path folder                       ( Ex: '
    10.x.x.15x\mdmtest\srinivas\srinipaddu.txt' )
    ERP Backend system folder (Ex : '
    10.x.x.1x1\sapsdn\srinipaddu.txt'
    For Above three all are working fine when am executing from the SE38 of the system.
    But here in XI box i have used Receiver RFC Adapter and used 'BAPI_DOCUMENT_CHECKIN2" as target interface.Some fields are given constant value using mapping , for ex: "lt_files-docfile " but when i execute in XI there is no file checked in , it shows no error when i see in "Communication channel moniotring" in RWB , but in when i see in sxmb_moni of my target system there are no messages.
    i see no error , but my file in the specifed folder is not getting checked in .
    kindly put u r views seeing above steps done.
    thx in advnc
    srinivas

Maybe you are looking for