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

Similar Messages

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

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

  • 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

  • HOW TO CALL FUNCTION MODULE FROM ABAP4 EDITOR

    HI !
    friends
    I want to call function module from abap 4 editor.
    is there any shortcut key from edit menu through which if give a function module name then  it calls the function automatically?
    points will be awarded.
    Cheers
    troy

    command will be like this
    <b> call function 'YW2_GET_MNW_PERIOD'
            exporting
              w_budat       = v_datum
            importing
              w_period      = i_date-period
              w_period_desc = i_date-p_desc.</b>
    Regards
    prabhu

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

  • How to call function module from IP

    Hi
    I need to trigger the process chain from the input ready queries in Bex analyzer. I figured out that I need to call RSPC_API_CHAIN_START.
    How do we go about in calling the above function module in IP.
    Thanks in advance
    I

    Hi Matt
    Thanks for your response, it was very productive at the right time as we saw our process chain running indefinetly. With selecting all chars to be changed, it ran just once with no errors.
    what is TA ? I know rsplan- transaction code for the planning modeler.
    Can you tell me how can we call function module in custom exit planning function.
    Where should I embed the code
    CALL FUNCTION 'RSPC_API_CHAIN_START'
                   EXPORTING
                     I_CHAIN             = 'ZPC_CCATOPCA'.
                   I_T_VARIABLES       =
                   I_SYNCHRONOUS       =
                   I_SIMULATE          =
                   I_NOPLAN            =
                 IMPORTING
                   E_LOGID             =
                 EXCEPTIONS
                   FAILED              = 1
                   OTHERS              = 2
    thanks in advance

  • Can we call Function Module from Process Chain?

    Hello experts,
    I have a small question.
    Can we call Function Module(SE37) from Process Chain?
    If yes can you please provide some example link?
    I m new to BI world.
    regards

    Hi,
    Create one ABAP program and call the function module from that program. Check the link to know how to call a function module from an ABAP program.
    http://help.sap.com/saphelp_wp/helpdata/en/d1/801edb454211d189710000e8322d00/content.htm
    http://help.sap.com/saphelp_wp/helpdata/en/9f/db98ef35c111d1829f0000e829fbfe/content.htm
    Then use process type "ABAP Program" in your process chain and add the program you have created. So then this program will be executed via process chain and this program will call the function module.
    Indrashis

  • Call function module from ITS template

    Hi all,
    Does anybody know if it is possible to call an ABAP function module (or embed any ABAP command) in an ITS template (HTML B)? If so, can someone post some sample codes?
    Thanks!
    Jay

    hi,
    it is not possible to run ABAP code from a ITS template.
    Best regards,
    Klaus

  • Call function module from BSP0 (Parameter group)

    Hello All,
    I am trying to call a FM by changing the parameter group of a planning profile (BSP0) as shown:
             CALL FUNCTION Z_BW_CLEAR_VAR.
    The name of the function module is already entered in table RSPLF_FDIR.
    In the above FM there is DB deletion statement, which is not getting process.
    When I kept break point at FM Z_BW_CLEAR_VAR and executed the planning function - it did not trigger the FM.
    Please let me know how to call the FM.
    Thanks & Regards,
    Pratik

    hi Alberto,
    have a look at quesiton 5 in sap note 730870
    it explains what you need to restart
    from this note:
    restart from visual admin:
    " the RfcAdapter J2EE Service 'SAP XI Adapter: RFC' is restarted or a dependend J2EE Service is restarted ('SAP XI AF CPA Cache', 'SAP XI AF Messaging')."
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • How to delare function module in BSP page

    hi
    i m using FM in bsp psge
    CALL FUNCTION 'TB_DOMAINVALUES_GET'
                                EXPORTING
                                  DOMAIN        =
    *                             LANGU         = SY-LANGU
                                TABLES
                                  T_DD07V       = gtab
    which is giving error massage
    Fields "Tables" is unknown .It is nither one of the specific tables nor defined by "Data" Statement .
    how to solve it
    thanks

    Hi Prashant,
    FMs are used in BSP as we do in ABAP.
    In your code thers no value for exporting parameter DOMAIN , probably that is the reason of this error.
    Search the forum before posting a question.
    Appreciate all helpful asnwers.
    Regards,
    Anubhav

  • How to Call Function Module from XI Mapping

    Hi All,
    I would like to call a function module that resides in ECC through XI mapping.
    Can any one please through some light on how to proceed ?
    Regards

    Hello Shabarish,
    Thanks for the reply, Actually i would like to do date validation using ISHMED_CHECK_DATE_TIME   FM inside Mapping.
    I would like to do this way, please let me know how good is this
    1) Expose the FM as a RFC enabled one
    2) Use the following UDF code inside Mapping
    3) do i need to import the RFC enabled FM into our XI??
    4) Do i required to create any Communication channel for this?
    function RFC_LOOKUP_API
    Imports java.io.;com.sap.aii.mapping.lookup.;
    String content = "";
    MappingTrace importanttrace;
    importanttrace = container.getTrace();
    // filling the string with our RFC-XML (with values)
    String m = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:Z_UDF_CREATE_ZTOR_REC xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\">";
    m = m + "<I_MESSAGEID>" + MsgID + "</I_MESSAGEID>";
    m = m + "<I_EBELN>" + PONum + "</I_EBELN>";
    m = m + "<I_ERDAT>" + MsgDate + "</I_ERDAT>";
    m = m + "<I_UZEIT>" + MsgTime + "</I_UZEIT>";
    m = m + "</ns0:Z_UDF_CREATE_ZTOR_REC>";
    RfcAccessor accessor = null;
    ByteArrayOutputStream out = null;
    try
    // 1. Determine a channel (Business system, Communication channel)
    Channel channel = LookupService.getChannel("XI","GeneratedReceiverChannel_RFC");
    // 2. Get a RFC accessor for a channel.
    accessor = LookupService.getRfcAccessor(channel);
    // 3. Create a xml input stream representing the function module request message.
    InputStream inputStream = new ByteArrayInputStream(m.getBytes());
    // 4. Create xml payload
    XmlPayload payload = LookupService.getXmlPayload(inputStream);
    // 5. Execute Record Create.
    Payload result = accessor.call(payload);
    InputStream in = result.getContent();
    out = new ByteArrayOutputStream(1024);
    byte[] buffer = new byte[1024];
    for (int read = in.read(buffer); read > 0; read = in.read(buffer)) {
    out.write(buffer, 0, read);
    content = out.toString();
    catch(LookupException e)
    importanttrace.addWarning("Error while writing " + e.getMessage() );
    catch(IOException e)
    importanttrace.addWarning("Error " + e.getMessage() );
    finally
    if (out!=null) {
    try {
    out.close();
    } catch (IOException e) {
    importanttrace.addWarning("Error while closing stream " + e.getMessage() );
    // 7. close the accessor in order to free resources.
    if (accessor!=null) {
    try {
    accessor.close();
    } catch (LookupException e) {
    importanttrace.addWarning("Error while closing accessor " + e.getMessage() );
    //returning the result u2013 RFC-XML.response
    return content;
    Thanks & Regards
    Vamsi

  • Calling function module from solman

    Hi Experts,
                    I created one function module in solution manager with remote enabled type,  how to call that rfc into development sysytem.
    Regards,
    Thiru. R

    hi,
    may be this link
    Re: TMS Error In Change Request Management
    can prove useful to u ... in solving ur issue
    regards,
    prashanti

Maybe you are looking for

  • Sort field in ALV report

    Hi Expert, IN  ALV report using RESUE_ALV_GRID_DISPLAY . I want to sort the second field of ALV output . In this function module  RESUE_ALV_GRID_DISPLAY  using event PF_STATUS . so can u tell me how sort the second field . Regards Bhabani

  • Why is my ipod touch 5 not working with itunes? It says it needs to update to itunes 10.7 or later.

    My new ipod touch 5 is working perfectly, almost. When I plugged it in to my laptop for Itunes, the laptop said the ipod needs to update to itunes 10.7 or later. The problem is it won't let me update it. Can somebody help me?

  • Tile List Selection indicator

    I have a tile list layout with some thumbnails. When one is selected it gets a default blueish background. Could someone explain how i would go about putting a nice green tick over a thumbnail once its selected?

  • High I/O  waits

    Any thoughts about why, when Streams capture processes are started up, the disk activity pegs i/o waits constantly high. It is pretty much slow down the whole database server. This is the state of CPU when we have streams instance up and without any

  • IPod video choppiness

    I use my iPod to watch my two shows, Lost and Heroes, on my TV. I have noticed recently that the output tends to get choppy for a good amount of time. The video and sound work, just that the video gets choppy. It doesn't matter if the unit is running