I_UPDMODE has no value in my Function Module when using Delta Extraction

Help me please.
My system is BW 3.52
Please see the source code below and tell me why I_UPDMODE has not been passed value. I have ever used "I_SOURCE" but the value pass to I_DSOURCE. Can anyone tell me where is the upload mode pass to?
FUNCTION ZBWFN_TEST_DELTA.
""Local Interface:
*"  IMPORTING
*"     VALUE(I_REQUNR) TYPE  SBIWA_S_INTERFACE-REQUNR
*"     VALUE(I_DSOURCE) TYPE  SBIWA_S_INTERFACE-ISOURCE OPTIONAL
*"     VALUE(I_MAXSIZE) TYPE  SBIWA_S_INTERFACE-MAXSIZE OPTIONAL
*"     VALUE(I_INITFLAG) TYPE  SBIWA_S_INTERFACE-INITFLAG OPTIONAL
*"     VALUE(I_UPDMODE) TYPE  SBIWA_S_INTERFACE-UPDMODE OPTIONAL
*"     VALUE(I_DATAPAKID) TYPE  SBIWA_S_INTERFACE-DATAPAKID OPTIONAL
*"     VALUE(I_RLOGSYS) TYPE  SRSC_S_INTERFACE-RLOGSYS OPTIONAL
*"     VALUE(I_READ_ONLY) TYPE  SRSC_S_INTERFACE-READONLY OPTIONAL
*"  TABLES
*"      I_T_SELECT TYPE  SBIWA_T_SELECT OPTIONAL
*"      I_T_FIELDS TYPE  SBIWA_T_FIELDS OPTIONAL
*"      E_T_DATA STRUCTURE  ZISU_ERCHC OPTIONAL
*"  EXCEPTIONS
*"      NO_MORE_DATA
*"      ERROR_PASSED_TO_MESS_HANDLER
This extractor is part of a delta scenario based on a timestamp
included in the fields of table ROVERCUBE1. The interesting part
takes place in form get_time_interval, where the date range is
calculated update modespecifically.
The pointer for the date up to which delta was extracted during
the last delta update is held in table ROBWQTSTAT.
  TABLES: ZISU_TP_ERCHC, ERCH, ERCHC.
Auxiliary Selection criteria structure
  DATA: L_S_SELECT TYPE SBIWA_S_SELECT.
  DATA: L_ERCHC LIKE ZISU_TP_ERCHC OCCURS 0 WITH HEADER LINE.
  DATA: L_DATE LIKE SY-DATUM,
            L_ACTUAL_DATE LIKE SY-DATUM,
            L_LAST_DATE LIKE SY-DATUM.
Maximum number of lines for DB table
  STATICS: L_MAXSIZE TYPE SBIWA_S_INTERFACE-MAXSIZE,
           BEGIN OF S_S_INTERFACE.
  INCLUDE TYPE SBIWA_S_INTERFACE.
  INCLUDE TYPE SRSC_S_INTERFACE.
  STATICS: END OF S_S_INTERFACE.
STATICS: BEGIN OF S_R_TSTMP OCCURS 1,
            SIGN(1),
            OPTION(2),
            LOW  LIKE ROVERCUBE1-TSTMP,
            HIGH LIKE ROVERCUBE1-TSTMP,
          END   OF S_R_TSTMP.
Initialization mode (first call by SAPI) or data transfer mode
(following calls) ?
  IF I_INITFLAG = SBIWA_C_FLAG_ON.
Invalid second initialization call -> error exit
    IF NOT G_FLAG_INTERFACE_INITIALIZED IS INITIAL.
      IF 1 = 2. MESSAGE E008(R3). ENDIF.
      LOG_WRITE 'E'                    "message type
                'R3'                   "message class
                '008'                  "message number
                ' '                    "message variable 1
                ' '.                   "message variable 2
      RAISE ERROR_PASSED_TO_MESS_HANDLER.
    ENDIF.
Check DataSource validity
    CASE I_DSOURCE.
      WHEN 'ZOVER_TRANS'.
      WHEN 'TEST_ROVERCUBE'.
      WHEN 'DO_DATASOURCE'.
      WHEN '0VER_DELTA_WITH_LONG_NAME'.
      WHEN '0VER_CUBE_OLD_LIS'.
      WHEN '0VER_TYPE_ATTR'.
      WHEN OTHERS.
        IF 1 = 2. MESSAGE E009(R3). ENDIF.
        LOG_WRITE 'E'                  "message type
                  'R3'                 "message class
                  '009'                "message number
                  I_DSOURCE            "message variable 1
                  ' '.                 "message variable 2
        RAISE ERROR_PASSED_TO_MESS_HANDLER.
    ENDCASE.
Check for supported update mode
    CASE I_UPDMODE.
      WHEN 'F'.
      WHEN 'D'.
      WHEN 'C'.
      WHEN 'R'.
      WHEN 'S'.
      WHEN OTHERS.
        IF 1 = 2. MESSAGE E011(R3). ENDIF.
        LOG_WRITE 'E'                  "message type
                  'R3'                 "message class
                  '011'                "message number
                  I_UPDMODE            "message variable 1
                  ' '.                 "message variable 2
        RAISE ERROR_PASSED_TO_MESS_HANDLER.
    ENDCASE.
    APPEND LINES OF I_T_SELECT TO G_T_SELECT.
