Passing select-options values using call transaction method

Hi Experts,
I have a scenario in which i have three fields BUKRS,WERKS and MATKL in an internal table i_tab and I have MATNR as a selection-option.
After this I have to use call transaction <tcode> for all the line items in the internal table and the MATNR select-option values I have to pass directly for each line of i_tab using call transaction method.
TYPES:  BEGIN OF t_tab,
          bukrs TYPE bukrs,
          werks TYPE werks_d,
          matkl TYPE matkl,
        END OF t_tab.
DATA:  w_tab TYPE t_tab,
            i_tab      TYPE STANDARD TABLE OF t_tab.
SELECT-OPTIONS: s_matnr FOR marc-matnr.
Now I am putting a loop at i_tab and have to use CALL TRANSACTION <TCODE> for each line with the SELECT-OPTIONS for MATNR.
Please tell me whether we can pass multiple ranges for MATNR using call transcation method.
for example there can be multiple single values/multiple ranges/excluded ranges for MATNR. so please suggest me how tho achieve this sceanrio using CALL transaction method of BDC.
Thanks a lot.
Regards,
Krishan

Hi Krishan,
For the Call transaction TCODE there is extension ....OPTIONS from OPT. Just Check it out. I think it is possible like this.
... OPTIONS FROM opt
*Effect*
This addition gives you control using the values of the components of the structure opt, which must be of the Dictionary type CTU_PARAMS. The components have the following meaning:
DISMODE
Processing mode (comparable with the MODE addition)
UPDMODE
Update mode (comparable with the UPDATE addition)
CATTMODE
CATT mode (controlling a CATT procedure)
The CATT mode can have the following values:
' ' No CATT procedure active
'N' CATT procedure without single screen control
'A' CATT procedure with single screen control
DEFSIZE
Use standard window size
RACOMMIT
COMMIT WORK does not end CATT procedure
NOBINPT
No batch input mode, that s SY-BINPT = SPACE.
NOBIEND
No batch input mode after BDC data has been read
The components DEFSIZE , RACOMMIT, NOBINPT, NOBIEND always take the following values:
'X' Yes
' ' No
If the OPTIONS addition is omitted, the following settings are valid for the control parameters:
DISMODE from the MODE addition
UPDMODE
from the UPDATE addition
CATTMODE
No CATT procedure active
DEFSIZE
Do not use standard window size
RACOMMIT
COMMIT WORK ends procedure successfully
NOBINPT
Batch input mode, that is SY-BINPT =X.
NOBIEND
Batch input mode also active after BDC data has been read
Regards,
Swapna.

