Execute BEX Query via Function Module

Hi Mates,
I want to execute BEX query via a Function Module.
Also i want to explore whether the input parameters of the query can be retrieved from a Database Table.
Please let me know how this can be achieved.
Thanks in advance.
Regards,
Hrishikesh

Hi Hrishikesh,
Assuming you have the necessary ABAP knowledge, you will have to code the exit in the include ZXRSRU01 under I_STEP = 1 (this is because you want to prepopulate your parameters from the values in your DB table).
Your DB table has Key1, Key2 and Your field as the three fields and you want to read the value of 'Your Field' based on your keys Key1 and Key2.
So, the code will be something like -
when 'Your variable'.
if i_step = 1.
select single 'Your field' from 'Your DB table' into lv_your_field where Key 1 = 'X' and
                                                                                                               key 2 = 'Y'.
clear l_s_range.
l_s_range - low = lv_your_field.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
append l_s_range to e_t_range.
endif.

Similar Messages

  • Error while executing BEX query via FM

    Hi Friends,
    I am getting following error while executing a query via FM RRW3_GET_QUERY_VIEW_DATA.
    Please see the error screenshot as follows.
    the I_T_PARAMETERS entered are as follows.
    Please let me know what is missing.
    Thanks.
    Regards,
    Hrishikesh

    the key date variable 0DAT is normally filled by a SAP exit variable, but this may not be the case.  it could have been changed in the query designer,  check the query in query designer and see.
    Try passing 0DAT in the variable list with todays date

  • Error in Extraction with Generic Datasource via Function Module

    Dear Gurus,
    Iam working for BI-HR module.We are extracting data with generic data source via function module. The client some more extra fields in already existing DS. So we made a copy of that Function module and tried to create new generic DS, we got error while extraction like "Error occured during the extraction process". Can you please help in resolving this issue, your valuable suggestion would be highly appreciated.
    Thanks and regards
    Arun S

    Hi,
    Which structure are you using??
    Are you using the same old structure for this function module as well.
    Have you enhanced the structure with new required fields.
    New extrac fields needs to be added to existing structure if you are using the same or create a new one and make sure that you have all the fields in the structure which you are going to use in the data source.
    You need to take care for the append as well and the issue could be in the code as well.
    Make sure you have written the proper code and just for the new fields done an append
    Thanks
    Ajeet

  • Query regarding function module SPOOL_RQ_READ_BAPI_EXPORTS (EBP-SRM Module)

    query regarding function module SPOOL_RQ_READ_BAPI_EXPORTS (EBP-SRM Module)
    shopping cart
    Hi in FM SPOOL_RQ_READ_BAPI_EXPORTS
    i want to relate the internal tables requisition_items and requisition_services.
    but in am not getting the key on which they should be joined
    here i have to take the quantity and other fields from requisition_services
    right now i am using the joining condition as
    requisition_items-pckg_no = requisition_services-pckg_no.
    any help in this regard is welcome.
    Thanks and regards,
    Vithalprasad

    Hi Kathirvel,
    Thank you for reply. I am making changes for standard code only.
    " Call FM SPOOL_DPO_READ_BAPI_EXPORTS to read PO data exported to backend.
    Use this data to call FM B46B_DPO_TRANSFER and copy errors tab from
    ' lt_bapi_return ' to ' et_messages' retrun tab in 'doc_check' badi. "
    Thank you.
    Regards, Sunu

  • WBS copy via function module "K_PLAN_TO_PLAN_COPY"

    Hi Experts
    anybody please advise whether WBS copy to other via function module "K_PLAN_TO_PLAN_COPY"
    is possible or not in below situation.
    Currently we faced some issue when WBS satus is "TECO", we can not
    copy WBS to another WBS (we want to copy whole wbs into others) by
    function module "K_PLAN_TO_PLAN_COPY".
    So we just change system status from TECO to REL then copy wbs to other,
    however, we could face another issue with this way of copying. (since we
    have to change wbs status, it could cause conflict against other project)
    We want to copy wbs without changing wbs status via function module "K_PLAN_TO_PLAN_COPY".
    Can it be possible? if yes, please advise how to, (settings/conditions/something like that)
    Thank you.
    Satoru

    Hi Satoru,
    The Function Module K_PLAN_TO_PLAN_COPY is not released for customers and therefore it is not intended to be used in customer specific programs or enhancements. For further details, please have a look SAP Note 109533.
    Sorry for not having better news.
    BR,
    Enrique

  • Adding a new conditon on head via function modul?

    Hi,
    is there a way to add a condition to an order via function module? I mean in customizing we have maintained the calc scheme (and everything else) and assign it to the order. What we want is to add the new condition type to the head of the order via function module. The scenario is as follows:
    We create an order and have on the header a field for a value. If you type a value in the field and press enter the condition should be created and calculatetd. The result is given in the condition tab of the order on header level.
    We try to not do a modifictaion. therefore i am looking for a function module. Is there someone who could help?
      thanks and regards,
           Ming

    Why can't this be done by the pricing configuration?
    There are also pricing user exits available, which are not modifications and exist for this purpose exactly (i.e. when for some reason configuration alone is not enough). See the list here:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/erplo/sdUserexits

  • Error during XML inbound via Function Module 'EDI_DATA_INCOMING'

    Hi Team,
    I am facing below error while trying to upload a inbound XML file via Function Module  'EDI_DATA_INCOMING'.
    The control record must begin with <EDI_DC40 segment="1"> instead of
    Message no. EA719
    Diagnosis
    The tag '<EDI_DC40 segment="1">' must be at the start of a control record in XML format, otherwise string '' would be found.
    System Response
    The file cannot be processed.
    Procedure
    Correct file DEV_H\SGIDOCI\MSUTEST\00082_ATT..
    Please suggest a proper solution for the same. If it is because of wrong structure of XML file then please send me correct XML format for file upload.
    Regards,
    Amit Sharma

    Hello,
    It's the error is SAP code.
    Look notes 1616333 and 1535033. Those should fix the error.
    BR, Janne

  • Generic Delta Extraction via Function Module

    Hello,
    i need a help for a generic delta extraction based on a Function Module. As an example i take the function module RSVD_BW_GET_DELTA_DATA.
    My generic delta extractor based on the field AEDAT - Change Date and i will extract purchase service orders and entry sheets.
    In the sample function module the select for the extraction worked with the table ROBWQTSTAT, but this table ist empty after the initialization.
    OPEN CURSOR WITH HOLD G_CURSOR FOR
          SELECT * FROM ROVERCUBE1
                   WHERE COUNTRY IN L_R_COUNTRY AND
                         REGION  IN L_R_REGION AND
                         KUNNR   IN L_R_KUNNR AND
                         TYPE    IN L_R_TYPE AND
                         GJAHR   IN L_R_GJAHR AND
    Here the timerange calculated in form GET_TIME_INTERVAL is evaluated.
                         TSTMP   IN S_R_TSTMP AND
                         OBJVERS = 'A'.
    I found the table ROOSGENDLM. In this table i found the field DELTAID with the last date of the extraction and the field REPEATID with the date for the repead-Update.
    My Questions:
    Is this the right way to build an generic delta extraction with an function module or must i install a coding in my function module for an update of the table ROBWQTSTAT?
    Which settings are needed in the table ROOSOURCE for a generic delta extraction via function module?
    Best regards
    Uwe

    Hi Uwe,
    please have a look at https://weblogs.sdn.sap.com/pub/wlg/2415. [original link is broken] [original link is broken] [original link is broken] It might help
    kind regards
    Siggi
    PS: We already had almost the same question here today.

  • Datasource via function module

    Hi,
    I am building a function that is due to be used by a Datasource (via Function Module).
    This function uses table WDRD. It applies to this table a code that needs the use of an internal table for the calculation (for intermediary calculation storage). After which, I want to get the result of this internal table (say T1_DATA), and return it to E_T_DATA, which will be used to fill my datasource. This is where I am stuck.
    -> When I try to get the content of my internal table in my cursor (code: OPEN CURSOR WITH HOLD S_CURSOR FOR
          select * from T1_DATA
        endif.),
    I get an error message stating the table is not defined in the ABAP dictionary.
    -> When I try to avoid the cursor and put directly the content of my table T1_DATA in table E_T_DATA, I don't get anything in my Datasource.
    Any help would be greatly appreciated.
    Thanks,
    Pierre

    Hi,
    Which structure are you using??
    Are you using the same old structure for this function module as well.
    Have you enhanced the structure with new required fields.
    New extrac fields needs to be added to existing structure if you are using the same or create a new one and make sure that you have all the fields in the structure which you are going to use in the data source.
    You need to take care for the append as well and the issue could be in the code as well.
    Make sure you have written the proper code and just for the new fields done an append
    Thanks
    Ajeet

  • Function Module to Execute BEx Query and Save as work book.

    Hi
    I have a requirement for executing the Query after the data is loaded into the cube and save as Workbook and emailing to the user. Is there any Function module to Execute the Query and saving as Work book? . Please suggest me the way how to approach the problem.
    Thanks for your help in advance.

    Hi,
    It is possible to execute the Query and send the result as workbook vial email to the user.
    For that use should use Information Broadcaster.
    Steps:
    1. Goto information broadcaster.
    2. Choose object type as "Query"
    3.Click create new setting.
    4. Give description and choose distribution type as "Broadcast E-mail"
    5.Choose output format "XML(MS Excel)
    6.In recipient tab Give valid e-mail addres which you want to send.
    7.Save it. and give technical name
    8.Click schedule.
    9.choose "Execution with Data Change in the InfoProvider " correspondig infoprovider will be shown (check the check box)
    10. that's it. whenever data loaded in your infocube, it will be automatically executed and send to user mail.
    <removed> if u want more information let me know.
    Regards,
    Senthil Kumar.P

  • Dump when i executed bex query

    i execute bex with my user ( i am sap_all), i haven't problem.
    when i executed this same report ( with variable autorisation), i have this dump:
    the dump:
    Erreur d'exécution     GETWA_NOT_ASSIGNED                                                          
    Date et heure          11.12.2009 17:26:11                                                                               
    Désignation                                                                               
    Field symbol has not yet been assigned.                                                      
    Causes                                                                               
    Error in the ABAP Application Program                                                                               
    The current ABAP program "SAPLRSEC_CHECKS" had to be terminated because it has               
        come across a statement that unfortunately cannot be executed.                               
    Solutions                                                                               
    Note down which actions and inputs caused the error.                                                                               
    To process the problem further, contact you SAP system                                       
        administrator.                                                                               
    Using Transaction ST22 for ABAP Dump Analysis, you can look                                  
        at and manage termination messages, and you can also                                         
        keep them for a long time.                                                                   
    Analyse des erreurs                                                                               
    You attempted to access an unassigned field symbol                                           
        (data segment 32774).                                                                               
    This error may occur if                                                                      
        - You address a typed field symbol before it has been set with                               
          ASSIGN                                                                               
    - You address a field symbol that pointed to the line of an                                  
          internal table that was deleted                                                            
        - You address a field symbol that was previously reset using                                 
          UNASSIGN or that pointed to a local field that no                                          
          longer exists                                                                               
    - You address a global function interface, although the                                      
          respective function module is not active - that is, is                                     
          not in the list of active calls. The list of active calls                                  
          can be taken from this short dump.                                                                               
    Comment corriger l'erreur                                                                               
    If the error occures in a non-modified SAP program, you may be able to                       
        find an interim solution in an SAP Note.                                                     
        If you have access to SAP Notes, carry out a search with the following                       
        keywords:                                                                               
    "GETWA_NOT_ASSIGNED" " "                                                                     
        "SAPLRSEC_CHECKS" or "LRSEC_CHECKSF06"                                                       
        "LOOK_UP_STAR_VARIABLES"                                                                               
    If you cannot solve the problem yourself and want to send an error                           
        notification to SAP, include the following information:                                                                               
    1. The description of the current problem (short dump)                                                                               
    To save the description, choose "System->List->Save->Local File                           
        (Unconverted)".                                                                               
    2. Corresponding system log                                                                               
    Display the system log by calling transaction SM21.                                       
           Restrict the time interval to 10 minutes before and five minutes                          
        after the short dump. Then choose "System->List->Save->Local File                            
        (Unconverted)".                                                                               
    3. If the problem occurs in a problem of your own or a modified SAP                          
        program: The source code of the program                                                      
           In the editor, choose "Utilities->More                                                    
        Utilities->Upload/Download->Download".                                                                               
    4. Details about the conditions under which the error occurred or which                      
        actions and input led to the error.                                                                               
    end ******************
    best regard
    francoise

    Try applying the following OSS Notes into your BW system. These should resolve the issue.
    [OSS  Note 1244842 - Termination LOOK_UP_STAR_VARIABLES-01-|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1244842] (relevant for BW 7.00 SP20, BW 7.01 SP3, BW 7.10 SP7 or BW 7.11 SP1)
    [OSS Note 1290949 - Dump GETWA_NOT_ASSIGNED for Query on InfoSet|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1290949] (relevant for BW 7.00 SP21, BW 7.01 SP4, BW 7.10 SP8 or BW 7.11 SP2)

  • Error while executing BEx Query on Composite Provider

    Hi,
    We have a BW on-HANA system, patch level SAPKW73105.
    We have created a Composite provider based on the union of two DSOs, two infoobjects, one SPO, and there are a couple of joins with two other DSOs, on the top of that we built a BEx query.
    While executing the BEx query, sometimes (depending on the filter values), We got the following error message
    "Attribute engine failed;Error executing physical plan: exception 6900: AttributeEngine/Parallel/DimensionFilter.cpp engine failed; $function$=getValidFemsPA;"
    "Error 6,900 has occurred in the BWA/SAP HANA server"
    "Error reading the data of InfoProvider @3ZSDRPCP5"
    "Error while reading data; navigation is possible"
    "Row: 59 Inc: MAP_TREX_EXCEPTION Prog: CL_RSDRH_TREX_STORAGE"
    (Attached error message)
    Ii We browse the composite provider data using the "display data" option in the RSA1, data is displayed without issue, the problem only appears during the BEx query execution and only with some filter vaues.
    Any idea on how to fix the issue.
    Thanks,
    Federico

    He's on 7.3 EhP1, which is on SPS12 today. It got pretty stable by SP08, SP09. SP05 was pretty early on, and had a lot of bugs in the HANA views.
    7.4 is on SP07 like you say, and most of our customers run at least SP06 - before then, you had to apply a bucketload of SAP notes. I would recommend customers apply SP08 with care because it's a feature release so will have a bunch of new features, which will no doubt need corrections.

  • Execute BW Query Via RFC

    Hi all.
    im traying to execute a BW query via an RFC ussing FM RRW3_GET_QUERY_VIEW_DATA.
    CALL FUNCTION 'RRW3_GET_QUERY_VIEW_DATA'
         EXPORTING
         i_infoprovider        =
           i_query                =
           i_view_id              =
           i_t_parameter       =
         IMPORTING
           e_axis_info           =
           e_cell_data           =
           e_axis_data          =
           e_txt_symbols       =
         EXCEPTIONS
           no_applicable_data      = 1
           invalid_variable_values = 2
           no_authority            = 3
           abort                   = 4
           invalid_input           = 5
           invalid_view            = 6
           OTHERS                  = 7.
    my query have two parameters. im puttings this valuen into table i_t_parameter , but at the momento of query execution, this values are not used like parameters never send to query.
    when debug my RFC, i can see that those values are passing to FM.
    Any Idea???

    try this blog.
    /people/durairaj.athavanraja/blog/2005/12/05/execute-bw-query-using-abap-part-iii

  • Error while executing BEx query made on Multiprovider having Virtual cube

    Hi All,
    We are getting an error message while executing a BEX query made on Multiprovide which consist of a Virtual Infocube infocube which extracts data from APO Live Cache, the error which we get is as below
    ''Error Reading the data of the infoprovider ZSS_R054
    Error in Substep
    Errors have occured while extracting data from datasource 9A_E2E_FC2
    Errors occured during parallel processing of query 4, RC:3
    Error while reading data; navigation is possible''
    And also when tried to execute from RSRT , it gets executed in debug mode in TRY and CATCHE
    Please let us know if anyone faced a similar situation or can suggest me what to do.
    Please suggest.
    Thanking you in advance.
    regards,
    ajay

    Hi Ajay,
    Try RSRV transaction, Select All Elementary Tests, Select query, now drag both these items on the right hand pane, select your query from this popup. and execute.
    Let us know what the result is.
    regards,
    Sree.

  • Error while executing Bex Query

    Hi all,
    i am getting error while executing the Bex Query.i am able to change and save the Query without any issues.
    Error:
    <internal error> Receiving from the BW server failed.BW server raised exception:SYSTEM_FAILURE
    Do you want to see more information?
    YES--->Syntax error in Program SAPLY05BW_ISA
    Details:
    Error Group
    RFC_ERROR_SYSTEM_FAILURE
    Message
    Syntax error in program SAPLY05BW_ISA
    What could be the problem?pl help me out!
    Thanks

    Hi,
    Try this:
    Execute the report RSFTP005 in BIW.
    With rgds,
    Anil Kumar Sharma .P

Maybe you are looking for

  • Disabled my ipod it says disabled connect to itunes

    i have locked myself out of my ipod touch it now says disabled connect to itunes but cant figure out what to do?? plz help

  • Making a movie with a self-playing slideshow

    Hello, I've been working hard on this slideshow with background music, videos and photos that are all timed to work automatically. Now I'm just trying to make it into a movie to put online and nothing's working! They either want manual timing or a fi

  • Partition size for clones

    Hi all in preparing an external drive to clone (CC Cloner) both my macbook pro and g5 would people recommend partition sizes on the external that matchthe physical size of the drives to be cloned or partition sizes that match the data used on the dri

  • Youtube on MacBook Pro.

    I installed adobe flash player twice, and youtube still says I don't have it, but everything else says I do

  • Nikon D5200 and Lightroom 4 - Incompatible Raw Files

    I just purchased a Nikon D5200. When I attempted to import my photographs into Lightroom 4, the raw files were incompatible. Every support topic I found said that I needed to go to the help menu in Lightroom and click "check for updates." But when I