Fill parameter buffer for data extraction calls
    S_S_INTERFACE-REQUNR    = I_REQUNR.
    S_S_INTERFACE-ISOURCE   = I_DSOURCE.
    S_S_INTERFACE-MAXSIZE   = I_MAXSIZE.
    S_S_INTERFACE-INITFLAG  = I_INITFLAG.
    S_S_INTERFACE-UPDMODE   = I_UPDMODE.
    S_S_INTERFACE-RLOGSYS   = I_RLOGSYS.
    S_S_INTERFACE-READONLY  = I_READ_ONLY.
    G_FLAG_INTERFACE_INITIALIZED = SBIWA_C_FLAG_ON.
    APPEND LINES OF I_T_FIELDS TO G_T_FIELDS.
here the timerange for update modes concerning delta is calculated
and the status table is updated
    PERFORM GET_CAL_INTERVAL TABLES G_R_DELTA_DATE[]
                              USING  S_S_INTERFACE-ISOURCE
                                         S_S_INTERFACE-UPDMODE
                                         S_S_INTERFACE-RLOGSYS.
  ELSE.                 "Initialization mode or data extraction ?
Data transfer: First Call      calcualte range tables for key fields
                               calculate date range due to update mode
                               OPEN CURSOR + FETCH
               Following Calls FETCH only
First data package -> OPEN CURSOR
    G_COUNTER_DATAPAKID = G_COUNTER_DATAPAKID + 1.
    IF G_COUNTER_DATAPAKID = 1.
Fill range tables.
     LOOP AT G_T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'COUNTRY'.
       MOVE-CORRESPONDING L_S_SELECT TO L_R_COUNTRY.
       APPEND L_R_COUNTRY.
     ENDLOOP.
     LOOP AT G_T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'REGION'.
       MOVE-CORRESPONDING L_S_SELECT TO L_R_REGION.
       APPEND L_R_REGION.
     ENDLOOP.
     LOOP AT G_T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'KUNNR'.
       MOVE-CORRESPONDING L_S_SELECT TO L_R_KUNNR.
       APPEND L_R_KUNNR.
     ENDLOOP.
     LOOP AT G_T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'TYPE'.
       MOVE-CORRESPONDING L_S_SELECT TO L_R_TYPE.
       APPEND L_R_TYPE.
     ENDLOOP.
     LOOP AT G_T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'GJAHR'.
       MOVE-CORRESPONDING L_S_SELECT TO L_R_GJAHR.
       APPEND L_R_GJAHR.
     ENDLOOP.
no data must be selected in Init simulation mode
      CHECK S_S_INTERFACE-UPDMODE NE SRSC_C_UPDMODE_INITSIMU.
Determine number of database records to be read per FETCH statement
from input parameter I_MAXSIZE.
      L_MAXSIZE = G_S_INTERFACE-MAXSIZE.
      REFRESH: L_ERCHC.
      SELECT * FROM ERCH WHERE ERDAT IN G_R_DELTA_DATE
                                      OR AEDAT IN G_R_DELTA_DATE.
        SELECT SINGLE * FROM ERCHC WHERE BELNR = ERCH-BELNR.
        IF SY-SUBRC = 0.
          CLEAR: L_ERCHC.
          L_ERCHC-BUKRS = ERCH-BUKRS.
          L_ERCHC-ABRVORG = ERCH-ABRVORG.
          L_ERCHC-PORTION = ERCH-PORTION.
          L_ERCHC-GPARTNER = ERCH-GPARTNER.
          IF ERCHC-CPUDT IN G_R_DELTA_DATE.
            L_ERCHC-DELDT = ERCHC-CPUDT.
            L_ERCHC-DOCDT = ERCHC-BUDAT.
            L_ERCHC-RELNO = 1.
            COLLECT L_ERCHC.
          ENDIF.
          IF ERCHC-INTCPUDT IN G_R_DELTA_DATE AND
             ERCHC-INTCPUDT IS NOT INITIAL.
            L_ERCHC-DELDT = ERCHC-INTCPUDT.
            L_ERCHC-DOCDT = ERCHC-INTBUDAT.
            L_ERCHC-REVNO = 1.
            COLLECT L_ERCHC.
          ENDIF.
        ENDIF.
      ENDSELECT.
      DELETE FROM ZISU_TP_ERCHC.
      LOOP AT L_ERCHC.
        MOVE-CORRESPONDING L_ERCHC TO ZISU_TP_ERCHC.
        INSERT ZISU_TP_ERCHC.
      ENDLOOP.
      OPEN CURSOR WITH HOLD G_CURSOR FOR
      SELECT * FROM ZISU_TP_ERCHC.
    ENDIF.                             "First data package ?
    IF S_S_INTERFACE-UPDMODE = SRSC_C_UPDMODE_INITSIMU.
      RAISE NO_MORE_DATA.
    ENDIF.
Fetch records into interface table.
    FETCH NEXT CURSOR G_CURSOR
               APPENDING CORRESPONDING FIELDS OF TABLE E_T_DATA
               PACKAGE SIZE  S_S_INTERFACE-MAXSIZE.
    IF SY-SUBRC <> 0.
      RAISE NO_MORE_DATA.
    ENDIF.
  ENDIF.              "Initialization mode or data extraction ?
ENDFUNCTION.

Dave,
1. You can fire SELECTS in an RFC as well, but in your case the data exists in SYSTEM A and the RFC is in System B, so you can't do that. You can fire SELECTS on tables in the same system.
2. Quick example of two table loops - EKKO (HEADER) EKPO (ITEM).
LOOP AT EKKO.
LOOP AT EKPO WHERE EBELN = EKKO-EBELN.
ENDLOOP.
ENDLOOP.
I hope this is clear now.
Regards,
Ravi

