Passing file path in function module XXL_FULL_API

Hi All,
I am using function module XXL_FULL_API instead of GUI_DOWNLOAD becuse  I need to download data with field names as heading. my question is how to pass complete file path (presentation server  path)in the function module XXL_FULL_API .
Thanks in advance.
vijaya.

Hi Vijaya lakshmi,
Please check this link
excel download: XXL_FULL_API
REPORT ZXXL_FULL_API  .
TABLES:
sflight.
*header data................................
DATA :
header1 LIKE gxxlt_p-text VALUE 'Suresh',
header2 LIKE gxxlt_p-text VALUE 'Excel sheet'.
*Internal table for holding the SFLIGHT data
DATA BEGIN OF t_sflight OCCURS 0.
INCLUDE STRUCTURE sflight.
DATA END OF t_sflight.
*Internal table for holding the horizontal key.
DATA BEGIN OF t_hkey OCCURS 0.
INCLUDE STRUCTURE gxxlt_h.
DATA END OF t_hkey .
*Internal table for holding the vertical key.
DATA BEGIN OF t_vkey OCCURS 0.
INCLUDE STRUCTURE gxxlt_v.
DATA END OF t_vkey .
*Internal table for holding the online text....
DATA BEGIN OF t_online OCCURS 0.
INCLUDE STRUCTURE gxxlt_o.
DATA END OF t_online.
*Internal table to hold print text.............
DATA BEGIN OF t_print OCCURS 0.
INCLUDE STRUCTURE gxxlt_p.
DATA END OF t_print.
*Internal table to hold SEMA data..............
DATA BEGIN OF t_sema OCCURS 0.
INCLUDE STRUCTURE gxxlt_s.
DATA END OF t_sema.
*Retreiving data from sflight.
SELECT * FROM sflight
INTO TABLE t_sflight.
*Text which will be displayed online is declared here....
t_online-line_no = '1'.
t_online-info_name = 'Created by'.
t_online-info_value = 'RAAM'.
APPEND t_online.
*Text which will be printed out..........................
t_print-hf = 'H'.
t_print-lcr = 'L'.
t_print-line_no = '1'.
t_print-text = 'This is the header'.
APPEND t_print.
t_print-hf = 'F'.
t_print-lcr = 'C'.
t_print-line_no = '1'.
t_print-text = 'This is the footer'.
APPEND t_print.
*Defining the vertical key columns.......
t_vkey-col_no = '1'.
t_vkey-col_name = 'MANDT'.
APPEND t_vkey.
t_vkey-col_no = '2'.
t_vkey-col_name = 'CARRID'.
APPEND t_vkey.
t_vkey-col_no = '3'.
t_vkey-col_name = 'CONNID'.
APPEND t_vkey.
t_vkey-col_no = '4'.
t_vkey-col_name = 'FLDATE'.
APPEND t_vkey.
*Header text for the data columns................
t_hkey-row_no = '1'.
t_hkey-col_no = 1.
t_hkey-col_name = 'PRICE'.
APPEND t_hkey.
t_hkey-col_no = 2.
t_hkey-col_name = 'CURRENCY'.
APPEND t_hkey.
t_hkey-col_no = 3.
t_hkey-col_name = 'PLANETYPE'.
APPEND t_hkey.
t_hkey-col_no = 4.
t_hkey-col_name = 'SEATSMAX'.
APPEND t_hkey.
t_hkey-col_no = 5.
t_hkey-col_name = 'SEATSOCC'.
APPEND t_hkey.
t_hkey-col_no = 6.
t_hkey-col_name = 'PAYMENTSUM'.
APPEND t_hkey.
*populating the SEMA data..........................
t_sema-col_no = 1.
t_sema-col_typ = 'STR'.
t_sema-col_ops = 'DFT'.
APPEND t_sema.
t_sema-col_no = 2.
APPEND t_sema.
t_sema-col_no = 3.
APPEND t_sema.
t_sema-col_no = 4.
APPEND t_sema.
t_sema-col_no = 5.
APPEND t_sema.
t_sema-col_no = 6.
APPEND t_sema.
t_sema-col_no = 7.
APPEND t_sema.
t_sema-col_no = 8.
APPEND t_sema.
t_sema-col_no = 9.
APPEND t_sema.
t_sema-col_no = 10.
t_sema-col_typ = 'NUM'.
t_sema-col_ops = 'ADD'.
APPEND t_sema.
CALL FUNCTION 'XXL_FULL_API'
EXPORTING
*DATA_ENDING_AT = 54
*DATA_STARTING_AT = 5
filename ='TEST'
header_1 = header1
header_2 = header2
no_dialog = ''
*no_start = ' '
n_att_cols = 6
n_hrz_keys = 1
n_vrt_keys = 4
sema_type = 'X'
SO_TITLE = 'TEST'
TABLES
data = t_sflight
hkey = t_hkey
online_text = t_online
print_text = t_print
sema = t_sema
vkey = t_vkey
EXCEPTIONS
cancelled_by_user = 1
data_too_big = 2
dim_mismatch_data = 3
dim_mismatch_sema = 4
dim_mismatch_vkey = 5
error_in_hkey = 6
error_in_sema = 7
file_open_error = 8
file_write_error = 9
inv_data_range = 10
inv_winsys = 11
inv_xxl = 12
OTHERS = 13
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Best regards,
raam

