How to use import parameter to be instead of SQL where sub-sentence ?

I wrote a RFC to read data from SAP table. To fetch data flexibility, I want to use import parameter xx instead of where sub-sentence in SQL sentence.
   For example, "SELECT * FROM T WHERE XXX",  and "XXX" is a importing parameter.
   How can I use it.
   Thanks a lot.
   Frank.

FUNCTION ZRFC_04.
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(TARGETTABLE) LIKE  MAKT-MAKTX
*"     VALUE(TWHERE) LIKE  MAKT-MAKTX
*"  EXPORTING
*"     VALUE(ZRETURN) LIKE  MAKT-MAKTX
*"  TABLES
*"      TMP_TEST1 STRUCTURE  ZTEST1
  DATA:
  TRANSACTION_ID LIKE ARFCTID,
  V_VAILD(1) TYPE C,
  scond(80) TYPE c.
  V_VAILD = 'X'.
GET PARAMETER twhere fields scond.
The error " 'LATE FIELDS' expected, not 'TWHERE FIELDS' " generated.

Similar Messages

  • How to use Import parameters of a search help

    Hi,
    Could you please tell me how to use import & export parameters of a search help in the report.

    Hi,
    Import parameters are imported from the selection screen of the report into the search help and then these are used to query in the search help.
    For example
    case 1.
    parameters : p_carrid like sflight-carrid.
    parameters : p_connid like sflight-connid.
    the search help that is used in the above condition is
    SFLIGHT.
    And the selection method is SFLIGHT in this search help.
    ( to check which search help is used go to se11 display the table and put your cursor on the field and in the menu for goto--> search help.)
    so when you do an F4 on connid it looks for a field which is declared like SFLIGHT-CARRID ( and the value entered in it) since the SFLIGHT-CARRRID is an import parameter in the search help,  and queries the database where the value is equal to the p_carrid which is declared like SFLIGHT-CARRID and gets only data which is equal to carrid
    case 2.
    parameters : p_carrid like SCARR-carrid.
    parameters : p_connid like sflight-connid.
    In this case the system will fetch all the data.
    since there is no parameter for SFLIGHT-CARRID on the selection screen it would get all the data from SFLIGHT.

  • How to use a parameter  of a report program from selection screen in a dialog program

    how to use a parameter value(entered ) of a report program from a selection screen in a dialog program.
    I have to fetch the value entered in the parameter of report program and display it in a dialog program

    Hi Aasim,
    Just mention like below in your ABAP report.
       PARAMETERS: p_aufnr TYPE aufnr MEMORY ID ord.
    and mention the same memory ID name in the module pool screen property it automatically populates the value to and fro

  • How to use a parameter of a report program in a dialog program

    how to use a parameter of a report program in a dialog program.
    I have to fetch the value entered in the parameter of report program and display it in a dialog program

    Hi Aasim,
    Just mention like below in your ABAP report.
       PARAMETERS: p_aufnr TYPE aufnr MEMORY ID ord.
    and mention the same memory ID name in the module pool screen property it automatically populates the value to and fro

  • How to use a parameter in a report program in a dialog program

    how to use a parameter in a report program in a dialog program

    Hi Shaikh,
    Post it in http://scn.sap.com/community/abap
    "ABAP Development".
    sree

  • How to use shared parameter on request set

    Hi
    I have a request set with two stages
    First stage contains From Date and To date where i have named the shared parameter as StartSP and EndSP
    i have to use these shared parameter in one of the query in next stage where my Type is SQL Statment and i have these two date fields From date and To date in next stage as well where i am able to retirve the values from previous stage
    based on these values i need to get the name in next parameter where my Type is SQL Statment
    select name from tablename where '02-MAR-09' > =start_Date and '29-MAR-09' <=end_Date
    I have written SQL as
    select name from tablename where StartSP > =start_Date and EndSP <=end_Date but it throws an error.
    I need the values of 02-Mar-09 and 29-Mar-09 from StartSP and EndSP
    Appreciate if any one has idea about this.

    hi user;
    please check:
    http://download-west.oracle.com/docs/cd/A60725_05/html/comnls/us/fnd/repset04.htm
    http://download-east.oracle.com/docs/cd/A60725_05/html/comnls/us/fnd/10gch609.htm
    Also you can check this search:http://www.google.com.tr/search?hl=tr&source=hp&q=How+to+use+shared+parameter+on+request+set+&meta=&aq=f&oq=
    Hope it helps
    Regard
    Helios

  • How to use dynamic parameter when a report is created using Stored Procedures

    Hi all,
    any one have the idea of how to use dynamic parameter in crystal report XI R2
    when report is created using Stored Procedure.
    Regards
    shashi kant chauhan

    Hi
    You can create an SQL command in Database Expert > Expand your datasource > Add command
    Then enter the SQL query that will create the list of values to supply to the user
    eg select field1,field2 from table
    Then edit the parameter of the report.  These will be the SP parameters adn can be seen in field explorer.
    Change the parameter type to Dynamic
    Under the word Value click on Click here to add item
    Scroll down to your Command and select one of the values that you want to appear in the list
    e.g field1
    Then click on the Parameters field - this is essential to create the param
    You can edit other options as required
    That should do it for you.
    I must say that i use CR 2008 connected to Oracle 10g SP, but i reckon this will work for SQL DB and CR XI as well
    Best of luck

  • How to use getAncestor(n),getdescendant(child,child) in sql why they are use please give me example

    how to use getAncestor(n),getdescendant(child,child) in sql why they are use please give me example
    jitendra

    Below are a few examples that demonstrate these hierarchyid data type methods.  See the hierarchyid reference in the SQL Server Books Online for more examples of these and other methods (http://technet.microsoft.com/en-us/library/bb677193.aspx).
    --return a child of this node ('/1/')
    SELECT CAST('/' AS hierarchyid).GetDescendant(NULL, NULL).ToString();
    --returns a child of this node greater than child node '/1/' ('/2/')
    SELECT CAST('/' AS hierarchyid).GetDescendant(CAST('/1/' AS hierarchyid), NULL).ToString();
    --returns a child of this node less than chold node '/1/' ('/0/')
    SELECT CAST('/' AS hierarchyid).GetDescendant(NULL, CAST('/1/' AS hierarchyid)).ToString();
    --returns a child of this node greater than child node '/1/' and less than child node '/2/' ('/1.1/')
    SELECT CAST('/' AS hierarchyid).GetDescendant(CAST('/1/' AS hierarchyid), CAST('/2/' AS hierarchyid)).ToString();
    --return ancestor of node 1 level up from this node ('/1/2/')
    SELECT CAST('/1/2/3/' AS hierarchyid).GetAncestor(1).ToString();
    --return ancestor of node 2 levels up from this node ('/1/')
    SELECT CAST('/1/2/3/' AS hierarchyid).GetAncestor(2).ToString();
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • How to use lexical parameter in report

    i want to use lexical parameter in report and pass parameter from form how it is possible in detail
    A.R

    Hi,
    typically you fill your lexical paramter in the after-paramform-trigger out of the values of your bind-parameters (giving end users directly control over lexical parameters might not be a good idea). Inside PL/SQL a lexical parameter is referenced like bind parameters with ":". In the query it's referenced via "&" and represents a part of the query.
    A simple example.
    - p_deptno as bind parameter
    - p_where as lexical paramter
    - end user choose value for p_deptno (10,20,... or nothing)
    - Trigger: if :p_deptno is not null then
    :p_where := 'WHERE deptno = :p_deptno'
    else
    :p_where := null;
    end if;
    - Query select ... from emp &p_where
    Regards
    Rainer

  • How to use a parameter field value as a substring in a "like" statement?

    Hi all,
    I'm trying to use a parameter field in a Record selection formula where the parameter field value would be a substring of the data stored in the field.
    My parameter field (SlctResearcher) is constructed as follows:
    Type: string
    List of Values: static
    Value Field: (Reports) RptAuthors
    (in Value Options) Allow custom values?: True
    {Reports.PubDate} in DateTime (2009, 04, 01, 00, 00, 00) to DateTime (2010, 03, 31, 23, 59, 59) and
    {Reports.RptAuthors} like "*{?SlctResearcher}*"
    When I hit F5 to generate the data, I get no results (and the parameter prompt field does not even come up...)
    If I modify the formula to put a hard-coded string, like
    "*Jones*"
    after the 'like', I get results (all the reports where "Jones" is a substring in the RptAuthors string.) If I modify the formula to just use the parameter field without the quotes/stars like:
    {Reports.PubDate} in DateTime (2009, 04, 01, 00, 00, 00) to DateTime (2010, 03, 31, 23, 59, 59) and
    {Reports.RptAuthors} like {?SlctResearcher}
    I do get the parameter prompt field, but still no results even if I put in a valid substring value (since it is not searching for a substring anymore...)
    How can I do this?
    Thanks,
    Will

    1st thing... Make a copy of your report before doing anything!!!
    To use a SQL Command, you'll want to open the Database Expert and look at the Current Connections. Expand the data source and the 1st option you see is the Add Command option.
    To find the SQL That CR is currently using, choose Database from the menu bar and select Show SQL Query...
    You can copy this and paste it directly into the command window. (If you you can write your own SQL you don't need copy CR's, it's just an option.)
    You'll also want to take not of any parameters that you have, you'll need to add them the the Parameter List of the command as well... be sure to spell them EXACTLY as they are in the design pane.
    Anyway, once the SQL statement is in the Command window you'll be able to alter the WHERE clause to use the wild cards.
    For future reference... What type of database are you reporting against???
    Jason

  • How to use import script with FDM using adapter ERPI?

    Hi,
    I use FDM and ERPI 11.1.2 to load data from EBS R12 to Planning 11.1.2
    Data loaded from eBS are YTD data.
    I have seen that I could use an import script to calculate manually the amount with the periodic_net_cr and periodic_net_dr fields.
    But how to use this import script? Because in my import format in FDM, I don't use a file but directly the adapter, so no "Expression" field.
    Thanks in advance for your help
    Fanny

    Hello Fanny,
    No you will not need to put anything in the BatchAction. If you review the FDM API Documentation posted it will outline all the scripts that will execute for a particular event ... and the order in which they execute. The BatchAciton only affects the execution of the batch ... it does not control processing of data. Processing of data is controlled by many others.
    There is a script that can be written and placed (as Tony mentioned) in the ImportAction that will be able to recaculate the values from ERPi to be YTD values. You can possibly open an SR and a support Engineer can help you .... or you can search the current KM base and use that information there from the v11.1.1.3.00 version to build your own for v11.1.2.x
    Thank you,

  • When/How to use - "search" parameter type in parameter like other types.

    We recently upgraded BI Publisher to 10.1.3.4. I saw new parameter type "search" in parameter section, when creating report. whats the use of it? How to use it ? like other parameter type Text, Menu,Hidden, Date.
    I couldn't find any help or release notes on this !
    Thanks
    Ayaps

    I started looking into this parameter type when our drop-down for customer numbers went from 13,000 (manageable) to 45,000 (completely unmanageable).
    I imagine this is supposed to mimic the effects of a "Long List" type LOV in Oracle Applications (as I had inquired about in [this thread|http://forums.oracle.com/forums/thread.jspa?threadID=895521&stqc=true|Large List of Values (LoV) hangs. Is there an equivalent for a long list?]), but performance-wise, "Search" does not seem to be any more efficient that using the "Menu" type LOV. Even with the help of having a partial string with a wildcard to match, the "Search" still takes too long to pull up to be of any use to us.

  • How to use Extension parameter in BAPI

    Hi,
    Can anyone provide any clue about how to use the EXTENSION paramenters in BAPI? Thanks.
    Regards,
    Chris

    Hi,
    just check this thread you can get some idea how to use extension in BAPI.
    BAPI_ACC_DOCUMENT_POST  (EXTENSION)
    Regards
    Vijay

  • URL iView Problem - How to Use URL Parameter of Type 'User Information'

    Hello URL iView experts
    I am currently working on integration of backend-functionality with the help of an URL iView.
    I want to use a parameter of type 'User Information'. In SAP Help Library it is said, that it is possible to set the value of a parameter according to a dynamic query on the users attributes. (Link SAP HELP)
    It is also said, that one can retrieve the Logon ID of the users account.(Attribute Name: j_user -> Link SAP HELP Attributes )
    I can choose the type 'User Information' but i don't know what to specify in the field 'Value'.
    I have made a screenshot of the problem.->[Link to screenshot|http://img66.imageshack.us/img66/7782/urliviewproblemfrsdnthrel3.jpg]
    But if i am calling the application this way, he doesn't retrieve the Logon-ID of the account, but he just uses the 'j_user' as value for the parameter.
    Can you tell me, what i need to specify in the field value?
    Best Regards
    Marcus
    Edited by: Marcus Böhm on Jun 2, 2008 1:22 PM

    Hi Marcus,
    > It is also said, that one can retrieve the Logon ID of the users account
    This is not correct; on the help.sap.com-page concerning the URL-iView-Parameters, it is printed that "other attributes (general, account, group, role) are not supported". The j_user attribute is part of the account group, so - not supported.
    For your needs, it may be a better choose to use the AppIntegrator, which offers such a possibility by using "<User.LogonUid>"; see http://help.sap.com/saphelp_nw70/helpdata/EN/36/5e3842134bad04e10000000a1550b0/frameset.htm and https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0cbc309-ff89-2a10-8bad-bcde4c152ecb
    Hope it helps
    Detlev

  • How to pass import parameter it_header_guid to FM CRM_ORDER_READ

    Hi,
    I have an internal table with only one field GUID of type CRMT_OBJECT_GUID.
    Now I need to pass this into the import parameter of the FM CRM_ORDER_READ.
    I tried in many ways but getting a type conflict error.
    <removed_by_moderator>
    Thanks,
    Madhurima
    Edited by: Julius Bussche on Sep 15, 2008 12:49 PM

    Hi Madhurima,
    Post CRM Technical or Functional related queries in "Customer Relationship Management (CRM) - General & Framework" available under SAP Solutions in Expert Forums.
    And regarding your question,
    Your guid should be of  "CRMT_OBJECT_GUID_TAB" type and not CRMT_OBJECT_GUID.
    Eg,
    DATA : IT_GUID TYPE CRMT_OBJECT_GUID_TAB.
    APPEND '488628CFB8C600B0E1008000C0090137' TO IT_GUID.
    CALL FUNCTION 'CRM_ORDER_READ'
        EXPORTING
          IT_HEADER_GUID       = IT_GUID
    Hope this helps.
    Thanks.
    Best Regards,
    Arun Sankar.

Maybe you are looking for