Multiple selection in Function Module

Hi Experts,
  Can we go for mutiple selection in our own Function Module? How we can go for mutiple selection in our own Function Module? Anyone help me.
Example:
we have to give multiple input values for company code when we execute the function module .
suppose import parameter are
  company code   3000
           4000
           5000
           6000
  plant          3215
  matnr          100002992
   i have to select the records based on this multiple company codes.Here i want multiple selection for company code.

Hi ,
I agree with Suresh.
It is my mistake I thought you are using standard function.
Lanka
Message was edited by: Lanka Murthy
Message was edited by: Lanka Murthy

Similar Messages

  • Multiple Select option in Module pool

    Hi,
    I wanna add a field for 'Delivery number' in the screen of a mod pool prgm.I created a subscreen area in the main screen and did the coding needed.now the problem i am having is if i giv a single value in the from field or  values in the 'From' and 'To' field its not taken to the program,i saw it while debugging. but if i enter the values in the multiple selection option its taken to the program.That means from screen its not going to the program where as from the multiple select option its taken to the program,What may be the propblem.
    Regards in Advance,
    Nitin

    Hi,
    Have you used the select-options in the subscreen or you have placed the multiple option manually?
    Either way, please check the two methods, it may solve your problem.
    Create a SELECT-OPTIONS in module pool screen using two methods as shown.
    Method 1
    a) Create a subscreen area in your screen layout where you want to create the select options.
    b) In the top include of your module pool program declare a selection screen as a subscreen e.g.
    SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.  
        select-options s_matnr for mara-matnr.
    SELECTION-SCREEN END OF SCREEN.
    c) In the PBO and PAI of the main screen where the select options needs to be created do a call subscreen of the above screen (100).
    CALL SUBCREEN sub_area INCLUDING  <program>   <screen>
    This CALL SUBSCREEN statement is necessary for transport of values between screen and program.
    Note: All validations of the selection screen fields e.g. the s_matnr field created above should be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These selection screen validations etc should be done in the top include only.
    Method 2
    a) Create 2 separate fields in your screen layout - one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this.
    struc_tab_and_field-fieldname = con_cust.  " 'KUNNR'
    struc_tab_and_field-tablename = con_kna1.  " 'KNA1'.
    CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'  
    EXPORTING*         
    TITLE                        = ' '    
    text                          = g_titl1   " 'Customers'     
    tab_and_field             = struc_tab_and_field   
    TABLES     
    RANGE                     = rng_kunnr   
    EXCEPTIONS     
    NO_RANGE_TAB       = 1    
    CANCELLED              = 2     
    INTERNAL_ERROR     = 3     
    INVALID_FIELDNAME  = 4    
    OTHERS                       = 5.
    IF NOT rng_kunnr[] IS INITIAL.       
    Read the very first entry of the range table and pass it to dynpro screen field   
    READ TABLE rng_kunnr INDEX 1.   
    IF sy-subrc = 0.       
      g_cust = rng_kunnr-low.    
    ENDIF.
    ENDIF.
    You can use the return table rng_kunnr to populate your own internal range table with the values entered by the user. Basically here you are just simulating the work of a select-options parameter by module pool screen elements.
    Regards

  • Multiple Instance Push Function Module

    All,
    I am referring to the service order tutorial as given in following link http://help.sap.com/saphelp_nwmobile71/helpdata/en/45/ac4bed74372733e10000000a155369/frameset.htm
    I have succefully created the Data Object/BAPI Wrappers and other objects. Everything works perfectly fine. Now I am trying to create a "Intance PUSH" function module in Mobile Server that will be called from backend to push the service orders. Till now using the same structure as in the tutorial I can send PUSH one instance. However I was wondering what if I have to PUSH Multiple instance at one shot.
    I am confused as to how should the structures for the same should look like. In the example given here, the customer node and equipment node do not have the order ID parameter in it. So when I have to push the same, how will the system know which instance of customer/equipment belongs to which instance of orderheader.
    If any one can clarify the same it will be really great.
    Regards,
    Shubham

    The backend key added by the DOE is a 'generated' field (and therefore internal to the DOE). This is why it is not exposed in the instance push FM.
    When you do not switch on automatic keymapping, the DOE creates this generated field, and fills it after calling GetDetail in the case of a delta download or a key push (since getdetail itself is called per instance, resolution is simple).
    If you switch on automatic keymapping, DOE will try to find existing backend fields in the child which match the root keys. (i.e. by name and type), and use these to resolve the children. If it cannot find such fields in the child that match the root keys, it will again generate fields on its own. And again these generated fields will be filled by the DOE after calling GetDetail during a delta load or key push.
    However, in the case of Instance Push, the only way to let the DOE resolve child instances is to send a field from the backend itself (i.e. not generated), which can be used to resolve the child instances (because GetDetail is not called in this case)
    If you do multiple instance push with the example given without changes, I am not sure if resolution will happen.
    An alternative to automatic keymapping is 'explicit keymapping' where you yourself decide which backend field in the child maps to which backend KEY in the parent (at all levels).
    Edited by: Arjun Shankar on Oct 1, 2009 1:36 PM

  • Effect of Multiple cursors in Function Module Extractors

    Hi,
    I am trying to use multiple cursors in an FM extractor, like this:
    OPEN CURSOR WITH HOLD c1 FOR <select query 1>.
    OPEN CURSOR WITH HOLD c2 FOR <select query 2>.
    FETCH NEXT CURSOR c1
                   INTO CORRESPONDING FIELDS
                   OF TABLE i_equi.
    FETCH NEXT CURSOR c2
                   APPENDING CORRESPONDING FIELDS
                   OF TABLE i_equi.
    " Further processing of equipments
    " obtained in i_equi
    I am also checking SY-SUBRC, after each Fetch statement. If both cursors happen to be empty, the extractor exits by raising no_more_data, like other extractors.
    It is possible to do so, since I just tried it. The question is, are there any disadvantages of this kind of approach in terms of memory or speed?
    Edited by: Suhas Karnik on Sep 29, 2008 12:06 PM

    hI kiran,
    The simple way is to create a data element & domain with value range where u provide set of fixed values or provide a check table to it.
    Use that data element in a table <ztable>.
    Code:
    Parameters:
          p_burks like <ztable>-dataelement.
    Call Function <function_name>
    exporting
    p_burks = p_burks,

  • Transfer multiple rows to function module

    Hi Friends,
    I have th following requirement.
    In Visula composer I have 1 Input table.
    Here I read rows from material master and I have a checkbox and a button transfer.
    And I have a second table view with similar fields.
    In the first table view I check several rows and when I press transfer.
    Now I want all the checked rows of table view 1 to appear in table view 2.
    For this reason I want to create a FM to keep the data in a table I have created.
    In fact, I want to transfer the rows from table view 1  in a temp table and from there into table view 2.
    But how can I transfer multiple rows from visual composer into the temp table by means of FM.
    Many thanks for your help.
    RG. Jimbob

    Connect your table view 1 to your FM (make sure you flip the table on your FM to a input port).
    Select the connector you just created and configure element. Set mapping scope to 'Selected Data Rows'.

  • How to make input parameter with multiple values in function module?

    Dear Experts,
    I want to add BUKRS as import field to a FM, what is the best way of of making it accept multiple enteries.
    Regards,
    Kiran

    hI kiran,
    The simple way is to create a data element & domain with value range where u provide set of fixed values or provide a check table to it.
    Use that data element in a table <ztable>.
    Code:
    Parameters:
          p_burks like <ztable>-dataelement.
    Call Function <function_name>
    exporting
    p_burks = p_burks,

  • Regarding Function Modules

    Hi,
    I want to fetch the function groups and function modules from enlfdir table, then i have to count the number of function modules for each function group and should display the number  in output in alv.
    by using the describe statement i can able to get the number for one function group, if i use multiple selection of function groups in selection screen it is not giving the correct values(it is giving same values for all the function groups) can any one help me  how to write code for this. 
    Thanks
    Alka

    Hi ,
    Here is the code to fetch the details.
    hope this helps !
    TABLES : ENLFDIR.
    *---- SELECTION-SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK b1.
    SELECT-OPTIONS:      s_area FOR ENLFDIR-area.
    SELECTION-SCREEN END OF BLOCK b1.
    types : begin of tp_data,
            AREA TYPE RS38L_AREA,
            FUNCNAME TYPE RS38L_FNAM,
            end of tp_data.
    types : begin of tp_final,
            AREA TYPE RS38L_AREA,
            count type i,
            end of tp_final.
    data : t_data type standard table of tp_data with header line,
           t_final type standard table of tp_final with header line.
    data : l_cnt type i,
           l_area type rs38l_area.
    select funcname
           area
           from ENLFDIR
           into corresponding fields of table t_data
           where area in s_area.
    if sy-subrc eq 0.
    sort t_data by area funcname .
    endif .
    Loop at t_data.
    l_cnt = l_cnt + 1 .
    l_area = t_data-area.
    at end of area.
    t_final-area = l_area.
    t_final-count = l_cnt.
    append t_final.
    clear t_final.
    clear  : l_cnt,
             l_area.
    endat.
    endloop.
    sort t_final by area.

  • Function Modules or BAPI for CK91N transaction Please

    Hi,
    To upate CK91N transaction , Is there any function module or BAPI exist?
    Thanks,
    Krishna

    Hi
        go to se80 ->package->type CKMLMV as package name.
    This package has multiple programs and function modules which update the transaction. You can choose from them according to your requirement.
    Hope this helps!
    Viquar Iqbal

  • In WE19 getting error Message as Function module missing

    Hi Friends,
    I need to debug the Inbound function module
    so in WE19 i am providing the IDOC number and clicking on the Inbound function module then i am getting pop-up
    i am able to select my function module name
    and checking the Fore ground processing Radio button
    for debugging
    I am getting a Warring Message as
    Interface or Function module <NAME> is Incorrect
    Kindly suggest me
    where the mistake might be
    and how to correct IT
    Thanks in Advance
    Ganesh

    Hi Ganesh,
    I believe you are using a non IDOC function module, that's the reason you are getting that error.
    Use the appropriate IDOC function module and then select the Debug check box and it will stop.
    If you can provide me the IDOC message then I can help you by giving the correct Function Module.
    Thanks,
    Mahesh.

  • Can anyone tell me steps to be taken while modifying a function module exit

    Hi guys,
    I have to make little changes to function module exits in a project .
    what are the necessary steps i need to take make the changes and make them work.
    Thanks,
    Venkat

    1.  Create a project in CMOD
    2.  Assign the exit definition name (From SMOD)
    3.  Select the function module you would like to implement from the components screen
    4.  Double click on the include name within the function module, create the include if not already created
    5.  Add your code to the include program
    6. Save and activate your code
    7.  Save and activate your CMOD Project
    Best Regards,
    Chris H.

  • Issue in creating web service for a ABAP Function Module

    Hi,
    now i'm learning how to create web service for a ABAP Function Module. I used the following steps.
    1. select the Function Module, named "zws_test".
    2. in the context menu, select "create->proxy object". so we enter into wizard.
    3. in the wizard, press the radio button "Service Provider".
    4. in the next page, press the radio button "Existing ABAP Objects(Inside Out)".
    5. In the next page, Enter the "zws_test_prvider" as Service Definition and select "Function Module" as Endpoint Type.
    6. in the next page, enter "zws_test" as Function Module and mark the "Mapping der Namen" button
    7. in the next page,select "PRF_DT_IF_SEC_LOW" as Profile and mark "Deploy Service".
    8. Save in the local package.
    9. then it will pop up a window with title "WSDL Source". i selected "URL/HTTP Destination" and press "OK".
    10.in the next page, i enter the URL as "http://hostname:portnumber/", and press "OK".
    11. then it will pop up a window with title "Display logs". A record with error message "HTTP error(return code 404, message "Not found")" appears.
    12. i press "ok" and a service provider with name "zws_test_prvider" appears in my local package.
    13. i use "zws_test_prvider"'s URL to create a service consumer "ZCO_WS_TEST_CONSUMER" and logic portal "LP1".
    14. But when i test my service consumer "ZCO_WS_TEST_CONSUMER", it will throw an exception "cx_ai_system_fault" with errortext "SOAP:14 Unexpected element -el=definitions ns=http://schemas.xmlsoap.org/wsdl/".
    15. I use t-code SM59 to test connection  and get the following info.
          Status HTTP Response     200
          Status Text                      OK
          Duration Test Call             328 ms.
    who can give me the reasons about item 11 and 14, and explain me how to create service provider and service consumer for a Function Module.
    Thanks in advance
    Johnney

    have you seen this weblog
    /people/thomas.jung3/blog/2004/11/15/bsp-150-a-developer146s-journal-part-xiii-developing-abap-webservices

  • How to create a generic datasource from function module?

    Dear experts,
    I have created a generic datasource from function module. For this extrator, I created a function module and a structure.
    I have now some difficulties to continue:
    In this function module, i get data from different transparent tables. Then i put these data into an internal table.
    I just don't know what is the relatioin between the structure i defined and this internal table.
    I should make "iTab structure AA" in the source code?
    Thanks

    Hi..
    check this
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
    Generic Extraction via Function Module
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    1. Create s structure with the fields that you need from the 4 tables . Activate.
    2. Goto SE 80 Select The Function Group , Copy , Select the Function module
    " RSAX_BIW_GET_DATA_SIMPLE " and Give a New name starting With
    Y or Z .
    3. SE37 ->Your Function module name -> Change , In table tab give your structure
    name by deleting the associated type given in " XXXX " .
    4. Now select source code and Do the coding . Give Data source name in Coding .
    In your case you have to take data from more that 1 table .
    5. Activate the Function Group .
    6. In RSO2 Create the Data source , Give the Function Module Name , And Save.
    7. RSA3 -> Give data source name and Check for the Records .
    Creation of custom datasource. (Using function module)
    .Create a function group .
    . Structure ZTXXXX
    Create function module (i.e. ZTESTXXX) .
    . Create the data source using transaction (RSO2).
    . If structure exists for the table parameter of your function module then ok else create a structure for the table parameter ‘        ’.
    Test the datasource in R/3 using transaction RSA3.
    Transfer the data source to BW –System and replicate it in the BW-System.
    Message was edited by:
            shiv

  • How to debug a function module using in the generic datasource?

    Hi all,
    We have created a generic data source using function modulle and have been extracting the data for a single customer it contains single records but it has pulled out more than 10,000 records. how to debug the function module used in the data source.
    since we schedule for extraction in bi and back ground job gets triggered in ecc for extraction,
    i know in se37 we can select the function module name and then debug but still need to check while the bacground job is trigered through bi.
    Thanks

    Yes you can debug the Function Module.
    Open the function module in SE37 and put a break point in the code where you want to check from, then come to RSA3 and give the datasource name and check the Debug check box on this screen, once you click on the start button it will take you the place where you have placed the break point in the FM, by pressing F5 you can see the flow of the FM.
    Let me know whether this solves your issue.

  • How to know the changes done in one function module??

    Hi All,
    Could you please let me know how can I know the changes done in one function module?
    I am not a technical expert..I can just jump into SE37 to access the function module.. but would like to know if there are any logs for the function module screen which tells us about the versions and changes done from time to time?
    Thanks,
    Ramya

    Hi Ramya,
    There are ways to look at the modification overview for a function module
    1) In se37, after selecting the function module, click on Ctrl + Shift + F2
    2) Other way is the menupath ie Edit > Modification operations > Modification overview.
    Hope this helps you.
    Please confirm
    Regards
    R. Senthil Mareeswaran.

  • Error in debugging tRFC Function module (in background task) in SM58

    Hi,
    I am trying to debug this statement:
    CALL FUNCTION 'CRM_UPLOAD_TRIGGER'                 
      IN BACKGROUND TASK                               
      DESTINATION gv_smof_erpsh-rfcdest AS SEPARATE UNIT
    I have followed these steps:
    When you debug a program that calls function modules using the IN BACKGROUND TASK addition, they are processed in a background work process (additional internal session). If you set the In background task: Do not process option, the system collects the function calls, but does not start the background work process. The Debugger assigns a transaction ID, which identifies the background work process uniquely. You can now start the Debugger for the background work process using transaction SM58. You can select the function module concerned here, and then execute it via the Edit menu.
    but still i cant find any entry in SM58.
    Can anybody help me out in this?
    Thanks a lot.
    Best Regards,
    Shweta

    HI,
    When the COMMIT WORK statement is executed, the function modules registered for the current SAP-LUW are started in the order in which they were registered. ROLLBACK WORK deletes all previous registrations for the current SAP-LUW.
    If the specified destination is not available when COMMIT WORK is executed, an executable program called RSARFCSE is started in background processing. By default, this tries to start the function modules registered for a SAP-LUW in their destination every 15 minutes and up to 30 times. These parameters can be changed in the transaction SM59. If the destination does not become available within the defined time, it is recorded in the database table ARFCSDATA as the entry "CPICERR". The entry in the database table ARFCSSTATE is deleted after a standard period of eight days

Maybe you are looking for

  • Adobe creative cloud app can't complete the installation

    I just downloaded adobe creative cloud app for mac, then i open it, but it can't be completed the download or the installation this picture after this step it canceled automatically!! please any help..

  • Problem while goods issue in mb1c

    problem created while entering in mb1c is that Account determinatiom for enering INT GBB 0001 ZOB 7920 not possible pls solve it.                                            With Regards                                          Prasanta Kumar Sahu

  • Problem in DBMS_JOB

    Hi All, I have problem while executing the job. I am able to submit the job but when the job is triggered I am encountering the error given below. Pocedure: create or replace procedure test_jj is V_date date; begin v_date := null; exception when othe

  • Question mark when mac turns on7

    I am getting the flashing question mark box when switching my mac on. Pressing C no longer seems to work but Ican press cmnd and R but not sure of what to do from here.

  • Umlaut bug in iTunes 5 (Entering song info)

    There seems to be a bug handling Umlauts in iTunes 5.0: You cannot enter one as a first or second letter when entering artist or composer info. E.g.: Ü is automatically converted to U. So to enter "Jürgen" you'd have to enter Juürgen, then delete the