Similar Messages

  • Problem in passing selection screen values using CALL TRANSACTION.

    Hi All
    I am facing problem in transfering selection screen values to the called transaction. I am trying to pass the path of the transaction filer but to no avail. The variable for filepath is not empty.
    Below is my code:
    DATA: lt_bdcdata TYPE TABLE OF bdcdata,
           wa_bdcdata TYPE bdcdata,
           opt TYPE ctu_params.
    CLEAR wa_bdcdata.
    wa_bdcdata-program  = 'RFBASM00'.
    wa_bdcdata-dynpro   = '1000'.
    wa_bdcdata-dynbegin = 'X'.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    wa_bdcdata-fnam = 'BDC_CURSOR'.
    wa_bdcdata-fval = 'RFPDO1-FEBUMSF'.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    wa_bdcdata-fnam = 'RFPDO1-FEBUMSF'.
    wa_bdcdata-fval = gv_filepath.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    wa_bdcdata-fnam = 'BDC_OKCODE'.
    wa_bdcdata-fval = 'PASS'.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    opt-dismode = 'E'.
    opt-updmode = 'S'.
    CALL TRANSACTION 'FF_5' USING lt_bdcdata OPTIONS FROM opt.
    Please help.
    Harsh

    Hi Harsh,
    I think you have entered wrong main program for tcode 'FF_5' and wrong screen field for the file name. Use the below code instead of yours.
    DATA: lt_bdcdata TYPE TABLE OF bdcdata,
           wa_bdcdata TYPE bdcdata,
           opt TYPE ctu_params,
           gv_filepath type char128 value 'C:\testfile.txt'.
    CLEAR wa_bdcdata.
    wa_bdcdata-program  = 'RFEBKA00'.
    wa_bdcdata-dynpro   = '1000'.
    wa_bdcdata-dynbegin = 'X'.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    wa_bdcdata-fnam = 'BDC_CURSOR'.
    wa_bdcdata-fval = 'UMSFILE'.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    wa_bdcdata-fnam = 'UMSFILE'.
    wa_bdcdata-fval = gv_filepath.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    *wa_bdcdata-fnam = 'BDC_OKCODE'.
    *wa_bdcdata-fval = 'PASS'.
    *APPEND wa_bdcdata TO lt_bdcdata.
    *CLEAR wa_bdcdata.
    opt-dismode = 'A'.
    opt-updmode = 'S'.
    CALL TRANSACTION 'FF_5' USING lt_bdcdata OPTIONS FROM opt.
    Thanks.
    Regards,
    Jey

  • Passing select-options value in method

    How to pass select-options value in method ?
    Example:
    Select-options: carrid for spfli-carrid.
    class cl_myclass implementation.
    select  carrid connid from
    spfli where carrid in carrid.
    endclass.
    Thanks

    Hello Anee
    The coding of this functionality is quite simple:
    REPORT zmy_report.
    DATA:  go_myclass   TYPE REF TO zcl_myclass,
               gd_repid         TYPE syst-repid.
    PARAMETERS:
      p_bukrs   ...
    SELECT-OPTIONS:
      o_kunnr  ...
    START-OF-SELECTION.
      gd_repid = syst-repid.
      CREATE OBJECT go_myclass
        EXPORTING
          id_calling_program = gd_repid.
    And that's how your CONSTRUCTOR method should look like:
    METHOD constructor.  " IMPORTING parameter id_calling_program
    CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
      EXPORTING
        CURR_REPORT = id_calling_report
      TABLES
        SELECTION_TABLE = me->mt_selopts.
    " NOTE: define mt_selopts as instance attribute of table type RSPARAMS_TT
    ENDMETHOD.
    Finally you have to extract the parameter and select-options from MT_SELOPTS.
    Regards
      Uwe

  • Passing SELECT-OPTIONS value to Function Module

    Hi,
    I need to pass select-options value to a function module.
    Code is like the following:
    SELECT-OPTIONS seltab FOR object-type.
    CALL FUNCTION 'Z_MY_FM'
          EXPORTING
            sel_tab         = seltab
         IMPORTING
            result_tab     = it_result
    I have found a similar problem in the SDN forum: How to pass select-options parameter to FM?
    However, that could not help me much in solving my problem.
    So far I have tried to created a structure in DDIC with the following components for the select-options:
    SIGN - BAPISIGN
    OPTION - BAPIOPTION
    LOW - ZBWOBJECTTYPE (my type)
    HIGH - ZBWOBJECTTYPE (my type)
    and subsequently a table type for this structure which is specified in the "Import" tab of my function module.
    Unfortunately, when I ran the program a runtime exception occured (CALL_FUNCTION_CONFLICT_TYPE).
    Could anyone please help me on this issue?
    Thanks in advance.
    Regards,
    Joon Meng

    Hello Joon,
    CALL FUNCTION 'Z_MY_FM'
          EXPORTING
            sel_tab         = seltab
         IMPORTING
            result_tab     = it_result
    You have defined SELTAB as a SELECT-OPTION.
    So when you pass only SELTAB, the header line is transferred to the FM. When you pass SELTAB[] the whole table(range) is passed.
    It is similar to the concept of an internal table with header line.
    Hope i am clear.
    Anyways how have you defined result_tab and sel_tab ?
    BR,
    Suhas

  • How to create a session using call transaction method.

    hi , this is nagaraju,
    How to create a session using call transaction method.

    Hi,
    About Data Transfer In R/3 System
    When a company decides to implement the SAP R/3 to manage business-critical data, it usually does not start from a no-data situation. Normally, a SAP R/3 project comes into replace or complement existing application.
    In the process of replacing current applications and transferring application data, two situations might occur:
    •     The first is when application data to be replaced is transferred at once, and only once.
    •     The second situation is to transfer data periodically from external systems to SAP and vice versa.
    •     There is a period of time when information has to be transferred from existing application, to SAP R/3, and often this process will be repetitive.
    The SAP system offers two primary methods for transferring data into SAP systems. From non-SAP systems or legacy system. These two methods are collectively called “batch input” or “batch data communication”.
    1. SESSION METHOD
    2. CALL TRANSACTION
    3. DIRECT INPUT
    First step for both the methods is to upload the data to internal table. From Internal Table, the data is transferred to database table by two ways i.e., Session method and Call transaction.
    Session is intermediate step between internal table and database table. Data along with its action is stored in session i.e., data for screen fields, to which screen it is passed, the program name behind it, and how the next screen is processed.
    When the program has finished generating the session, you can run the session to execute the SAP transactions in it. Unless session is processed, the data is not transferred to database table.
    A technique similar to SESSION method, while batch input is a two-step procedure, Call Transaction does both steps online, one after the other. In this method, you call a transaction from your program.
    SESSION METHOD
    Data is not updated in database table unless Session is processed.
    No sy-subrc is returned.
    Error log is created for error records.
    Updation in database table is always synchronous
    CALL TRANSACTION
    Immediate updation in database table.
    Sy-subrc is returned.
    Errors need to be handled explicitly
    Updation in database table can be synchronous Or Asynchronous.
    Regards,
    Sruthi.

  • How to pass select option value to function module while using service call

    Hi,
    I have select-option in my WD application. To collect data based on user input im using service call. How to pass this select option values to my RFC.
    rgds
    sudhanshu

    Hi,
    Thank s for your reply. In fact im doing similar with following variation:
    i) collected range values using get_range* method.
    ii) separate low and high values as: 
    read table <field2> index 1 into wa_range.
    vert2_low = wa_range-low.
    vert2_high = wa_range-high.
    (Please note that in RFC I have taken two importing parameter as s_vert_lo and s_vert_hi)
    iii) Now setting these RFC attribute as:
    lo_el_importing->set_attribute(
        EXPORTING
          name =  `S_VERT_LO`
          value = vert2_low ).
    and
    lo_el_importing->set_attribute(
        EXPORTING
          name =  `S_VERT_HI`
          value = vert2_high ).
    iv) In RFC im having my query as :
    select <fld list> from BUT000 into table itab where vertical in r_vert.
    Here, r_vert is a range defined as:
    ranges r_vert for <fld refrence>
    r_vert-sign = 'I'.
    r_vert-option = 'BT'.
    r_vert-low = S_VERT_LO.
    r_vert-high = S_VERT_HI.
    append r_vert.
    Issue here is with ranges. if im passing both low and high values it is fine but if only low value being passed it is not giving me any record.
    Please suggest.
    Rgds
    Sudhanshu

  • Doubt in uploading using call transaction method

    hi all
    i am uploading f-29 in call transaction method .. i have a problem in currency field, the currency field is not picking up it shows a error that input field is longer than screen field .. i have declared currency field as type BSEG-WRBTR(same as screen field ...how to go about
    thanks
    lokesh

    Hi,
    When you use the database value directly in your BDC, you will have this issue. It is always advisable to use character fields when doing BDC. so change it to charecter field and try it..
    Regards
    Sudheer

  • Passing select-options table to a class method

    Hi,
    I have to pass a table which contains a select-options to a class method as a param...
    How I do this??
    DATA s_mail TYPE  z_mail_rng.
    o_mail->add_receiver( ? ).
    (add_receiver's formal param is TYPE ANY)
    Plese give me help.
    Thanks.

    Hi,
    I send coding for  how to use select-options in class.
    May it is useful for u
    tables:marc.
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_matnr for marc-matnr.
    selection-screen end of block b1.
    class c3 definition.
    public section.
    types: begin of ty_marc,
    matnr type marc-matnr,
    werks type marc-werks,
    end of ty_marc.
    data: wa_itab type ty_marc.
    data: itab type table of ty_marc .
    data: wa_matnr type r_matnr.
    methods: add.
    private section.
    *methods: sub.
    endclass.
    class c3 implementation.
    method add .
    select matnr
    werks
    from marc into table itab where matnr IN s_matnr.
    write:/ 'material no', 20 'plant'.
    loop at itab into wa_itab.
    write:/ wa_itab-matnr,
    wa_itab-werks.
    endloop.
    endmethod .
    endclass.
    start-of-selection.
    data b1 type ref to c3.
    create object b1 .
    call method b1->add.

  • Call Transaction Method of BDC

    Hi All,
    How to read screen field values using Call Transaction method of BDC? The BDC recording for the transaction /SAPAPO/TSCOPY has been done and only values from 2 fields have to be read which deals with Keyfigures. GS_KFMAP-KEYF_FR & GS_KFMAP-KEYF_TO are the two screen fields.
    Thanks & Regards,
    Savitha

    Hi Savitha,
       Can you please clarify Whether you want read the values or Populate values to screen fileds using call transaction?.
    If you want to read the screen filed values.I think we do n't use BDC.Directly we can refer to the screen fields and try to find out what fileds(dictionary) they are reffering.

  • How do I pass SELECT-OPTIONS to another screen via CALL TRANSACTION?

    Good day, everyone!
    I am writing a program that will be passing PARAMETERS and SELECT-OPTIONS values to another transaction via the CALL TRANSACTION statement.  I'm new at this, and I've run into a problem.  I have several fields that are defined as SELECT-OPTIONS, like so:
    SELECT-OPTIONS so_ccode FOR fkkop-bukrs.
    The user may select multiple values, enter a range, exclude certain values, etc. -- the things a SELECT-OPTIONS allows.
    But how do I pass all of this to a field on another screen using CALL TRANSACTION when I only have two fields (BDCDATA-FNAM and BDCDATA-FVAL) available to me?  That works fine for PARAMETERS, but I can send low/high values, different signs/options, etc. for the SELECT-OPTIONS variables.
    Please help!!  Points awarded for all helpful answers.
    Thank you,
    Dave

    Don't use CALL TRANSACTION. Use SUBMIT instead.
    Rob

  • How to Pass Select-options Single values as Parameter value to Method ?

    Hi Friends,
    I need to pass select-options values(single values) for s_arbpl to the method "process_percent_planned". Now all single values are in internal table s_arbpl-low field. I need to pass this internal table(s_arbpl-low) values to the method where i will run query based on these single values.In my below code i am passing value through variable w_arbpl. I have defined this parameter in the method.But here only one value is passed to method. I want multiple single values (in s_arbpl-low) should be passed. Please let me know how to correct code.
    Tables: crhd.
    Data: ktext type auftext,
    w_arbpl type arbpl.
    select-options: s_arbpl for crhd-arbpl.
    ktext = 'Test'
    create object obj_plan.
    call method obj_plan->process_percent_planned
    exporting
    ktext = ktext
    w_arbpl = s_arbpl-low.
    Thanks

    hi ,
    when you want to pass  S_ARBPL AS PARAMETER IN SELEC OPTION
    ARBPL SUCH AS  
       WIN002
      WIN003
      WIN004
      WIN005
      WIN006
      WIN007
    IN MULTIPLE SELECTION  S_ARBPL
    THEN
    USE  
    Tables: crhd.
    Data: ktext type auftext,
    w_arbpl type arbpl.
    select-options: s_arbpl for crhd-arbpl.
    ktext = 'Test'
    LOOP AT S_ARBPL .
    create object obj_plan.
    call method obj_plan->process_percent_planned
    exporting
    ktext = ktext
    w_arbpl = s_arbpl-low.
    ENDLOOP.
    REGARDS
    dEEPAK .
       THEN SELECT THAT
    call method obj_plan->process_percent_planned
    exporting
    ktext = ktext
    w_arbpl = s_arbpl-low.

  • 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

  • HOW TO PASS SELECT-OPTIONS AS IMPORT PARAMETER TO A CLASS

    Hi experts,how to pass select options value as a export parameters to a zclass.
    can  give me some idea.
    Thanks
    sai

    As Sachin already said, selection options are stored in an internal table. You can reconstruct the table type without the corresponding input fields using the type addition RANGE OF.
    So - assuming you have the following in your program:
    DATA: wa TYPE sflight.
            SELECT-OPTIONS so_car FOR sflight-carrid.
    you can create a publically-visible type in your class using direct type entry and the code
    TYPES: my_selectoption TYPE RANGE OF sflight-carrid.
    and use this to define the importing parameter of the method.
    The only other thing you have to remember is that select-options generates an internal table with header line. Thereore, to pass the table to the method, you would use (in the above example) so_car[], and not just the name of the select-option.
    Hope this helps.
    Regards
    Jon.

  • How to avoid a POP-UP in CALL Transaction Method

    Hi All,
    I am doing a BDC for transaction CA02 by using CALL Transaction method, while i am trying to delete an operation i am getting a POP-UP asking YES/NO. My program contains the BDC OKCODE value as '=YES' for deletion of the operation/s. Still the POP-UP is persisting.
    Could you please let me know how can i avoid the POP-UP or is there any other way handling the POP-UP's.
    Reward Points Gauranteed. )
    Thanks in Advance,
    Suresh

    This means that you are running your CALL TRANSACTION in the frontend.
    One way would be to use the MODE addition
    Here is an extract from the Help
    ... MODE mode
    Effect
    The processing mode can take the following values:
    'A' Display screen
    'E' Display only if an error occurs
    'N' Do not display
    'P' Do not display; debugging possible
    But the fact that you get a popup you don't expect is worrying. You have to process this Popup otherwise the result is hazardous !

  • Passing select options through subroutines

    Hi
    how do you pass select option values through subroutines?

    Hello,
    Is this what you are looking for:
    TYPES: ty_r_bukrs TYPE RANGE OF bukrs.
    DATA:
          v_date TYPE datum,
          v_bukrs TYPE bukrs.
    SELECT-OPTIONS:
    s_bukrs FOR v_bukrs OBLIGATORY,
    s_date FOR v_date.
    AT SELECTION-SCREEN.
      PERFORM f_check_cocd
      USING s_bukrs[].
    *&      Form  f_check_cocd
    *       Check Comp. Code
    FORM f_check_cocd
      USING fp_s_bukrs TYPE ty_r_bukrs.
      DATA: l_v_bukrs TYPE bukrs.
      SELECT bukrs UP TO 1 ROWS
      FROM t001
      INTO l_v_bukrs
      WHERE bukrs IN s_bukrs.
      ENDSELECT.
      IF sy-subrc <> 0.
    *   Throw Error Message
      ENDIF.
    ENDFORM.                    " f_check_cocd
    BR,
    Suhas

Maybe you are looking for

  • Keeping my BT Yahoo Premium Mail Account, I am hav...

    I cancelled my BT Broadband Option 3 subscription around Nov 20th 2011 and I discovered on the internet that my BT Yahoo Premium mail would be terminated 90 days after my BT Broadband was cancelled, I've had my bt email account for around 10 years so

  • Dialog box to Select Directories...

    Hi, I need to develop a Java tool where you have an option for the customer to select a directory in which a group of files wiil be saved. To implement this, when I invoked the JFileChooser.SAVE_DIALOG and set the filter to display only directories,

  • Payment Medium program

    All, I did a payament proposal in F110 and am expecting to see a DME file generated.  The proposal was made for both CT payment methods. The vendor was set up for both payment methods.  In the proposal log, it gave a message that "ayment method(s) ar

  • Problem about PCN

    Hi folks , I've some queries regarding PCN functioning  and make myself clear . 1. During , PCN , when material will get change its status from one stock category to another stock category , ( like , block to QI ) .. , it's mandatory/ SAP standard , 

  • Hiding folders in Mail

    Is there a way to hide a single folder in Mail so that it's contents are not visible to other users.