Get first entry of a table (return parameter of procedure)

Hello Community,
I created a procedure with a couple of projections and one join.
The procedure returns the result as a parameter (o_result).
In the calling procedure, I get the result.
But I need to do further processing based on the first row of the result.
Is this possible with SAP Hana SQL Script?
Many thanks in advance.
Regards, Rolf

Hi Rolf,
Your question is not very clear. May be you explain what you want to achieve after getting first entry of table.
In your calling procedure you would make a call and bind the output table like this
call proc1 ( :input_param, output_tab);
On the returing output_tab you could just write something like
output_top1 = select top 1 * from :output_tab;
You could use this table for whatever processing you want to do further.
If you want to get values into some scalar variables that is also possible.
e.g
declare lv_column1 nvarchar(10);
select column1 into lv_column1 from :output_top1;
Thanks
Sagar

Similar Messages

  • Extract First Entry from Hash Table, Place into Variable

    Hello,
    I want Powershell to query a property and then extract the first entry of that property and place into a variable. How would I do that?
    The command is:
    Get-CsRgsAgentGroup -Identity service:ApplicationServer:server.company.net -Name "Dispatch" | fl -Property AgentsByUri
    The output is: 
    AgentsByUri:{sip:[email protected],sip:variable2@company,sip:[email protected]}
    So, I would like the entry "sip:[email protected]", to be pulled into a variable.
    Thanks in advanced!

    If I run this without the $Variable, I at least return this output which is a good sign, though still throws back an error.
    When run with the $Variable, I just get back the error alone. We are on the right track.
    Get-CsRgsAgentGroup -Identity service:ApplicationServer:server.company.net -Name "Dispatch" | Select -ExpandProperty AgentsByUri | Select -First 1
    AbsolutePath   : [email protected]
    AbsoluteUri    : sip:[email protected]
    LocalPath      : [email protected]
    Authority      :
    HostNameType   : Unknown
    IsDefaultPort  : True
    IsFile         : False
    IsLoopback     : False
    PathAndQuery   : [email protected]
    Segments       : {[email protected]}
    IsUnc          : False
    Host           :
    Port           : -1
    Query          :
    Fragment       :
    Scheme         : sip
    OriginalString : sip:[email protected]
    DnsSafeHost    :
    IsAbsoluteUri  : True
    UserEscaped    : False
    UserInfo       :
    Get-CsRgsAgentGroup : The pipeline has been stopped.
    At line:1 char:1
    + Get-CsRgsAgentGroup -Identity service:ApplicationServer:server.company.net -Name " ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Get-CsRgsAgentGroup], PipelineStoppedException
        + FullyQualifiedErrorId : Microsoft.Rtc.Rgs.Management.GetOcsRgAgentGroupCmdlet
    Thank you so much for your help!

  • Creating view to get first row for each table !!

    I am having tables(more than 10) which are related using foreign key and primary key relationship.
    Example:
    Table1:
    T1Prim T1Col1 T1Col2
    Table2
    T2For T2Prim T2Col1 T2Col2 T2Col3
    (here T2For will have value same as T1Prim and in my design it has same column name i.e. T1Prim)
    Table3
    T3For T3Prim T3Col1 T3Col2 T3Col3
    (here T3For will have value same as T2Prim)
    and so on.
    The data in the tables is like For table1 there will be one record, for table2 there will be one record and for table 3 there are more than one records.
    Can i view either the first record for each of them or all records from each of them by writing the following view.
    I have written a view like this:
    Create or replace view test (T1Prim,T1Col1, T1Col2,T2Prim,T2Col1 T2Col2, T2Col3, T3Prim,T3Col1, T3Col2, T3Col3)
    As
    Select
    Table1.T1Prim,
    Table1.T1Col1,
    Table1.T1Col2,
    Table2.T2Prim,
    Table2.T2Col1,
    Table2.T2Col2,
    Table2.T2Col3,
    Table3.T3Prim,
    Table3.T3Col1,
    Table3.T3Col2,
    Table3.T3Col3
    From
    Table1,
    Table2,
    Table3
    where
    Table1.Prim = Table2.For
    and Table2.Prim = Table3.For
    When i ran the select statement on the view I am not getting any data. Whereas there is data when select is ran on individual table.
    Can someone please tell me where i am goofing.
    Thanks in the anticipation that i will get some hint to solve this.
    Eagerly waiting for reply.
    Thanks !!

    I mean use a collection :
    Collection Methods
    A collection method is a built-in function or procedure that operates on collections and is called using dot notation. The methods EXISTS, COUNT, LIMIT, FIRST, LAST, PRIOR, NEXT, EXTEND, TRIM, and DELETE help generalize code, make collections easier to use, and make your applications easier to maintain.
    EXISTS, COUNT, LIMIT, FIRST, LAST, PRIOR, and NEXT are functions, which appear as part of an expression. EXTEND, TRIM, and DELETE are procedures, which appear as a statement. EXISTS, PRIOR, NEXT, TRIM, EXTEND, and DELETE take integer parameters. EXISTS, PRIOR, NEXT, and DELETE can also take VARCHAR2 parameters for associative arrays with string keys. EXTEND and TRIM cannot be used with index-by tables.
    For more information, see "Using Collection Methods".
    Syntax
    Text description of the illustration collection_method_call.gif
    Keyword and Parameter Description
    collection_name
    This identifies an index-by table, nested table, or varray previously declared within the current scope.
    COUNT
    COUNT returns the number of elements that a collection currently contains, which is useful because the current size of a collection is not always known. You can use COUNT wherever an integer expression is allowed.
    For varrays, COUNT always equals LAST. For nested tables, normally, COUNT equals LAST. But, if you delete elements from the middle of a nested table, COUNT is smaller than LAST.
    DELETE
    This procedure has three forms. DELETE removes all elements from a collection. DELETE(n) removes the nth element from an index-by table or nested table. If n is null, DELETE(n) does nothing. DELETE(m,n) removes all elements in the range m..n from an index-by table or nested table. If m is larger than n or if m or n is null, DELETE(m,n) does nothing.
    EXISTS
    EXISTS(n) returns TRUE if the nth element in a collection exists. Otherwise, EXISTS(n) returns FALSE. Mainly, you use EXISTS with DELETE to maintain sparse nested tables. You can also use EXISTS to avoid raising an exception when you reference a nonexistent element. When passed an out-of-range subscript, EXISTS returns FALSE instead of raising SUBSCRIPT_OUTSIDE_LIMIT.
    EXTEND
    This procedure has three forms. EXTEND appends one null element to a collection. EXTEND(n) appends n null elements to a collection. EXTEND(n,i) appends n copies of the ith element to a collection. EXTEND operates on the internal size of a collection. So, if EXTEND encounters deleted elements, it includes them in its tally. You cannot use EXTEND with index-by tables.
    FIRST, LAST
    FIRST and LAST return the first and last (smallest and largest) subscript values in a collection. The subscript values are usually integers, but can also be strings for associative arrays. If the collection is empty, FIRST and LAST return NULL. If the collection contains only one element, FIRST and LAST return the same subscript value.
    For varrays, FIRST always returns 1 and LAST always equals COUNT. For nested tables, normally, LAST equals COUNT. But, if you delete elements from the middle of a nested table, LAST is larger than COUNT.
    index
    This is an expression that must yield (or convert implicitly to) an integer in most cases, or a string for an associative array declared with string keys.
    LIMIT
    For nested tables, which have no maximum size, LIMIT returns NULL. For varrays, LIMIT returns the maximum number of elements that a varray can contain (which you must specify in its type definition).
    NEXT, PRIOR
    PRIOR(n) returns the subscript that precedes index n in a collection. NEXT(n) returns the subscript that succeeds index n. If n has no predecessor, PRIOR(n) returns NULL. Likewise, if n has no successor, NEXT(n) returns NULL.
    TRIM
    This procedure has two forms. TRIM removes one element from the end of a collection. TRIM(n) removes n elements from the end of a collection. If n is greater than COUNT, TRIM(n) raises SUBSCRIPT_BEYOND_COUNT. You cannot use TRIM with index-by tables.
    TRIM operates on the internal size of a collection. So, if TRIM encounters deleted elements, it includes them in its tally.
    Usage Notes
    You cannot use collection methods in a SQL statement. If you try, you get a compilation error.
    Only EXISTS can be applied to atomically null collections. If you apply another method to such collections, PL/SQL raises COLLECTION_IS_NULL.
    You can use PRIOR or NEXT to traverse collections indexed by any series of subscripts. For example, you can use PRIOR or NEXT to traverse a nested table from which some elements have been deleted.
    EXTEND operates on the internal size of a collection, which includes deleted elements. You cannot use EXTEND to initialize an atomically null collection. Also, if you impose the NOT NULL constraint on a TABLE or VARRAY type, you cannot apply the first two forms of EXTEND to collections of that type.
    If an element to be deleted does not exist, DELETE simply skips it; no exception is raised. Varrays are dense, so you cannot delete their individual elements.
    PL/SQL keeps placeholders for deleted elements. So, you can replace a deleted element simply by assigning it a new value. However, PL/SQL does not keep placeholders for trimmed elements.
    The amount of memory allocated to a nested table can increase or decrease dynamically. As you delete elements, memory is freed page by page. If you delete the entire table, all the memory is freed.
    In general, do not depend on the interaction between TRIM and DELETE. It is better to treat nested tables like fixed-size arrays and use only DELETE, or to treat them like stacks and use only TRIM and EXTEND.
    Within a subprogram, a collection parameter assumes the properties of the argument bound to it. So, you can apply methods FIRST, LAST, COUNT, and so on to such parameters. For varray parameters, the value of LIMIT is always derived from the parameter type definition, regardless of the parameter mode.
    Examples
    In the following example, you use NEXT to traverse a nested table from which some elements have been deleted:
    i := courses.FIRST; -- get subscript of first element
    WHILE i IS NOT NULL LOOP
    -- do something with courses(i)
    i := courses.NEXT(i); -- get subscript of next element
    END LOOP;
    In the following example, PL/SQL executes the assignment statement only if element i exists:
    IF courses.EXISTS(i) THEN
    courses(i) := new_course;
    END IF;
    The next example shows that you can use FIRST and LAST to specify the lower and upper bounds of a loop range provided each element in that range exists:
    FOR i IN courses.FIRST..courses.LAST LOOP ...
    In the following example, you delete elements 2 through 5 from a nested table:
    courses.DELETE(2, 5);
    In the final example, you use LIMIT to determine if you can add 20 more elements to varray projects:
    IF (projects.COUNT + 20) < projects.LIMIT THEN
    -- add 20 more elements
    Related Topics
    Collections, Functions, Procedures
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/13_elems7.htm#33054
    Joel P�rez

  • How to get First line item in Table control for BDC.

    Hi,
    I have a requirement while creating the return order from the reference Sales order for BOM.
    Once I compare the line items and delete the items not to be returned, I want to read the first line item which in fact is header, to make some changes.
    How to read  this as cursor points to the last line item.
    -B S B

    Hi Bsb,
    What is exactly unclear to you? =POPO will give a popup screen in which you can enter the order position number. This number will then be on the top of the table which means you can refer to it in BDC with "(01)".
    Regards,
    John.

  • Even though the Table is updating, am not getting an entry in CDHDR table?

    Hi Experts,
    Am updating the MVKE-VMSTA filed from 33 to 34 by using a FM - ASSORTMENT_MVKE_CORR.
    When, I see the MVKE tbl, its updating correctly - was chaged from 33 to 34.
    But, I did NOT find any change entry in CDHDR or CDPOS tables on for this change.
    Let me know that, Why there is NO entry in CDHDR / CDPOS tbls? Iguess, definately, the CHANGE/history settings were set/switched on for this(MVKE) tabale.
    thanq

    We can create our own change documents by following a procedure. There are many more threads available. See below for your quick reference..
    The change documents gets updated by the FMs which are created /generated when the change doc objects are generated in SCDO. the change doc objects provided by sap are already generated. the fms will have names something like this
    <Change document object>_WRITE_DOCUMENT
    The object-specific update function module calls the following function modules with object-specific parameters:
    a. CHANGEDOCUMENT_OPEN
    b. CHANGEDOCUMENT_SINGLE_CASE and/or
    c. CHANGEDOCUMENT_MULTIPLE_CASE and possibly
    d. CHANGEDOCUMENT_TEXT_CASE
    e. CHANGEDOCUMENT_CLOSE
    For PO, the Change documnet object is EINKBELEG and the update FM Is EINKBELEG_WRITE_DOCUMENT
    Business data objects are changed frequently. We recommend that you log these changes for objects that are critical or susceptible to audits. You may find it helpful, and sometimes necessary, to be able to trace or reconstruct such changes later, for example for investigating or auditing purposes. SAP Systems log changes to business data objects in change documents.
    SAP Systems do not automatically use change documents for business objects. You must activate the process yourself.
    To activate a change document for an object, perform the following steps:
    1. Create the change document. (Use the transaction SCD0.)
    2. Activate the change document for the object. (Use data element maintenance: transaction SE11.)
    3. Generate an update for the object. (Use the transaction SCD0.)
    4. Insert the appropriate calls in the corresponding programs.
    To view change documents for an object, also use the transaction SCD0.
    For more information on change documents, check the below link.
    The change documents gets updated by the FMs which are created /generated when the change doc objects are generated in SCDO. the change doc objects provided by sap are already generated. the fms will have names something like this
    <Change document object>_WRITE_DOCUMENT
    The object-specific update function module calls the following function modules with object-specific parameters:
    a. CHANGEDOCUMENT_OPEN
    b. CHANGEDOCUMENT_SINGLE_CASE and/or
    c. CHANGEDOCUMENT_MULTIPLE_CASE and possibly
    d. CHANGEDOCUMENT_TEXT_CASE
    e. CHANGEDOCUMENT_CLOSE
    For PO, the Change documnet object is EINKBELEG and the update FM Is EINKBELEG_WRITE_DOCUMENT
    Business data objects are changed frequently. We recommend that you log these changes for objects that are critical or susceptible to audits. You may find it helpful, and sometimes necessary, to be able to trace or reconstruct such changes later, for example for investigating or auditing purposes. SAP Systems log changes to business data objects in change documents.
    SAP Systems do not automatically use change documents for business objects. You must activate the process yourself.
    To activate a change document for an object, perform the following steps:
    1. Create the change document. (Use the transaction SCD0.)
    2. Activate the change document for the object. (Use data element maintenance: transaction SE11.)
    3. Generate an update for the object. (Use the transaction SCD0.)
    4. Insert the appropriate calls in the corresponding programs.
    To view change documents for an object, also use the transaction SCD0.
    For more information on change documents, check the below link.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2a/fa015b493111d182b70000e829fbfe/content.htm
    Reward if find useful

  • How to get First record in a table

    Hi,
    I have created a table, at a time 20 records are displayed in the table.
    When the 21-40 records are displayed in the table, and the page is refreshed.. then first 20 records are displayed.
    How can I display the current records i.e., 21-40 records when I refresh the page?
    Please give me a solution for this.
    Thanks.

    Are you talking about the page refresh through OAF code or the refresh button?
    The logic you need to follow is to make sure that you maintain the state of the VO which will maintain the pointer to rows.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Who know how to handle pl/sql table return from stored procedure calling from jsp

    I have some stored procedure which return pl/sql table (index by table), It is look like an array. how jdbc handle this?
    CallableStatement cs = con.prepareCall("EXECUTE bill.getcountry(?,?)");
    cs.setInt(1, cid);
    cs.registerOutParameter(2, java.sql.Types.VARCHAR);// ARRAY?
    ResultSet rs = cs.executeQuery();
    Array array = (Array) rs.getObject (1);
    ResultSet array_rset = array.getResultSet ();

    Not that familiar with the OCI (Oracle Call Interface), but I think this call will be problematic - the OCI deals with SQL data types and not with PL/SQL structures.
    The OCI has since Oracle 8i sported an object call interface (see OCI Runtime Environment for Objects for details).
    This allows you to use the CREATE TYPE command to create advance user data types - and these are supported by the SQL engine, PL/SQL engine and external languages via the OCI.
    So you need to have a look at the Perl-DBI documentation to see how it supports Oracle object types and consider using these. As for internal PL/SQL data structures. These are not supported by the SQL engine and I would expect limited or no support in the OCI for these. Anyway, using SQL data types makes a lot more sense ito flexibility and transparency across languages and environments.

  • Getting idoc error - Entry in outbound table not found- in outbound scenari

    hi,
    while generating idoc for outbound idoc to file scenario - i am getting error
    "Entry in outbound table not found" (29 - error in ALE service)
    Diagnosis
    No partner profile (outbound parameter) could be found using the following key:
    /C100/KU//WP_EAN////
    This refers to the key fields in table EDP13:
    RCVPRN  Partner number
    RCVPRT  Partner type
    RCVPFC  Partner function
    MESTYP  Logical message
    MESTYP  Message code
    but already entry has been maintained in partner profiles for the corresponding message.
    same setup is working for other message types. pls let me know what might be the problem

    Hi,
    Check whether partner name is correct or not in WE20/outbound parameters undoer Logical System.
    Regards,
    Sreenivas.

  • How to make only first entry in table noneditable

    Hi,
    Only the first entry in the table should be made noneditable and remaining editable.
    Thanks and Regards,
    Sridevi

    Hi Sridevi,
    make it first your table will non editable all the rows.
    then use small button, write some code inside that to edit from the second row onwards.
    sample code:
      IF lo_el_professional_data IS INITIAL.
        CALL METHOD lo_nd_professional_data->create_element
          RECEIVING
            element = lo_el_professional_data.
      ENDIF.
      l_count = lo_nd_professional_data->get_element_count( ).
      l_index = lo_nd_professional_data->get_lead_selection_index( ).
      l_index = l_index + 1.
      lo_el_professional_data = lo_nd_professional_data->create_element( ).
      CALL METHOD lo_nd_professional_data->bind_element
       EXPORTING
          new_item             = lo_el_professional_data
          set_initial_elements = abap_false
          index                = l_index
    Regards,
    Naresh.

  • How to make entry in a table e.g. vbak table

    how make entries in a table.
    what is the procedure.
    can i do it in  production directly?

    >
    Vijay Babu Dudla wrote:
    > it is not possible to do it directly in production. if you do that you will loose your job, don't practice those on production.
    More than loosing you job you are violating the contractual terms with SAP. You will simply loose all Support from SAP.
    I wonder how an ABAPer got a uid in Proction Server. Its a strict no-no in our organization.
    pk

  • Returning Internal Table as Returning Parameter of Method (by Value).

    When you return an internal table as the returning parameter of a method, it is passed by value.  I understand the concept of passing by value vs. passing by reference, but exactly what this means in this case is ambiguous.
    1)  It could mean that the entire table, including data, is copied from the local table in the method into the parameter provided by the calling code.
    2)  Alternatively, it could mean that only the pointer to the table is passed by value and the data is not literally copied from one place in memory to another.  This would <b>not</b> be the same as passing by reference.  For instance, I believe this is how object references are passed by value.
    I want to know how it works, so that I know if there is an efficiency problem with returning a huge table.  The returning parameter is wonderful for getter methods, and I prefer to use it over exporting parameters, but I have some concern about passing tables as returning parameters since I don't know how this works.
    Can anyone either explain this, or at least make it clear to me whether or not there is an efficiency issue?
    Thanks, in advance,
    -Chris

    Thanks to those who tried to help me with this question, but I finally had to just figure it out on my own.  I just realized today that there is a way to find the answer using the debugger's <i>Go To->Status Display->Memory Use</i> option.  This shows how variables are stored in memory.
    The answer:
    First of all, if you set one internal table equal to another like:
      i_tab1 = i_tab2.
    or like:
      i_tab1[] = i_tab2[].
    both will simply set <i>i_tab1</i> to point to the same memory that <i>i_tab2</i> is using.  It does <b>not</b> make a copy.  Now, if you attempt to change <i>i_tab1</i>, with an <i>append</i> statement for instance, a copy of <i>i_tab2</i>'s memory is made <b>then</b>!  The requested change to <i>i_tab1</i> is then applied to the copied data.  <b>AHA!!!</b>  This means that even if you think you are copying a table, you are not really doing it until it becomes necessary due to a divergence in values.
    I specifically tested a returning parameter to see how memory is handled, and it is basically just like an '<i>=</i>' statment.  No copy of the data is performed at first.  The memory that is allocated for the local variable in the method is simply pointed to by the variable used in the calling code to recieve that value.
    What if you then change the value in the calling code after the method has finished executing?  The answer depends on the situation.  If the value that you returned from the method is still being pointed to by another variable somewhere, then a copy is made when you attempt to change the returned table in the calling code, but if there is no longer another variable pointing to this memory, you can change the table in the calling program all you want without causing a copy in memory.
    For instance, if you have a getter method that returns the value of an attribute, at first no copy will be made, but when you try to change the table in your calling code, a copy will be made then.  However, if you just fill a local table in your getter method and return that table, there will never be a copy made, because the local variable that originally pointed to that memory expired when the method completed.  That means that after the method completes, the only variable pointing to the allocated memory is the one in the calling code that recieved the returning value.
    This is fantastic!!  This behaives in a way that seems to provide maximum efficiency in most cases.  Also, the table copies are <b>never</b> a waste, since they only happen upon changing of one of the table variables that point to the common memory, and in this case you would <b>want</b> to make a copy to avoid corrupting the other variable.
    Also, even if you did return your table as an exporting parameter by reference, you would not gain any significant efficiency.  There would still be no table copy if you don't change the returned table.  Also, if you did change the returned table, you <b>would</b> still produce a table copy if there was another variable, like an attribute, still pointing to the memory that you set your exporting paramter from before.
    The only situation that I can see resulting in a needless efficiency problem is if someone used a getter method to return the value of a table attribute, then changed the returned table in the calling program, and then used a setter method to set the whole table attribute equal to the changed table.  This would be a waste, so maybe this should be accomplished in another way.
    In conclusion, there is essentially no reason to hesitate returning a whole internal table as a returning parameter from a method call, even though it is pass by value.
    Kudos to the ABAP development team for their good design!

  • Which field ,table gets the entry when we refresh cube statistics

    Hey,
    I just want to know  into which field or table entry is made when we Refresh statistics using the manage tab of the Infocube.. I saw the fields of the table RSDCUBE , there are two includes as given below and their fields, Im noy able to quite figure out which field gets the entry when i click on refresh statistics button in the Performance tab.
    1) RSDCUBEDBFLAGS (InfoCube: DB Performance Flags): which has the following fields namely
    CLEAR_INDEX     Boolean
    DELTA_INDEX     Boolean
    REBUILD_STAT     Boolean
    DELTA_STAT     Boolean
    PERCENTAGE     internal use
    NULLCOMP     Zero elimination in the summarization module
    COMP_DISJ     Flag: only disjunct records
    REFUPDATE     No update of the non-cumulative marker
    2)RSDCUBEBWSTAT (InfoCube: BW Statistics)
    BWSTATISTICS     Boolean
    BWSTATWHM     Boolean
    However , when i click on refresh statics, there is a job which runs from my id which triggers the program RSDSTAT1 with variant as the cube name..
    its kinda urgent...  helllpp
    Thanks,
    vaish

    Hey,
    I just want to know  into which field or table entry is made when we Refresh statistics using the manage tab of the Infocube.. I saw the fields of the table RSDCUBE , there are two includes as given below and their fields, Im noy able to quite figure out which field gets the entry when i click on refresh statistics button in the Performance tab.
    1) RSDCUBEDBFLAGS (InfoCube: DB Performance Flags): which has the following fields namely
    CLEAR_INDEX     Boolean
    DELTA_INDEX     Boolean
    REBUILD_STAT     Boolean
    DELTA_STAT     Boolean
    PERCENTAGE     internal use
    NULLCOMP     Zero elimination in the summarization module
    COMP_DISJ     Flag: only disjunct records
    REFUPDATE     No update of the non-cumulative marker
    2)RSDCUBEBWSTAT (InfoCube: BW Statistics)
    BWSTATISTICS     Boolean
    BWSTATWHM     Boolean
    However , when i click on refresh statics, there is a job which runs from my id which triggers the program RSDSTAT1 with variant as the cube name..
    its kinda urgent...  helllpp
    Thanks,
    vaish

  • In BDCP table I am not getting any entries for EKKO,EKPO,EKBE,EKET,EBAN

    In BDCP table I am not getting any entries for EKKO,EKPO,EKBE,EKET,EBAN tables.
    But there are entries for many other tables.
    I have got objects for EKKO,EKPO,EKBE,EKET,EBAN tables from TCDOB tables.

    Hi Avishek,
       Let me explain the meaning of Change pointers.
    If you have entry in BDCP table for MARA, that means everytime a material is created in MARA table in one system, a corresponding Material is created in another system which is connected to the current system VIA ALE. and whenever you change that material in your source system, then the change is propagated to the target system also(If you have done the change pointer set up).
    The you do not have entries for other tables becuase the configuration for change pointers is not done for those Objects(In your case the change pointers are not defined for Purchase Orders and hence no entries in BDCP table).
    Regards,
    Ravi kanth Talagana

  • Is there any BAPI or function module  to delete entries from a table (VBAK)

    Hi Everybody,
    this is my first thread in SDN...
    my problem follows...
    A report is be created that selects all sales orders created by e-Sales that are more than 20 minutes old and still have a delivery block:
    tables:
    VBAK     sales document: header data
    selection fields:
    VBAK-LIFSK      &#8800;     <BLANK>
    VBAK-ERNAM     =     userID used by e-Sales / IVE
              (EP-BATCH / EAI-BATCH)
    VBAK-ERDAT      <=     Current system Date
    VBAK-ERZET     <=     Current system Time - 20 minutes
    These orders should be deleted from SAP system.
    This report should be scheduled to run regularly every 10 minutes.
    my doubt : is ther any BAPI or Function module to delete entries from a standard table...if no what is the way to delete the enteries from a std table...
    best replies will be rewarded....
    regards
    Reddy

    Hi Vasanth ,
    thanks for your reply.
    i tried in the same manner what u mentioned.
    but how to pass only one parameter to the functionmodule..
    here in this case we have to pass only update flag as 'D'..
    i did the same it giving dump..
    An exception occurred that is explained in detail below.                          
    The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was      
      not caught and                                                                   
    therefore caused a runtime error.                                                 
    The reason for the exception is:                                                  
    The call to the function module "BAPI_SALESORDER_CHANGE" is incorrect:                                                                               
    In the function module interface, you can specify only                            
    fields of a specific type and length under "ORDER_HEADER_INX".                    
    Although the currently specified field                                            
    "INT_ORDER_HEADER_INX" is the correct type, its length is incorrect.              
    my pgm :
    *& Report  YNEW_ORDER_DELETION
    REPORT  ynew_order_deletion.
    TABLES:vbak.
    PARAMETERS:
         p_lifsk LIKE vbak-lifsk DEFAULT '02'.
    SELECT-OPTIONS:
       s_lifsk FOR vbak-lifsk DEFAULT '10',
        s_ernam FOR vbak-ernam,
        s_erdat FOR vbak-erdat,"DEFAULT sy-datum.
        s_erzet FOR sy-uzeit.
    *PARAMETERS:
    p_erzet LIKE sy-uzeit.
       s_erdat like vbak-erdat,
       s_erzet like vbak-erzet.
    DATA:
       BEGIN OF int_final OCCURS 0,
            w_vbeln TYPE vbak-vbeln,
       END OF int_final.
    DATA:
      int_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    DATA: int_order_header_inx LIKE bapisditmx OCCURS 0 WITH HEADER LINE.
    DATA:
      wf_time TYPE sy-uzeit.
    INITIALIZATION.
      s_ernam-low = 'KULKARMA'.
      s_ernam-sign = 'I'.
      s_ernam-option = 'EQ'.
      APPEND s_ernam.
    s_ernam-low = 'EAI-BATCH'.
    s_ernam-sign = 'I'.
    s_ernam-option = 'EQ'.
    APPEND s_ernam.
    wf_time = sy-uzeit - 1200.
    p_erzet = sy-uzeit - 1200.
    p_erzet-low = wf_time.
    APPEND s_erzet.
      int_order_header_inx-updateflag = 'D'.
      APPEND int_order_header_inx.
    START-OF-SELECTION.
      SELECT vbeln FROM vbak
                       INTO TABLE int_final
                       WHERE lifsk EQ p_lifsk
                         AND ernam IN s_ernam
                         AND erdat IN s_erdat
                         AND erzet IN s_erzet.
      IF sy-subrc = 0.
        LOOP AT int_final.
          CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
            EXPORTING
              salesdocument         = int_final-w_vbeln
      ORDER_HEADER_IN             =
        order_header_inx            = int_order_header_inx
      SIMULATION                  =
      BEHAVE_WHEN_ERROR           = ' '
      INT_NUMBER_ASSIGNMENT       = ' '
      LOGIC_SWITCH                =
      NO_STATUS_BUF_INIT          = ' '
            TABLES
              return                      = int_return
      ORDER_ITEM_IN               =
      ORDER_ITEM_INX              =
      PARTNERS                    =
      PARTNERCHANGES              =
      PARTNERADDRESSES            =
      ORDER_CFGS_REF              =
      ORDER_CFGS_INST             =
      ORDER_CFGS_PART_OF          =
      ORDER_CFGS_VALUE            =
      ORDER_CFGS_BLOB             =
      ORDER_CFGS_VK               =
      ORDER_CFGS_REFINST          =
      SCHEDULE_LINES              =
      SCHEDULE_LINESX             =
      ORDER_TEXT                  =
      ORDER_KEYS                  =
      CONDITIONS_IN               =
      CONDITIONS_INX              =
      EXTENSIONIN                 =
        ENDLOOP.
        LOOP AT int_return.
          WRITE:/ int_return-type,
                  int_return-id,
                  int_return-number,
                  int_return-message.
        ENDLOOP.
      ENDIF.
    please help me ..its a very urgent issue to be solved...
    am waiting for ur reply...
    regards
    gangareddy

  • Can I pass a table function parameter like this?

    This works. Notice I am passing the required table function parameter using the declared variable.
    DECLARE @Date DATE = '2014-02-21'
    SELECT
    h.*, i.SomeColumn
    FROM SomeTable h
    LEFT OUTER JOIN SomeTableFunction(@Date) I ON i.ID = h.ID
    WHERE h.SomeDate = @Date
    But I guess you can't do this?... because I'm getting an error saying h.SomeDate cannot be bound. Notice in this one, I am attempting to pass in the table function parameter from the SomeTable it is joined to by ID.
    DECLARE @Date DATE = '2014-02-21'
    SELECT
    h.*, i.SomeColumn
    FROM SomeTable h
    LEFT OUTER JOIN SomeTableFunction(h.SomeDate) I ON i.ID = h.ID
    WHERE h.SomeDate = @Date

    Hi
    NO you cant pass a table function parameter like this?
    As When you declare @date assign value to it and pass as a parameter it will return table which you can use for join as you did it in first code 
    But when you pass date from some other table for generating table from your funtion it doesnt have date as it is not available there
    Ref :
    http://www.codeproject.com/Articles/167399/Using-Table-Valued-Functions-in-SQL-Server
    http://technet.microsoft.com/en-us/library/aa214485(v=sql.80).aspx
    http://msdn.microsoft.com/en-us/library/ms186755.aspx
    https://www.simple-talk.com/sql/t-sql-programming/sql-server-functions-the-basics/
    http://www.sqlteam.com/article/intro-to-user-defined-functions-updated
    Mark
    as answer if you find it useful
    Shridhar J Joshi Thanks a lot

