How to read a particular record from BRF+ table in ABAP

hi all,
I have a requirement where a particular record has to be read based on certain value for a set of columns from BRFplus Decision table to Delete/Update. I tried many methods of CL_FDT* but could not find any right one.
Could anyone please help me?
Thanks,
Deepika

Hi Deepika,
There is one solution from my side.
1. Include the Decision table in a BRF+ function.
2. Set the input and result of the function.
3. Call the function in the ABAP.
4. Get the record from result.
Please find the call function logic in ABAP as below.
Data:
        lo_admin_data         TYPE REF TO if_fdt_admin_data,
        lo_function           TYPE REF TO if_fdt_function,
        lo_context            TYPE REF TO if_fdt_context,
        lo_result             TYPE REF TO if_fdt_result.
cl_fdt_factory=>get_instance_generic( EXPORTING iv_id = "functon id in general tab"
                                                      IMPORTING eo_instance = lo_admin_data ).
lo_function ?= lo_admin_data.
*Set input parameter
lo_context ?= lo_function->get_process_context( ).
lo_context->set_value( iv_name = "parameter name"    ia_value ="parameter value" ).
lo_function->process( EXPORTING io_context = lo_context
                                          IMPORTING eo_result = lo_result ).
lo_result->get_value( IMPORTING ea_value = "Result" ).
Best Regards
Clark Huang

