Returning Exeptions of a function module in webServices

Hi,
I defined a webService for a rfc with the following parameters:
FUNCTION J_3S_F_RJEDSN.
""Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(ABAP) TYPE  J_3SREPORT
*"     VALUE(VARNAME) TYPE  STRING DEFAULT '?'
*"  EXPORTING
*"     VALUE(DSN) TYPE  J_3SDSN
*"     VALUE(GENERAT) TYPE  J_3SANZ
*"     VALUE(CPAGE) TYPE  J_3SRJECP
*"     VALUE(CPOLD) TYPE  CPCODEPAGE
*"     VALUE(CPNEW) TYPE  CPCODEPAGE
*"     VALUE(DESTIN) TYPE  TEXT40
*"     VALUE(CMD) TYPE  TEXT50
*"     VALUE(FILEFORMAT) TYPE  J_3S_FILEFORMAT
*"     VALUE(TARGET_SYS) TYPE  SYSYSID
*"     VALUE(JOBNAME) TYPE  J_3SSYMNAM
*"  EXCEPTIONS
*"      NOT_FOUND
*"      NO_FILE
*"      NO_GAPS_ALLOWED
*"      PHYSICALLY_LOCKED
I tested the webService using transaction wsadmin.
In case of failure I do not get the declared exception.
If I test the function module using transaction se37 the exception is returned.

Hi Saurabh,
Can you explain your scenario in detail with tcode and function module and all.
Regards,
kamalapriya

