Calling function module in bsp

hi all,
please help me out. i am calling function module in bsp(in on initialization). i am calling 2d_matrix fm. but in output, its not showing the graphics. i think i have to do something in layout also, to connact the FM. Plz help me if you have any idea in bsp.
thanks in advance.

thanks for ur reply.
but i am using it in layout and its giving me an error.
i have selected all the fields in on initialization.
and in layout i am displaying my data in tabular form. correspondigly i want to display same data in graphical format.
for that i have used a FM in on initialization(2d_matrix FM).
but how i link it in layout . so, that i can give me a output.
i can understand.
plz reply me.
thanks in advance.

Similar Messages

  • Suggest me way for calling Function Module in BSP page

    Dear Friends,
    I want to create sales order using BSP. For that there is an bapi called BAPI_SALES_CREATEFROMDAT2. I have two ways to do that.
    1. I will create all the required structure on the BW system and then i can call the bapi.
    2. I will create another function module which calls the BAPI_SALES_CREATEFROMDAT2. and i will pass all the require parameters to my created Function module.
    In the first case i suppose to create structure for header data, order items and partner data. It is quite lenghty work.
    In the second case i need not to create any kind of structure or types-pool.
    If answer is case1 then should i create exact structure or i can create that many fields contained structure which i require?
    Suggest me that whether should i follow first case or i should follow second case and also which one is more powerful?

    Thanks for giving me answer.
    I have tried to find through BAPI Browser for BAPI_SALESORDER_CREATEFROMDAT2 but unfortunately it is not creating the structure. This is very suprising for me because as per your weblog and as per your answer it should be generated. Now i have two choices :
    1. I create same structure on 6.20 system manually for that i have to create around 100 data elements or may be more than that which are not exits on 6.20 system.
    2. I will create another function module on 4.6c system which calls BAPI_SALESORDER_CREATEFROMDAT2 and i need to pass only selected parameters.
    2nd option is suitable for me but i have doubt that is the proper way for working production?

  • Call function module from BSP page

    Hi Experts,
    I am new to ABAP and BSP as well.
    I am creating an BSP page through which I want to call an function module in R/3 which will fetch a file from the application server and place into an internal table.
    I have identified the function module.
    My questions are:
    Since I am going to have an web interface where on a button click the file should be uploaded to the intrernal table.So how do I call the function module.
    Can I use JSP and ABAP together in an BSP page.
    Thanks
    Ankit

    Hello Ankit,
    Please check the following link:
    http://help.sap.com/saphelp_47x200/helpdata/en/bd/ac1e3a0088e042e10000000a11402f/frameset.htm
    I think it will answer all your queries.
    Regards,
    Siddhesh

  • Calling Function Modules from BSP

    Hi,
    Can we call Remote Function Modules from a BSP page? If yes, can they be called from both Layout and Events and what's the proper way of calling them?
    Any help will be great.

    HI Aurang
    Calling RFC is similar to calling any other Function Module..Only thing is you need to provide the DESTINATION name  of RFC Destination..
    And you can call it from Event like OnInputprocessing...
    inside your BSP Page..
    For Example
          CALL FUNCTION 'ZFI_FUNC_IM_DISPLAY_ASSE_CA_AS' DESTINATION 'Provide the RFC Destination here'
            EXPORTING
              I_PRCAT    = 'CA'
              I_DOCNO    = VAR_DOCNO
            IMPORTING
              E_ASSE_HDR = WA_HDR
              E_TEXT     = VAR_STATUS
            TABLES
              T_ASSE_LIT = T_T900.
    If you are calling from same server..Write destination as NONE
    Cheers:)
    Mithlesh

  • Uncatchable exception: BSP calling Function Module

    Hi all,
    currently i'm facing a very weird problem. My application class calls function module
    HR_INFOTYPE_OPERATION. Normally, in case of an error, the function module gives you back a return parameter. But if i call it from my BSP, the processing doesn't leave the function module. It directly throws an exception ERROR_MESSAGE_STATE instead of writing the message into parameter return.
    If i call the function module with the same parameters from a report, it works fine and the error message is written to return parameter without throwing an exception.
    What am i doing wrong? I don't want that exception and need to go on with filled parameter result.
    Regards
    Mark-André

    Hi MA,
    try using ERROR_MESSAGE in the exceptions list, like this.
    CALL FUNCTION 'func_name'
         EXPORTING
              string            = text
              pos               = position
         IMPORTING
              string1           = text1
              string2           = text2
         EXCEPTIONS
              string1_too_small = 1
              string2_too_small = 2
              ERROR_MESSAGE     = 3
              OTHERS            = 4.
    Cheers
    Graham Robbo

  • 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 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 function modules from a BSP page

    Hi all
    How do we call function modules from a BSP page.
    regards,
    Paul

    Ok, You want to construct the URL pointing to a BW report and want to execute the same when a button is clicked right? if yes here is the answer.
    for constructing the BW query URL
    http://<bwserver>:<port>/sap/bw/BEx?sap-language=ENCMD=LDOC&infocube=<cube anme>&query=<query name>&var_name_1=<variable name1>&var_value_ext_1=<variable value 1>&var_name_2=<variable name2>&var_value_ext_2=<variable value 2>
    (for more info on how to pass parameters to BW query URL refer to the BW web designer reference manual which can be found at http://services.sap.com/bw)
    and for executing this from a button use onclientclick property of htmlb:button along with window.open
    <htmlb:button id ="BWQ"
                  onClientClick = "javascript:window.open("<%= BW_URL %>" );"/>
    Hope this is clear.
    Regards
    Raja

  • What is the use of CALL FUNCTION MODULE - AT BACKGROUND TASK?

    Hi experts,
    I found Call functional module in background task will make the FM run at the next commit work as some people said. So I have some questions:
    1 if we use COMMIT WORK commend, the pending FM will be called? If there are several FMs called at background task, what is the sequence of them? How many conditions will trigger the running of these FMs?
    2 Where can I find the log of this pending FMs? In SAP library, it says there are 2 tables. But I checked these tables and can only find the FM name and user of it. And I can not understand content of these tables. It seems one is for the main information of FM, and the other is for the data of the FM, maybe the parameters.
    3 If I call a FM in this way, Can I canncel it before the next commit work in some way?
    Finally, thanks for reading and help.

    HI,
    When the COMMIT WORK statement is executed, the function modules registered for the current SAP-LUW are started in the order in which they were registered. ROLLBACK WORK deletes all previous registrations for the current SAP-LUW.
    If the specified destination is not available when COMMIT WORK is executed, an executable program called RSARFCSE is started in background processing. By default, this tries to start the function modules registered for a SAP-LUW in their destination every 15 minutes and up to 30 times. These parameters can be changed in the transaction SM59. If the destination does not become available within the defined time, it is recorded in the database table ARFCSDATA as the entry "CPICERR". The entry in the database table ARFCSSTATE is deleted after a standard period of eight days

  • Third party system call function module/BAPI through RFC to update Z table

    Dear Friends,
    We have a third party system which directly inserts a Z table in SAP through its programming, which is an auditing issue.
    We want the third party system should call function module/BAPI through RFC so that the Z table gets updated.
    waiting for inputs..
    Thanks,
    Kumar

    if third party system is capable of making Remote Function call, then writing a Function module & making it remote enable is not difficult task in ABAP.
    You may have to prepare specifications first to decide if third party system is going to Read, insert, update, delete records from Zee table.

  • Why Service Call and why not call Function module Directly in WD ABAP

    Hi,
    I have created a Webdynpro applications and the logic requires calling avrious Function modules.
    Do I need to create Service Call for each Function module or call them directly.
    It would be great if you can suggest me under what cases I need to opt for Service call
    For example, if I use 'RP_CALC_DATE_IN_INTERVAL', do I need to use Service call or call function module directly.
    Note: I have searched forums but could not get the correct answer which I want
    Thanks!

    The Service Call is really meant to be a wizard/time saver.  It has the advantage that it can generate matching context nodes/attributes for the interface of the Function Module you are calling. However everything that the service call does can also be created by hand.
    Personally I'm not a fan of what the service call wizard generates.  Its good as a time saver or for beginners, but I find I prefer to touch up the code it generates anyway. I much prefer to create a nice reusable model class with its own unit test and then consume this model class (with the service call wizard) from WD.  This model class might contain one or more function module calls depending upon what logic I need to access.

  • Calling Function Module in Update Task

    Hello Experts,
                              Can anyone let me know about
    Calling Function Module in Update Task.
    Why do we use this " In Update Task "  ??
    How do we Use ??
    What is the Use... ??
    Kindly let me know....
    Thanks and Regards
    Pramod

    hi,
    Why do we use this " In Update Task " ??
    The main update technique for bundling database changes in a single database LUW is to use CALL FUNCTION... IN UPDATE TASK.
    How do we Use ??
    A typical R/3 installation contains dialog work processes and at least one update work process. The update work processes are responsible for updating the database. When an ABAP program reaches a COMMIT WORK statement, any function modules from CALL FUNCTION... IN UPDATE TASK statements are released for processing in an update work process. The dialog process does not wait for the update to finish. This kind of update is called asynchronous update.
    What is the Use... ??
    Asynchronous update is useful when response time from the transaction is critical, and the database updates themselves are so complex that they justify the extra system load
    Real time scenario.
    Suppose a user wants to change an entry in a database table, or add a new one. He or she enters the necessary data, and then starts the update process by choosing Save. This starts the following procedure in the ABAP program:
    Firstly, the program locks the database entry against other users, using the enqueue work process (or the message server in the case of a distributed system). This generates an entry in the lock table. The user is informed whether the update was successful, or whether the lock could not be set because of other users.
    If the lock is set, the program reads the entry that is to be changed and modifies it. If the user has created a new entry, the program checks whether a record with the same key values already exists.
    In the current dialog work process, the program calls a function module using CALL FUNCTION... IN UPDATE TASK, and this writes the change details as an entry in table VBLOG.
    When the program is finished (maybe after further dialog steps), a COMMIT WORK statement starts the final part of the SAP LUW. The work process that is processing the current dialog step starts an update work process.
    Based on the information passed to it from the dialog work process, the update work process reads the log entries belonging to the SAP LUW from table VBLOG.
    The update work process passes this data to the database for updating, and analyzes the return message from the database. If the update was successful, the update work process triggers a database commit after the last database change and deletes the log entries from table VBLOG.
    If an error occurred, the update work process triggers a database rollback, leaves the log entries in table VBLOG, flags them as containing errors, and sends a SAPoffice message to the user, who should then inform the system administrator.
    The corresponding entries in the lock table are reset by the update work process.
    Hope this is helpful, Do reward.

  • Call function module in backgrouns task and in update task

    Hi Gurus,Pls crear me on the " <b>Call function module in backgrouns task and in update task</b>".
    how it works and waht is the link with LUW  releated to these .
    also heard that commit work statement aslo linked with this.
    Pls clarfiy me with expalnation of code.

    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

  • Error BT616 when calling function module SXPG_COMMAND_EXECUTE in background

    Hi All,
    We use function module SXPG_COMMAND_EXECUTE with a custom command we defined in SM69 to move files in unix (mv command).
    The function module call has worked fine for almost a year and recently we have been seeing an error (BT616) in our job lob (SM37) when the program is run in background. We have not been able to reproduce the error in foreground mode and it seems to be occuring only periodically in the background. (The appropriate SAP authorization objects where assigned to the batch job ID and the steps on the batch job.) We are in the process of setting up the trace flag and performing analysis on the trace log via ST11 to help identify the issue.
    After perform analysis on SXPG_COMMAND_EXECUTE, the error is occurring when calling function module SAPXPG_END_XPG for exception 2, system failure, yet function module SAPXPG_END_XPG does not exist. I assume this is a program at the operating system level and is just a signature of the parameters to be passed to the operating system program.
    Below is part of the SAP function module SXPG_COMMAND_EXECUTE that is failing.
    * Now we have to wait for the termination of the external
    * command if the caller wants us to.
        IF TERMINATIONWAIT = 'X'.
          CALL FUNCTION 'SAPXPG_END_XPG'
            DESTINATION DESTINATION
            IMPORTING   EXITSTAT = STATUS
                        EXITCODE = EXITCODE
            TABLES      LOG      = LOG
            EXCEPTIONS  COMMUNICATION_FAILURE = 1 MESSAGE MSG
                        SYSTEM_FAILURE        = 2 MESSAGE MSG.
    I performed a where used on function module SXPG_COMMAND_EXECUTE, and most of SAP programs call the function module with the parameter TERMINATIONWAIT = 'X', so I assume we should pass ‘X’ as well.
    Any ideas on what could be causing this issue?
    Mike Vondran

    I also remember I have this kind of issue, as I have some UNIX script at OS( UNIX) level . The problem was with the ID , as it don’t have proper authorization at OS level ( UNIX ) . Please check this ID authorization. This could be the one of reasons if you’re sure from SAP standpoint.
    Hope this’ll give you some guide line..
    Thanks
    Bye

  • Type error while calling function module with in FOX formula

    Hi,
    I am getting following error while calling function module from FOX Formula:
    "Types of parameter DAY_IN () and variable J_CALDAY(D) are inconsistent"
    Following is the code:
    DATA    I_CALDAY       TYPE  0CALDAY.
    DATA    N_CALDAY       TYPE  0CALDAY.
    DATA    KYF              TYPE KEYFIGURE_NAME.
    FOREACH   I_CALDAY, KYF.
       CALL FUNCTION SLS_MISC_GET_LAST_DAY_OF_MONTH
          EXPORTING
             DAY_IN  =  I_CALDAY
          IMPORTING
             LAST_DAY_OF_MONTH = N_CALDAY.
        {KYF, N_CALDAY}  =  {KYF, L_CALDAY}.
    ENDFOR.
    Import parameter DAY_IN is of type sy-datum (that inturn is data element SYDATUM of data type DATS - same as 0CALDAY). Not sure why error is being thrown. Any idea? Thanks.
    Edited by: SAP_BOY on Dec 4, 2009 5:26 PM

    Hi,
    I think It will not identify ,though you have  (data element SYDATUM of data type DATS - same as 0CALDAY).Check it out by assigning it through a variable of type D.
    Data I_CALDAY TYPE D.
    Hope it may work out.
    Regards,
    Indu

Maybe you are looking for

  • HP Officejet Pro 8600 N911g always cannot print and scan after turn on the Mac from sleep

    Dear Community: This is my printer:  1. Product Name and Number Product Name HP Officejet Pro 8600 N911g Product Model Number CM750A Product Serial Number {Private Information Removed} Service ID 23022 Firmware Version CLP1CN1150CR Total Page Count 4

  • I want to arrange local folders. The default is in alphebetical order.

    I want to arrange local folders. The default is in alphebetical order. How do I do that?

  • UWL Mail Content Format Error

    Hi Frnds,      The UWL Mail Content is displayed in single line without line break. Is there any solution for it? I have used even html tag <br /> for line break, but it appears for some only. Kindly provide with the solution. Thanks Suganya

  • Inserrer un lien dans une animation

    Bonsoir à tous, J'ai créé une bannière animée avec Flash CS3 mais je ne sais pas comment faire pour inserrer un lien dans l'animation... En faite je voudrais que l'on puisse être redirrigé sur mon site web lorsque l'on clique sur l'animation... Est-c

  • Deployment Optimization

    Hi experts, We are trying to obtain a solution from deployment optimizer such that whenever a specific transportation lane is utilized (i.e. deployment stock transfer is observed on that specific transportation lane), a fixed transportation cost base