Similar Messages

  • How to read records from Relationship table using ABAP API's

    Hi All,
    I need to retrieve the records from Relationship table. In Java API's I came to know there is an option to retrieve this. I could not find anything in ABAP API's. Is there any option in ABAP API's to do this.
    Please Suggest.
    Thank You,
    Gajendra.

    Hi Gajendra,
    You can mainly read records from MDM (in a DDIC structure) using ABAP API's using the following function modules/methods:
    1. RETRIEVE: This is used to generically retrieve records from tables. Attributes and Values can also be retrieved.
    2. RETRIEVE SIMPLE: Retrieve records from MDM in a simple way.( simple data types).
    3. RETRIEVE CHECKOUT: Retrieves all checked out ID's.
    4. RETRIEVE ATTRIBUTES: Retrieves attribute(s) from a Taxanomy table.
    You will find all these methods in the following interface
    Interface : IF_MDM_CORE_SERVICES
    Hope it helps.
    *Please reward points if found useful.
    Thanks and Regards
    Nitin Jain

  • How to handle the failed records from the table when using DB Adapter

    Hi,
    I am reading some records from table using DB Adapter inside my synchronous BPEL process. Say like reading 100 records from table in between after successful reading of 90 records an error occured in 91st record due some various reasons(like DB down, Connection interrupted etc.). Then how to handle this situation, whether i have to read all the records from the begining and is there any option to continue from where it stopped reading.
    Can please anybody help me out in the regard?
    Thanks in advance
    Regards,
    Aejaz

    we had the same requirement some time ago and had two option:
    1. ask the R/3 development team add a deletion indicator in the table (and thus not actually deleting the record). this deletion indicator could then be used like for any other standard datasource
    this option was however refused, due to huge data volume after a while
    2. at the end of the load we copied the ZTABLE1 to ZTABLE2. then in the begin of the load (day after) we compare the data of table1 to table2. entries available in table2 but not in table1 are deleted, and we put a 'D'. in deletion indicator; as we only keep the deleted entries for one day, the volume of the new table is acceptable.
    M.

  • Deletion of  a particular record  from database table

    hai friends,
         i want to <b>delete</b> (or)   <b>insert</b> particular record from  predefined sap table... that is with out module pool programming...  can i delete or insert a record to or from  the table..
         thanks in advance
    @jay

    hi,
    ucan do it without module pool programming in your normal report program.
    To insert a line into an index table, use the statement:
    INSERT <line> INTO <itab> [INDEX <idx>].
    <line> is either a work area that is convertible to the line type, or the expression INITIAL LINE. If you use <wa>, the system adds a new line to the internal table <itab> and fills it with the contents of the work area. INITIAL LINE inserts a blank line containing the correct initial value for each field of the structure.
    To select the lines that you want to delete using a condition, use the following:
    DELETE FROM <target> WHERE <cond> .
    All of the lines in the database table that satisfy the conditions in the WHERE clause are deleted. The FROM expression must occur between the keyword and the database table.
    You should take particular care when programming the WHERE clause to ensure that you do not delete the wrong lines. For example, if you specify an empty internal table in a dynamic WHERE clause, all of the lines in the table are deleted.
    If at least one line is deleted, the system sets SY-SUBRC to 0, otherwise to 4. SY-DBCNT contains the number of lines deleted.
    regards,
    keerthi

  • How to delete some of records from wf_notifications table any API Name?

    Hi All,
    I want to delete some of records from wf_notifications table , can any one tell API' name and Back end delete process.
    Thanks,
    Ramu
    Edited by: Ramu on Mar 20, 2013 5:42 AM

    Hi ,
    I hv done below script, now it's working fine.
    DECLARE
    CURSOR csr_transaction_id IS
    SELECT   hat.transaction_id,
             hat.item_type,
             hat.item_key,
             ppx.employee_number,
             hat.section_display_name
      FROM   hr_api_transactions hat, per_people_x ppx
    WHERE   hat.process_name = 'HR_PERSONAL_INFO_JSP_PRC'
             AND hat.selected_person_id = ppx.person_id
             AND ppx.employee_number IN
                      ('100024773',
                       '100024820',
                       '100024859',
                       '100024879',
                       '100024902',
                       '100024937',
                       '100025137',
                       '100026470',
                       '610014755',
                       '610017039')
    order by  ppx.employee_number;
    BEGIN
      dbms_output.put_line('***Deleted all Transactions  and Notifications of below Employee Personals Tranactions ***');
       FOR my_cur_v IN csr_transaction_id
       LOOP
       /*Delete all Transaction_id's in hr_api_transactions,hr_api_transaction_steps,hr_api_transaction_values and hr_api_transaction_steps_bk tables */
        hr_transaction_swi.delete_transaction
                              p_transaction_id =>my_cur_v.transaction_id,
                              p_validate => hr_api.g_false_num
        wf_engine.abortprocess  (
                                  itemtype => my_cur_v.item_type,
                                 itemkey => my_cur_v.item_key
         /* Deleted all Notification_id's and item_key's in wf_item_activity_statuses,wf_items,wf_item_attribute_values,wf_notifications     Table */                     
         wf_purge.items (
                          itemtype => my_cur_v.item_type,
                         itemkey => my_cur_v.item_key
        dbms_output.put_line('Emp No --'||my_cur_v.employee_number||'Transaction_id :'||my_cur_v.transaction_id||'Emp Personal Info :'||my_cur_v.section_display_name||
                              'Item Type :'||my_cur_v.item_type|| 'Item Key :'||my_cur_v.item_key); 
       END LOOP;
       commit;
    EXCEPTION
    WHEN OTHERS THEN
      dbms_output.put_line('hr_transaction_swi.delete_transaction api goest to exception block'    ||sqlcode|| '  '||sqlerrm);
    END;  
    /thanks,
    Ramu

  • How do I extract matching records from two tables?

    I'm trying to extract client records from our client database to put together a very targeted email campaign. As an example, the result I want is a list of names and email addresses of those clients who have a record in our system, have not had a visit in our clinic in the last year, and live within 200 miles of our clinic. I can capture the first two criteria in one extract, and the second in another. I can then import those as tab delimited data into Numbers. What I then need to do is create a third table that represents ONLY those records that exist in both tables.
    Can someone tell me if this is possible and if so, how to do it?
    I'd be very appreciative of any help, thank you.

    conejo61 wrote:
    I can then import those as tab delimited data into Numbers. What I then need to do is create a third table that represents ONLY those records that exist in both tables.
    You can create a column that generates a serial marker on the table from which you want to transfer the data, making all the names that also appear on the other table. Not that the formula will mark only exact matches.
    Here's a short example:
    Table 1 on the left, is one of the two tables imported from the tab delimited data files. It has other data, but only the names in column A are used to identify records appearing on both tables.
    Table 2 on the right, contains the names and other data (represented by the email addresses in column B), to be transferred to the third table.
    Column C of this table contains the formula that counts off the rows containing names appearing on both tables. The version below is in C2, and is filled down to the end of the column.
    =IF(COUNTIF(Table 1 :: $B,A2)>0,MAX($C$1:C1)+1,"")
    Note that jane Doe is not counted (or transferred) as her name is recorded differently on the two tables.
    Table 3 is the results table. It contains one formula for each column to be transferred from Table 2 to Table 3.
    A2:   =IF((ROW()-1>MAX(Table 2 :: $C)),"",LOOKUP(ROW()-1,Table 2 :: $C,Table 2 :: $A))
    B2:   =IF((ROW()-1>MAX(Table 2 :: $C)),"",LOOKUP(ROW()-1,Table 2 :: $C,Table 2 :: $B))
    Regards,
    Barry
    EDIT: I was working in Numbers '09 when developing this, and got the following warning when I saved a copy as an iWork '08 document:
    Referencing row or column ranges that include header or footer cells isn't supported. The formula references were updated to exclude header and footer cells.
    The formulas in Table 2::C2 references C1. You may have to ensure that Table 2 does not include a header row.
    B.
    EDIT2: A check on the file in Numbers '08 showed no apparent change to the formula, and editing Jane Doe's name on table 1 resulted in her name being added to Table 3.
    Message was edited by: Barry

  • How to Concatenate Multiple Column Records from multiple tables

    my question is
    there are three tables like A,B,C
    i want the data from these tables with the help of relation
    select a.simno,b.item_code,c.desc
    from A a,B b,C c
    WHERE a.ms=b.ms and
    b.item_code=c.item_code
    and a.ms=c.ms
    the output for this query which i am getting is
    simno item_code desc
    1 i1 abc
    1 i2 def
    1 i3 xyz
    2 i4 gtr
    2 i5 poi
    but i want the output in this
    simno details
    1 abc#def#xyz
    2 gtr#poi
    and so on
    if it dispayes the output inthis manner i can save as ".csv" file

    Hi,
    There are different Solutions you can achieve
    Refer to Asktom : http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:2196162600402
    SQL> create table test(simno number, itemcode varchar2(5), desc1 char(5))
    Table created.
    SQL> insert into test(simno,itemcode,desc1) values (1 ,'i1' ,'abc');
    1 row created.
    SQL> insert into test(simno,itemcode,desc1) values (1 ,'i2' ,'def') ;
    1 row created.
    SQL> insert into test(simno,itemcode,desc1) values (1 ,'i3' ,'xyz') ;
    1 row created.
    SQL> insert into test(simno,itemcode,desc1) values (2 ,'i4' ,'gtr');
    1 row created.
    SQL> insert into test(simno,itemcode,desc1) values (2 ,'i5' ,'poi');
    1 row created.
    SQL> select simno,wmsys.wm_concat(desc1) CONCAT
      2  from test
      3  group by simno;
         SIMNO
    CONCAT
             1
    abc  ,def  ,xyz
             2
    gtr  ,poi- Pavan Kumar N

  • Is it possible to read a specified record from a table.

    Hi:
    I met a problem when I I was designing a report by using Crystal Report 2008, the problem is that I want to display some data from an incident table, and the limitation for my query is assignment.group ="Customer Support", while the "Customer Support" is a dynamic value, it was stored in another table -- environment, suppose there are two field in environment table, one is name, another is group.
    environment
    name(PK)                           group
    customer support                   Customer Support
    approval                           CCB
    and I don't want to hard code my query like  assignment.group ="Customer Support", what I want is to get the customer support group name from the environment table. the name for "Customer Support" group in environment table is a constant. is there a way I can do this?
    By the way
    1) there is no link between incident and environment table. and the name value is a constant. it won't change, but the group name might be change to adjust customer requirement.
    2) my ODBC driver has limited function. it does not support complex query SQL.
    Thanks in advance
    Tian-liang

    Hi Jyothi:
    thanks a lot for your patience.
    Prompt the user to input the group name in the parameter dialog is an option. But my test show it doesn't show a drop list in the parameter dialog(I hope it show all the group name in the drop list that was queried from environment table). I am not sure whether crystal report doesn't support this future or i miss used it.
    and most important, what I really want is that I just want to look for the group field in environment table with name="customer support", I need to use this query result to do some logical computation in report. and I think that it is unappropriated to expose this procedure to the end user.
    Is it possible for Crystal Report 2008 to accomplish this?
    Best Regard
    Tianliang

  • How to read a particular word from the middle of the line from a .txt file

    BufferedReader reader = new BufferedReader(new FileReader("D:\\kiran.txt")); //given as a input
    String line = reader.readLine();
    StringBuffer sb=new StringBuffer();
    while(line!=null){
    sb.append(line);//appended to line
    line=reader.readLine();
    line=sb.toString();
    StringTokenizer st=new StringTokenizer(line); //Input to String Tokenizer
    while(st.nextToken()!=null){
    String ln=st.nextToken();
    System.out.println(ln);
    if(ln.equals("Time:")){
    System.out.println(st.nextToken());
    can any help me regarding this

    either refer this:-
    http://forum.java.sun.com/thread.jspa?threadID=5276606
    Or
    try this:-
    String str=null;
                   DataInputStream di=new DataInputStream(new FileInputStream("D:\\Test.txt"));
                   while((str=di.readLine())!=null)
                        if(str.contains("Time"))
                             int index=str.indexOf("Time");
                             str=str.substring(index,str.length());
                        System.out.println(str);
                   }

  • How to read block of rows from database tables

    I have created a Database Application in Java and display all the records in tabular format of one Table. This table have Millions of Rows, If I run Select * from Table, then my Machine not responding, so Now I wants to add paging of 1000 rows at one time.
    Is there are any option to read block of rows at one time and then query again for next page ?
    Please let me know..
    Database : SQL Server 2000/2005, Oracle and MYSQL
    Thanks in Advance
    Laxmilal

    Refer to the SQL documentation of the database server how to query a subset of records.
    This has certainly nothing to do with JDBC nor Java, but with SQL.

  • How to read LONG RAW data from one  table and insert into another table

    Hello EVERYBODY
    I have a table called sound with the following attributes. in the music attribute i have stored some messages in the different language like hindi, english etc. i want to concatinate all hindi messages and store in the another table with only one attribute of type LONG RAW.and this attribute is attached with the sound item.
    when i click the play button of sound item the all the messages recorded in hindi will play one by one automatically. for that i'm doing the following.
    i have written the following when button pressed trigger which will concatinate all the messages of any selected language from the sound table, and store in another table called temp.
    and then sound will be played from the temp table.
    declare
         tmp sound.music%type;
         temp1 sound.music%type;
         item_id ITEM;
    cursor c1
    is select music
    from sound
    where lang=:LIST10;
    begin
         open c1;
         loop
              fetch c1 into tmp; //THIS LINE GENERATES THE ERROR
              temp1:=temp1||tmp;
              exit when c1%notfound;
         end loop;
    CLOSE C1;
    insert into temp values(temp1);
    item_id:=Find_Item('Music');
    go_item('music');
    play_sound(item_id);
    end;
    but when i'm clicking the button it generates the following error.
    WHEN-BUTTON-PRESSED TRIGGER RAISED UNHANDLED EXCEPTION ORA-06502.
    ORA-06502: PL/SQL: numeric or value error
    SQL> desc sound;
    Name Null? Type
    SL_NO NUMBER(2)
    MUSIC LONG RAW
    LANG CHAR(10)
    IF MY PROCESS TO SOLVE THE ABOVE PROBLEM IS OK THEN PLESE TELL ME THE SOLUTION FOR THE ERROR. OTHER WISE PLEASE SUGGEST ME,IF ANY OTHER WAY IS THERE TO SOLVE THE ABOVE PROBLEM.
    THANKS IN ADVANCE.
    D. Prasad

    You can achieve this in many different ways, one is
    1. Create another VO based on the EO which is based on the dest table.
    2. At save, copy the contents of the source VO into the dest VO (see copy routine in dev guide).
    3. commiting the transaction will push the data into the dest table on which the dest VO is based.
    I understand that if we attach VO object instance to region/page, we only can pull and put data in to only one table.
    if by table you mean a DB table, then no, you can have a VO based on multiple EOs which will do DMLs accordingly.Thanks
    Tapash

  • How can we select duplicate records from a table

    Hi
    I desire to use a query to select duplicate columns (based on all the columns of the table) ...
    I am able to write queries which include column names, but when my table contains more than 50 columns, is it advisable for me to mention all the 50 column names in the query or is there any other query by which duplicate rows can be selected without column names being mentioned ?
    Thnx in advance
    Regards

    Basic rule of relational design says that "thy table shalt have a primary key".
    Now assuming that you do not have a primary key constraint and that resulted in duplicates, you should still have a couple of columns that uniquely describes a row in that table.
    To select duplicate rows can then be done by joining rows with the primary key (same set of unique columns), where rows have different rowids (physical addresses).
    E.g.
    select
    t1.*,
    t2.*
    from table t1,
    table t2
    where t1.col1 = t2.col1
    and t1.col2 = t2.col2
    and t1.rowid < t2.rowidIf you do not have a couple of columns (primary key) that uniquely identifies a row, then you do not have duplicates in the table - as there cannot be duplicates without having a means of unique identification.

  • How to get large no of records from adf table

    Hi All,
    I'm working on adf.I'm using jdeveloper 11.1.1.5 version.In my adf application i have 1000 records in my adf table.I want to get the 500 selected records from that table at a time.But im not able to get huge number of records.How can i get the records from adf table.Please give me ur valuable suggestions.
    Thanks!

    Hi.
    for large record check the oficial doc.
    http://docs.oracle.com/cd/E24382_01/web.1112/e16182/bcadvvo.htm#CEGDBJEJ
    PAGE_RANGING is the best option for large tables.
    and these maybe will help you
    Re: Performance scrolling large ADF tables
    Re: Expert opinion needed: Best practices to handle huge rowsets on UI

  • Issue with fetching a record from IHPA table with PARNR value as condition

    Hi All,
    I am trying to fetch a particular record from IHPA table where i am giving the OBJNR number, PARVW and PARNR as customer no. , But I am not getting any record  but if i will give OBJNR and PARVW it will generate a record with having same PARNR value.
    Example :
    case 1st :-
    when i am passing following values in IHPA table,
    OBJNR  = IE000000000010070910
    PRAVW = BP                 
    PARNR  = 620000562   
    it is not generating any record  
    case 2nd:-
    But if i will pass  
    OBJNR  = IE000000000010070910
    PRAVW = BP
    it will generate a record?(one row) which will include PARNR as same 620000562 along with other value.
    Q1 -  Why it's not generating in case 1st,
    Q2 - How I will resolve this issue ? as i have to link some table as EQUI -
    IHPA -
    VCKUN
    VCNUM ?
          I have written a code for this to join :
         SELECT A~EQUNR
           B~PARVW
           C~CCNUM
           D~CCNUM
           FROM EQUI AS A JOIN IHPA AS B ON AOBJNR = BOBJNR
           INNER JOIN VCKUN AS C ON BPARNR = CKUNNR
           INNER JOIN VCNUM AS D ON CCCNUM = DCCNUM
           APPENDING CORRESPONDING FIELDS OF TABLE IT_OBSO
           WHERE A~EQUNR IN S_EQN.
                 AND PARVW  = 'BP'.
          But it is not generating any record but when i am commenting the PARVW i am getting the mixed record of PARVW as (BP,SP,SH)
    Let me know if any more clarification required.
    Highly appreciate your help
    Thanks & Regards
    Shaw

    Hi Santosh,
    Thanks for your quick response.
    But I am Sorry, I already checked with putting Zero before PARNR.
    The issue is still as it is.
    Thanks
    Shaw

  • How to delete a particula record from InfoObject

    Dear All,
    I got some problem situations and would like some suggestions from any of you.
    <b>Problem detail</b>- one process chain was failed due to could not activate an ODS-A
    - ODS-A and ODS-B contained InfoObject-0BP_GUID
    - errors were found and referred to the InfoObject-0BP_GUID.
    - The errors referred to one record composed of incorrect data. I still wondered where it came from since normally, 0BP_GUID keeps only guid.
    I'd like to delete the incorrect record.But I do not want any impact to InfoProviders.
    I'm not sure how to resolve this case. This has to be very carefully managed because it happened on production system.
    Actually, I did find one thread in this forum "Delete SID table content". But I'm not sure whether it could be applied to my case.
    Any suggestion would be appreciated.
    Thank you very much.
    -WJ-

    Unfortunately you cant delete data without inpacting the data in the.  This is how BW works and you will appreciate this because youur transaction data is secured and you wont face any data issues later on. Let me give you an example. Lets sa your ODS or cube stored sales data and in the ODS you have sales org, customer and amount. When you run the report, data is read from this cube /ods, but to fetch the master data it goes to the master data tables via SID. When the transaction data gets loaded and when you try to delete a record in master data, it will let you do.
    If you still wish to do, proceed as follows:
    1. Delete the data in cube first.
    2. Delete the particular record from the master data table.3
    3. Reload the data to the ODS / cube.
    Without deleting the transaction data in the ODS / Cube the system wont let you delete the data in master data and you will get any of the following messages.
    (a) " not all master data could be deleted
    (b) "the master data can not be deleted".
    Ravi Thothadri

Maybe you are looking for

  • My files no longer sort properly - files beginning with AEIOU come before

    My files no longer sort properly - files beginning with AEIOU come first after numbers and special characters, then letters H, K, M-N, P, W, B-D and so on. I click on the column header again and it reverses the sort, but still messed up. This convolu

  • Max Number of threads per Process in Solaris 8

    I'm running into qpplication which crashes with a segfault when the LWP for that process hits about 255, i'm trying to find the maximum number of threads per process using sysconf and its returning -1 #include <unistd.h> int main(void) printf("%ld\n"

  • Field Unknown error message in program node

    I'm brand new to SAP and trying to get to grips with Smartforms. This is a very basic question I'm afraid but hope someone will answer it. I'm trying to perform the following in a program node SELECT SINGLE * FROM MARC INTO WA_MARC   WHERE IT_VBDPA-M

  • Importing photos to aperture 3?

    So I recently switched from a windows laptop to a MacBook pro. I transferred all my photos from my external hard drive into the photos tab on my MacBook. Now I just bought Aperture 3 and I'm wanting to know if I import the photos that are already on

  • MagicPrefs preference pane missing.

    I use Lion on my MacBook. I also use MagicPrefs, but I can no longer use it because the preference pane is not there (in my library) I deleted MagicPrefs and downloaded it again, but stil I cannot use it because there is no magicprefs preference pane