Similar Messages

  • Is it necessary to pass RETURN parameter in bapi function module

    Hai All,
                Is it necessary to pass structure to RETURN parameter in bapi_transaction_rollback function module. If it is not necessary then how can it gives return value. Please give me the answer for this one. some sample code below...
    CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
    IMPORTING
       RETURN        = i_return.
            LOOP AT i_return into wa_return WHERE type EQ c_error.
              wa1_out-postdoc = wa_return-message.
            ENDLOOP.
    Thanks & Regards.
    Laxman.P

    hi
    bapi should never throw an error as it might be called for mass data proceessing
    and it is prefferred not to hault the proceess bcoz of one or two errors.
    that's why the error or success messages are caught and returned in return table.
    in bapi_transaction_rollback the return parameter is not necessary as it will work without that as well.
    the purpose of rollback bapi is just to undo whatever done before that.
    regards
    vijay
    <b>reward points if helpful</b>
    Message was edited by:
            vijay sharma

  • Return to ALV from function module

    Hi to all,
    I'm new in this forum. My name is Guido and I'm working with Abap from 6 months ago and I whish to greet all of you. Now I have a problem that I try to explain simply. I have created a report with 2 screens: the first one is a selction screen and the second one is an ALV.
    In the ALV I have added a button "Details" and on pressing it a new screen is opened. This screen is "created" in a function module developed by me.
    All works fine but there is a problem: I'm not able to return from the screen of the function module to the ALV(second screen of my report). I try to use "Leave to transaction" or "Submit" calls but in all cases the screen displayed is the selection screen(first screen of my report).
    Note also that the selction screen has some obligatory fields so I can't use the "Leave to tansaction..AND SKIP FIRST SCREEN" or "Call tansaction..AND SKIP FIRST SCREEN" call.
    There is a way to solve this problem? Any suggestion?
    Thanks in advance for the help!

    One thing I don't catch here. You said you have two screens - one selection screen and another with ALV. Then you said that you have added details buton which trigger new screen. So how many screen do you really have. Where is the ALV placed - is it selection screen?
    If so than whenever you return from FG screen your program ends and shows initial screen which is selection screen.
    You need something like
    "selection screen
    call screen 100.  "next screen also set as 100
    "pbo screen 100
    ALV here
    "pai screen 100
    call function ....
    "in function
    call screen 200 with ALV details
    "pai screen 200
    LEAVE TO SCREEN 0.
    Doing it like that you will get the processing back to ALV.
    Regards
    Marcin

  • Getting values from a function module called in a WDA method

    Friends,
    I am trying to execute a function module from WDA.
    I have created a service call for the function module. The function module takes values from the user, looks up the corresponding values of another field and returns the values in an internal table.
    I am using the "Method Call in Used Controller" of WD Code wizard to call the function module.
    When the event handler method containing the call to the function module is executed, nothing happens.
    I am not sure how to pass values to the function module and to get the return values from the function module.
    I am new to using function modules from WDA. Please help me out.
    Thanks and Regards.

    Rashmi,
    Is the function module intended to collect input data from the UI and process it? - Yes
    If yes, then the input (importing parameter) to the Function Module is a table of values (which should be ideally from the context mapped to the Table UI Element). - The importing parameter is a single value NOT a table and is mapped to the view context.
    Now this table UI Element is bound to the view controller context , which in turn is mapped to the component controller context. And you are indeed being able to read the value of this internal table in the component controller method where the function module is being called by means of get_static_attributes_table (Is this right? - Yes, I am able to read the table of values that is passed from the component controller view to form view context by using get_static_attributes_table.
    Or are you being able to read it in the event handler method of the view controller and not being able to read it in the component controller method) -
    The function module takes a single value as import parameter and returns a table of values as return value.
    It works fine when no importing parameter is being used and returns the table of values that is getting passed from component controller context to form view context when i am able to read it using get_static_attributes_table.
    Now the question is: how to pass the import parameter value to the function module. I assumed since the importing parameter is a context node (like the return values are), i should set the value ( captured when the user enters the value in the form) to the importing parameter context attribute using set_attribute method. Since it is mapped to the component controller context, i assumed it will get passed and the method will take it as input parameter.
    Let me know if my assumptions are correct regarding passing the import parameters and what is missing here.
    Thanks and Regards.

  • ALV function module usages in report

    Hi All,
    I am writing an ALV report and would like to know whether the following function modules can add some value for my report. The report displays in Grid format using ALV_GRID_DISPLAY.
    REUSE_ALV_EVENTS_GET
    REUSE_ALV_COMMENTARY_WRITE
    REUSE_ALV_VARIANT_F4
    REUSE_ALV_VARIANT_EXISTENCE
    REUSE_ALV_VARIANT_DEFAULT_GET
    I got some example programs for this from the forum but did not quite understand the need of this. So please explain in a simple way how to use this in reports.
    Thanks
    Ricky

    Hi,
    SAP provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to beautify the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in SAP when the output of a report contains columns extending more than 255 characters in length.  In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output. The report output can contain upto 90 columns in the display with the wide array of display options.
    The commonly used ALV functions used for this purpose are;
    1.     REUSE_ALV_VARIANT_DEFAULT_GET
    2.     REUSE_ALV_VARIANT_F4
    3.     REUSE_ALV_VARIANT_EXISTENCE
    4.     REUSE_ALV_EVENTS_GET
    5.     REUSE_ALV_COMMENTARY_WRITE
    6.   REUSE_ALV_FIELDCATALOG_MERGE
    7.   REUSE_ALV_LIST_DISPLAY
    8.     REUSE_ALV_GRID_DISPLAY
    9.     REUSE_ALV_POPUP_TO_SELECT
    The different steps used for getting the above function modules into use are :
    Step 1
    DATA DECLARATION
    Sap standard type pools: SLIS, KKBLO.
    Sap standard tables types taken from the type pools are:  SLIS_LAYOUT_ALV,
                                             SLIS_T_FIELDCAT_ALV,
    SLIS_T_LISTHEADER,
    SLIS_T_EVENT,
    SLIS_SELFIELD.
    Internal tables to used in the program declared based on the above table types
    DATA:  I_LAYOUT TYPE SLIS_LAYOUT_ALV,
                I_FIELDTAB TYPE SLIS_T_FIELDCAT_ALV,
               I_HEADING TYPE SLIS_T_LISTHEADER,
    I_EVENTS TYPE SLIS_T_EVENT.
    TYPES:  KKBLO_SELFIELD TYPE SLIS_SELFIELD.
    Step 2 (Optional)
    SELECTING THE VARIANTS FOR INITIAL LIST DISPLAY (DEFAULT VARIANT)
    The variants in the list display can be both user-specific and general. The user can programmatically set the initial (default) variant for list display.
    The default variant can be found using the function module 'REUSE_ALV_VARIANT_DEFAULT_GET'.
    Sample code:
    CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
           EXPORTING
                i_save     = variant save condition ( A=all, U = user-specific )
           CHANGING
                cs_variant = internal table containing the program name (and the default variant---optional )
           EXCEPTIONS
                not_found  = 2.
    The user can also choose from the list of existing variants using the function module ‘REUSE_ALV_VARIANT_F4’.
    Step 3
    DEFININING OUTPUT CHARACTERISTICS: PREPARING DISPLAY FIELDS CATALOG
    A field catalog is prepared using the internal table (I_FIELDCAT) of type SLIS_T_FIELDCAT_ALV. Field catalog containing descriptions of the list output fields (usually a subset of the internal output table fields).
    A field catalog is required for every ALV list output to add desired functionality (i.e. Key, Hotspot, Specific headings, Justify, Col. position etc) to certain fields of the output. If not mentioned specifically, then the defaults are taken. The possible values and defaults are listed below.
    The field catalog for the output table is built-up in the caller's coding. The build-up can be completely or partially automated by calling the REUSE_ALV_FIELDCATALOG_MERGE module.
    The minimal field catalog is documented below. This can be done in a routine using a local variable. The user can use the other optional parameters to assign output attributes to different fields in the output, which differ from the default.
    A field catalog need not be built-up and passed explicitly only under the following conditions:
    1.     The internal table to be output has the same structure as a Data Dictionary structure which is referred to in the internal table declaration using LIKE or INCLUDE STRUCTURE. In this case the attributes of the different fields is taken directly from the table and the attributes (key fields, length, texts etc) need to state explicitly.
    2.     all fields in this structure are to be output
    3.     The structure name is passed to ALV in the parameter I_STRUCTURE_NAME of the function module REUSE_ALV_LIST_DISPLAY.
    All the values entered in the catalog are specific to the particular field whose name is entered in the fieldname FIELDNAME of the fieldcat structure. The name of the table is also entered in the corr. Fieldname TABNAME of the structure.
    The different possible attributes are:
    •     Row_pos (row position): Only relevant if the list output is to be multi-line (two or three lines) by default. So, this attribute can be used maintain certain level of alignment in the output.
                         Value set: 0, 1 – 3
    •     Col_pos (column position): This parameter is relevant when the fields in the output are to be different from the sequence of the fields in the internal table used for display.       The parameter specifies the relative column position of the field in the list output. The column order can be changed interactively by the user. If this parameter is initial for all field catalog entries, columns appear in the internal table field sequence.
    Value set: 0, 1 – 60
    •     Fieldname (field name): This is the name of the internal table field for which the parameters are passed in the catalog.
    Value set: internal output table field name (required parameter)
    •     Tabname (internal output table): Name of the internal output table that contains the field FIELDCAT-FIELDNAME above.
                         Value set: SPACE, internal output table name.
    •     Ref_fieldname (reference field name): Name of the Data Dictionary field referred to. This parameter is only used when the internal output table field described by the current field catalog entry has a reference to the Data Dictionary (not a program field), and the field name in the internal output table is different from the name of the field in the        Data Dictionary. If the field names are identical, naming the Data Dictionary structure or table in the FIELDCAT-REF_TABNAME parameter is sufficient.
        Value set: SPACE, Data Dictionary field name.
    •     Ref_tabname (reference table/structure field name): Structure or table name of the referred Data Dictionary field.        This parameter is only used when the internal output table field described by the current field catalog entry has a Data Dictionary reference (not a program field).
    Value set: SPACE, name of a Data Dictionary structure or table
    Link to currency unit
    •     Cfieldname (currency unit field name): This is used for currency fields that have a reference to any unit field. This is only relevant for amount columns with associated unit. This parameter contains the Name of the internal output table field containing the currency unit associated with the amount field FIELDCAT-FIELDNAME. The field in FIELDCAT-CFIELDNAME must have its own field catalog entry.
    Value set: SPACE, output table field name
    •     Ctabname (internal currency unit field output table): Name of the internal output table containing the FIELDCAT-CFIELDNAME field.
    Value set: SPACE, output table field name.
            Link to measurement unit
    •     Qfieldname (measurement unit field name): Only relevant for quantity columns with unit link. Name of the internal output table field containing the measurement unit associated with the quantity field FIELDCAT-FIELDNAME. The field in FIELDCAT-QFIELDNAME must have its own field catalog entry.
    Value set: SPACE, output table field name.
    •     Qtabname (internal measurement unit field output table): Name of the internal output table containing the FIELDCAT-QFIELDNAME field.
    Value set: SPACE, output table field name.
    •     Outputlen (column width): This parameter is used if the desired output length for a field is desired to be different from the internal output table field. For fields with a Data Dictionary link this parameter can be left initial. For fields without a Data Dictionary link (program field) the parameter must be given the value of the desired field list output length (column width).
    Initial = column width is the output length of the referred Data Dictionary field (domain).
    N = column width is n characters.
          Value set: 0 (initial), n.
    •     Key (key column): By default, the system makes some fields in the output as key fields, provided the fields are key fields in their referencing table. Using this parameter, fields other than key fields of the referencing table can be made key field. This parameter is most important if the output needs to contain some field which are not scrollable or cannot be hidden.
    If the internal output table contains fields that are key fields from different tables, then all those fields in the report output becomes unscrollable and cannot be hidden. So, the fields in the output internal table should not be referenced from tables in which they are key fields. Instead, they should be referenced to the tables in which they are not key fields, incase they are not desired as key field in the output.
    'X' = key field (key field output in color) and Key fields can not be interactively hidden. Parameter FIELDCAT-NO_OUT must be left initial.
          Value set: SPACE, 'X'.
    •     Key_sel (hideable key column): This parameter is only relevant for the fields which are made key fields using FIELDCAT-KEY = 'X'. Using this parameter the Key field can be hidden interactively.
    The key column sequence cannot be changed interactively by the user. The output is controlled by the FIELDCAT-NO_OUT parameter analogously to non-key fields.
    Value set: SPACE, 'X'.
    •     No_out (field in field list): This parameter is used to remove certain fields from the output during initial display.  The user can however interactively choose the field for output from the field list in the display variant.
                'X' = field is not displayed in the current list.
            Value set: SPACE, 'X'.
    •     Tech (technical field): This parameter is used to make certain field display only in the field catalog. The fields with this parameter set cannot be output in the list nor can they be displayed interactively from the catalog.
                        'X' = technical field.
           Value set: SPACE, 'X'.
    •     Emphasize (highlight columns in color): As name suggests, this field parameter is used to highlight certain field with chosen colors.
    Value set: SPACE, 'X' or 'Cxyz' (x:'1'-'9'; y,z: '0'=off ,'1'=on).
    'X' = column is colored with the default column highlight color.
                        'Cxyz' = column is colored with a coded color:
                      -  C: Color (coding must begin with C)
                     -  X: color number
                      -  Y: bold
                       -  Z: inverse
    •     Hotspot (column as hotspot): This parameter is used to make certain field appear as hotspot i.e. a hand is displayed if the cursor is positioned on the field value. Single click on such fields cause the PICK OR F2 events to happen.
             Value set: SPACE, 'X'.
                        'X' = column cells are output as hotspots.
    •     Fix_column (fix column): This parameter is used to fix certain columns in the output. All columns to be fixed must have this flag, starting from the left. If a column without this flag is output, only the columns to the left of this column are fixed. The user can change the column fixing interactively.
                         Value set: SPACE, 'X'.
            'X' = column fixed (does not scroll horizontally).
    •     Do_sum (sum over column): the user can also call this function interactively.
                      Value set: SPACE, 'X'.
    'X' = a sum is calculated over this internal output table field.
    •     No_sum (sums forbidden): No sum can be calculated over this field, although the data type of the field would allow summing.
             Value set: SPACE, 'X'.
    •     Icon: The parameter displays certain column contents as icons. The internal output table column contents must be valid icon strings.
                        Value set: SPACE, 'X'.
                         'X' = column contents to be output as an icon.
    •     Symbol: The internal output table column must be a valid symbol character.
    Value set: SPACE, 'X'
                        'X' = column contents are to be output as a symbol.
    •     Just (justification): This parameter is used for alignment of the contents of the output table. This is only relevant for CHAR or NUMC fields in the output internal table. The justification of the column header always follows the justification of the columns. Independent justification of the column header is not possible.
    Value set: SPACE, 'R', 'L', and ‘C’.
           ' ' = Default justification for this data type
           'R' = right-justified output
           'L' = left-justified output
           'C' = centered output.
    •     Lzero (leading zeros): By default ALV outputs NUMC fields right-justified without leading zeros. Using this parameter only the NUMC fields can be displayed with leading zeroes.
                       Value set: SPACE, 'X'.
                        'X' = output with leading zeros.
    •     No_sign (no +/- sign): This parameter is used to suppress the signs of the output fields. It is only relevant for the value fields.
        Value set: SPACE, 'X'.
               'X' = value output without +/ sign.
    •     No_zero (suppress zeros): Only relevant for value fields.
                 Value set: SPACE, 'X'.
                        'X' = suppress zeros.
    •     Edit_mask (field formatting): To apply the report output formatting options same as in the WRITE statement in report writing.
               Value set: SPACE, template.
    The following parameters are used for customizing the texts in the heading of the output of the columns. The texts are taken from the Data Dictionary for fields with a Data Dictionary reference. If this is not desired, the text parameters can also be specified. The Data Dictionary texts are then ignored.
    If the user changes the column width interactively, the column header text with the appropriate length is always used.
    The interactive function 'Optimize column width' takes account of both the field contents and the column headers: if all field contents are shorter than the shortest column header, the column width depends on the column header.
         The 'long field label' is also used in display variant definition,
            Sort, etc.  Popup.
    •     seltext_l (long field label)
    •     seltext_m (medium field label)
    •     seltext_s (short field label)
    •     reptext_ddic(header) Analogous to the Data element main header
    •     Ddictxt (specify text) : You can specify with values 'L', 'M',  and 'S', the keyword that should always be used as column header. If the column width changes, no attempt is made in this case to find an appropriate header for the new output width.
    Value set: SPACE, 'L', 'M', and ‘S’.
    Sample code:
    Suppose I_PO_DETAILS is an internal table containing two fields EBELN (PO number) and EBELP (PO item no).
    DATA: L_FIELDCAT TYPE SLIS_FIELDCAT_ALV.     “Local variable to hold the parameters                                                                               
    for a particular field of the field catalog
      CLEAR L_FIELDCAT.
      L_FIELDCAT-TABNAME   = 'I_PO_DETAILS'.
      L_FIELDCAT-FIELDNAME = 'EBELN'.
      L_FIELDCAT-KEY = 'X'.         “The PO no is made the key field,
                          “Colored and non scrollable
      L_FIELDCAT-HOTSPOT = 'X'.     “The po no becomes a hotspot
      L_FIELDCAT-SELTEXT_S = ‘P.O No’.
      L_FIELDCAT-SELTEXT_M = 'P order No'.
      L_FIELDCAT-SELTEXT_L = 'Purchase order No'.
      APPEND L_FIELDCAT TO I_FIELDTAB.
      CLEAR L_FIELDCAT
      L_FIELDCAT-TABNAME   = 'I_PO_DETAILS'.
      L_FIELDCAT-FIELDNAME = 'EBELN'.
      L_FIELDCAT-KEY = 'X'.         “The po item no is made the key field,
                          “Colored and non scrollable
      L_FIELDCAT-SELTEXT_S = 'Item No'.
      L_FIELDCAT-SELTEXT_M = 'Item No`.
      L_FIELDCAT-SELTEXT_L = 'PO Item No'.
      APPEND L_FIELDCAT TO I_FIELDTAB.
      CLEAR L_FIELDCAT
    Thus the catalog for the report output is prepared.
    Step 4
    The next step is to build an event table, which are used for firing both user commands and the system dependent events i.e. top of page, end of page etc.
    A list of possible events is populated into an event table (I_EVENTS) when this table is passed to the function module REUSE_ALV_EVENT_NAMES_GET. The return table from this function module contains all the possible events.
    The function module contains following import and export parameters.
    IMPORTING PARAMETERS: I_LIST_TYPE
    This parameter has possible values from 0-4.
    The parameter I_LIST_TYPE is of TYPE SLIS_LIST_TYPE and is DEFAULT 0 .
    EXPORTING PARAMETERS:  I_EVENTS table.
    This table is of TYPE SLIS_T_EVENT and returns to the program the name of all the possible events.
    The table structure contains the fields:
         I_EVENTS-NAME: Name of the Callback event.
    I_EVENTS-FORM: Name of the form routine that should be called in the calling program at the event.
    Only events with a form routine name are processed.
    The I_EVENTS table returns with the following possible constants:
    1.     Slis_ev_item_data_expand TYPE slis_formname VALUE 'ITEM_DATA_EXPAND'.     
    Only relevant for hierarchical-sequential lists using the layout parameter IS_LAYOUT-EXPAND_FIELDNAME of the structure IS_LAYOUT. Exit for passing item entries (ITEM table) for a header record that was expanded interactively by the user.
    2.     Slis_ev_reprep_sel_modify TYPE slis_formname VALUE 'REPREP_SEL_MODIFY'.
    RS_SELFIELD-TABINDEX contains the header table index for which the item entries are to       be put in the global item output table (T_OUTTAB_SLAVE). The Callback is only called if ALV has no items for a header that is to be expanded.
    RFLG_ALL is passed with 'X' if the user shows all items. The application must ensure that    entries are not repeated in the item table.
        RS_SELFIELD is initial in this case.         
    3.     Slis_ev_caller_exit_at_start TYPE slis_formname VALUE 'CALLER_EXIT'.
    Is called at the beginning of the function module to make special settings. It is not usually used.          
    4.     Slis_ev_user_command TYPE slis_formname VALUE 'USER_COMMAND'.
    As this is a frequently-used Callback event, the form routine can also be passed        directly in the interface by passing the user command in the IMPORTING parameter           I_CALLBACK_USER_COMMAND.
    5.     Slis_ev_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
       Equivalent to the list processing TOP-OF-PAGE event.           
    6.     Slis_ev_top_of_coverpage TYPE slis_formname VALUE 'TOP_OF_COVERPAGE'.       
    The selection information and list status are output together (if they exist) on a separate page by default
    7.     Slis_ev_end_of_coverpage TYPE slis_formname VALUE 'END_OF_COVERPAGE'.       
    Analogously to TOP_OF_COVERPAGE the user can add other information
    to the information output by ALV (selection information, list status) at this event.
    8.     Slis_ev_foreign_top_of_page TYPE slis_formname VALUE ‘FOREIGN_TOP_OF_PAGE'.
    The Top-of-page event is always processed in ALV and is only passed to the caller via the Callback mechanism. This is still the case if the caller, e.g. by a user action, processes a branch list which was not formatted by ALV (e.g. a popup with additional information about the list record selected and displayed by ALV).
    In this case, top-of-page cannot be formatted by ALV analogously to the basic list, it must be handled completely by the caller. The event top-of-page still occurs in ALV. When ALV notices a top-of-page which was not caused by an ALV output, the form routine in FOREIGN_TOP_OF_PAGE is called.
    9.     Slis_ev_foreign_end_of_page TYPE slis_formname VALUE 'FOREIGN_END_OF_PAGE'.  
    The event end-of-page is always processed in ALV and only passed to the caller via callback. This is still the case, e.g. when the caller processes a details list which was not formatted by ALV (e.g. a popup with further information about selected list records which were displayed by ALV).
    In this case, end-of-page cannot be formatted by ALV analogously to the basic list, it must be handled completely by the caller. The event end-of-page still occurs in ALV. When ALV notices an end-of-page that was not caused by an ALV output, the form routine in FOREIGN_END_OF_PAGE is called.                             
    10.     Slis_ev_pf_status_set TYPE slis_formname VALUE 'PF_STATUS_SET'.
    If a user list status is to be set, it must be done in the form routine assigned to this event. The ALV function codes, which must not be active, are in the Parameter RT_EXTAB. This table must be passed with the SET PF-STATUS command (with inactive user function codes as well, if necessary).
    The STANDARD status of the function group SALV should be used as a          template for a user-specific status. As this is a frequently used Callback event, its form routine can also be passed directly in the interface in the IMPORTING parameter I_CALLBACK_PF_STATUS_SET.
    11.     Slis_ev_list_modify TYPE slis_formname VALUE 'LIST_MODIFY'.     
    LIST_MODIFY USING R_TABNAME TYPE SLIS_TABNAME
                                             R_INDEX LIKE SY-TABIX
                                             R_INDEX_ITEM LIKE SY-TABIX
                                             R_INDEX_SUM LIKE SY-TABIX.
    12.     Slis_ev_top_of_list TYPE slis_formname VALUE 'TOP_OF_LIST'.  
    Information output at the start of the list     
    13.     Slis_ev_end_of_page TYPE slis_formname VALUE 'END_OF_PAGE'.
    Information output at the end of a page. This is only called for printing.
    14.     Slis_ev_end_of_list TYPE slis_formname VALUE 'END_OF_LIST'.     
    Information output at the end of the list
    15.     Slis_ev_after_line_output TYPE slis_formname VALUE 'AFTER_LINE_OUTPUT'.
    Output information after each output line. Should only be used in justified cases because it costs a lot of performance.
    16.     Slis_ev_before_line_output TYPE slis_formname VALUE   'BEFORE_LINE_OUTPUT'.       
    Output information before each output line. Should only be used in justified cases because it costs a lot of performance.         
    17.     Slis_ev_subtotal_text TYPE slis_formname VALUE  'SUBTOTAL_TEXT'.                        
    This event table (I_EVENTS) is now checked with the desired constants. If the desired constant is found, then the corresponding field for the FORM NAME is populated with the name of the routine containing the corresponding event.
    Sample code :
    FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',
    FORMNAME_END_OF_PAGE TYPE SLIS_FORMNAME VALUE 'END_OF_PAGE', FORMNAME_USER_COMMAND TYPE SLIS_FORMNAME VALUE 'USER_COMMAND'.
    DATA: L_I_EVENT TYPE SLIS_ALV_EVENT.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
               I_LIST_TYPE = 0
           IMPORTING
                ET_EVENTS   = I_EVENTS.
      READ TABLE I_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
                               INTO L_I_EVENT.
      IF SY-SUBRC = 0.
        MOVE FORMNAME_TOP_OF_PAGE TO L_I_EVENT-FORM.
        APPEND L_I_EVENT TO I_EVENTS.
      ENDIF.
      READ TABLE I_EVENTS WITH KEY NAME = SLIS_EV_END_OF_PAGE
                               INTO L_I_EVENT.
      IF SY-SUBRC = 0.
        MOVE FORMNAME_END_OF_PAGE TO L_I_EVENT-FORM.
        APPEND L_I_EVENT TO I_EVENTS.
      ENDIF.
      CLEAR L_I_EVENT.
      READ TABLE I_EVENTS WITH KEY NAME = SLIS_EV_USER_COMMAND
                               INTO L_I_EVENT.
      IF SY-SUBRC = 0.
        MOVE FORMNAME_USER_COMMAND TO L_I_EVENT-FORM.
        APPEND L_I_EVENT TO I_EVENTS.
      ENDIF.
    This will prepare the events table for the report.
    The report will contain three forms for the above events:
    1.     FORM TOP_OF_PAGE : This form will contain the top of page event for the report i.e header etc
    Using the function module ‘REUSE_ALV_COMMENTARY_WRITE’, the internal table containing the headings for top of page event can be passed to the list output. Also, any logo specific to the report can be passed to the function module.
    2.     FORM END_OF_PAGE : This form will contain the end of page event for the report i.e footer etc
    3.     FORM USER_COMMAND : This form will contain the desired user command i.e pick/line selection
    Step 5
    A layout is build for the report output list description USING the internal table declared above (I_LAYOUT).
    Output list description structure.
         The parameters are described under the following heads:
    •     Display options
    •     Exceptions
    •     Totals
    •     Interaction
    •     Detail screen
    •     Display variants (only for hierarchical-sequential lists)
    •     Color
    •     Other
    The layout table is of type slis_layout_alv_spec and has the following fields:
    Display options                                                
    1. Colwidth_optimize (1) TYPE c: This parameter optimizes the length of the different columns in the output. The width of the different col. now depends on the max. Length of the data in the column.
    Value set: SPACE, 'X'
    'X' = optimizes the column width so that all contents are displayed completely.                   
    2. No_colhead(1) TYPE c : This parameter suppresses the column headings                    
    Value set: SPACE, 'X'.
    'X' = column headers are not output
    3. No_hotspot(1) TYPE c :  The heading of the report output are not output as hotspot.       
    Value set: SPACE, 'X'.
    'X' = column headers are not output as hotspot
    4. Zebra(1) TYPE c : The report is output in the striped pattern.             
    Value set: SPACE, 'X'.
    'X' = striped pattern (e.g. for wide lists)
    5. No_vline(1) TYPE c : The report output contains columns only separated by space and no lines.  It is not relevant for: hierarchical-sequential lists and multiple-line lists.
    Value set: SPACE, 'X'.
    'X' = columns separated by SPACE
    6. No_min_linesize(1) TYPE c : The report  line size is equal to the width of the list. It is not relevant for block lists.
    Value set: SPACE, 'X’.
    'X' = line size depends on list width
    '  ' = Line size is set to 80 or MIN_LINESIZE (if > 0) .
    7. Min_linesize LIKE sy-linsz: The report output contains a minimum possible length of line. If initial min_linesize is set to 80 by default, then this parameter is used to customize it. The prerequisite for this is that the parameter no_min_linesize should be ' '.
    Value set: 0, 10 - 250
    If the list is wider, the format uses the list width (maximum 250 or MAX_LINESIZE (if > 0)).
    8. Max_linesize LIKE sy-linsz: The default max. Linesize is 250. To change this default value, this parameter can interactively-define the maximum list width setting.
    Value set: 0, 80 - 1020
    9. Window_titlebar LIKE rsmpe-tittext: To set the titlebar on the report output.                            
               10. No_uline_hs(1) TYPE c.
    Exceptions                                                 
    11. Lights_fieldname TYPE slis_fieldname: Internal output table field containing the codes of exceptions to be output.
                      Output table field code:  '1' = red traffic light
                                    '2' = yellow traffic light
                                         '3' = green traffic light Fieldname for exception 
         Value set: SPACE, internal output table field name.
    12. Lights_tabname TYPE slis_tabname: Name of the internal output table that contains the field in the parameter LIGHTS_FIELDNAME. If LIGHTS_FIELDNAME is not empty, this field must also be filled for hierarchical-sequential lists. Only relevant for hierarchical-sequential lists.
    .     Value set: SPACE, internal output table name.
    13. Lights_rollname LIKE dfies-rollname: The documentation of this data element is displayed when you call F1 help for an exception column.
    Value set: SPACE, data element name.
               14. Lights_condense(1) TYPE c : If a list record is output with 'red traffic light', each
               Subtotal that includes this record is also output with 'red traffic light'.
               Value set: SPACE, 'X'
               'X' = the 'maximum' exception of the items in the subtotal is output at subtotal level.
    Sums                                                       
    15. No_sumchoice(1) TYPE c : This parameter allows the choice for summing up
    Only by fieldcatalog.
    Value set: SPACE, 'X'
    'X' = fields which are to be summed, passed by the calling program (FIELDCAT-DO_SUM = 'X'). The user should not be able to change this value interactively.
    16. No_totalline(1) TYPE c : Removes the option of having totals after sub-totals.
    Value set: SPACE, 'X'
    'X' = no total record is to be output. Subtotals can still be calculated and output. The fields in the subtotals are flagged DO_SUM = 'X' in the field list.
    17. No_subchoice(1) TYPE c : Does not allow the user to interactively change the field chosen for subtotals.
    Value set: SPACE, 'X'
    'X' = value whose change triggers subtotals, provided by the calling program. The user should not be able to change this value interactively.
    18. No_subtotals(1) TYPE c : No subtotals possible          
    Value set: SPACE, 'X'
    'X' = no subtotals.
    19. Numc_sum(1)  TYPE c : Totals only possible for NUMC-Fields.
    20. No_unit_splitting TYPE c: No separate total lines by inh.units   
    21.totals_before_items TYPE c: Display totals before the items   
    22. Totals_only(1) TYPE c :  Show only totals      
    Value set: SPACE, 'X'
    'X' = only total records are output.
    23. Totals_text(60) TYPE c : Text for 1st col. in totals   
    Value set: SPACE, string (max.60)
    ' ' = The first column in the total record contains an appropriate number of '*'s to indicate the total by default. If the first column is wide enough, the string 'Total' is output after the asterisks.
    'String’ = The string passed is output after the total indicated by '*', if the column is wide enough.
    24. Subtotals_text(60) TYPE c : Texts for subtotals
    Value set: SPACE, string (max.60)
    ' ' = In the first column of subtotal records, the subtotal is indicated by an appropriate number of '*' by default. If the first column is not a subtotal criterion, the string 'Total' is output after the asterisks, if the column is wide enough.
    'String’ = the string passed is output after the subtotal indicated by '*', if the column is wide enough and the first column is not a subtotal criterion. If it is a subtotal criterion, its value is repeated after the total, if the column is wide enough.
    Interaction                                                      
    25. Box_fieldname TYPE slis_fieldname: Fieldname for checkbox in the report output. If the list has checkboxes at the start of records (for selecting several records), this parameter contains the internal output table field name indicated by the checkbox selection column. The field is a checkbox at the start of list records without a list header.
    Value set: SPACE, internal output table field name
    26. Box_tabname TYPE slis_tabname: Name of the internal output table that contains the field in the parameter BOX_FIELDNAME. If BOX_FIELDNAME is not empty, this field must also be filled for hierarchical-sequential lists.
    Value set: SPACE, internal output table name.
    27. Box_rollname LIKE dd03p-rollname: rollname for checkbox          
    28. Expand_fieldname TYPE slis_fieldname: fieldname flag ‘expand’. The user can show or hide the items by clicking on the folder symbol (hotspot). If the items for a header entry are only to be read by the calling program and passed to ALV when a header has been expanded interactively, this can be controlled via the CALLBACK event        'ITEM_DATA_EXPAND'.
    29. Hotspot_fieldname TYPE slis_fieldname: Used to make the fieldname flag hotspot.
    30. No_input(1) TYPE c : The fields are only display fields.
            Value set: SPACE, 'X'
    'X' = all ready-for-input fields in a list are displayed as not ready-for-input. (Record selection checkboxes and fields which can be made ready-for-input via the field list parameter FIELDCAT-INPUT = 'X')
    31. F2code LIKE sy-ucomm: To assign an ALV standard function code to double-click (F2), assign the function code to this parameter. Ex.: to assign the ALV standard function 'Detail' ('&ETA') to F2.
                      => LAYOUT-F2CODE = '&ETA'.
    Value set: SPACE, function code
    32. Confirmation_prompt: confirm. Prompt when leaving       
    Value set: SPACE, 'X'
    'X' = if one of the functions ‘Back (F03)', ‘Exit (F15)' or ‘Cancel (F12)' occurs, a confirmation prompt appears.
    33. Key_hotspot(1) TYPE c : The key fields are displayed as hotspot. The columns defined in the field catalog as key fields (FIELDCAT-KEY = 'X') are output as hotspots, i.e. clicking on a key column (highlighted in color in the list) calls the function under F2.
    Value set: SPACE, 'X'.
    34. Reprep(1) TYPE c :  report report interface active.     
    35. Group_buttons(1) TYPE c :  group-buttons for COL1 - COL5 . Group output fields via FIELDCAT-SP_GROUP in the field list, and pass the group name to the list module in the interface parameter IT_SPECIAL_GROUPS.           
    Value set: SPACE, 'X'.
    36. No_keyfix(1) TYPE c : Used to make the key fields scrollable.
    Value set: SPACE, 'X'.
    ' ' = The key columns defined in the field catalog by FIELDCAT-KEY = 'X' are fixed in the list output. These columns do not scroll horizontally. The item table key columns are fixed in hierarchical-sequential lists. The header table key fields are not considered here.
    'X' = key columns not fixed
    37. Get_selinfos(1) TYPE c : To read selection screen.
    Value set: SPACE, 'X'.
    If the calling program is a report with an ABAP/4 selection screen, setting this parameter makes ALV read the selection screen again. If the selections are read successfully, a pushbutton, via which the user can call a popup which lists the report selections in a simple form, becomes active on the results list output by ALV.
    38.     group_change_edit(1) TYPE c :  Settings by user for new group     
    Value set: SPACE, 'X'
    'X' = the user can enter a format option for each sort criterion in the sort/subtotal popup, for the list format when this value changes (e.g. new page or underline).
    39.     No_scrolling(1) TYPE c : Does not allow scrolling of the list to the right.
    Value set: SPACE, 'X'.
    40. Expand_all(1) TYPE c : Expand all positions                   
    Detailed screen                                                    
    40.     Detail_popup(1) TYPE c : show detail in popup.
    Value set: SPACE, 'X'
    '  '  = List record detail display in full-screen mode, with top-of-page.
    'X'  = list record detail display in popup (without top-of-page).
    41. Detail_initial_lines(1) TYPE c : show also initial lines   
    Value set: SPACE, 'X'
    '  ' = Only fields whose contents are not initial are output in the detail view.
    'X' = initial field contents are also output in detail.
    41.     detail_titlebar(30) type c : Titlebar for detail screen
    Value set: SPACE, string (max.30)
    ` ' = ' Detail: Display' is output as the title of the detail window.
                  'String’ = the string passed is output as the title of the detail window. 
    Display variants                                                   
    42. Header_text (20) TYPE c: Text for header button. Only relevant for hierarchical-sequential lists. You can toggle between display field and field list views via pushbuttons in the display variant definition popup for hierarchical-sequential lists. The views refer to the hierarchy level of the fields. This is technically a toggle between the header table and item table fields.   
    Value set: SPACE, CHAR (20)
    ' ' = The header table field pushbutton text is 'Header' by default.
    CHAR (20) = header table field pushbutton text.
    43.item_text(20) TYPE c : Text for item button. Only relevant for hierarchical-sequential lists. You can toggle the view between the display fields and the field list via pushbuttons in the display variant definition popup for hierarchical-sequential lists. The views refer to the hierarchy level of the fields. This is technically a toggle between the header table and item table fields.        
    Value set: SPACE, CHAR (20)
    ' ' = The pushbutton text for the item table fields is 'Item' by default.
    CHAR (20) = item table field pushbutton text.
    44.default_ item(1) TYPE c : Items as default. Only relevant for hierarchical-sequential lists.
         Value set: SPACE, 'X'
    ' ' = The header table fields are displayed by default in the display variant definition popup. The user can switch to the item table fields interactively.
    'X' = the item table fields are displayed by default in the display variant Definition Popup.    The user can switch to the header table fields interactively.
    Colour                                                       
    45. Info_fieldname TYPE slis_fieldname: infofield for listoutput. A whole list record can be colored individually using a color code in a column of the internal output table for the record. Assign the name of the field containing the color code to this parameter.
    Value set: SPACE, internal output table field name
    The internal output table field must be of type CHAR(3).
    The code must have the following syntax:  'Cxy':
            C = color (all codes must start with 'C')
            X = color number ('1'-'9')
            Y = bold ('0' = off, '1' = on)
    46. Coltab_fieldname TYPE slis_fieldname: Cells can be colored individually using a color code which is contained in a column of the internal output table for the record containing the cell. Assign the name of the field to this parameter.       
    Others                                                
    47. List_append(1) TYPE c :  no call screen. It is only useful to output block-lists without specifying the above modules if the number of list blocks exceeds, or may exceed, the maximum number specified in the block module documentation. These operations are not possible for user-defined block lists.
    Example code :
           I_LAYOUT-f2code       = ws_fcode.
           I_LAYOUT-zebra        = 'X'.
    I_LAYOUT-colwidth_optimize = 'X'.
    I_LAYOUT-no_keyfix = 'X'.
    I_LAYOUT-get_selinfos = 'X'.
    I_LAYOUT-no_hotspot = 'X'.
           I_LAYOUT-no_input = 'X'.
    I_LAYOUT-hotspot_fieldname = FIELDNAME.
    I_LAYOUT-no_input          = ‘X’.
    I_LAYOUT-no_vline          = `X’.
    I_LAYOUT-no_colhead        = ‘ ‘.
    I_LAYOUT-lights_condense   = ` `.
    I_LAYOUT-totals_text       = ` `.
    I_LAYOUT-subtotals_text    = ` `.
    I_LAYOUT-totals_only       = ` `.
    I_LAYOUT-key_hotspot       = ‘X’.
    I_LAYOUT-detail_popup      = ‘X’.
    I_LAYOUT-group_change_edit = ‘X’.
    I_LAYOUT-GROUP_BUTTONS     = ‘X’.
    Step 6
    This step is required to get the selection screen information in the report output.
    The prerequisite for this is to set the parameter LAYOUT-GET_SELINFOS of the IMPORTING structure.
    The parameters to be passed in the IS_SEL_HIDE table are:
    o mode:              'R' = only the entries passed in the internal table IS_SEL_HIDE-T_ENTRIES       
    Are output in the pop up. Selection info, which the list tool read in the selection screen (when called by a report with a selection screen), is replaced by the values passed.
    'S' = the selection info which the list tool read in the selection screen of the calling report are modified by the entries in the table IS_SEL_HIDE-T_ENTRIES.
    o t_entries:         Selection info table
    o t_entries-mode:   'A' = output the selection info for the current table record in the info popup.
    'D' = do not output select option or SELNAME parameter selection info in   the popup.
    o t_entries-selname: (only used in t_entries-mode = 'D') : Name of the select option or parameter.
    The following table fields are only used in t_entries-mode = 'A'. They contain the selection information to be added.
    •     t_entries-field:  DDIC field name of the field for which selection information is to be output.
    •     t_entries-table:  DDIC table names of t_entries-field.
    •     t_entries-stext:  Field name in info popup.
    •     If t_entries-field and t_entries-table have been entered, this text is taken from DDIC.
    •     t_entries-valuf:  Selection condition 'from' value (external format)
    •     t_entries-valut:  Selection condition 'to' value (external format)
    •     t_entries-sign0:  (I)nclusive (E)xclusive
    •     t_entries-option:  All values of the select options Option field allowed.
    Step 6
    The Table IT_SORT is populated with the sort criteria for the different fields.
    The caller specifies the sorting and/or subtotaling of the basic list in the internal table IT_SORT.
    This internal table has the following fields:
         o spos :  Sort sequence
         o fieldname :  Internal output table field name
         o tabname : Only relevant for hierarchical-sequential lists. Name of the internal output table.
         o up : 'X' = sort in ascending order
         o down : 'X' = sort in descending order
         o subtot : 'X' = subtotal at group value change
         o group : '* ' = new page at group value change ,'UL' = underline at group value change
                             Step 7
    The final step in the output of the report is the use of two ALV functions modules.
    1.     REUSE_ALV_FIELDCATALOG_MERGE
    2.     REUSE_ALV_LIST_DISPLAY
    The first function module is used to pass the field catalog to the report output and merge it with the internal output table.
    FUNCTION reuse_alv_fieldcatalog_merge.                                
    ""Lokale Schnittstelle:                                             
    *” IMPORTING                                                    
    *"             VALUE(I_PROGRAM_NAME) LIKE  SY-REPID OPTIONAL          
    *"             VALUE(I_INTERNAL_TABNAME) TYPE  SLIS_TABNAME OPTIONAL  
    *"             VALUE(I_STRUCTURE_NAME) LIKE  DD02L-TABNAME OPTIONAL   
    *"             VALUE(I_CLIENT_NEVER_DISPLAY) TYPE  SLIS_CHAR_1        
    *"                             DEFAULT 'X'                            
    *"             VALUE(I_INCLNAME) LIKE  TRDIR-NAME OPTIONAL            
    *"       CHANGING                                                     
    *"             VALUE(CT_FIELDCAT) TYPE  SLIS_T_FIELDCAT_ALV           
    *"       EXCEPTIONS                                                   
    *"              INCONSISTENT_INTERFACE                                
    *"              PROGRAM_ERROR                                         
    Import parameters 
    I_PROGRAM_NAME: Program in which the internal output table is declared and populated   
    I_INTERNAL_TABNAME: Internal output table name
    I_STRUCTURE_NAME: Structure name (structure, table, and view)
    I_CLIENT_NEVER_DISPL: Hide client fields default ‘X’
    I_INCLNAME: Data declarations include name
    CHANGING parameter
    CT_FIELDCAT: Field catalog with field descriptions
    The variant based on a program-internal table should only be used for rapid prototyping since the following restrictions apply:                                                                               
    1.   Performance is affected since the code of the table definition must always be read and interpreted at runtime.                                                                               
    2.   Dictionary reference are only considered if the keywords LIKE or  INCLUDE STRUCTURE (not TYPE) are used.
    Step 8
    The other function module is used to display the internal output table with the contents
    FUNCTION reuse_alv_list_display.                                          
    ""Lokale Schnittstelle:                                                 
    *” IMPORTING                                                        
    *"             VALUE(I_INTERFACE_CHECK) DEFAULT SPACE                     
    *"             VALUE(I_CALLBACK_PROGRAM) LIKE  SY-REPID DEFAULT SPACE     
    *"             VALUE(I_CALLBACK_PF_STATUS_SET) TYPE  SLIS_FORMNAME        
    *"                             DEFAULT SPACE                              
    *"             VALUE(I_CALLBACK_USER_COMMAND) TYPE  SLIS_FORMNAME         
    *"                             DEFAULT SPACE                              
    *"             VALUE(I_STRUCTURE_NAME) LIKE  DD02L-TABNAME OPTIONAL       
    *"             VALUE(IS_LAYOUT) TYPE  SLIS_LAYOUT_ALV OPTIONAL            
    *"             VALUE(IT_FIELDCAT) TYPE  SLIS_T_FIELDCAT_ALV OPTIONAL      
    *"             VALUE(IT_EXCLUDING) TYPE  SLIS_T_EXTAB OPTIONAL            
    *"             VALUE(IT_SPECIAL_GROUPS) TYPE  SLIS_T_SP_GROUP_ALV         
    *"                             OPTIONAL                                   
    *"             VALUE(IT_SORT) TYPE  SLIS_T_SORTINFO_ALV OPTIONAL          
    *"             VALUE(IT_FILTER) TYPE  SLIS_T_FILTER_ALV OPTIONAL          
    *"             VALUE(IS_SEL_HIDE) TYPE  SLIS_SEL_HIDE_ALV OPTIONAL        
    *"           VALUE(I_DEFAULT) DEFAULT 'X'
    "             VALUE(I_SAVE) DEFAULT SPACE                             
    "             VALUE(IS_VARIANT) LIKE  DISVARIANT                      
    "                             STRUCTURE  DISVARIANT DEFAULT SPACE     
    "             VALUE(IT_EVENTS) TYPE  SLIS_T_EVENT OPTIONAL            
    "             VALUE(IT_EVENT_EXIT) TYPE  SLIS_T_EVENT_EXIT OPTIONAL   
    "             VALUE(IS_PRINT) TYPE  SLIS_PRINT_ALV OPTIONAL           
    "             VALUE(IS_REPREP_ID) TYPE  SLIS_REPREP_ID OPTIONAL       
    "             VALUE(I_SCREEN_START_COLUMN) DEFAULT 0                  
    "             VALUE(I_SCREEN_START_LINE) DEFAULT 0                    
    "             VALUE(I_SCREEN_END_COLUMN) DEFAULT 0                    
    "             VALUE(I_SCREEN_END_LINE) DEFAULT 0                      
    "       EXPORTING                                                     
    "             VALUE(E_EXIT_CAUSED_BY_CALLER)                          
    "             VALUE(ES_EXIT_CAUSED_BY_USER) TYPE  SLIS_EXIT_BY_USER   
    "       TABLES                                                        
    "              T_OUTTAB                                               
    "       EXCEPTIONS                                                    
    "              PROGRAM_ERROR
    Import parameters
    I_INTERFACE_CHECK: Interface consistency check log output.
    I_CALLBACK_PROGRAM: Name of the calling program
    I_CALLBACK_PF_STATUS_SET: Set EXIT routine to status.   
    I_CALLBACK_USER_COMMAND: EXIT routine for command handling
    I_STRUCTURE_NAME: Internal output table structure name     
    IS_LAYOUT: List layout specifications 
    IT_FIELDCAT: Field catalog with field descriptions
    IT_EXCLUDING: Table of inactive function codes   
    IT_SPECIAL_GROUPS: Grouping fields for column selection
    IT_SORT: Sort criteria for first list display
    IT_FILTER: Filter criteria for first list output
    IS_SEL_HIDE     : Selection information modification
    I_DEFAULT:      Initial variant active/inactive logic
    I_SAVE: Variants can be saved
    IS_VARIANT     : Variant information
    IT_EVENTS: Table of events to perform  IT_EVENT_EXIT :  Standard fcode exit requests table 
    IS_PRINT: Print information
    IS_REPREP_ID: Initialization keys for Re/Re interface
    I_SCREEN_START_COLUMN: Coordinates for list in dialog box
    I_SCREEN_START_LINE: Coordinates for list in dialog box
    I_SCREEN_END_COLUMN: Coordinates for list in dialog box        
    I_SCREEN_END_LINE: Coordinates for list

  • Doubt in function module BAL_DSP_LOG_DISPLAY

    Hai, guys,
    i have doubt in the function module BAL_DSP_LOG_DISPLAY.
    actually after executing the functin module bapi_acc_document_post, how to pass bapi return table to this function module bal_dsp_log_display.
    if any one know means please tell me with sample coding.
    thanks in advance.
    From Elamaran.

    Hi Elamaran!
    Did you try to use SE37 with this module and use "Where-Used List" (CTRL + SHIFT + F3)? This should give you enough examples to look through.
    Best regards
    Wolfgang
    Message was edited by: Ralf Wolfgang Geithner

  • Exception of function modul

    Hi,
    I develop on the EP 6.0 and I use JCA (ConnectorService) to get a connection to a R/3.
    How can I get the exeption of a function modul?
    Thanks,
    Christian

    Hi , you can do like this.
    CASE SY-SUBRC.
    WHEN 1.
    WRITE: 'alt_not_found'.
    WHEN 2.
    WRITE : 'missing_authorization '.
    WHEN 3.
    WHEN 4.
    WHEN 5.
    WHEN 6.
    WHEN 7.
    WHEN 8.
    WHEN 9.
    ENDCASE.

  • Usage of function module Material_Read

    hi
    Can anybody explain me how to use function module Material_Read with various necessary parameters .
    You can also mail me on  [email protected]
    Thanx n Regards
    Jitesh

    You check the function module by checking the function module help in SE37.
    The following is the details of Function Module Material_Read
    Call
      CALL FUNCTION 'MATERIAL_READ'
          EXPORTING  SCHLUESSEL = MTCOM
          IMPORTING  MATDATEN   = View table
                     RETURN     = MTCOR
          TABLES     SEQMAT01   = Internal table
        ( EXCEPTIONS Material_not_found = 4
                     Plant_not_found    = 8 .  )
          Exceptions statement useful only for required tables (see below).
    Required tables
    If a table flagged as a required table does not exist, the function module terminates at this point and issues an error message. The error message can be suppressed with the exceptions statement, in which case a return code in SY-SUBRC is given instead. In both cases (with or without EXCEPTIONS), the function module does not return any data in the event of an error. You can inactivate all required tables for the view dynamically (as a whole, not individually) by setting the flag MTCOM-NOMUS.
    Return codes
    If the function module ends without an error message, a return code flag can be interrogated for each table in structure MTCOR; for example, MTCOR-RMARD = X means that the function module tried to read table MARD, but did not succeed. If the flag is not set, the table was read successfully or the function module did not try to read table MARD at all (because the table is not contained in the view or because no storage location was specified).
    MTCOR-LVORM
    This flag is set if the object is flagged for deletion.
    MTCOR-PSTAT/MTCOR-FSTAT
    If you specify a maintenance status in MTCOM, for example, MTCOM-PSTAT = BDE, the system checks whether the object has been maintained by the user departments Accounting (B), Material Requirements Planning (D), and Purchasing (E). As a result:
    Field MTCOR-PSTAT contains the user departments that have maintained the object; for example, MTCOR-PSTAT = B means that the object has been maintained by Accounting, but not by MRP or Purchasing.
    Field MTCOR-FSTAT contains the user departments that have not maintained the object, but that could have maintained it; that is, the system checks whether the user department is allowed by the material type.
    Note
    This check takes time (performance). If it is not required, the function module should always be called with MTCOM-PSTAT = space.
    MTCOM-NOVOR
    If a plant has been specified, but no valuation level or sales organization, the function module automatically adopts (for the plant specified) the corresponding values for the valuation level and sales organization in table T001W. You can inactivate this function by setting the flag MTCOM-NOVOR.
    Locking materials
    If materials are locked by function module MATERIAL_READ, MATERIAL_READ_MAKF, or by other function modules of function groups MATL or MAKF, the information on which materials were already locked is buffered for performance reasons. This buffer is reset or ignored if the two indicators (MTCOM-)KZSPR and (MTCOM-)KZRFB are set. You can also use function module MATERIAL_RESET_ENQ_BUFFER or MATERIAL_RESET_ENQ_BUFFER_MAKF to completely reset this buffer. This can, for example, be necessary if function module DEQUEUE_ALL has been executed.
    Parameters
    SCHLUESSEL
    MATDATEN
    RETURN
    MATPER
    SEQMAT01
    Exceptions
    ACCOUNT_NOT_FOUND
    BATCH_NOT_FOUND
    FORECAST_NOT_FOUND
    LOCK_ON_ACCOUNT
    LOCK_ON_MATERIAL
    LOCK_ON_PLANT
    LOCK_ON_SALES
    LOCK_ON_SLOC
    LOCK_ON_BATCH
    LOCK_SYSTEM_ERROR
    MATERIAL_NOT_FOUND
    PLANT_NOT_FOUND
    SALES_NOT_FOUND
    SLOC_NOT_FOUND
    SLOCNUMBER_NOT_FOUND
    SLOCTYPE_NOT_FOUND
    TEXT_NOT_FOUND
    UNIT_NOT_FOUND
    INVALID_MCH1_MATNR
    INVALID_MTCOM
    SA_MATERIAL
    WV_MATERIAL
    WAART_ERROR
    T134M_NOT_FOUND
    Reward Points if useful.

  • Details about ABAP Function Module

    Hi All,
    I am trying to get information about the data returned by 2 ABAP function modules. These are :-
    1) TH_WPINFO - Shows the number of work processes running on the SAP system. The table fields are:-
    WP_NO
    WP_TYP
    WP_PID
    WP_STATUS
    WP_WAITING
    WP_SEM
    WP_RESTART
    WP_DUMPS
    WP_CPU
    WP_ELTIME
    WP_MANDT
    WP_BNAME
    WP_REPORT
    WP_ACTION
    WP_TABLE
    WP_SERVER
    WP_WAITINF
    WP_WAITTIM
    2) TH_WP_DETAIL_INFO - Shows the additional details about a particular work process. The table fields are:-
    EYEON
    STARTTIME1
    STARTTIME2
    ENDTIME1
    ENDTIME2
    RESPTIME
    ROLLED_OUT
    CPUTIME
    QUEUETIME
    GUITIME
    GUICNT
    GUINETTIME
    L_ENDTIME1
    L_ENDTIME2
    RFCTI
    RFCCNT
    INPUTLEN
    OUTPUTLEN
    MAXROLL
    MAXPAGE
    ROLLINCNT
    ROLLINTI
    ROLLOUTCNT
    ROLLOUTTI
    LOCKCNT
    LOCKTI
    READDIRCNT
    READDIRTI
    READDIRREC
    READDIRBUF
    READSEQCNT
    READSEQTI
    READSEQREC
    READSEQBUF
    PHYREADCNT
    INSCNT
    INSTI
    INSREC
    PHYINSCNT
    UPDCNT
    UPDTI
    UPDREC
    PHYUPDCNT
    DELCNT
    DELTI
    DELREC
    PHYDELCNT
    COMMITTI
    DBPROCCNT
    DBPROCTI
    GENERATETI
    REPLOADTI
    CUALOADTI
    DYNPLOADTI
    SRCLODCNT
    DSQLCNT
    QUECNT
    QUETI
    DDICTI
    MEMSUM
    PRIVSUM
    USEDBYTES
    MAXBYTES
    MAXBYTESDI
    ADCNT
    ADTIME
    DISPCNT
    ACCOUNT
    TRANSID
    TERMINAL
    REPORT
    DYNPRONR
    TCODE
    CUAPRG
    CUAFUNC
    DIA_FILL_1
    EYEOFF
    As you can see, the tables shown by these function modules have lots of columns but there is not much description (In fact, nothing at all) about them. If anybody has used these function modules before can you please point me to a location where I can find documentation for these. I have already searched on SAP help portal but it doesn't show any information about this. I tried with TCODE SM50 on my SAP GUI but it doesn't give precise information. Please suggest on how or where I can find description for these tables.
    Many Thanks in advance!!!
    - John

    Hi John!
    There is no documentation - you can't expect, that <i>every</i> bit is documented in SAP.
    If you are interested in something special, ask this - but I doubt that you will find someone, who writes a FM documentation based on his own experience.
    The most important fields you can guess by the name or comparing with SM50 / SM66.
    Regards,
    Christian

  • Printing options in parameters of function module of smartforms

    HI experts,
    i hav a loop inside driver program where for every loop it calls smartform and the printing is continuous. But can any one help me how to control this by not displaying LPD. So that directly i can see the preview after all loop passes
    Advanced
    thanks
    Krish

    Hi,
    In this I suggest you to capture the data in the OTF format adn append the details after every LOOP pass and finally after ENDLOOP. Now use this OTF data to display the details in PDF where you have option to save the details and Print the form details.
    Pass the below variable as 'X' in the control parameters of the Smartform.
    ssfctrlop-getotf = 'X'.
    Now capture the OTF data return from the Smartform Function Module in the Importing Parameter "job_output_info" as shown below.
    data : wa_otf          TYPE ssfcrescl,
              it_otf type standard table of ssfcrescl with header  line.
    *ssfctrlop-getotf* = 'X'.
    Loop you Internal_table.
    *--Call the Smartform Function Module for Displaying the Details
        CALL FUNCTION lv_fname
          EXPORTING
            control_parameters = wa_ssfctrlop
            output_options     = wa_ssfcompop
            user_settings      = k_space1
            wa_output          = p_details
          IMPORTING
            job_output_info    = wa_otf
          EXCEPTIONS
            formatting_error   = 1
            internal_error     = 2
            send_error         = 3
            user_canceled      = 4
            OTHERS             = 5.
    append wa_otf to it_otf.
    Endloop.
    *--To display the Smartform the PDF format where thr Printing the Form
    *--can be done
          CALL FUNCTION 'HR_IT_DISPLAY_WITH_PDF'
            TABLES
              otf_table = it_otf-otfdata.

  • Function modules Exit and Init

    Hi Friends,
    What is the purpose of function modules init and exit in the "Exit" functions.
    why two function modules are using in the Exit functions?
    Please give me relevant secanarios?
    will assign the points.
    Thanks
    BPS

    <b>FM Initialization</b>:
    A function module to initialize the planning function. This function module is optional. It is only required if new transaction data records are to be generated in the planning function that are different, in terms of the combinations of values, to characteristics in the previous transaction data that are not to be changed. The keys for these new transaction data records are delivered by the function module in the table ETO_CHAS. The keys are supplemented by the keys of the transaction data that already exist. The data objects for which the planning function is called up are formed from these keys. They also influence how often and with which combinations of transaction data the second function module is called up.
    <b>Function Module:</b>
    A function module that is called up several times and that changes transaction data records. This function module receives a package of transaction data records in each case. These differ only in their characteristics to be changed. They have the same values as far as all other characteristics are concerned. The transaction data is in table XTH_DATA. Only the existing records are transferred. If key combinations were returned by the initialization function module, and no transaction data exists for these, then table XTH_DATA is empty. The key combination is in the table ITO_CHASEL.
    Its not necessary to write a init FM unless you need to generate new records by the exit function.
    regards,
    sanjay.

  • Testing custom function modules

    Hi Friends ....
      As I am new to ABAP testing , I need help in knowing how to test custom function modules .
    Below is how I am trying :
      Step : 1 -- >  Open Tcode SE37
      Step : 2 -->  Display the function module
       Step : 3 --> Do its syntax check.....activate it..... execute it
       What if no test data is available???
    I am trying to execute directly where it gives a return parameter for some function modules saying No Entry \ No data available for this ID etc.,
    I am in a confusion whether its correct or not
    I want some ideas regarding this
                                 - Swapna

    >
    Swapna Vadlamani wrote:
    > Hi Anupama...
    >
    >   Thank u a ton for the quick reply...but I have another doubt..if I execute without giving any selection parameter data...it says
    >
    >   No data stored for in the selected period
    >
    >                                 -Swapna
    Ok, so that is what it does if you don't pass it any selection parameter data - I doubt very much if that is how it will be used in Production.  Any function module is just a bit of code that does what it has been programmed to do; to test it you just need to find out what it is supposed to do from whoever has asked for it to be built and then check that it does it.  If there is no test data set up, then you'll need to find out from your functional consultant how to set some up or get them to set it up for you.

  • Using function module SD_CUSTOMER_MAINTAIN_ALL

    Hello @ll,
    I'm trying to use the function module SD_CUSTOMER_MAINTAIN_ALL for changing the value of KNA1-TELBX. But it doesn't work at all because the value of this field won't be updated on database. And I don't get any return code from the function module. What I'm doing wrong?
    Here is the used coding:
    DATA:
    wa_kna1 TYPE kna1.
    PARAMETERS:
    p_kunnr TYPE kunnr DEFAULT '91'.
    START-OF-SELECTION.
    SELECT SINGLE * FROM kna1 INTO wa_kna1 WHERE kunnr EQ p_kunnr.
    wa_kna1-telbx = '999'.
    CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'
    EXPORTING
    i_kna1                              = wa_kna1
    COMMIT WORK.
    Thanks for any helpful answers!
    Chris

    Hey David,
        Try like this..
        CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'
    EXPORTING
       I_KNA1                              = wa_kna1
       I_FROM_CUSTOMERMASTER               = 'X'
    IMPORTING
       E_KUNNR                             = l_kunnr
       E_SD_CUST_1321_DONE                 = l_val
    EXCEPTIONS
       CLIENT_ERROR                            = 1
       KNA1_INCOMPLETE                     = 2
       KNB1_INCOMPLETE                     = 3
       KNB5_INCOMPLETE                     = 4
       KNVV_INCOMPLETE                     = 5
       KUNNR_NOT_UNIQUE                   = 6
       SALES_AREA_NOT_UNIQUE         = 7
       SALES_AREA_NOT_VALID            = 8
       INSERT_UPDATE_CONFLICT         = 9
       NUMBER_ASSIGNMENT_ERROR  = 10
       NUMBER_NOT_IN_RANGE            = 11
       NUMBER_RANGE_NOT_EXTERN   = 12
       NUMBER_RANGE_NOT_INTERN    = 13
       ACCOUNT_GROUP_NOT_VALID     = 14
       PARNR_INVALID                            = 15
       BANK_ADDRESS_INVALID             = 16
       TAX_DATA_NOT_VALID                  = 17
       NO_AUTHORITY                             = 18
       COMPANY_CODE_NOT_UNIQUE    = 19
       DUNNING_DATA_NOT_VALID          = 20
       KNB1_REFERENCE_INVALID          = 21
       CAM_ERROR                                  = 22
       OTHERS                                         = 23.
    Regards,
      Jayram..

  • Document number generated from function module K_COSTS_PLAN_INTERFACE_TOTAL

    Dear friends,
      I am using function module K_COSTS_PLAN_INTERFACE_TOTAL to upload the Planning costs, After this function module call I need the document number generated for that item, but there is no return parameter from this function module which would give me the document number generated. Please let me know how to get the document number after this function module call.

    Hi...
    Try this function module..
    CALL FUNCTION 'BAPI_DOCUMENT_GETLATEST2' "
      EXPORTING
        documenttype =              " bapi_doc_aux-doctype  Document type
        documentnumber =            " bapi_doc_aux-docnumber  Document number
        documentpart =              " bapi_doc_aux-docpart  Documentation - text lines
        documentversion =           " bapi_doc_aux-docversion  Document version
        multilevelexplosion = 'X'   " bapi_doc_aux-flag  Document management indicator
    *   docbomchangenumber = SPACE  " bapi_doc_draw2-ecnumber  Change number
    *   docbomvalidfrom = SY-DATUM  " bapi_doc_draw2-validfromdate  Valid-From Date
    *   docbomrevisionlevel = SPACE  " bapi_doc_draw2-revlevel  Revision level
    *   loadlatest = 'X'            " bapi_doc_aux-flag  Document management indicator
    *   loadlatestreleased = 'X'    " bapi_doc_aux-flag  Document management indicator
    *   search_new_maindoc = SPACE  " bapi_doc_aux-flag  Document management indicator
    *   getdocdata = SPACE          " bapi_doc_aux-flag  Document management indicator
    *   getobjectlinks = SPACE      " bapi_doc_aux-flag  Document management indicator
    *   getdocdescriptions = SPACE  " bapi_doc_aux-flag  Document management indicator
    *   getlongtexts = SPACE        " bapi_doc_aux-flag  Document management indicator
    *   getstatuslog = SPACE        " bapi_doc_aux-flag  Document management indicator
    *   getdocfiles = SPACE         " bapi_doc_aux-flag  Document management indicator
    *   getcomponents = SPACE       " bapi_doc_aux-flag  Document management indicator
    *   getclassification =         " bapi_doc_aux-flag  Document Management Indicator
    *   getstructures =             " bapi_doc_aux-flag  Document Management Indicator
    *   getwhereused =              " bapi_doc_aux-flag  Document Management Indicator
    *   sortf_exclude = SPACE       " stpox-sortf   Sort string
    *   sortf_stop_expl = SPACE     " stpox-sortf   Sort string
    *   expl_docs_only_once = 'X'   " bapi_doc_aux-flag  Document management indicator
    *   stop_on_first_error = SPACE  " bapi_doc_aux-flag  Document Management Indicator
      IMPORTING
        return =                    " bapiret2      Return parameter
        newversion =                " bapi_doc_aux-docversion  Document version
      TABLES
        docstructure =              " stpox         BOM Items (Extended for List Displays)
    *   changedversions =           " tchg_vers     Table for Transferring Changed Document Versions
    *   statuslist =                " tstate_order  Sequence of Status Check
    *   documentdata =              " bapi_doc_draw2  BAPIS DMS: document data
    *   objectlinks =               " bapi_doc_drad_keys  BAPIS DMS: document data
    *   documentdescriptions =      " bapi_doc_drat_keys  BAPIS DMS: document data
    *   longtexts =                 " bapi_doc_text_keys  BAPIS DMS: document data
    *   statuslog =                 " bapi_doc_drap_keys  BAPIS DMS: document data
    *   documentfiles =             " bapi_doc_files2_keys  BAPIS DMS: document data
    *   components =                " bapi_doc_comp_keys  BAPIS DMS: document data
    *   all_returns =               " bapiret2      Return Parameters
    *   characteristicvalues =      " bapi_char_values_keys  BAPI Structure for Characteristic Value Assignment (Docs)
    *   classallocations =          " bapi_class_allocation_keys  BAPI Structure for the Assignment of Classes to Several Objects
    *   documentstructures =        " bapi_doc_structure_keys  BAPIs DMS: Structure Data for Several Documents
    *   whereusedlists =            " bapi_doc_structure_keys  BAPIs DMS: Structure Data for Several Documents
        .  "  BAPI_DOCUMENT_GETLATEST2
    And also check this link..
    Send original document from DMS as mail attachment
    Hope this will help you..
    Regards,
    Jhings

  • Web Services  from ABAP function modules return values- leading zeros

    I am using several web services from SAP CRM (5.0) that were created from Function modules ( I am assuming that that they are in ABAP).
    I can call the web services fine and they work as expected, but I am seeing a lot of leading zeros in the return values of fields in tables from the Web service.
    The ABAP er’s are telling me that they cannot see the leading zero’s.
    So my question is where these are appended to the values in the whole process. When I execute the Function Module in SAP CRM from transaction SE37 I can see the leading zeros. So I think that this is something that has to be handled by the ABAP er’s and not in the client consuming the web service.
    Are the functions in SAP CRM that can remove leading zeros for fields in a table (that is an export parameter?)
    Jawahar

    Hello Jawahar
    If you run your (RFC-enabled) function modules using the SAP-GUI (i.e. in dialog) then the GUI automatically replaces leading zero when the function module returns any data. However, calling the same function module remotely you will always see these leading zeros.
    These so-called conversion exits are defined as attribute of domains in the ABAP dictionary. If the function module used for the WebService is a standard fm then you have little chances to get rid of the leading zero. Perhaps the WebService has some attribute to suppress conversion exits or activate them when retrieving the data.
    Regards, 
       Uwe

