Dynamic programming: send data to function module, mapping...

Hello abappers,
I have a requirement to be able to send a the name of a table and a table-field to a function module, it can be a table of any type, so the function module should be generic in nature, the function module receives the table name and table-field name and then selects data for the field specified from the table specified (in the import parameter of the FM). Within the function module, I want to be able to determine the fields type? and then send this field to an internal table representing a a destination table (also specified in the import parameters).
the idea is to be able to map a field from any table to a specified field in another table, the table(source and destination) and field names will only determined at run time as specified by the user.
any assistance will be appreciated, I am not very familiar with dynamic\generic programming.

Hello Bijo,
Following are the steps to implement this requirement:
1. Create import parameter for table name i.e. TABLE_NAME
2. Create tables parameter for fields table
3. Define table. DATA TABLE TYPE REF TO DATA. Also create single column internal table for fields and load all fields to select from database.
Inside function module you can implement following steps:
4. Load all the fields name into internal table. for this you can use DD03L for field details and use TABLE_NAME as key.
5. Once you have all the fields ready in internal table then construct fieldcatlog using these fields
loop at internal table with all the fields.
move it to field catalog.
append field catalog.
endloop.
6. Pass this field catalog table to static method create_dynamic_table
call method cl_alv_table_create=>create_dynamic_table
exporting
it_fieldcatalog = fieldcatalog_tab
importing
ep_table = table.
Here table is defined with data object type.
now assign table reference to field symbol of type table.
ASSIGN table->* to <field-tab>.
Also create work area <field-wa> using refrence of table.
create data object wa LIKE LINE OF <field-tab>.
ASSIGN wa->* to <field-wa>.
Also define field symbol for field name.
for e.g. <field_name>
7. Dynamic internal table is ready
    Now using can use select as follows:
    SELECT (fields)  "--> fields is single column internal table to hold fields need to be selected
         INTO CORRESPONDING FIELDS OF TABLE <itab> "--> itab created dynamically at runtime
        FROM (TABLE_NAME) --> Table name imported
     WHERE (where_clause). --> where_clause is single column internal table with data type CHAR72.
Select data into <itab> and use ASSIGN COMPONENT to move data from one table to another as follows:
8. To fill this dynamic internal table using ASSIGN COMPONENT <Comp_number> OF STRUCTURE <field-wa> TO <field-name>
So in this case if first field of structure STRUCT1 is user_id then sudo-code will be
loop at internal table containing list of fields into field_wa
ASSIGN COMPONENT field_wa OF STRUCTURE <field-wa> TO <field>. "Here field_wa is wa area for single column internal table holding all the fieldnames.
Now <field-name> points to user_id field. Move some value into it as nornally we do with variables.
move '001' to <field-name>.
or
<field-name> = '001'.
endloop.
after completing all the fields one row will be ready in <field_wa>.
APPEND <field_wa> to <field_tab>.
Let me know incase you face any issues!
Hope this helps you.
Thanks,
Augustin.
Edited by: Augustarian on Aug 23, 2009 7:02 PM
Edited by: Augustarian on Aug 23, 2009 7:08 PM
Edited by: Augustarian on Aug 23, 2009 7:09 PM