Similar Messages

  • Query in passing value to a function module

    Hi All ,
    I have a small query in the below code about the way i have passed value into a function module :
    CALL FUNCTION 'AUTHORITY_CHECK'
      EXPORTING
      USER                      = SY-UNAME
        OBJECT                    = 'E_INVOICE'
        FIELD1                    = 'BEGRU'
      VALUE1                    = ' '
       FIELD2                    = 'BUKRS'
       VALUE2                    = '$BUKRS'
       FIELD3                    = 'ISU_ACTIVT'
       VALUE3                    = '1,2,5,6'
       FIELD4                    = 'VKTYP_KK'
      VALUE4                    = ' '
    EXCEPTIONS
       USER_DONT_EXIST           = 1
       USER_IS_AUTHORIZED        = 2
       USER_NOT_AUTHORIZED       = 3
       USER_IS_LOCKED            = 4
       OTHERS                    = 5
    IF SY-SUBRC <> 0.
    MESSAGE 'User doesnt have sufficient authorizations' TYPE 'E'.
    EXIT.
    The query is on the field  VALUE3                    = '1,2,5,6' , is the format correct. If this is not right could someone please suggest the correct approach.
    thanks

    Hi Balaji,
    as that is parameter you can use at a time only one value..
    if you check in that FM we have other parameters VALUE1 to VALUE10..
    why don't you use those...
    Thanks!

  • Downloading file passing File Path in the FM as well as Retain Values in XL

    Hi Experts,
    I am writing a report where it is required that I have an option for the user, in selection  srceen, to have an F4 help to choose the file path they want. The same should be further used to automatically download the internal table into an excel file.
    I was initially using GUI_DOWNLOAD which seemed to work fine except that certain values were not being retained in the download file,  For example , the leading zero in "02" and the value "2-6-21" gets updated in date format automatically as 02-06-2011.
    To avoid the above I tried using the FM  XXL_FULL_API which retains this value but it does not seem to have an option where I can pass the file path to download on the presentation . Instead we need to manually save the excel file when it is generated.
    Could you help me with how to proceed with this, in a way where I can pass the file path as well as retain the values in excel?
    <removed by moderator>. Any help is welcome
    Thanks in advance.
    Regards,
    Trishna
    Edited by: Thomas Zloch on Nov 22, 2011 5:24 PM

    Hi,
    The easiest way to make excel retain the values and not apply any formatting on cells is to add a quote in front of those fields...
    e.g. '02 and '2-6-21. Then you can use the gui_download method...
    Those values will then be considered as text by excel and you won't be bother with auto-formatting issue...
    There are of course other ways of doing it...(via OLE e.g)
    Kr,
    Manu.

  • Pass Existing Paths to Function

    I am new to Powershell (and scripting in general).  I have a function which works to enable auditing on a path.  I want to be able to run it on remote machines for all users which exist on the machine.  The path I'm working on auditing is
    %localappdata%.
    In trying to enumerate the user accounts, and then pass each path to the function, I have written this:
    $path = dir c:\users\ | where {$_.name -ne "Public"} | % {"c:\users\" + $_.name + "\appdata\local"}
    addaudittofile
    I'm running into a number of problems with this approach, so my question is:  What is a better way to approach this in order to enumerate and pass the user's local appdata path to the function?
    I did not write the function, I only altered it slightly from this guy (http://giuoco.org/security/configure-file-and-registry-auditing-with-powershell/).  All I did was remove the mandatory parameter sting.

    Try this to get the user path for all current profiles.
    $computerName = "."
    $wmi=[wmiclass]"\\$($computerName)\root\default:stdRegProv"
    foreach($guid in $wmi.EnumKey(2147483650,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileGuid").sNames)
    $sid = $wmi.GetStringValue(2147483650,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileGuid\$($guid)","SidString").sValue
    $wmi.GetStringValue(2147483650, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$($sid)","ProfileImagePath").sValue
    This snippet will not include the built in accounts (system, admin, .DEFAULT), only user profiles. The only issue will be this that any new profiles that get created won't get set for auditing. You could use a WMI event trigger to enable auditing on the user
    appdata path whenever a new profile is created.
    EDIT: Here are the identifiers for the different registry classes:
    <#
    HKEY_CLASSES_ROOT (2147483648 (0x80000000))
    HKEY_CURRENT_USER (2147483649 (0x80000001))
    HKEY_LOCAL_MACHINE (2147483650 (0x80000002))
    HKEY_USERS (2147483651 (0x80000003))
    HKEY_CURRENT_CONFIG (2147483653 (0x80000005))
    HKEY_DYN_DATA (2147483654 (0x80000006))
    #>

  • How to give the application server file path in the module pool programming

    Hi,
         Could somebody help me how to provide the application server file path in module pool programming once the logo is uploaded to sap system.
      For eg I have imported a logo name ‘owens’ into sap system by using transaction ‘se78’; now I need to call the path in the below url,
    if container2 is initial.
    CREATE OBJECT CONTAINER2
      EXPORTING
        CONTAINER_NAME              = 'PICTURE_CONTAINER2'.
    CREATE OBJECT PICTURE2
      EXPORTING
        PARENT = CONTAINER2.
    CALL METHOD PICTURE2->SET_DISPLAY_MODE
      EXPORTING
        DISPLAY_MODE = CL_GUI_PICTURE=>display_mode_fit_center
      EXCEPTIONS
        ERROR        = 1.
    CALL METHOD PICTURE2->LOAD_PICTURE_FROM_URL
      EXPORTING
        URL    = " ? "
      EXCEPTIONS
        ERROR  = 1
        Others = 2.
    endif.
    Thanks in advance
    Deepu

    hi Deepu,
    Use FM '/SAPDMC/LSM_F4_FRONTEND_FILE' for fetching the data from the application server path/presentation server path
    Regards,
    Santosh

  • Pass Values between two Function Modules RFC in Portal

    I need to pass values ​​between 2 FM RFC.
    I have an implicit enhancement in HRMSS_RFC_EP_READ_GENERALDATA RFC function module.
    PERNR LIKE  PSKEY-PERNR
    ENHANCEMENT 1  Z_ESS_EXPORT_PERNR.    "active version
      EXPORT pernr to memory id 'PMK'.
      set parameter id 'PMK' field pernr.
    ENDENHANCEMENT.
    On the other hand an RFC function module that has the code:
            pmk    LIKE PSKEY-PERNR,
            pmk_2  LIKE PSKEY-PERNR.
      get parameter id 'PMK' field pmk.
      IMPORT pmk_2 FROM MEMORY ID 'PMK'.
    When the execution is done in development environment, the modules function at the level of R3, the "get parameter id" works only if the debbuger is classic, otherwise not work. The Import to memory id never works.
    In the environment of quality, r3 do not work any of the 2 sentences. If run from portal (which is as it should be) does not work.
    Thanks if anyone can help me get the problem. Both function modules are executed at the portal.
    Regards
    Edited by: Daynet1840 on Feb 15, 2012 2:02 AM

    When the execution is directly in r3, in development environment or quality, does the set / get parameter id. Export / Import memory id not work.
    But if the FM are called from the portal, does not the set / get parameter id.
    I tried changing the sentence as I indicated harishkumar.dy still not working.
    Madhu: They're in different function groups, one is standard and the other not.
    Regards
    Edited by: Daynet1840 on Feb 15, 2012 3:08 PM
    Edited by: Daynet1840 on Feb 15, 2012 3:11 PM

  • Pass File Path into Message Box

    Hello,
    I’m building an application that is being used to create a report for whatever date range the user chooses. After the data is exported into Excel I have a message box pop up telling the user where the file has been saved to. However, as it is now, I have
    the file path hard coded. What I want to do is have the file path chosen by the user passed into the message box and display a message with the selected path. Any help with this will be greatly appreciated.
    Dave
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Data.SqlClient;
    using ClosedXML.Excel;
    using DocumentFormat.OpenXml;
    using System.IO;
    namespace LoanOrig_FDIC_Codes
    public partial class Form1 : Form
    SqlCommand sqlCmd;
    SqlDataAdapter sqlDA;
    DataSet sqlDS;
    DataTable sqlDT;
    SqlCommand sqlCmdCnt;
    public Form1()
    InitializeComponent();
    //BEGIN BUTTON LOAD CLICK EVENT
    private void btnLoad_Click(object sender, EventArgs e)
    string sqlCon = "Data Source=FS-03246; Initial Catalog=ExtractGenerator; User ID=myID; Password=myPW";
    //Set the 2 dateTimePickers to today's date
    DateTime @endDate = End_dateTimePicker.Value.Date;
    DateTime @startDate = Start_dateTimePicker.Value.Date;
    //Validate the values of the 2 dateTimePickers
    if (endDate < startDate)
    MessageBox.Show("End Date must be greater than or equal to the Start Date OR Start Date must be less than or equal to the End Date ", "Incorrect Date Selection",MessageBoxButtons.OK,MessageBoxIcon.Error);
    //Reset both dateTimePickers to todays date
    Start_dateTimePicker.Value = DateTime.Today;
    End_dateTimePicker.Value = DateTime.Today;
    return;
    //End of date validation
    string sqlData = @"SELECT AcctNbr,
    CurrAcctStatCD,
    Org,
    MJAcctTypCD,
    MIAcctTypCD,
    NoteOriginalBalance,
    ContractDate,
    FDICCATCD,
    FDICCATDESC,
    PropType,
    PropTypeDesc
    FROM I_Loans
    WHERE CAST(ContractDate AS datetime) BETWEEN @startdate AND @enddate ORDER BY ContractDate";
    SqlConnection connection = new SqlConnection(sqlCon);
    SqlCommand sqlCmd = new SqlCommand(sqlData, connection);
    sqlCmd.Parameters.AddWithValue("@startDate", startDate);
    sqlCmd.Parameters.AddWithValue("@endDate", endDate);
    sqlDS = new DataSet();
    sqlDA = new SqlDataAdapter(sqlCmd); //SqlAdapter acts as a bridge between the DataSet and SQL Server for retrieving the data
    connection.Open();
    sqlDA.SelectCommand = sqlCmd; //SqlAdapter uses the SelectCommand property to get the SQL statement used to retrieve the records from the table
    sqlDA.Fill(sqlDS, "I_Loans"); //SqlAdapter uses the "Fill" method so that the DataSet will match the data in the SQL table
    sqlDT = sqlDS.Tables["I_Loans"];
    //Code section to get record count
    sqlCmdCnt = connection.CreateCommand();
    sqlCmdCnt.CommandText = "SELECT COUNT(AcctNbr) AS myCnt FROM I_Loans WHERE ContractDate BETWEEN @startDate AND @endDate";
    sqlCmdCnt.Parameters.AddWithValue("@startDate", startDate);
    sqlCmdCnt.Parameters.AddWithValue("@endDate", endDate);
    int recCnt = (int)sqlCmdCnt.ExecuteScalar();
    txtRecCnt.Text = recCnt.ToString();
    btnExport.Enabled = true;
    //End of code section for record count
    connection.Close();
    dataGridView1.DataSource = sqlDS.Tables["I_Loans"];
    dataGridView1.ReadOnly = true;
    //Reset both dateTimePickers to todays date
    Start_dateTimePicker.Value = DateTime.Today;
    End_dateTimePicker.Value = DateTime.Today;
    //END BUTTON LOAD CLICK EVENT
    //BEGIN BUTTON EXPORT CLICK EVENT
    private void btnExport_Click(object sender, EventArgs e)
    { //ClosedXML code to export datagrid result set to Excel
    string dirInfo = Path.GetPathRoot(@"\\FS-03250\users\dyoung\LoanOrig_FDIC_Codes");
    if (Directory.Exists(dirInfo))
    var wb = new XLWorkbook();
    var ws = wb.Worksheets.Add(sqlDT);
    ws.Tables.First().ShowAutoFilter = false;
    SaveFileDialog saveFD = new SaveFileDialog();
    saveFD.Title = "Save As";
    saveFD.Filter = "Excel File (*.xlsx)| *.xlsx";
    saveFD.FileName = "LoanOrig_FDIC_Codes_" + DateTime.Now.ToString("yyyy-MM-dd");
    if (saveFD.ShowDialog() == System.Windows.Forms.DialogResult.OK)
    Stream stream = saveFD.OpenFile();
    wb.SaveAs(stream);
    stream.Close();
    //End of ClosedXML code
    MessageBox.Show("File has been exported to U:\\LoanOrig_FDIC_Codes", "File Exported", MessageBoxButtons.OK, MessageBoxIcon.Information);
    else
    MessageBox.Show("Drive " + "U:\\Visual Studio Projects\\LoanOrig_FDIC_Codes" + " " + "not found, not accessible, or you may have invalid permissions");
    return;
    //END BUTTON EXPORT CLICK EVENT
    private void Form1_Load(object sender, EventArgs e)
    //Set dates to be today's date when the form is openend
    Start_dateTimePicker.Value = DateTime.Today;
    End_dateTimePicker.Value = DateTime.Today;
    private void Form1_Load_1(object sender, EventArgs e)
    // TODO: This line of code loads data into the 'dataSet1.I_Loans' table. You can move, or remove it, as needed.
    this.i_LoansTableAdapter.Fill(this.dataSet1.I_Loans);
    private void iLoansBindingSource_CurrentChanged(object sender, EventArgs e)
    private void btnExit_Click(object sender, EventArgs e)
    this.Close();
    //END THE SAVE AS PROCESS
    David Young

    Assuming I have located the part of your code you are talking about, I think you just need to replace the hard code path in the message with the path from the SaveFileDialog. You should only display the message if the use clicked OK.
    if (saveFD.ShowDialog() == System.Windows.Forms.DialogResult.OK)
    Stream stream = saveFD.OpenFile();
    wb.SaveAs(stream);
    stream.Close();
    MessageBox.Show("File has been exported to " + saveFD.FileName, "File Exported", MessageBoxButtons.OK, MessageBoxIcon.Information);

  • Passing File Path of an XFDF to a PDF

    I am attempting to pass the path to a file, an xfdf, to a PDF form and have the form fields filled in.
    I have this working with a page level script on page open -
    this.importAnXFDF("myFile.xfdf");
    How can I pass the "myfile.xfdf" to the PDF as a parameter? And then read that parameter with Acrobat javascript? Making my script look like -
    this.importAnXFDF(myFileVariable);
    I am guessing the link to the PDF would look like -
    myPDF.pdf#xfdf=myFile.xfdf
    So the whole package would be something like -
    myPDF.pdf#xfdfFile=myFile.xfdf
    Then -
    this.importAnXFDF(xfdfFile);
    Right?????
    Any help is appreciated.
    Thanks in advance.

    To pdobratz -
    The error is in the sequence editor when trying to initiate the drag of the object. I am not sure why it occurs, but the Sequence Editor is just reporting an exception that occurred when calling an API method in the TestStand engine. TestStand should still run fine.
    I tried the senario with TestStand 3.1 and the error did not occur. Starting with TestStand 3.0, most of the watch pane code was rewritten.
    Scott Richardson (NI)
    Scott Richardson
    National Instruments

  • Passing dynamic table to function module

    Hi all,
    actully i have to pass dynamic internal table from function module.
    for that i use syntax
    move <dyn_table> to data_tab.
    but now my question is that in fm parameters what is the  type spec & associated type for data_tab in fm parameters.
    regards,
    anuj

    Hi
    Good
    Here is a simple example of passing an internal table "itab" to a function module "REUSE_ALV_LIST_DISPALY".
    It displays the internal table data into a list format.
    data : itab like ztest213 occurs 0 with header line.
    tables : ztest213 .
    select * from ztest213 into table itab.
    loop at itab.
    call function 'REUSE_ALV_LIST_DISPLAY'
    exporting
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = ' '
    I_CALLBACK_PF_STATUS_SET = ' '
    I_CALLBACK_USER_COMMAND = ' '
    i_structure_name = 'ztest213'
    IS_LAYOUT =
    IT_FIELDCAT =
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = ' '
    IS_VARIANT =
    IT_EVENTS =
    IT_EVENT_EXIT =
    IS_PRINT =
    IS_REPREP_ID =
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    IR_SALV_LIST_ADAPTER =
    IT_EXCEPT_QINFO =
    I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    tables
    t_outtab = itab
    exceptions
    program_error = 1
    others = 2
    if sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    endloop.
    Thanks
    mrutyun^

  • Passing Select-option to Function Module

    Hi ,
         I want to pass a select-option directly to the function Module tables parameter . Can anyone highlight on how i can declare the table in Function module side .
    Thanks & Regards,
    Raj

    Hi.
    In the TABLES tab of the specific FM ,
    give the parameter name ( which u have defined as Select options ). Since select options is like an Internal Table with values sign,option,low and high , u can give it here.
    Also give the ref. type and type specification.
    Pl try this.
    Thanks,
    Maheshwari.V

  • Significance of pass value checkbox in function module

    Hi all,
    Here is a confusion.....While creating a custom function module,i have checked the update module or RFC call radio button going to its attributes.But in the importing parameter if i pass a structure,it is giving a syntax error.It is only allowing table parameter.But if i check the pass value checkbox,it is not givng any syntax error if i pass any structure in the importing parameter.Can anybody please explain me the significance of pass value checkbox?
    Thanks in advance.......

    Hi,
    Function modules are cross-program, reusable procedures that are organized into function groups, and whose functions are implemented between the statements FUNCTION and ENDFUNCTION. Function modules and their interfaces are created in the Function Builder.
    Function Module Interfaces
    The parameter interface of a function module is defined in the Function Builder. It includes the definition of interface parameters and the specification of exceptions that can be triggered by a function module. The Function Builder automatically generates comment lines below the FUNCTION statement in the source code of the function module, which represent the interface of the function module with the following syntax:
    Syntax
    ... [IMPORTING parameters]
    [EXPORTING parameters]
    [CHANGING parameters]
    [TABLES table_parameters]
    [{RAISING|EXCEPTIONS} exc1 exc2 ...]
    The syntax and semantics of IMPORTING, EXPORTING, CHANGING, RAISING, and EXCEPTIONS mainly correspond to the definition of method interfaces with [CLASS-]METHODS. The additional option of defining table parameters using TABLES is obsolete.
    Interface parameters
    The interface parameters are defined on the relevant tab pages in the Function Builder.
    IMPORTING parameters are input parameters. When the function module is called, a suitable actual parameter must be specified for every non-optional input parameter. The content of the actual parameter is passed to the input parameter when the call is made. The content of an input parameter for which 'pass by reference' is defined cannot be changed in the function module.
    EXPORTING parameters are output parameters. When the function module is called, a suitable actual parameter can be specified for every output parameter. The content of an output parameter that is defined for <b>'pass by value'</b> is transferred to the actual parameter if the function module is completed without errors. An output parameter that is defined for pass by reference is not initialized when the function module is called.
    CHANGING parameters are input and output parameters. When the function module is called, a suitable actual parameter must be specified for every non-optional input or output parameter. When the function module is called, the content of the actual parameter is passed to the input/output parameter, and when the function module is completed, the content of the input/output parameter is passed to the actual parameter.
    TABLES parameters are table parameters. Table parameters are obsolete CHANGING parameters that are typed as standard tables with a header line. If an internal table without a header line or a table body is passed as an actual parameter to a formal parameter of this type, an empty local header line is generated in the function module. If an internal table with a header line is used as an actual parameter, both the table body and the header line are passed to the function module. Pass by value is not possible in formal parameters defined using TABLES. Formal parameters defined with TABLES can be replaced by formal parameters defined with CHANGING. A local work area can be created for the internal table in the function module by using the addition LIKE LINE OF itab of the DATA statement.
    Exceptions
    The exception of a function module are defined on the Exceptions tab page in the Function Builder. Here you can select exception classes to define whether class-based exceptions are declared or non-class-based exception are defined. Class-based exceptions are represented in the above syntax by RAISING, and non-class-based exceptions are represented by EXCEPTIONS.
    The addition RAISING is used to declare class-based exceptions that can be propagated from the function module to the caller. Exceptions in the categories CX_STATIC_CHECK and CX_DYNAMIC_CHECK must be explicitly declared, otherwise a propagation can lead to an interface violation. A violation of the interface leads to the treatable exception CX_SY_NO_HANDLER. Exceptions of the category CX_NO_CHECK are implicitly always declared. The declaration of exceptions of the category CX_STATIC_CHECK is statically checked in the syntax check. For exceptions of the category CX_DYNAMIC_CHECK, the check is not performed until runtime. In a function module in which class-based exceptions are declared with the RAISING addition, the statement CATCH SYSTEM-EXCEPTIONS cannot be used. Instead, the relevant treatable exceptions should be handled in a TRY control structure.
    The addition EXCEPTIONS is used to define a list of non-class-based exceptions that can be triggered in the function module using the statements RAISE or MESSAGE RAISING. Exceptions defined in this way - as with formal parameters - are bound to the function module and cannot be propagated. If an exception of this type is triggered in a function module, and no return value has been assigned to it with the homonymous addition EXCEPTIONS of the CALL FUNCTION statement when the call was made, this leads to a runtime error.
    Note
    For new developments after release 6.10, SAP recommends that you work with class-based exceptions that are independent of the function module.
    RFC is a technology which is used to access a functions (Modules) from
    the remote systems.
    If a function module is set as remote enabled which can be access from
    the remote system via RFC.Eg: U can access the Remote enabled function modules in ur VB,Webdynpro,Java,Visual composer program.
    A function module can be set as remote enabled by SE37->Go to ur FM->click the option Button "remote enabled".
    But Normal function modules can not accessd from the remote system.
    Good Example for RFC enabled function module is : BAPI(Business Application Programming Interface)
    Note: All BAPIs are Remote enabled but not all remote enabled function modules are BAPI.
    CALLING A FUNCTION MODULE:
    1)In U ABAP Editor --> Click "Patter" ---> Selection Option Button "Call Function"
    --> Write the Corresponding FM name --> Hit Enter
    2)The appropriate import ,export Parameters will be displayed in ur editor
    3)Pass the Values Here.
    Also check these links.
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    Check this link:
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    Check this link:
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    See the following links:
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
    Regards,
    Srilatha.

  • Can we change WSDL file created from Function Module wizard??

    Hi everybody!
    I have created a web service from function module using SAP wizard.
    Now the consumer side want me to change <wsp:UsingPolicy wsdl:required="true"/>
    Is this possible???
    If so how?????
    Thank u in advance!!

    Hi Muhammad!
    As soon as you open WSDL for selected binding in the URL are of you explorer change the ws_policy with "standard" . Then simply save the wsdl and send it to the other party.
    Hope this helps!

  • FOTY0001error when trying pass file path variable to ora:readBinaryFromFile

    I want to read a file from a location,I take that file location as input and assign it to variable filePath and use
    ora:readBinaryFromFile(bpws:getVariableData('filePath','payload','/tns:value')),I get FOTY0001 type error.
    Any light on the issue would be appreciated.
    StackTrace:
    <2008-06-03 14:47:31,875> <ERROR> <default.collaxa.cube.engine.dispatch> <BaseScheduledWorker::process> Failed to handle dispatch message ... exception ORABPEL-05002
    Message handle error.
    An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessage"; the exception is: XPath expression failed to execute.
    Error while processing xpath expression, the expression is "ora:readBinaryFromFile(bpws:getVariableData('filePath','payload','/tns:value'))", the reason is FOTY0001: type error.
    Please verify the xpath query.
    ORABPEL-05002
    Message handle error.
    An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessage"; the exception is: XPath expression failed to execute.
    Error while processing xpath expression, the expression is "ora:readBinaryFromFile(bpws:getVariableData('filePath','payload','/tns:value'))", the reason is FOTY0001: type error.
    Please verify the xpath query.
    TIA,
    -Tripti

    You need to use a colon-delimited path. If the JavaScript returns a slash-delimited one, run:
    set myTemplate to POSIX file "/SPACE/Marketing/webTemplatesCreation/working/template.pdf"
    or:
    set the_string to "/SPACE/Marketing/webTemplatesCreation/working/template.pdf"
    set new_string to ""
    repeat with this_char from 2 to (count the_string)
    if item this_char of the_string is "/" then
    set new_string to new_string & ":"
    else
    set new_string to new_string & item this_char of the_string
    end if
    end repeat
    (53281)

  • Pass file path through a variable

    I have a script that works when I place path directly instead of variable, but I will need that path to come from java script, so I need to replace it with a variable, but when I do that, it doesn't work any more and it the same path, but running the script tells me that it can't find the file (and file is there ).
    _*Working script:*_
    set ScriptPath to (path to applications folder as text) & "Adobe Illustrator CS4:Presets.localized:enUS:Scripts:_NDF_ILLbasicWebTemplates.jsx" as alias
    tell application "Adobe Illustrator"
    activate
    open file "SPACE:Marketing:webTemplatesCreation:working:template.pdf"
    set Doc_Ref to the current document
    tell Doc_Ref
    do javascript ScriptPath
    end tell
    end tell
    _*Not working:*_
    set myTemplate to "/SPACE/Marketing/webTemplatesCreation/working/template.pdf" as alias
    set ScriptPath to (path to applications folder as text) & "Adobe Illustrator CS4:Presets.localized:enUS:Scripts:_NDF_ILLbasicWebTemplates.jsx" as alias
    tell application "Adobe Illustrator"
    activate
    open myTemplate
    set Doc_Ref to the current document
    tell Doc_Ref
    do javascript ScriptPath
    end tell
    end tell
    I tried different versions: like with '/Volumes' in the beginning and with out 'as alias' for the variable. And none of it helps. The file is on the server and not on my system.
    Thank you very much for your help.
    Yulia.

    You need to use a colon-delimited path. If the JavaScript returns a slash-delimited one, run:
    set myTemplate to POSIX file "/SPACE/Marketing/webTemplatesCreation/working/template.pdf"
    or:
    set the_string to "/SPACE/Marketing/webTemplatesCreation/working/template.pdf"
    set new_string to ""
    repeat with this_char from 2 to (count the_string)
    if item this_char of the_string is "/" then
    set new_string to new_string & ":"
    else
    set new_string to new_string & item this_char of the_string
    end if
    end repeat
    (53281)

  • Passing an XML file from WebDynpro app to ABAP function module

    Hi all,
    I'm stuck with a problem, and am hoping one of you could let me know how to proceed:
    I need to pass an XML file (or at least the entire content of the XML) from my WebDynpro application to a backend ABAP function module. What I tried was this:
    In my WebDynpro app, I read the XML and convert the content into one long string (using java.io.FileReader and java.io.BufferedReader). In my ABAP function module I created an import parameter of type String. I then imported the ABAP Function module into my WebDynpro app as a model. I then tried to pass the XML string to the ABAP module. What happens is this:
    If the size of the string (XML) happens to be less than 255 characters, then it works. That is, the string is passed to the ABAP function module and I can see the contents. However, if the XML string happens to be greater than 255 characters, then it does not work. The string at the ABAP side is empty. Surprisingly, the ABAP module does not throw an error either. It just displays an empty string.
    Could you please tell me what the problem is?
    Thanks & Regards,
    Biju

    Hi Biju ,
    Welcome to SDN.
    If the import parameter is defined as type string it should work, however did you check whether your application pass it properly?
    I have applications using strings as import parameters working fine. (webapplications (BSP) to RFC)
    Regards
    Raja

Maybe you are looking for

  • Photo Booth - audio and video not syncing

    I was making some videos on Photo Booth and the audio doesn't start playing until 5 seconds after the video starts! Do you know if there is any way to fix this or is it a software issue? I have tried resetting the computer but it didn't help. Thanks

  • Batch Determination for material in Process Order

    Hello, I need to set up a Batch determination strategy for the Raw material at IM level for a Process Order. Basically the materials are Batch Managed and already have a Batch number assigned to it. I just want to use a simple strategy of determining

  • Viewing photos/images in Finder

    Hi, I've been transferring photos onto an external hard drive which is going fine. Suddenly though, in Finder it's no longer previewing the photos when you scroll through without opening the file, just an icon with 'jpeg' as shown below. How do I cha

  • Zen agent on Windows server?

    Hello, Can the Zen agent and it's components be installed on a Windows 2003 server? I'm looking to use the DLU functionality with the Novell client. Thanks, Tom

  • No Spanning-Tree Vlan # on C2950

    Hello everyone, I've recently found that one of the switches on my network (which I never set up) is running a "no spanning-tree vlan 3, 5, 10" command, which I want to remove, but I have been unable to. When I do try and type in "spanning-tree vlan