Maybe you are looking for

  • AR Aging Report by Due Date

    Hello: I did the OB transfer from another database. I transferred all the invoices by due date. After the transfer I tried to run an aging report. The aging report does not show the AR by age. I just see the total. Any help to resolve this will be mu

  • A simple problem (should be)

    I am trying to download Adobe Flash so I can watch DirecTV in Europe. It will not accept my password. I changed the password, still no go. I chatte with an adobe person who reset it twice, gave me a new password that let me log in to Adobe, but it st

  • The IM translator does not open rather Blank Mozilla page comes up Help to overcome it

    I had IM translator working for few years.Lately it does not open up.Instead a blank maximum page of Mozilla appears. I tried to delete the translator and reintroduce it.It does not work.Also the mail from one web site does not open. All this started

  • Removing Flex Stack Configuration from a removed member

    Hi all I'm pretty new to Felx Stack.I tried to stack 4 C2960-48TDL switches.All four switches were configured seperatley with different Managment IPs(192.168.172.11/12/13/14) before stacking.And The highest Up time switch became the master as expecte

  • Change date format in BEx report

    There is a date field in report which is character type. ZCOMDAT - compensation date (CHAR 8) The output of this file in report is YYYYMMDD (20110422) format which is char This should be converted to 22-APR-2011 in BEx report. This object is used in