Similar Messages

  • Master Data Deletion / Function Module RSDMD_DEL_MASTER_DATA

    I need to develop an automated way of deleting some data from 0employee master data InfoObject. The data we need to delete from the InfoObject is held in a separate ODS.
    I believe the only automated way is to create an ABAP program which uses the function module RSDMD_DEL_MASTER_DATA.
    Can anyone please advise what FM RSDMD_DEL_MASTER_DATA is designed to do.
    I'm also not an ABAP'er so I'm unsure how to code what I need. Can anyone help me with this?
    Many thanks,
    Mark.

    Hi,
    if you need to delete master data selectively, then use the mentionned function module: RSDMD_DEL_MASTER_DATA
    check this thread:
    Re: delete master data
    from which you'll get the code:
    TYPES: ly_CHAVL         type RSCHAVL.
    DATA:  gt_CHAVL_DEL    type table of ly_CHAVL.
    DATA: lv_chavl LIKE RSGENERAL-CHAVL.
    SELECT DISTINCT <IOBJ_ID>
    INTO TABLE gt_chavl_del
    FROM /BIC/Z<ODSNAME>
    WHERE .....
    "the above will fill your inttable.
        CALL FUNCTION 'RSDMD_DEL_MASTER_DATA'
          EXPORTING
            I_IOBJNM                    = 'IOBJ'
    *       I_FLG_DELETE_ALL            = ' '
            I_FLG_DELETE_SIDS           = 'X'
    *       I_FLG_DELETE_SIDS_ASK       = ' '
            I_FLG_DELETE_TEXTS          = 'X'
            I_T_CHAVL                   = gt_CHAVL_DEL
            I_FLG_DIALOG                = ' '.
    *       I_FLG_FORCE_DELETE          = ' '
    *       I_FLG_SIMULATION            = ' '
    *       I_WITHOUT_PROTOCOL          = ' '
    *     IMPORTING
    *       E_RESULT                    =
    *       E_T_SIDVAL_USED             =
    *       E_T_PROTOCOL                =
    *       E_T_ULIST_DIM               =
    *       E_T_ULIST_ATR_NAV           =
    *       E_T_ULIST_HIE               =
    *       E_T_ULIST_HIE_NODE          =
    *       E_T_ULIST_QUERY             =
    *       E_PROT_OBJECT               =
    *       E_PROT_SUBOBJECT            =
    *       E_PROT_EXTNUM               =
    *     EXCEPTIONS
    *       ILLEGAL_INPUT               = 1
    *       IOBJ_ERROR                  = 2
    *       SID_ERROR                   = 3
    *       PROGRAM_ERROR               = 4
    *       ENQUEUED                    = 5
    *       QUEUE_ERROR                 = 6
    *       NO_CHKTAB                   = 7
    *       CHKTAB_NOT_GENERATED        = 8
    *       NO_AUTHORITY                = 9
    *       RSDPW_ERROR                 = 10
    *       OTHERS                      = 11
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    let me know should you need further assistance...
    hope this helps...
    Olivier.
    Message was edited by:
            Olivier Cora

  • Can we write leave program syntax in RFC function module.

    hello friends,
       can we write leave program syntax in RFC function module. Iam developing RFC Function module .
    useful answers will be awarded..
    Regards
    Kanth
    Edited by: Kanth on Mar 30, 2008 11:38 PM

    Don't use leave program in RFC function module. You can better use EXIT or RETURN. But when developing RFC modules you should use the return structure BAPIRET2 to store message generated in the calling system. So when you use EXIT or RETURN, first give a message so the calling program knows why the RFC module was exited.

  • URGENT : Error: Please create data processing function module

    Hi
    I am getting the folloiwng error
    "Please create data processing function module" in table maintainence.
    It is working fine in dev environment but not in QA and production.
    Pleae help.
    Regards
    Kalpesh

    Hi Kalpesh,
       I see it is something to do with the naming convention used in the quality and production system. These must have been setup differently compared to ur development system. So check with different naming conventions.
    Reward points if helpful.
    Cheers
    Shafiq

  • Error : J_2IRG1BAL, Create data processing Function module

    Sap Experts,
    when i go to se11 in which have given table name: J_2IRG1BAL, than i gone menu bar click on utilities select the table contents
    click on create entries button.
    1) Error Message : Create data processing function module
    2) This table Relevant to RG1 Updation
    3) Due to this error I am not able to upload the opening stock of finished material manuaaly
    4) What are the actions need to be done to rectify the above error.
    Regards,
    Prabhakar

    Hi
    Ask your ABAPER to create the maintainence view of the table
    regards
    Sanil Bhandari

  • Sql queries for retrieving setups data for functional modules

    Hi,
    Can anyone give me the sql queries for retrieving setups data for functional modules (GL, AP, AR, FA, and CM) from Database.

    Hi,
    Can anyone give me the sql queries for retrieving setups data for functional modules (GL, AP, AR, FA, and CM) from Database.

  • Updating liveCache Data using Function Module or ABAP program.

    Is it possible to update APO Live Cache using Function Module or ABAP Program.
    Will the aggregation/disaggreagation remain the same if data is modified using Function Module or ABAP Program.
    Regards,
    Vikas

    ello Vikas,
    -> Please click at
    http://help.sap.com/saphelp_nw04/helpdata/en/f2/0271f49770f0498d32844fc0283645/frameset.htm
    & read about 'SAP liveCache'.
    As you know objects stored in liveCache in the class containers can be accessed
    and manipulated only via LCA routines which are methods of LCA objects.
    The registration of the LCA routines is done automatically when
    the liveCache is started by the LC10, check the lcinit.log file.
    The shared procedures in the LiveCache are written in C++ and shipped
    to the customers as binary shared libraries(LCA-Routines) < LCA build >
    together with the LiveCache. The original C++ source code of the
    libraries is not generally available to the customers.
    The LCA routines could be called via "/SAPAPO/OM*" ABAP functions.
    -> For SAP liveCache documentation in English:
    http://help.sap.com/saphelp_nw04/helpdata/en/f2/0271f49770f0498d32844fc0283645/frameset.htm
    < -> Database Administration in CCMS: SAP liveCache -> liveCache Assistant ->
    liveCache: Monitoring -> Problem Analysis-> DB Procedures >
    In transaction LC10 for the LCA connection choose liveCache:Monitoring
    then go to Problem Analysis -> DB Procedures=>
    The system displays an overview of all database procedures loaded into
    liveCache, their input and output parameters, and other details.
    -> Tr. /n/SAPAPO/OM16 ( in further releases /n/sapapo/om19 ) is provided by
    SAP to get information about data stored in the LiveCache. If you would
    like to get your own views, you should write a special report in ABAP using
    "/SAPAPO/OM"-development class functionality.
    -> There are standard function modules in ABAP available to extract/change data from/in liveCache.
    -> In addition to the given information => find more information at:
    SCM 4.0 -> http://help.sap.com/saphelp_scm40/helpdata/en/12/3dfd81126e1c448c870f335f11d016/frameset.htm
    SCM 4.1 ->
    http://help.sap.com/saphelp_scm41/helpdata/en/12/3dfd81126e1c448c870f335f11d016/frameset.htm
    SCM 5.0 ->
    http://help.sap.com/saphelp_scm50/helpdata/en/12/3dfd81126e1c448c870f335f11d016/frameset.htm
    You can go to the Advanced Planner and Optimizer documentation from the above links < Supply Network Planning Run -> Aggregated Planning -> SNP Disaggregation Or SNP aggregation . >.
    If you still have open questions on the posted topic =>
    Could you please give more information on your application scenario.
    Thank you and best regards, Natalia Khlopina

  • Buffer table not up to date - BBP_PD_PO_SAVE Function Module

    Hi SRM Experts,
    I am trying to develop custom program for uploading POs into SRM and got struck at the time of BBP_PD_PO_SAVE function Module.
    I followed the follwoing steps:
    Step 1: Creating PO with BBP_PD_PO_CREATE - this step executed successfully.
    Step 2: Trying to save PO data into SRM with BBP_PD_PO_SAVE - this step I am getting error message "Buffer table not up to date". 
    CALL FUNCTION 'BBP_PD_PO_SAVE'
    EXPORTING
      IV_WORKITEM_ID               =
      IV_USERTYPE                  =
       IV_HEADER_GUID               = wa_header-guid
      IV_CREATE_HIST_VERSION       =
    wa_header-guid - PO GUID which is created in first step.
    Please let me know any suggestions or solution on this.
    Thanks,
    Koyya

    Hi Koyya ,
    I am also doing the same in our project . But i am able to save the PO using BBP_PD_PO_SAVE Function Module .
    If you are getting this error means , then you check the all guids mapping part .
    Check all item guids ...have mentioned same parent guid
    same to account deatils and partner data also.
    Thank you ,
    Bharathi

  • Unable to send table to function module using RFC

    Hi all,
    I'm trying to send a table from XI to a function module using RFC. I tested the process first using indivdual parameters. At this point there were no problems. Now I changed the import parameter of
    the FM into a table and imported the changes into XI. I changed the Message mapping and tested it with multiple records. When I run the process XI calls the FM but the FM doesn't receive any data. I tested this by puting a break-point in the FM. There are no errors in the XML Messages Monitor. I found this message in the Communication Channel Monitoring:
    Short Log:
    Server 0 10_39293 Receiver channel 'CC_BackendIn' for party '', service 'BS_Backend' (internal name 'RfcClient[CC_BackendIn]')
    Client data: {jco.client.lang=EN, jco.client.snc_mode=0, jco.client.client=610, jco.client.passwd=******, jco.webas.ignore_jdsr_error=1, jco.client.user=Admin, jco.client.sysnr=10, jco.client.ashost=192.168.51.8}
    Repository data: {jco.client.lang=EN, jco.client.snc_mode=0, jco.client.client=610, jco.client.passwd=******, jco.webas.ignore_jdsr_error=1, jco.client.user=Admin, jco.client.sysnr=10, jco.client.ashost=192.168.51.8}
    Current pool size: 0, maximum pool size : 1
    Channel History
    - OK: 2009-02-18 01:35:14 CET: Message processed for interface MIIA_BapiIn
    Any ideas?
    Thanks for your help!
    Regards,
    Ivo van Ee

    Hi everyone,
    thanks for your prompt response! I tested the mapping in XI and didn't find any error here. So I concentrated on the receiver side. There were some communication channels running on the server that were generating errors. I stopped alle the communication channels and started just the two communication channels for this process. This time the table was successfully exported to the function module! Problem solved. Still not sure what caused the problem in the first place, but everything is working fine now.
    Thanks for your help.
    Regards,
    Ivo

  • Calling a ALV Report program via a Remote Function module.

    H All,
         The thing which I am looking out for is ,to know a technique to acheive this,
      To start with,
    For the transaction MB51-(Material Document List),which is a Report Program "RM07DOCS",I also observed that this uses a ALV to display the output.
    Now what I actually require is another extra field (from MARA table )  along with the standard output that is displayed from this report.
    Also this needs to be passed to a different UI system(build using VC ).
    So I have a RFC eg DisplayList(),where in I need to exeucte this report program ,get the output what it gives ,add my additional information what I want to and pass it as a export parameter,
    So this is the structure which I can visualise,
    FUNCTION ZFUN_MB51TXN.
    I would get all the import parameters here ,from who ever is calling my fun module,
    *Call the report program,pass the input  parameters required
    *get the output from this report program
    *send the output to the caller through export parameters
    ENDFUNCTION.
    So Here I need to know ,Can this be achieved something using Submit report or anything,Any guidelines to move further would be really of great help!

    Hi All,
    It would really be great if you can explain with the reference to the same report program,the same selection screen elemetns or something.
    Thanks,
    Archies!

  • LSMW or ABAP Program:- I need BAPI function module or Direct input program

    hi experts,
    I have to develop the program which uploads the transportation pricing data for freight cost management.
    the transcation code is XK15 for the application A.
    There is a program called RV14BTCI which will uploads for the application V or M not for A.
    So i can use lsmw or direct input program in both lsmw and abap program so plz help me if there is any BAPI function module or Direct input program for Application A.
    thank you,
    waiting for u r reply.
    Edited by: SANTOSH MARUPALLY on Jan 22, 2008 6:27 AM

    Hi Santosh
    Am not really sure if RV14BTCI can not be used for other applications apart from V and M.
    You can try using BAPI: BAPI_PRICES_CONDITIONS. Over the forum you can find few example coding.
    Regards
    Eswar

  • To update Employee Data with Function module

    Hi
    CRM employee master and HR employee master need to be mapped
    for the labor cost posting function to work.
    In BP transaction (Change in BP role : Employee),
    I could update "Personnel number" and "User Name"
    under Identification Tab
    now I need to do same job with Function module in report program.
    Anybody knows that what Function module should I use ?
    I tryed to do it with Function "CRMXIF_PARTNER_SAVE"
    but I only succesed to update imformations under Adress tab in BP transaction.
    thank you.

    Use FM BAPI_BUPA_CREATE_FROM_DATA.
    Rg,
    Harshit

  • Dynamic table as output in Function Module

    Hi all,
    I am trying to output a dynamic table from a FM. I am a generating a dynamic internal table in the FM. Now i want to assign that internal table to a table parameter of the FM so that i can use that table in the calling program. can this be done?
    regards,
    hamza

    You may need to look into code of sap function module
    RFC_READ_TABLE

  • Delta extraction(date) with Function module problem

    Hi All,
    FUNCTION zrsax_biw_get_data_pr_d.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SBIWA_S_INTERFACE-REQUNR
    *"     VALUE(I_ISOURCE) 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_PRIVATE_MODE) OPTIONAL
    *"     VALUE(I_CALLMODE) LIKE  ROARCHD200-CALLMODE OPTIONAL
    *"     VALUE(I_REMOTE_CALL) TYPE  SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
    *"  TABLES
    *"      I_T_SELECT TYPE  SBIWA_T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SBIWA_T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  ZPR_ST OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    * The input parameter I_DATAPAKID is not supported yet !
    * Example: InfoSource containing TADIR objects
    *  TABLES: tadir.
    *DATA: BEGIN OF zpr_st_copy,
    *        banfn TYPE zpr_st-banfn,
    *        bnfpo TYPE zpr_st-bnfpo,
    *        zebkn TYPE zpr_st-zebkn,
    *        knttp TYPE zpr_st-knttp,
    *        vbeln TYPE zpr_st-vbeln,
    *        ps_psp_pnr TYPE zpr_st-ps_psp_pnr,
    *        gsber TYPE zpr_st-gsber,
    *        werks TYPE zpr_st-werks,
    *        statu TYPE zpr_st-statu,
    *        ekgrp TYPE zpr_st-ekgrp,
    *        menge TYPE zpr_st-menge,
    *        frgdt TYPE zpr_st-frgdt,
    *        meins TYPE zpr_st-meins,
    *         loekz TYPE zpr_st-loekz,
    *      END OF zpr_st_copy.
    * Auxiliary Selection criteria structure
      DATA: l_s_select TYPE sbiwa_s_select.
    * Maximum number of lines for DB table
      STATICS: l_maxsize TYPE sbiwa_s_interface-maxsize.
    * Select ranges
    *  RANGES: l_r_pgmid  FOR tadir-pgmid,
    *          l_r_object FOR tadir-object,
        RANGES: PRNO for zpr_st-banfn,
                DATE1 FOR zpr_st-frgdt.
    * Parameter I_PRIVATE_MODE:
    * Some applications might want to use this function module for other
    * purposes as well (e.g. data supply for OLTP reporting tools). If the
    * processing logic has to be different in this case, use the optional
    * parameter I_PRIVATE_MODE (not supplied by BIW !) to distinguish
    * between BIW calls (I_PRIVATE_MODE = SPACE) and other calls
    * (I_PRIVATE_MODE = X).
    * If the message handling has to be different as well, define Your own
    * messaging macro which interprets parameter I_PRIVATE_MODE. When
    * called by BIW, it should use the LOG_WRITE macro, otherwise do what
    * You want.
    * Initialization mode (first call by SAPI) or data transfer mode
    * (following calls) ?
      IF i_initflag = sbiwa_c_flag_on.
    * Initialization: check input parameters
    *                 buffer input parameters
    *                 prepare data selection
    * The input parameter I_DATAPAKID is not supported yet !
    * 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 InfoSource validity
        CASE i_isource.
          WHEN 'ZPR_ST_DS_D' OR ''.
          WHEN OTHERS.
            IF 1 = 2. MESSAGE e009(r3). ENDIF.
            log_write 'E'                  "message type
                      'R3'                 "message class
                      '009'                "message number
                      i_isource            "message variable 1
                      ' '.                 "message variable 2
            RAISE error_passed_to_mess_handler.
        ENDCASE.
    * Check for supported update mode
        CASE i_updmode.
          WHEN 'F' OR ''.
          WHEN 'C'.
          WHEN 'R'.
          WHEN 'S'. " DELTA INITIALIZATION
          WHEN 'I'. "DELTA INITIALIZATION FOR NON CUMULATIVE
          WHEN 'D'. "DELTA
          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.
    BREAK-POINT.
    * Check for obligatory selection criteria
    *    READ TABLE i_t_select INTO l_s_select WITH KEY fieldnm = 'ZPR_ST-FRGDT'.
    *    IF sy-subrc <> 0.
    *      IF 1 = 2. MESSAGE e010(r3). ENDIF.
    *      log_write 'E'                    "message type
    *                'R3'                   "message class
    *                '010'                  "message number
    *                'PGMID'                "message variable 1
    *                ' '.                   "message variable 2
    *      RAISE error_passed_to_mess_handler.
    *    ENDIF.
        APPEND LINES OF i_t_select TO g_t_select.
    * Fill parameter buffer for data extraction calls
        g_s_interface-requnr    = i_requnr.
        g_s_interface-isource   = i_isource.
        g_s_interface-maxsize   = i_maxsize.
        g_s_interface-initflag  = i_initflag.
        g_s_interface-updmode   = i_updmode.
        g_s_interface-datapakid = i_datapakid.
        g_flag_interface_initialized = sbiwa_c_flag_on.
    * Fill field list table for an optimized select statement
    * (in case that there is no 1:1 relation between InfoSource fields
    * and database table fields this may be far from beeing trivial)
        APPEND LINES OF i_t_fields TO g_t_segfields.
    *   Start tracing of extraction
    *    bice_trace_open g_r_tracer i_t_fields.
      ELSE.                 "Initialization mode or data extraction ?
    * Data transfer: First Call      OPEN CURSOR + FETCH
    *                Following Calls FETCH only
    * First data package -> OPEN CURSOR
        IF g_counter_datapakid = 0.
    * Fill range tables for fixed InfoSources. In the case of generated
    * InfoSources, the usage of a dynamical SELECT statement might be
    * more reasonable. BIW will only pass down simple selection criteria
    * of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
    *      LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'PGMID'.
    *        MOVE-CORRESPONDING l_s_select TO l_r_pgmid.
    *        APPEND l_r_pgmid.
    *      ENDLOOP.
    *      LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'OBJECT'.
    *        MOVE-CORRESPONDING l_s_select TO l_r_object.
    *        APPEND l_r_object.
    *      ENDLOOP.
    LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'ZPR_ST-FRGDT'.
                MOVE-CORRESPONDING l_s_select to DATE1.
                DATE1-sign = 'I'.
                DATE1-option = 'GE'.
                clear DATE1-high.
                APPEND DATE1.
          ENDLOOP.
    * Determine number of database records to be read per FETCH statement
    * from input parameter I_MAXSIZE. If there is a one to one relation
    * between InfoSource table lines and database entries, this is trivial.
    * In other cases, it may be impossible and some estimated value has to
    * be determined.
          l_maxsize = g_s_interface-maxsize.
          OPEN CURSOR WITH HOLD g_cursor FOR
    *      SELECT (g_t_fields) FROM tadir
    *                               WHERE pgmid  IN l_r_pgmid AND
    *                                     object IN l_r_object.    "#EC CI_GENBUFF
    *@ CODE FOR THE STRUCTURE TO FILL IN FROM EBAN AND EBKN@*
                SELECT a~banfn a~bnfpo k~zebkn a~knttp k~vbeln k~ps_psp_pnr k~gsber a~werks a~statu a~ekgrp a~menge a~menge a~frgdt a~meins
    * INTO CORRESPONDING FIELDS OF TABLE IT1
                FROM  eban AS a INNER JOIN ebkn AS k ON ( a~banfn = k~banfn AND a~bnfpo = k~bnfpo )
                WHERE a~banfn GE '2000000000' AND a~banfn LE '2999999999' and a~loekz eq ' ' and a~frgdt ge '20130401' and a~FRGKZ eq '2'.
    *BREAK-POINT.
        ENDIF.                             "First data package ?
    * Fetch records into interface table. There are two different options:
    * - fixed interface table structure for fixed InfoSources have to be
    *   named E_T_'Name of assigned source structure in table ROIS'.
    * - for generating applications like LIS and CO-PA, the generic table
    *   E_T_DATA has to be used.
    * Only one of these interface types should be implemented in one API !
        FETCH NEXT CURSOR g_cursor
                   APPENDING CORRESPONDING FIELDS
                   OF TABLE e_t_DATA
                   PACKAGE SIZE l_maxsize.
        IF sy-subrc <> 0.
          CLOSE CURSOR g_cursor.
    *      bice_trace_close g_r_tracer.
          RAISE no_more_data.
        ENDIF.
    *    bice_collect_table g_r_tracer e_t_data.
        g_counter_datapakid = g_counter_datapakid + 1.
      ENDIF.              "Initialization mode or data extraction ?
    ENDFUNCTION.
    in the above I_t_fields and I_T_select structures  are not getting data .....
    can any one pleasee let me know what mistake i hvae done with my code?
    and i m unbale to change data source value to F1 if i am trying to change my function module and extract structure are disappearing....
    i m not getting why it is happening .......
    thank you
    vijay

    Hi yasemin,
       I m bit confused here with the line below
                                     IF i_initflag = sbiwa_c_flag_on.(if we pass 'X' then it will enter loop and checks for F or D and then assigns values to I_T_SELECT and I_T_Fields structure)
          accordfing to my code i feel it will work for any one not both(F or D).
    one more doubt rsax_biw_get_data extraction method is F2 few of them are asking to change to F1.
    so tried running a code then in RSO2 extact structure and FM both dissapeared i did not get why it happened ?
    can you please let me know why it happend
    thanks
    vijay

  • Configuring Dynamic drop down in ABAP Function Module based VC application

    Dear Expert,
    Can someone help me in configuring Dynamic Drop down list in ABAP function module based
    VC application, so that all the backend data like material description list should display in drop down list followed by * search.
    Thanks & Regards,
    Kundan

    Hi Anja,
    As you suggested i design a combo box with dynamic entry list. But it not displaying any item for selection. Combo box is showing empty. Can you please help me in this so all the backend list should display in combo box dynamically?
    Thanks,
    Kundan

Maybe you are looking for