Similar Messages

  • Impact of Function Modules when used in upgraded versions

    Hello Experts,
              I wan to know the Impact of Function Modules when used in upgraded versions. How the function module works irrespective of changes done to it in the latest verisons
    Thanks in Advance

    Hi,
    If the function modules is released, it should not have any impact. However if not released, use them with caution as SAP does not support non-released function modules.
    Cheers.
    ...Reward if useful.

  • Function module when used should not display ALV

    Hi ,
    All ABAP Gurus
    I want to use a function module WS_DELIVERY_MONITOR which should give the VBELN on the basis of CHARG in internal table so that on the basis of VBELN I can fulfil further requirement and display the final output in ALV.
    But this function module when executed display an ALV.
    My requirement is that it should retrieve all the VBELN on the basis of CHARG (which is in the internal table and is passed to the function module) in an internal table and do not display the ALV so that when all the VBELN come in internal table then I can perform further calculation.
    Please guide me in this matter.
    Thanks & Regards
    Bharti Jain

    Hi Bharti,
    Please try calling FM 'WS_LM_DATA_SELECTION' instead. This FM is callled inside main FM 'WS_DELIVERY_MONITOR' and is used to fetch data. You will only need to fill extra import parameter for using  this FM ( if_flag_inbound) and two changing tables  (lt_postab) and  ( lt_postab_kodat), which will have results. 'if_flag_inbound' field will be having value X for all inbound cases.
    I have used the same FM to get open deliveries:
    CALL FUNCTION 'WS_LM_DATA_SELECTION'
        EXPORTING
          if_proctype                 = c_proc_type_f
        TABLES
          it_matnr                    = i_deliv_matnr
          it_lgort                    = i_deliv_lgort
          it_lfart                    = i_deliv_type
          it_kostk                    = i_deliv_kostk
          it_wbstk                    = i_deliv_wbstk
          ct_postab                   = i_deliv_nos
        CT_POSTAB_KODAT             =
        EXCEPTIONS
          no_data_found               = 1
          wrong_proc_type             = 2
          OTHERS                      = 3 .
      IF sy-subrc = 0.
    **-Calculate open delivery quantity
        LOOP AT i_deliv_nos INTO wa_deliv_nos
                                 WHERE NOT posnr IS INITIAL.
          pc_open_deliv_qty = pc_open_deliv_qty + wa_deliv_nos-lfimg.
        ENDLOOP.
      ENDIF.
    <removed by moderator>
    Edited by: Thomas Zloch on Sep 7, 2010 9:06 AM - please do not ask for ...

  • What for Function module is used in Extraction? Pls provide step by step.

    Hai Experts.
    I am kid infront of u all Experts who is well Experienced in SAP BW need u r help.
    Pls what is the need for Going Extraction by Function Module? Provide the real time scenario step by step with screen schots?
    Thanks a lot........
    Regards
    Ashok

    Hi,
    Check this doc.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
    Regards.

  • Which R/3 function Module is used to extract material data?

    Hi,
    Does someone know which FM is used in R/3 to extract the material data when the replication object 'MATERIAL' is executed?
    Thanks,
    Jeroen

    Hi,
    You can write similar to the below.
    CALL FUNCTION 'CRM_ORDER_READ'
    <b>DESTINATION  'DERCLNT200'</b>
    EXPORTING
    it_header_guid = lt_header_guid
    IMPORTING
    et_orderadm_i = lt_orderadm_i_buffer
    et_customer_i = lt_customer_i_buffer
    CHANGING
    cv_log_handle = lt_log_handle
    EXCEPTIONS
    document_not_found = 1
    error_occurred = 2
    document_locked = 3
    no_change_authority = 4
    no_display_authority = 5
    no_change_allowed = 6
    OTHERS = 7.
    Thanks
    Ramakrishna

  • How to get sysnr value in a Function Module

    Hi all,
    I need to get the sysnr(system number) value of the R/3 system. I execute a RFC function module and need to get the value of sysnr of the system it executes in as a return parameter. Can somebody tell me how to get this value in the function module and return it.
    Thanks and Regards,
    Pratik

    Hello Pratik
    The system number has to be defined in the RFC destination. Thus, select on your local system (where you call the RFC function module) the corresponding RFC destination from table <b>RFCDES</b>. In field RFCDES-RFCOPTIONS you will find a string like this:
    H=<ip address>,S=21,R=N, ...
    S=system number
    Regards
      Uwe

  • Select options values pass to function module

    Hi all,
            I want to pass the values entered in the select options to the function module. How should my function module interface be declared for passing the select options
    I tried declaring like
    t_range type data in the tables tab.  But this throws error. 
    Please let me know how to pass select option values back to function modules.
    Thanks,

    Hi,
    Check this code.
    data: node_flights type ref to if_wd_context_node.
    data: rt_carrid type ref to data.
    data: rt_connid type ref to data.
    data: isflight type table of sflight.
    data: wsflight type sflight.
    field-symbols: <fs_carrid> type table,
    <fs_connid> type table.
    Retrieve the data from the select option
    rt_carrid = wd_this->m_handler->get_range_table_of_sel_field(
    i_id = 'S_CARR_ID' ).
    if rs_carrid is not initial.   Here you can check that if rs_carrid is no initial then assign value of field symbol
    Assign it to a field symbol
    assign rt_carrid->* to <fs_carrid>.
    endif.
    Retrieve the data from the select option
    rt_connid = wd_this->m_handler->get_range_table_of_sel_field(
    i_id = 'S_CONN_ID' ).
    if rt_connid is not initial. Here you can check that if  rt_connid is no initial then assign value of field symbol
    Assign it to a field symbol
    assign rt_connid->* to <fs_connid>.
    endif.
    if  <fs_connid> is not initial and <fs_carrid> is not initial.
    Retrieve that data from the database. Normally it is suggested to
    encapsulate the data retrieval in a separate class.
    For simplicity, the SELECT statement has been implemented here.
    clear isflight. refresh isflight.
    select * into corresponding fields of table isflight from sflight
    where carrid in <fs_carrid>
    and connid in <fs_connid>.
    endif.
    Bind the data to the context
    node_flights = wd_context->get_child_node( name = `FLIGHTS` ).
    node_flights->bind_elements( isflight ).
    Hopes this will helps you.
    Regard
    Manoj Kumar
    Edited by: Manoj Kumar on Mar 16, 2009 10:41 AM

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

  • How to define null or empty value in BAPI function modules?

    Hi,
    I have problem with BAPI functions, where some parameters are mandatory.
    For example: when I try to use HR BAPI's(BAPI_PERSDATA_CHANGE, etc.) I have to insert parameters like SUBTYPE,OBJECTID,LOCKINDICATOR. The PA0002 table that is used from this BAPI doesn't have SUBTYPE, OBJECTID, LOCKINDICATOR, for any of the records that I would like to select.
    So what I tried, was to put a ' ', to indicate that is empty. It returned an error message saying "Make an entry in all required fields". Next tried to put in some values for these fields -- and it returned an error message saying "No data selected from 0002 for this period".
    I also tried to run BAPI_FAMILY_CHANGE that uses data from table PA0021. Here I found some records with  SUBTYPE, OBJECTID fields that were not empty, but LOCKINDICATOR was still missing. So I tried to put LOCINDICATOR value directly in to database (with MS SQL Enterprise Manager).  After that I was able to use BAPI_FAMILY_CHANGE.
    I think that manually inserting data in database is not normal procedure.
    Is there something that I have missed out?
    I mean -- how can I get this to work without inserting data directly in database?
    How can I define null or empty value in BAPI function modules?
    Thank you in advance.
    Best regards,
    Mihail

    Defining an empty value for a parm in a table is easy.
    First get the function's definition from the SAP system
    Second only populate the fields for which you have a value to set
    Third execute the function.
    The JCO takes care of the rest.
    Enjoy

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

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

  • Hi guru's what are the function modules are used in ALV

    hi guru's what are the function modules are used in ALV

    Hi vasu,
    There are some function modules which will enable to produce the  reports without much effort.
    All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.
    1. SIMPLE REPORT.
    The important function modules are
    a. Reuse_alv_list_display
    b. Reuse_alv_fieldcatalog_merge
    c. Reuse_alv_events_get
    d. Reuse_alv_commentary_write
    e. Reuse_alv_grid_display
    A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.
    The important parameters are :
    I. Export :
    i. I_callback_program : report id
    ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status
    iii. I_callback_user_command : routine where the function codes are handled
    iv. I_structure name : name of the dictionary table
    v. Is_layout : structure to set the layout of the report
    vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE
    vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.
    II. Tables :
    i. t_outtab : internal table with the data to be output
    B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
    The Important Parameters are :
    I. Export :
    i. I_program_name : report id
    ii. I_internal_tabname : the internal output table
    iii. I_inclname : include or the report name where all the dynamic forms are handled.
    II Changing
    ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is
    declared in the type pool SLIS.
    C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type
    Parameters :
    I. Import :
    Et_Events : The event table is returned with all possible CALLBACK events
    for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV.
    II. Export :
    I_List_type :
    0 = simple list REUSE_ALV_LIST_DISPLAY
    1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY
    2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND
    3 = hierarchical-sequential block list
    REUSE_ALV_BLOCK_LIST_HS_APPEND
    D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.
    Parameters :
    I. it_list_commentary : internal table with the headings of the type slis_t_listheader.
    This internal table has three fields :
    Typ : ‘H’ – header, ‘S’ – selection , ‘A’ - action
    Key : only when typ is ‘S’.
    Info : the text to be printed
    E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.
    Parameters : same as reuse_alv_list_display
    This is an example for simple list.
    2. BLOCK REPORT
    This is used to have multiple lists continuously.
    The important functions used in this report are:
    A. REUSE_ALV_BLOCK_LIST_INIT
    B. REUSE_ALV_BLOCK_LIST_APPEND
    C. REUSE_ALV_BLOCK_LIST_HS_APPEND
    D. REUSE_ALV_BLOCK_LIST_DISPLAY
    A. REUSE_ALV_BLOCK_LIST_INIT
    Parameters:
    I. I_CALLBACK_PROGRAM
    II. I_CALLBACK_PF_STATUS_SET
    III. I_CALLBACK_USER_COMMAND
    This function module is used to set the default gui status etc.
    B. REUSE_ALV_BLOCK_LIST_APPEND
    Parameters :
    Export :
    I. is_layout : layout settings for block
    II. it_fieldcat : field catalog
    III. i_tabname : internal table name with output data
    IV. it_events : internal table with all possible events
    Tables :
    i. t_outtab : internal table with output data.
    This function module adds the data to the block.
    Repeat this function for all the different blocks to be displayed one after the other.
    C. REUSE_ALV_BLOCK_LIST_HS_APPEND
    This function module is used for hierarchical sequential blocks.
    D. REUSE_ALV_BLOCK_LIST_DISPLAY
    Parameters : All the parameters are optional.
    This function module display the list with data appended by the above function.
    Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.
    3. Hierarchical reports :
    Hierarchical sequential list output.
    The function module is
    A. REUSE_ALV_HIERSEQ_LIST_DISPLAY
    Parameters:
    I. Export:
    i. I_CALLBACK_PROGRAM
    ii. I_CALLBACK_PF_STATUS_SET
    iii. I_CALLBACK_USER_COMMAND
    iv. IS_LAYOUT
    v. IT_FIELDCAT
    vi. IT_EVENTS
    vii. i_tabname_header : Name of the internal table in the program containing the
    output data of the highest hierarchy level.
    viii. i_tabname_item : Name of the internal table in the program containing the
    output data of the lowest hierarchy level.
    ix. is_keyinfo : This structure contains the header and item table field
    names which link the two tables (shared key).
    II. Tables
    i. t_outtab_header : Header table with data to be output
    ii. t_outtab_item : Name of the internal table in the program containing the
    output data of the lowest hierarchy level.
    slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using ‘REUSE_ALV_FIELDCATALOG_MERGE’.
    Important Attributes :
    A. col_pos : position of the column
    B. fieldname : internal fieldname
    C. tabname : internal table name
    D. ref_fieldname : fieldname (dictionary)
    E. ref_tabname : table (dictionary)
    F. key(1) : column with key-color
    G. icon(1) : icon
    H. symbol(1) : symbol
    I. checkbox(1) : checkbox
    J. just(1) : (R)ight (L)eft (C)ent.
    K. do_sum(1) : sum up
    L. no_out(1) : (O)blig.(X)no out
    M. outputlen : output length
    N. seltext_l : long key word
    O. seltext_m : middle key word
    P. seltext_s : short key word
    Q. reptext_ddic : heading (ddic)
    R. ddictxt(1) : (S)hort (M)iddle (L)ong
    S. datatype : datatype
    T. hotspot(1) : hotspot
    some theory regarding alv:
    This table tells ALV which events are processed by the caller by CALLBACK.
    The table of possible events per list type can be initialized using the module REUSE_ALV_EVENTS_GET.
    You can display the names of the constants in the type pools SLIS which represent the individual events using the individual test function in the function module
    REUSE_ALV_EVENT_NAMES_GET. Only events with a form routine name are processed.
    The table structure contains the fields:
    • IT_EVENTS-NAME
    Name of the Callback event.
    Possible Callback events:
    • Action
    USER_COMMAND USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE SLIS_SELFIELD
    Process actions on the list
    As this is a frequently-used Callback event, the form routine can also be passed directly in the interface in the IMPORTING parameter I_CALLBACK_USER_COMMAND.
    PF_STATUS_SET USING RT_EXTAB TYPE SLIS_T_EXTAB
    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.
    ITEM_DATA_EXPAND USING RS_SELFIELD TYPE SLIS_SELFIELD RFLG_ALL TYPE C
    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 which was expanded interactively by the user.
    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 which 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.
    CALLER_EXIT USING RS_DATA Is called at the beginning of the function module to make special settings. It is not usually used.
    • List processing events
    IMPORTANT: The application Callback routine must not manipulate the internal output table and/or its header record. This restriction applies to all Callbacks which are called in the list output and run under the 'List processing events'.
    TOP_OF_LIST no USING parameter. Information output at the start of the list
    END_OF_LIST no USING parameter. Information output at the end of the list
    TOP_OF_PAGE no USING parameter
    Equivalent to the list processing TOP-OF-PAGE event
    END_OF_PAGE no USING parameter. Not available for hierarchical-sequential lists.
    Information output at the end of a page. This is only called for printing.
    TOP_OF_COVERPAGE no USING parameter
    The selection information and list status are output together (if they exist) on a separate page by default. See also the documentation of the parameters:
    IS_PRINT-NO_COVERPAGE
    IS_PRINT-NO_PRINT_SELINFOS
    IS_PRINT-NO_PRINT_LISTINFOS
    IS_LAYOUT-GET_SELINFOS
    The user can format the header area of the 'cover page' himself or herself by specifying a Callback routine for this event.
    END_OF_COVERPAGE no USING parameter
    Analogously to TOP_OF_COVERPAGE the user can add other information to the information output by ALV (selection information, list status) at this event.
    FOREIGN_TOP_OF_PAGE no USING parameter
    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.
    FOREIGN_END_OF_PAGE no USING parameter
    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.
    BEFORE_LINE_OUTPUT USING RS_LINEINFO TYPE SLIS_LINEINFO
    Output information before each output line. Should only be used in justified cases because it costs a lot of performance.
    AFTER_LINE_OUTPUT USING RS_LINEINFO TYPE SLIS_LINEINFO
    Output information after each output line. Should only be used in justified cases because it costs a lot of performance.
    • Internal use only
    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
    • IT_EVENTS-FORM
    Name of the form routine which should be called in the calling program at the event.
    Field_catalog:
    Field catalog with field descriptions
    2.7.1. Description
    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.
    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
    See also the documentation of the function module REUSE_ALV_FIELDCATALOG_MERGE.
    The minimal field catalog is documented under 'default'. The caller can use the other optional parameters to assign output attributes to a field which differ from the default.
    A field catalog need not be built-up and passed explicitly only under the following conditions:
    • 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.
    • all fields in this structure are to be output
    • the structure name is passed to ALV in the parameter I_STRUCTURE_NAME.
    See also the documentation of the IMPORTING paramter I_STRUCTURE_NAME.
    Positioning
    • row_pos (row position)
    value set: 0, 1 - 3
    Only relevant if the list output is to be multi-line (two or three lines) by default.
    A multi-line list can also be defined by the user interactively if the default list is one-line.
    The parameter specifies the relative output line of the column in a multi-line list.
    • col_pos (column position)
    value set: 0, 1 - 60
    only relevant when the default relative column positions differ from the field catalog field sequence. 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 field catalog field sequence.
    Identification
    • fieldname (field name)
    value set: internal output table field name (required parameter)
    Name of the internal output table field which is described by this field catalog entry
    • tabname (internal output table)
    value set: SPACE, internal output table name
    This parameter is used in 'manual' field catalog build-up only for hierarchical-sequential lists.
    Name of the internal output table which contains the field FIELDCAT-FIELDNAME.
    Data Dictionary reference
    • ref_fieldname (reference field name)
    value set: SPACE, Data Dictionary 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.
    • ref_tabname (reference table/structure field name)
    value set: SPACE, name of a Data Dictionary structure or table
    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).
    Reference to fields with currency/measurement unit
    Each internal output table sum or quantity field whose decimal places are to be formatted appropriately for the unit in the list must follow the convention:
    • the field is of data type QUAN or CURR (internal type P) (the field must really have this physical data type. Overwriting the physical data type with the parameter FIELDCAT-DATATYPE has no effect)
    • There is a field in the internal output table which contains the associated unit.
    • There is also an entry in the field catalog for the unit field.
    (If the unit is not to appear as a column in the list, and cannot be interactively displayed as a column, e.g. because it is always unambiguous and is therefore explicitly output by the caller in the list header, the field catalog units field entry can take the parameter FIELDCAT-TECH = 'X'.
    The association of a value field to a unit affects the output as follows:
    • appropriate decimal places display for the unit
    • an initialized field with a link to a non-initial unit is output as '0' for the unit (if FIELDCAT-NO_ZERO is initial). When this field is summed, this unit affects whether the units are homogeneous.
    • an initialized field with a link to an initial unit is output as SPACE. When this field is summed, the unit SPACE does not affect the homogeneity of the units.
    • When non-initial fields with an initial unit are summed, the unit SPACE is considered to be a unit.
    Link to currency unit
    • cfieldname (currency unit field name)
    value set: SPACE, output table field name
    Only relevant for amount columns with associated unit.
    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.
    • ctabname (internal currency unit field output table)
    value set: SPACE, output table field name
    only relevant for hierarchical-sequential lists
    Name of the internal output table containing the FIELDCAT-CFIELDNAME field.
    Link to measurement unit
    • qfieldname (measurement unit field name)
    value set: SPACE, output table 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.
    • qtabname (internal measurement unit field output table)
    value set: SPACE, output table field name
    only relevant for hierarchical-sequential lists
    Name of the internal output table containing the FIELDCAT-QFIELDNAME field.
    Column output options
    • outputlen (column width)
    value set: 0 (initial), n
    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
    • key (key column)
    value set: SPACE, 'X' 'X' = kex field (key field output in color)
    Key fields can not be interactively hidden. Parameter FIELDCAT-NO_OUT must be left initial.
    For exceptions see the documentation of the FIELDCAT-KEY_SEL parameter.
    • key_sel (hideable key column)
    value set: SPACE, 'X'
    only relevant when FIELDCAT-KEY = 'X'
    Key field which 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.
    • no_out (field in field list)
    value set: SPACE, 'X' 'X' = field is not displayed in the current list.
    The user can interactively choose the field for output from the field list.
    The user can display the contents of these fields at line level using the 'Detail' function.
    See also the 'Detail screen' documentation of the parameter IS_LAYOUT.
    • tech (technical field)
    value set: SPACE, 'X' 'X' = technical field
    Field cannot be output in the list and cannot be displayed interactively.
    Field can only be used in the field catalog (not in IT_SORT, ...).
    • emphasize (highlight columns in color)
    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)
    value set: SPACE, 'X'
    'X' = column cells are output as hotspots
    • fix_column (fix column)
    value set: SPACE, 'X'
    Not relevant for block lists (output of several lists consecutively)
    'X' = column fixed (does not scroll horizontally)
    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. See also the documentation of the Layout parameter
    IS_LAYOUT-NO_KEYFIX of the IMPORTING paramter IS_LAYOUT.
    • do_sum (sum over column)
    value set: SPACE, 'X' 'X' = a sum is to be calculated over this internal output table field.
    This function can also be called by the user interactively.
    • no_sum (sums forbidden)
    value set: SPACE, 'X' 'X' = no sum can be calculated over this field, although the data type of the field would allow summing.
    • input (column ready for input)
    Function not available
    Format column contents
    • icon
    value set: SPACE, 'X' 'X' = column contents to be output as an icon.
    The caller must consider the printability of icons.
    • symbol
    value set: SPACE, 'X' 'X' = column contents are to be output as a symbol.
    The internal output table column must be a valid symbol character.
    The caller must consider the printability of symbols.
    Symbols can usually be printed, but may not always be output correctly, depending on the printer configuration.
    • just (justification)
    value set: SPACE, 'R', 'L', 'C'
    Only relevant for fields of data type CHAR or NUMC
    ' ' = default justification for this data type
    'R' = right-justified output
    'L' = left-justified output
    'C' = centered output
    The justification of the column header always follows the justification of the columns. Independent justification of the column neader is not possible.
    • lzero (leading zeros)
    value set: SPACE, 'X'
    Only relevant for fields of data type NUMC
    ALV outputs NUMC fields right-justified without leading zeros by default.
    'X' = output with leading zeros
    Note: If a NUMC field is output left-justified or centered by FIELDCAT-JUST, leading zeros are output. If the output of leading zeros is suppressed by a Data Dictionary reference ALPHA conversion exit, the output is always left-justified.
    • no_sign (no +/- sign) Only relevant for 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)
    value set: SPACE, template
    template = see documentation of WRITE formatting option USING EDIT MASK template
    The output conversion conv can be made by template = '== conv'.
    Texts
    The following text parameters should be specified for program fields without a Data Dictionary reference. 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. popups.
    • seltext_l (long field label)
    • seltext_m (medium field label)
    • seltext_s (short field label)
    • reptext_ddic (header)
    analogous to the Data element maintenance 'Header'
    The specified text is not necessarily output in the list, an optimum among all texts is sought.
    • ddictxt (specify text)
    value set: SPACE, 'L', 'M', 'S'
    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.
    Parameters for program fields without Data Dictionary reference
    see also 'Text' parameters
    • datatype (data type)
    value set: SPACE, Data Dictionary data type (CHAR, NUMC,...)
    Only relevant for fields without Data Dictionary reference
    Program field data type
    • ddic_outputlen (external output length)
    value set: 0 (initial), n
    Only relevant for fields without Data Dictionary reference whose output is nevertheless to be modified by a conversion exit.
    Prerequisites:
    • FIELDCAT-EDIT_MASK = '==conv'
    see also the documentation of the parameter FIELDCAT-EDIT_MASK
    • FIELDCAT-INTLEN = n
    see also the documentation of the parameter FIELDCAT-INTLEN
    n = external format field output length
    The column width FIELDCAT-OUTPUTLEN need not be the same as the external format output length (FIELDCAT-DDIC_OUTPUTLEN).
    • intlen (internal output length)
    value set: 0 (initial), n
    Only relevant for fields without Data Dictionary reference whose output is nevertheless to be modified by a conversion exit.
    Prerequisites:
    • FIELDCAT-EDIT_MASK = '==conv'
    see also the documentation of the parameter FIELDCAT-EDIT_MASK
    • FIELDCAT-DDIC_OUTPUTLEN = n
    see also the documentation of the parameter FIELDCAT-DDIC_OUTPUTLEN
    n = internal format field output length
    • rollname (data element)
    value set: SPACE, Data Dictionary data element name
    F1 help can be provided for a program field without a Data Dictionary reference, or F1 help which differs from the Data Dictionary help can be provided for a field with a Data Dictionary reference, using this parameter.
    When F1 help is called for this field, the documentation of the specified data element is displayed.
    If the FIELDCAT-ROLLNAME is initial for fields with a Data Dictionary reference, the documentation of the data element of the referred Data Dictionary field is output.
    Others
    • sp_group (field group key)
    value set: SPACE, CHAR(1)
    Field group key.
    Keys are assigned to group names in the IT_SPECIAL_GROUPS parameter (see also the documentation of the parameter IT_SPECIAL_GROUPS).
    When such an assignment is made in the field catalog and in IT_SPECIAL_GROUPS, the fields are grouped correspondingly in the display variant popup.
    • reprep (Report/Report interface selection criterion)
    value set: SPACE, 'X'
    Prerequisites:
    • The system contains the Report/Report interface (function group RSTI, table TRSTI)
    • Parameter LAYOUT-REPREP = 'X'
    (see also the documentation of the parameter LAYOUT-REPREP of the IMPORTING parameter IS_LAYOUT )
    'X' = When the Report/Report interface is called, the value of this field is passed in the selected interface start record as a selection criterion.
    2.7.2. Default
    • The following entries are usually sufficient for internal table fields with a reference to a field defined in the Data Dictionary :
    • fieldname
    • ref_tabname
    Notes:
    ALV gets the remaining information from the Data Dictionary.
    If no relative column position (COL_POS) is specified, the fields are output in the list in the order in which they were added to the field catalog.
    REF_FIELDNAME need only be specifid when the name of the internal table field differs from the name of the referred Data Dictionary field.
    Information which is explicitly entered in the field catalog is not overwritten by information from the Data Dictionary.
    Priority rule:
    Entries in the field catalog have priority over differing entries in the Data Dictionary.
    • The following entries are usually sufficient for internal table fields without a reference to the Data Dictionary (program fields):
    • fieldname
    • outputlen
    • datatype
    • seltext_s
    • seltext_m
    • seltext_l
    Notes:
    F1 help can be provided for program fields by assigning a data element to the parameter ROLLNAME.
    If the parameters SELTEXT_S, SELTEXT_M, SELTEXT_L, and REPTEXT_DDIC contain appropriate field labels, the program field column headers are also adjusted appropriately when the column width changes
    sites :
    http://www.sapdevelopment.co.uk/reporting/alv/alv_variousfcat.htm
    <b>plese reward if useful </b>
    Message was edited by:
            sunil kairam

  • ABAP Function Module where-used in BI-Transformations

    Hi,
    we have developed some ABAP-Z-Function-Modules. These are used in several BI-Data-Transformations and work fine and performant.
    The problem we have now is to find out in which transformation a Function-Module is used.
    The where-used-list in SE37 doesn't report any BI-Transformations althought I check all categories.
    Got anyone a solution for our problem?
    Christian

    Hi,
    see this code for function module where used list only for transformation . i used the same code as bhaskar specified..but little modification..here u used "date_get_week" function module..
    TYPE-POOLS slis.
    DATA fcat1 TYPE slis_t_fieldcat_alv.
    DATA: BEGIN OF t_display OCCURS 0,
             targetname LIKE rstran-targetname,
             sourcename LIKE rstran-sourcename,
             tranid LIKE rstran-tranid,
             routine LIKE rstran-startroutine,
             line_no LIKE rsaabap-line_no,
             line LIKE rsaabap-line,
    END OF t_display.
    data : input(75) type c.
    DATA : input_pattern1(75) TYPE c.
    DATA : input_pattern2(75) TYPE c.
    DATA : same_source(30) TYPE c.
    **Internal table declerations**************************************
    TYPES:  BEGIN OF t_trans_lookup_finder,
             targetname TYPE rstran-targetname,
             sourcename TYPE rstran-sourcename,
             tranid TYPE rstran-tranid,
             routine TYPE rstran-startroutine,
             line_no TYPE rsaabap-line_no,
             line TYPE rsaabap-line,
    END OF t_trans_lookup_finder.
    DATA: i_lookup_finder TYPE STANDARD TABLE OF t_trans_lookup_finder,
      wa_lookup_finder TYPE t_trans_lookup_finder,
      i_trans_lookup_finder TYPE STANDARD TABLE OF t_trans_lookup_finder,
      wa_trans_lookup_finder TYPE t_trans_lookup_finder,
      i_trans_final TYPE STANDARD TABLE OF t_trans_lookup_finder,
      wa_trans_final TYPE t_trans_lookup_finder.
    DATA : i(7) TYPE n.
    DATA  old_cube(20) TYPE c VALUE ' '.
    DATA  old_source(20) TYPE c VALUE ' '.
    **Selections for update rules**************************************
    SELECT DISTINCT  targetname    sourcename  tranid        endroutine       line_no       line
           INTO TABLE i_trans_lookup_finder FROM
           rstran AS a  INNER JOIN rsaabap AS b ON aendroutine = bcodeid
                           WHERE
                           aobjvers = 'A' AND bobjvers = 'A'.
      APPEND LINES OF i_trans_lookup_finder TO i_lookup_finder.
    **Selections for Transformations(Expert routine)*******************
    SELECT DISTINCT        targetname       sourcename       tranid       expert       line_no       line
           INTO TABLE i_trans_lookup_finder FROM
           rstran AS a  INNER JOIN rsaabap AS b ON aexpert = bcodeid
                           WHERE
                           aobjvers = 'A' AND bobjvers = 'A'.
      APPEND LINES OF i_trans_lookup_finder TO i_lookup_finder.
    Edited by: Sakthi Jaganathan on May 20, 2009 6:25 PM

  • Testing Function Module before using in DataSource?

    Hi Experts,
    After writing a Function module for Transaction DataSouce (by copying RSAX_BIW_GET_DATA_SIMPLE), is there any way to test the Function Module before using in Transaction DataSource? (to see how many records it retrieves).
    Also can somebody please throw some light in understanding the source code of RSAX_BIW_GET_DATA_SIMPLE function module, as it has many declarations like E_T_DATA,
    I_T_SELECT which will be used in the new function module?
    Looks like, the function module RSAX_BIW_GET_DATA_SIMPLE uses only one table SPFLI.
    If it is just one table why do we need to write function module to extract data?
    Forgive me for my lack of ABAP knowledge.
    Thank you,
    Lakshmi

    The generic function moduel is used when there is no BW extractor and you cannot get to the data via a view or table
    The extractor is quite simple
    You create a extract strcuture of data to send to BW
    Then you create the function module - e_t_data takes on the extract structure
    The select options read data via the infopackage selection from BW (and thus when you create your datasource you shoudl click the fields to be select option)
    So in the ABAP
    You read the select option and put them into a range
    You select from which ever tables you need to in R3 and put into an itab
    You then loop aroudn the itab and manipulate the data or read other tables
    The data finally ends up in e_t_data
    The whole thing gets looped around based on the size of the data package - ie if it is 10000 records then the fetch next cursor after 10000 records will send the package of e_t_data out to the refc scheduler and down the line to BW - then the fetch next cursor will get the next 10000 records for the next
    I use this all the tiem (so sorry for the brain dump)
    I especially use it for virtual cubes - ie to get real time data from R3 from within BW - the data is not requested by ipak but by the query at runtime against a Virtual cube which connects to this generic extractor
    Note: this generic extractor can also live on the BW side - ie you can use it instead of APD to snapshot cube or DSO data to send as an ipak into another cube

  • How to find the existing function module is used in another function module

    Hi all,
    I created a function module and the same one is called from another function module.
    When I tried to find where the  first function module is used  using  Where-used List , I am getting the message "function module not found in selected areas" .
    Please  guide me what is other method to find whether the function module is used in another one.
    Thanks,
    Vengal Rao.

    hi,
    Go to UTILITIES-> Update Navigation index.
    or go to fucntion group and Generate the Funtion group once.
    it will detect all fucntion modules under that function group.
    regards,
    Rama

Maybe you are looking for