Maybe you are looking for

  • Interactive Report will not save BLOB Column Attributes

    I have created many interactive reports with 4.0 and 4.1 that had BLOB columns with no problems and the download link worked fine. After upgrading to 4.2, the interactive reports get the following error when clicking on the download link: Not found T

  • JMF error - Format of Stream not supported in RTP Session Manager

    java.io.IOException: Format of Stream not supported in RTP Session Manager at com.sun.media.datasink.rtp.Handler.open(Handler.java:139) why this erro occors? I already created the DataSink. When I try to do this... dsk.open(); //here the error got ds

  • HP Pro 8500A printing quality

    At first my Cyan would not print on the print quality page. i have changed all the ink Cartridges. I have ran the alignment and head cleaning process many times. The alignemnt fails and i have unplugged the power from the printer. I read where i coul

  • How to disable security block on intranet file:///// urls?

    I have the latest version of firefox esr and im trying to remove the security blocks which stop it from opening file:///// urls on our intranet website. Can anyone tell me how I can disable the feature and get it to open the urls with the relevant pr

  • Pdf opening problem ?

    Hi, I am generating pdf output type reports with Oracle Reports . I am getting problem while trying to open the pdf file. My Problem is " There was an error opening this document. The file is damaged and could not be repaired ". Why i am getting this