Probelm facing in Zprogram select statements developed for PBS conversion

Hi,
Am using PBS conversion tool to convert the Report programs for Archive. In that program am having select statement for KONV table which takes KWERT and KSCHL based on KNUMV. In this case PBS conversion tool is not able to do the conversion and this where needs manual editing is necessary, becoz KNUMV and KSCHL which are used for selection are not supported as index fields.
Kindly suggest how to proceed ..
Thanks in Advance.

NAME1,
STRAS,
MCOD2
MCOD3
LAND1
TELF1
TELFX
FOR KNA1
namev, name1 for knvk table
name1, street, house_num1, str_suppl1, city1, country post_code1 for adrc table
vbeln for vbak table
/cwm/pikmg, /cwm/pikme for lips table

Similar Messages

  • How to use the select statement in for loop

    Hi All,
    my question is can we use select statement in for loop like as follows .
    for key in select key from one_table.
    when i am using this am getting an error like Found select invalid i identifier
    how to make use of select statement in for loop
    please suggest me .
    Thanks
    Sree

    SQL>set serveroutput on;
    SQL> DECLARE
         BEGIN
         FOR Cur_Rec IN (SELECT dname FROM dept) LOOP
          DBMS_OUTPUT.PUT_LINE(Cur_Rec.dname);
         END LOOP;
         END;
    SQL>
    ACCOUNTING
    RESEARCH
    SALES
    OPERATIONSAs per your requirement always filter the Query beforehand
    Like
    FOR Cur_Rec IN (SELECT key FROM <table> WHERE key=1) LOOP
    END LOOP;Edited by: Lokanath Giri on १ दिसंबर, २०११ ३:५६ अपराह्न

  • Facing problem in select statement dump DBIF_RSQL_INVALID_RSQL CX_SY_OPEN_S

    Hi Experts,
    I  am facing the problem in the select statement where it giving the short dump
    DBIF_RSQL_INVALID_RSQL CX_SY_OPEN_S.
    i have searched many forms, but i found that the select option s_matnr have the limitaion 2000 entreis, but i am passing same s_matnr to other select statement with more than 2000 entries but it is not giving me any short dump.
    but i am facing problem with only one select statement where if i  pass select option s_matnr more than 1500 entris also giving short dump.
    my select statement is
    SELECT * FROM bsim                                       
             INTO CORRESPONDING FIELDS OF TABLE g_t_bsim_lean  
               FOR ALL ENTRIES IN t_bwkey   WHERE  bwkey = t_bwkey-bwkey
                                            AND    matnr IN matnr
                                            AND    bwtar IN bwtar
                                            AND    budat >= datum-low.
    in the internal table g_t_bsim_lean internal table contain all the fields of the table bsim with 2 fields from other table.
    Please let me know whether i need to change the select statement or any other solution for this.
    Regards,
    udupi

    my select query is like this:
    DATA: BEGIN OF t_bwkey OCCURS 0,                          "184465
              bwkey LIKE bsim-bwkey,                            "184465
            END OF t_bwkey.                                     "184465
      LOOP AT g_t_organ          WHERE  keytype  =  c_bwkey.
        MOVE g_t_organ-bwkey     TO  t_bwkey-bwkey.
        COLLECT t_bwkey.                                        "184465
      ENDLOOP.                                                  "184465
      READ TABLE t_bwkey INDEX 1.                               "184465
      CHECK sy-subrc = 0.                                       "184465
      SELECT * FROM bsim                                        "n443935
             INTO CORRESPONDING FIELDS OF TABLE g_t_bsim_lean   "n443935
               FOR ALL ENTRIES IN t_bwkey   WHERE  bwkey = t_bwkey-bwkey
                                            AND    matnr IN matnr
                                            AND    bwtar IN bwtar
                                            AND    budat >= datum-low.

  • Advice required on a select statement using "FOR ALL ENTRIES"

    Hi,
    this is really intresting ...
    I have a small requirement where in i have to find out
    the valid entries in my internal table (T_MATNR) by using a select statement to a check table (MARA) which has all the fields present in the internal table T_MATNR.
    Select statement is
    SELECT MATNR
           MTART
           from MARA
           for all entries in T_MATNR
           into table T_MATNR
           where matnr eq T_MATNR-MATNR.
    If you observe the itab in the option 'FOR ALL ENTRIES' and the destination table is the same. I want to know whether this is correct? will it cause any performance issue? right now this statement is working fine for me.

    Hi,
    U have to use
    SELECT MATNR
    MTART
    from MARA
    <b>into table I_MATNR(different table)</b>
    for all entries in T_MATNR
    where matnr eq T_MATNR-MATNR.
    If u r specifying both same table name then for what entries it will retrieve, if u have alreay selected some entries and appending u can use
    SELECT MATNR
    MTART
    from MARA
    <b>into table T_MATNR</b>where matnr eq T_MATNR-MATNR.
    then
    SELECT MATNR
    MTART
    from MARA
    <b>appending table T_MATNR</b>
    for all entries in T_MATNR
    where matnr eq T_MATNR-MATNR.
    In this way u can do.
    Hope u got it.

  • Select statement help for sql/oracle newbie

    I have a db for a fake airline. i have a route table that has columns for "FIRST_CLASS_FARE", "COACH_FARE", and "ECONOMY_FARE". I then have a flight table that references the route#, then a trip table that references the flight#. I also have a passenger table and a reservation table that has the passenger # in it. The reservation table also has a column called "reservation class" that has a 'f' for first class fare, 'c' for coach fare, 'e' for economy fare.
    What I am trying to do is create a fill for each individual passenger that shows the total amount they spent on all of their reservations.
    Any suggestions on how to join the tables to create this bill?
    Thanks in advance!

    Is it the way the passenger table has columns and is populated,
    for a passenger A, takes a route - 1 with First class fare - $2500 on flight- B123, to a trip - t1 and reserved for class - 'f'
    If this is the way, then you get the bill from the fare column

  • Filter in adobe bridge to only select Raw files for DNG conversion

    Here's my problem - I have a new DMC TZ70 camera and Lightroom 5.7 doesn't recognise the .RW2 files. I would need to buy LR6! Perhaps later.
    So I thought I will import via bridge and convert to DNG.
    So I open bridge and select the camera - fine - BUT there are files for the Raw images, the same number of JPEGs and some .bdm, .TDT etc files. (e.g. 3 raw + 7 others).
    I can set up a filter to view only the Raw files when I see what files are there in the card folder in Bridge but when I select "get photos from camera" I can either select them all OR deselect and then I need to MANUALLY select the raw files. There doesn't seem to be a way of setting up a filter in the Downloader screen so that Bridge only selects the Raw files for conversion.
    If I let it select all, Bridge converts the RW2 files to DNG but also brings in the jpgs and other files. I can delete these afterwards but this seems an inefficient way to do it.
    Is there any way to manually select the raw files in the photo downloader screen?
    Advice please, thanks, Mel

    Not sure I follow completely, Mel, but Bridge allows you  to View > Sort > Type... which would allow you, after sorting, to click on the first image with a specific extension, then hold down the Shift key to select the last in  the series and  handle them independent of the other files presented.

  • Select statement for JDBC receiver synch scenario for capturing random value from ECC portal

    Dear Experts,
    I am working on ECC <----> SAP-PO 7.31 <----> JDBC synchronous scenario. I am clear about the config part except the Select statement. I will be
    capturing 2 random values from the portal i.e. VendId and VendName in ECC to get the vendor details like Vendor Country, Vendor Status, Vendor Contact , Vendor Address etc from JDBC vendor table/view VENDETAIL.
    What would be the select statement to capture the random values for ECC portal? My select statement would look some thing like this..
    Select f1,f2,f3,f4 from table VENDETAIL where key1 = "VendId" and "VendName"
    Please suggest if the above select statement works for the above scenario...
    Regards
    Rebecca

    Hi Rebecca,
    Your statement should work fine.
    Please see the statement we use below.
    SELECT eT_cashier, eT_proc_yn, eT_proc_date FROM eTest WHERE eb_proc_yn = 'N'
    Just remember to update the change indicator so that you dont duplicate your records.
    UPDATE eTest SET eb_proc_yn = 'Y' WHERE eb_proc_yn = 'N'.
    Regards,
    Jannus Botha

  • Error by using database procedure in select statement

    hi ,
    I have built a database procedure having one parameter with in out varchar type. that return value with some addition.
    i am using it with some column in select statement only for display purpuses but i am facing error by doing that in select statement. that procedure is working well with bind variable but not with select statement.
    plz help me how i can use a procedure in select statement. or can i do it or not.

    plz help me how i can use a procedure in select statement. or can i do it or not.A workaround could be to create a wrapper function for your procedure. One that only passes the input parameters and returns the output parameter.
    The simply call this function in your select which internally calls the procedure.

  • How to find the number of fetched lines from select statement

    Hi Experts,
    Can you tell me how to find the number of fetched lines from select statements..
    and one more thing is can you tell me how to check the written select statement or written statement is correct or not????
    Thanks in advance
    santosh

    Hi,
    Look for the system field SY_TABIX. That will contain the number of records which have been put into an internal table through a select statement.
    For ex:
    data: itab type mara occurs 0 with header line.
    Select * from mara into table itab.
    Write: Sy-tabix.
    This will give you the number of entries that has been selected.
    I am not sure what you mean by the second question. If you can let me know what you need then we might have a solution.
    Hope this helps,
    Sudhi
    Message was edited by:
            Sudhindra Chandrashekar

  • How to use Oracle Table Type values in Select Statement.

    Hi,
    I am fetching initial set of values into Oracle Table of Records Type and want to use list of values in the Select statement.
    For example, try something like the following:
    TYPE t_record IS RECORD (
    ID TABLEA.ID%type,
    NO TABLEA.NO%type,
    v_record t_record;
    TYPE t_table IS TABLE OF v_record%TYPE;
    v_table t_table;
    -- Code to populate the values in v_table here.
    SELEC ID,NO, BULK COLLECT INTO <some other table variabes here> FROM TABLEA
    WHERE ID IN v_table(i).ID;
    I want to know how to use the values from Oracle Table Type in the Select Statement.

    Something like this:
    create or replace type t_record as  object (
    id number,
    no number
    CREATE or replace type t_table AS TABLE OF t_record;
    set serveroutput on
    declare
      v_table t_table := t_table();
      v_t1 t_table := t_table();
    begin
      v_table.extend(1);
      v_table(1).ID := 1;
      v_table(1).No := 10;
      v_table.extend(1);
      v_table(2).ID := 2;
      v_table(2).ID := 20;
      SELEC t_record (ID,NO) BULK COLLECT INTO v_t1
      from TableA
      FROM TABLEA
      WHERE ID IN (select t.ID from table(v_Table) t);
      for i in 1..v_t1.count loop
        dbms_output.put_line(v_t1(i).ID);
        dbms_output.put_line(v_t1(i).No);
      end loop;
    end;
    /Untested!
    P;
    Edited by: bluefrog on Mar 5, 2010 5:08 PM

  • How to add a dummy row in the result set of a SELECT statement.

    Hello Everyone -
    I have requirment to add a dummy row in the result set of a SELECT statement.
    For e.g. lets say there is a table Payment having following colums:
    Payment_id number
    status varchar2(10)
    amount number
    payment_date date
    so here is the data :-
    Payment_id Status Amount payment_date
    1 Applied 100 12/07/2008
    2 Reversed 200 01/ 06/2009
    3 Applied 300 01/ 07/2009
    Here is my SQL
    Select * form payment where payment_date >= 01/01/2009
    Output will be
    2 Reversed 200 01/ 06/2009
    3 Applied 300 01/ 07/2009
    My desired output is below
    2 Reversed 200 01/ 06/2009
    3 Applied 300 01/ 07/2009
    2 Reversed -200 01/ 06/2009 ------(Dummy Row)
    Thrid row here is the dummy row which I want to add when status is "Reversed"
    I would be very thankful for any kind of help in this regard ...
    Thanks,
    Gaurav

    Cartesion joining against a dummy table is a useful method of creating a dummy row:
    with my_tab as (select 1 cust_id, 1 Payment_id, 'Applied' Status, 100 Amount, to_date('12/07/2008', 'mm/dd/yyyy') payment_date from dual union all
                    select 1 cust_id, 2 Payment_id, 'Reversed' Status, 200 Amount, to_date('01/06/2009', 'mm/dd/yyyy') payment_date from dual union all
                    select 1 cust_id, 3 Payment_id, 'Applied' Status, 300 Amount, to_date('01/06/2009', 'mm/dd/yyyy') payment_date from dual union all
                    select 2 cust_id, 1 Payment_id, 'Applied' Status, 100 Amount, to_date('12/07/2008', 'mm/dd/yyyy') payment_date from dual union all
                    select 2 cust_id, 2 Payment_id, 'Reversed' Status, 200 Amount, to_date('01/05/2009', 'mm/dd/yyyy') payment_date from dual union all
                    select 2 cust_id, 3 Payment_id, 'Applied' Status, 300 Amount, to_date('01/06/2009', 'mm/dd/yyyy') payment_date from dual union all
                    select 2 cust_id, 4 Payment_id, 'Reversed' Status, -400 Amount, to_date('01/06/2009', 'mm/dd/yyyy') payment_date from dual union all
                    select 2 cust_id, 5 Payment_id, 'Applied' Status, 500 Amount, to_date('01/07/2009', 'mm/dd/yyyy') payment_date from dual),
                    --- end of mimicking your table
          dummy as (select 'Reversed' col1, 1 rn from dual union all
                    select 'Reversed' col1, 2 rn from dual)
    select mt.cust_id,
           mt.payment_id,
           mt.status,
           decode(dummy.rn, 2, -1*mt.amount, mt.amount) amount,
           mt.payment_date
    from   my_tab mt,
           dummy
    where  mt.status = dummy.col1 (+)
    order by mt.cust_id, mt.payment_id, dummy.rn nulls first;
    CUST_ID     PAYMENT_ID     STATUS     AMOUNT     PAYMENT_DATE
    1     1     Applied     100     07/12/2008
    1     2     Reversed     200     06/01/2009
    1     2     Reversed     -200     06/01/2009
    1     3     Applied     300     06/01/2009
    2     1     Applied     100     07/12/2008
    2     2     Reversed     200     05/01/2009
    2     2     Reversed     -200     05/01/2009
    2     3     Applied     300     06/01/2009
    2     4     Reversed     -400     06/01/2009
    2     4     Reversed     400     06/01/2009
    2     5     Applied     500     07/01/2009Edited by: Boneist on 07-Jan-2009 23:10
    NB. You may have to mess around with the ordering if that's not come back in the order you wanted. You didn't mention what the rules were for any expected ordering though, so I've made up my own *{;-)
    Also, I added an identifier (cust_id) to differentiate between different sets of payments, since that's usually the case. Remove that if it's not applicable for your case.

  • Please explain on what does these select statements get from these tables..

    Hello Experts,
    What does these select statements get?and what are these tables CDHDR and CDPOS used for?
    The program that I am currently modifying lets users post documents and the ones that are not posted
    are saved in a custom table. Now, we had a scenario in PROD server wherein certain items are not being
    fetched as bypassed but we saved it in the bypassed table. Anyway, below is the select statements:
    get all change document header within the selected dates
      SELECT * INTO CORRESPONDING FIELDS OF TABLE it_cdhdr
        FROM cdhdr
       WHERE udate IN s_udate
         AND objectclas EQ 'CHARGE'
         AND tcode IN (lc_tcode_msc1,
                       lc_tcode_msc2,
                       lc_tcode_msc1n,
                       lc_tcode_msc2n,
                       lv_tcode_vl33n,
                       'SE38',
                       'ZGENE').
    IF NOT it_cdhdr[] IS INITIAL.
    SELECT objectid changenr value_new
          FROM cdpos
          INTO TABLE it_cdpos
          FOR ALL ENTRIES IN it_cdhdr
         WHERE objectclas EQ it_cdhdr-objectclas
           AND objectid   = it_cdhdr-objectid
           AND changenr   = it_cdhdr-changenr
           AND tabname    = lc_tabname_mcha
           AND fname     IN (lc_fname_zustd,'LWEDT').
    DELETE it_cdpos WHERE value_new+00(01) = 'X'.
      LOOP AT it_cdpos ASSIGNING <fs_cdpos>.
        l_matnr = <fs_cdpos>-objectid+00(18).
        l_charg = <fs_cdpos>-objectid+22(10).
        l_zustd = <fs_cdpos>-value_new+00(01).
        READ TABLE it_batch INTO wa_batch
             WITH KEY matnr = l_matnr
                      charg = l_charg.
        IF sy-subrc EQ 0.
          l_tabix = sy-tabix.
          wa_batch-zustd = l_zustd.
          MODIFY it_batch FROM wa_batch INDEX l_tabix
                 TRANSPORTING zustd.
        ELSE.
          wa_batch-matnr = l_matnr.
          wa_batch-charg = l_charg.
          wa_batch-zustd = l_zustd.
          wa_batch-code  = 'A'.              "selected within period
          APPEND wa_batch TO it_batch.
        ENDIF.
      ENDLOOP.
      ENDIF.

    Hi,
                            The first select statement is for Change document header.CDHDR table contains this object class in your case if you change any batch number for any material number  from the transaction for example (MB01) you can trace this .
    From CDPOS you can trace which tables affected (EX : MCHA) and the new value(l_zustd ).
    Regds,
    Vinsa.R

  • Subquery in Select Statement

    Hi,
    In crystal reports 10 is there a way to alter the select statement to include a subquery into the select statement.  For example
    select customer.lastname from customer;
    to be
    select customer.lastname , (select departmentname from dept where customer.dept_id= dept.dept_id) as "Customer_DeptName"
    from customer;
    I don't know how to do this in crystal but this can easily be done in toad or other sql query tool.
    Please advise.
    Thanks.
    Tom.

    hi Tom,
    i walk through how to create a sub select (using a command object instead of using tables) in this post here...
    http://scn.sap.com/community/crystal-reports/blog/2012/07/11/show-all-sub-groups-and-a-summary-for-every-group
    cheers,
    jamie

  • Why I Can't use procedure in select statement

    Why I Can't use procedure in select statement

    We can use function in select statement but we couldn't use procedure with one out parameters in select statement... You can use Function because they are designed for this but procedure are not. Functions can return value (without OUT parameter) which can be used in SELECT whereas procedures do not have such concept. As you can see in the above post you can not call even functions also if it has any out parameter.
    I have just trying to use procedure in select statement ..for this I require technical answer..The technical answer is because conceptually procedure is for doing set of operation, performning DMLs on the tables , whereas functions are for processing and producing a single result. Functions are basically for not using INSERT/UPDATE/DELETE in it. That is the reason they are allowed to be used in SELECT because conceptually they are not supposed to do any data changes.
    Regards,
    Avinash

  • Use of cursors insted of select statements

    could any one please explain what is the advantage of using cursors instead of simple select statements
    thanks
    siby

    A benefit to using an explicit cursor rather than a select statement, is for the NO_DATA_FOUND exception. Its kind of like a free IF statment. IF no data is found, then stop.
    if you write a select statement, and no data is returned, you SHOULD code for the NO_DATA_FOUND exception. Often people say, "i'll ALWAYS get a row returned". but you should always cover your code "just in case". so you must code an exception...
    declare
    v_var varchar2(1);
    procedure do_something(p_parm varchar2) is
    begin
    null;
    end do_something;
    procedure log_error is
    begin
    null;
    end log_error;
    begin <<main>>
    do_something('x');
    begin <<selectblock>>
    select dummy
    into v_var
    from dual
    where dummy = 'a';
    do_something(v_var);
    exception
    when no_data_found then
    log_error;
    end selectblock;
    do_something (v_var||'abc');
    end main;
    if you use an explicit cursor instead, you don't need to code for the NO_DATA_FOUND. If an explicit cursor opens and finds no rows, there are simply no rows. of course, you don't need a loop if you expect only 1 row returned under normal circumstances.
    BTW, don' forget that SQL%ROWCOUNT and your_cursor%ROWCOUNT are not initialized. There is a null, until a row is successfully fetched. therefore if no rows are returned at all, %ROWCOUNT is NULL.
    declare
    v_var varchar2(1);
    cursor my_cur is
    select dummy
    from dual
    where dummy = 'a';
    procedure do_something(p_parm varchar2) is
    begin
    null;
    end do_something;
    procedure log_error is
    begin
    null;
    end log_error;
    begin << main>>
    for cur_rec in my_cur loop
    dbms_output.put_line('inside');
    begin <<loop_block>>
    if nvl(my_cur%rowcount,0) > 1 then
    do_something(cur_rec.dummy);
    else
    log_error;
    end if;
    end loop_block;
    end loop;
    end main;
    /

Maybe you are looking for

  • Setting attachment content-type manually?

    Hello, I am trying to write code that will allow a user to specify the content-type of an attachment when s/he adds it to an email. The following code, which appears to let Java figure out the content-type from the file extension, works just fine: Mu

  • Sync from ipod to i tunes

    the main sync order to sync itunes with the ipod, is there a reverse way? i have more music in my ipod and i want to download it to my library

  • Just downloaded trial version and icon won't open at all

    I wanted to try out photoshop before I bought it, so downloaded the trial of the creative cloud and whilst was downloading photoshop, it crashed my laptop, forcing me to restart it and now when I try to open the creative cloud icon on my desktop it d

  • Spinning beach ball of death. I'm desperate.

    Hi, one months ago I had a quite clean installation of Snow Leopard but I kept getting the spinning wheel. I reinstalled the OS and it was better. Now, 4 weeks after, I have again the same situation. Very random spinning wheel. I can't even log off o

  • Itunes Server (store) not working !

    I have an 16GB Iphone 4s  When i download somthing on the app store i must type in my password i do that then it will load 5 minutes and then its say Could not connect to itunes i tried different apps to download on my i phone but not working turned