Select Statement - from Decimal Fields into Char

Hi
I would like to run a SELECT from table T007A into an internal table which is of type TXW_TAXCOD.
T007A has a decimal field in it ( TOLERANCE ) which is of data type DEC, length of 3 and 1 decimal place.
This is the code in the standard program --
select * from t007a
         into corresponding fields of table t_txw_taxcod up to 20 rows.
I have to make the TOLERANCE field value in T007A land up in a character field in the structure, I have declared the TOLERANCE field in structure TXW_TAXCOD as a character field of type 5 (infact tried CHAR4 and CHAR8 etc etc) but I face a runtime error
I cannot change the code in standard program, can you please tell me what other data type can I use to make this select work

If LTXW0F02 is your program and form extract_txw_taxcod
then
  select * from t007a
           into corresponding fields of table t_txw_taxcod.
  sort t_txw_taxcod.
  loop at t_txw_taxcod.
    select single * from t007s
                    where spras = sy-langu
                      and kalsm = t_txw_taxcod-kalsm
                      and mwskz = t_txw_taxcod-mwskz.
    if sy-subrc = 0.
      move-corresponding t007s to t_txw_taxcod.
    endif.
    call function 'TXW_SEGMENT_RECORD_EXPORT'
      exporting
        data_record = t_txw_taxcod.
  endloop.
Within the function module TXW_SEGMENY_RECORD_EXPORT have implicit enhancements try to use then and make one more select to table t007s using key KALSM and fill the char field TOLERENCE
select tolerence from t007a into v_tolerence
          where kalsm = t_txw_taxcod-kalsm.
   write: v_tolerence to t_txw-taxcod-tolerence.

Similar Messages

  • Select statement inside function with  into keyword

    Hi Everyone,
    i have a function which contains a select statement
    create or replace
    function fun_1(Table_Name1 in varchar2)
    RETURN VARCHAR2
    is
    VAR_GEN_TYPE NUMBER(10);
    TA_U varchar2(256);
    VAR_DATA_FLAG varchar2(1);
    begin
    select T.FLAG into VAR_GEN_TYPE ,T.DATA_UID_GEN_TYPE into VAR_DATA_FLAG  from T_DYNAMIC_TABLE T  where T.TABLE_NAME=TABLE_NAME1;
    end
    whene ever i am executing this function giving error message: From Keyword  Not Found
    when i change select statement to
    select T.FLAG ,T.DATA_UID_GEN_TYPE into VAR_DATA_FLAG, VAR_GEN_TYPE from T_DYNAMIC_TABLE T where T.TABLE_NAME=TABLE_NAME1;
    then it is working
    why first statements will not work ?
    i.e.,
    select T.FLAG into VAR_GEN_TYPE ,T.DATA_UID_GEN_TYPE into VAR_DATA_FLAG from T_DYNAMIC_TABLE T where T.TABLE_NAME=TABLE_NAME1;
    why in select statement we cannot use into keyword more than one time ?
    Edited by: karteek on Jun 7, 2012 4:23 AM
    Edited by: karteek on Jun 7, 2012 4:24 AM

    select T.FLAG into VAR_GEN_TYPE ,T.DATA_UID_GEN_TYPE into VAR_DATA_FLAG, from T_DYNAMIC_TABLE T where T.TABLE_NAME=TABLE_NAME1;
    into should be only once..
    the syntax should be
    select <column list>
    into
    <variable list>
    from <table name> where <condition>
    --This query shuold return only one row.
    column list count and variable list count should match
    there should be no comma after last variable.andbefore from.

  • Limitation on SQL executing select statement from ADO and Oracle 8.1.7.1 OleDB Driver

    Hi,
    we are running a query with a big dunamic select statement from VB code using ADO command object. When Execute method is called system hangs and control won't return back to the application. it seems to be that there is some type limitation on Query string length. Please tell us if there is any?
    we are running Oracle 8.1.7 Server on Windows 200 Server and connecting from a W2K professional, ADO 2.6 and Oracle OLEDB 8.1.7.1 OLEDB Driver.
    Sample code:
    Dim rs As ADODB.Recordset
    Dim cmd As ADODB.Command
    Set cmd = New Command
    With cmd
    .CommandText = ' some text with more than 2500 characters
    .CommandType = adCmdText
    Set rs = .Execute
    End With
    when i debug using VB6 and when .Execute line is called system hangs or return a message method <<somemethod> of <<some class name>> failed error.
    Any help is appreciated.
    Thanks,
    Anil

    A stored procedure would only slow you down here if it was poorly written. I suspect you want to use the translate function. I'm cutting & pasting examples from the documentation-- a search at tahiti.oracle.com will give you all the info you'll need.
    Examples
    The following statement translates a license number. All letters 'ABC...Z' are translated to 'X' and all digits '012 . . . 9' are translated to '9':
    SELECT TRANSLATE('2KRW229',
    '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ',
    '9999999999XXXXXXXXXXXXXXXXXXXXXXXXXX') "License"
    FROM DUAL;
    License
    9XXX999
    The following statement returns a license number with the characters removed and the digits remaining:
    SELECT TRANSLATE('2KRW229',
    '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ', '0123456789')
    "Translate example"
    FROM DUAL;
    Translate example
    2229
    Also, LIKE '%<string>%' is going to be rather expensive simply because it has to compare the entire string and because it forces full table scans, rather than using indexes. You could speed this sort of query up by using interMedia Text (Oracle Text now in 9i). If you can eliminate one of the '%' options, you could also improve things.
    My guess is that your stored procedure is inefficient and that's causing the problem-- 5k rows per table should be pretty trivial.
    If you post your query over on the PL/SQL forum, there are better performance tuners than I that might have more hints for you. To get really good advice, though, you'lllikely have to get at least the execution plan for this statement and may need to do some profiling to identify the problem areas.
    Justin

  • How to get the selection parameters from logical database into one of the t

    Hi Sap ABAP Champians,
    How to get the selection parameters from logical database into one of the tab in the tabstrip selection-screen.
    Please help me for this
    Thanks
    Basu

    Hi
    Thanks, that will work, but then I'll have to insert code into all my reports.
    I can see that "Application Server Control Console" is able to rerun a report.
    This must mean that the Report Server has access to the runtime parameters.
    But how?
    Cheers
    Nils Peter

  • Source selection derived from target field Cons Chart of Accts is empty

    Dear,
    When I run the LDS, The system issues this error message :
    "Source selection derived from target field Cons Chart of Accts is empty"
    Although, mapping of Cons Chart of Accts   in LDS for this method is defined as constant value.
    I can't load data from raw data cube. What can be the reason ?
    Thanks,

    Source selection derived from target field Cons Chart of Accts is empty
    Message no. UCT8257
    Diagnosis
    The system derives the source selection from the selection for target field Cons Chart of Accts. The resulting source selection is empty.
    System Response
    The system cannot read any source data.
    Procedure
    Examine the mapping rule for field Cons Chart of Accts. Make sure that the inversion of the mapping rule does not produce an empty selection or lead to conflicting values.

  • Select statement from a join file deletes the primary records with MS Expl.

    Hello,
    is reality,
    Select statement from a join file deletes the primary records with MS Explorer 6, Firefox not, this with a normal data provider or with a normal "select..." statement.
    This is very strange, I should have a.a.s.p. a solution or workaround
    Thanks, Franco.
    Message was edited by:
    fbiaggi

    Please see the following excerpt from the online documentation.
    http://docs.oracle.com/cd/E11882_01/server.112/e22490/ldr_modes.htm#SUTIL1332
    Enabled Constraints
    During a direct path load, the constraints that remain enabled are as follows:
    NOT NULL
    UNIQUE
    PRIMARY KEY (unique-constraints on not-null columns)
    NOT NULL constraints are checked at column array build time. Any row that violates the NOT NULL constraint is rejected.
    Even though UNIQUE constraints remain enabled during direct path loads, any rows that violate those constraints are loaded anyway (this is different than in conventional path in which such rows would be rejected). When indexes are rebuilt at the end of the direct path load, UNIQUE constraints are verified and if a violation is detected, then the index will be left in an Index Unusable state. See "Indexes Left in an Unusable State".

  • Benefit of using store procedure instead of select statement to pull data into biztalk

    I was wondering why store procedure is more beneficial than using select statement to pull data into biztalk?

    In addition to the above two points, in case if there is a change in logic of stored procedure, you only need to modify the stored proc and the applications calling/using it may be left intact.
    Also, stored procedures are complied code so performance is better and safe too.
    Thanks,
    Prashant
    Please mark this post accordingly if it answers your query or is helpful.

  • Select statement from "v_filename_txt" inside cursor

    Hi,
    I've got a store procedure procedure that create parametric tables to upload from csv files. I have collect into v_filename_txt variable the parametric table name where I would like to make some select.
    I have write the following code but I can't use a variable into a select statement :
    select field
    FROM TABLE '''||v_filename_txt||''' ;
    Does anybody know how to include the precedent statement into a cursor to retrive recods ?
    Paolo.

    You could rcreate an external table. Then select the values from this external table.
    You can switch the source of the external table to a new file with the
    alter table myExtTable location ('mySecondCsvFIle.csv');
    command.
    Of cause this works only when all the files have the same structure. But the Idea is: mimic the structure of the csv file sin the database with a external table command. Then you can read the values and move them to some other table.
    Insert into myParameterTable select * from myExtTable;

  • SELECT statement comparing 2 fields in a table.

    Hi,
    Can someone help me out  in making a efficient SELECT statement for the follwing requirement.
    Say, I want to select all the records from a database table where the field, PLANT is equal to field SALESORG in the table (i.e., when both fields are equal select that record).
    Thanks & regards,
    Sree

    Hello,
    I think this is the answer to your question... if you explain a bit more we can formulate a query.
    Subquery
    Variants:
    1. ( select )
    2. ALL ( select )
    3. ANY ( select )
    4. SOME ( select )
    Effect
    A subquery is a SELECT statement select that occurs within a
    SELECT,
    OPEN CURSOR,
    UPDATE, or
    DELETE statement
    in the WHERE clause or HAVING clause, to check whether data from database tables or views meets certain criteria.
    Subqueries have a restricted syntax in comparison to the normal SELECT statement:
    SELECT result FROM source [WHERE where] [GROUP BY fields]       [HAVING having].
    Variant 1
    ( select )
    If the subquery returns a single value, you can use any relational operator except LIKE and BETWEEN.
    Example
    Selecting the flights with the most passengers:
    DATA: WA TYPE SFLIGHT.
    SELECT * FROM SFLIGHT
        INTO WA
        WHERE SEATSOCC = ( SELECT MAX( SEATSOCC ) FROM SFLIGHT ).
      WRITE: / WA-CARRID, WA-CONNID, WA-FLDATE.
    ENDSELECT.
    Note
    If you use a subquery with a relational operator instead of EXISTS, you may only specify one column in the SELECT clause. This can be either a field from the database table or an aggregate expression. Subqueries of this kind are referred to as scalar subqueries.
    Variant 2
    ALL ( select )
    If the subquery returns several lines, each containing one value, you specify that the comparison should apply for all of the values it returns.
    Example
    This example shows how to use ALL. It displays a list of the customer IDs of the customer (or customers) who have made the most bookings:
    DATA: ID TYPE SBOOK-CUSTOMID, CNT TYPE I.
    SELECT CUSTOMID COUNT( * ) AS C FROM SBOOK
        INTO (ID, CNT)
        GROUP BY CUSTOMID
        HAVING COUNT( * ) >=
          ALL ( SELECT COUNT( * ) FROM SBOOK GROUP BY CUSTOMID ).
      WRITE: / ID, CNT.
    ENDSELECT.
    Variant 3
    ANY ( select )
    Variant 4
    SOME ( select )
    If the subquery returns several lines each containing one value, this variant specifies that the comparison should apply to at least one of the values returned. The IN operator is the same as the combination = ANY.
    &ABAP_HINT
    If you use a subquery with the EXISTS operator, the expression is true if the subquery selects at least one line. You can useuse * in the SELECT clause of subqueries that use EXISTS.
    Example
    Selecting all flights from Frankfurt to New York between 1.1.1999 and 31.3.1999 that are not yet full:
    DATA: WA_SFLIGHT TYPE SFLIGHT.
    SELECT * FROM SFLIGHT AS F INTO WA_SFLIGHT
        WHERE SEATSOCC < F~SEATSMAX
          AND EXISTS ( SELECT * FROM SPFLI
                        WHERE CARRID = F~CARRID
                           AND CONNID = F~CONNID
                           AND CITYFROM = 'FRANKFURT'
                           AND CITYTO = 'NEW YORK' )
          AND FLDATE BETWEEN '19990101' AND '19990331'.
      WRITE: / WA_SFLIGHT-CARRID, WA_SFLIGHT-CONNID,
               WA_SFLIGHT-FLDATE.
    ENDSELECT.
    Subqueries such as the one in this example, in which the WHERE clause uses fields from the main query, are known as correlated subqueries. Subqueries can be nested, and a given subquery may contain any fields from other, hierarchically-superior subqueries.
    In a correlated subquery, the subquery is executed for each line r returned by the main query. In the above example, the main query finds all flights in table SFLIGHT that are not full and that have a date that meets the selection criterion. The statement then performs the subquery for each of the records returned by the main query, using the corresponding values of CARRID and CONNID, to check whether the relevant flight operates between Frankfurt and New York.
    Additional help
    Subqueries

  • How can I convert "exists (select 1 from . ." into OWB

    Hello,
    I have sql statement that have to convert from PL/SQL to utilize OWB
    select a.1, a.2, b.1,b.2
    from a, b
    where a.1 = b.1
    and exists in (select 1 from c where a.3 = c.3)
    Thank you in advance.

    OWB does support EXISTS
    you can join tables a and b using simple joiner. from the output of this joiner , use a.3 to lookup on table c. select the business/primary key of table c from lookup operator and all other required fields from joiner into a filter. in the filter condition put condition
    c.businesskey is not null.
    Its like performing
    select a1,b1 from
    (SELECT
    c.businesskey bk,a.1 a1,b.1 b1
    FROM
    c lkp_tbl
    RIGHT OUTER JOIN a ON ( ( c.3 = a.3 ) )
    LEFT OUTER JOIN b ON ( ( b.1 = a.1 ))
    ) SUBQUERY
    WHERE
    SUBQUERY.bk is not null
    try it and let me know. I have tried not exists and it works in OWB fine

  • SELECT STATEMENT FROM THIS TABLES

    HI FRIENDS,
    PLE HELP ME REGARDING THIS.
    data from 3 tables
    TABLES: CUST_CONT,CONT_CAT_FOLD,CONT_FOLD_***
    cust_cont_pk (IS COMMON FIELD IN TABLE I AND 3)
    cont_cat_fold_pk( IS COMMON FIELD IN TABLE 2 AND 3)
    HOW CAN I WRITE SELECT STATEMENT
    Thanking u
    suneel.

    Hi
    Join the two tables
    CUST_CONT  and CONT_FOLD_*** with cust_cont_pk  field and
    CONT_CAT_FOLD and CONT_FOLD_*** with cont_cat_fold_pk field
    see the doc
    Joins are used to fetch data fast from Database tables:
    Tables are joined with the proper key fields to fetch the data properly.
    If there are no proper key fields between tables don't use Joins;
    Important thing is that don't USE JOINS FOR CLUSTER tableslike BSEG and KONV.
    Only use for Transparenmt tables.
    You can also use joins for the database VIews to fetch the data.
    JOINS
    ... FROM tabref1 [INNER] JOIN tabref2 ON cond
    Effect
    The data is to be selected from transparent database tables and/or views determined by tabref1 and tabref2. tabref1 and tabref2 each have the same form as in variant 1 or are themselves Join expressions. The keyword INNER does not have to be specified. The database tables or views determined by tabref1 and tabref2 must be recognized by the ABAP Dictionary.
    In a relational data structure, it is quite normal for data that belongs together to be split up across several tables to help the process of standardization (see relational databases). To regroup this information into a database query, you can link tables using the join command. This formulates conditions for the columns in the tables involved. The inner join contains all combinations of lines from the database table determined by tabref1 with lines from the table determined by tabref2, whose values together meet the logical condition (join condition) specified using ON>cond.
    Inner join between table 1 and table 2, where column D in both tables in the join condition is set the same:
    Table 1 Table 2
    A
    B
    C
    D
    D
    E
    F
    G
    H
    a1
    b1
    c1
    1
    1
    e1
    f1
    g1
    h1
    a2
    b2
    c2
    1
    3
    e2
    f2
    g2
    h2
    a3
    b3
    c3
    2
    4
    e3
    f3
    g3
    h3
    a4
    b4
    c4
    3
    |--|||--|
    Inner Join
    A
    B
    C
    D
    D
    E
    F
    G
    H
    a1
    b1
    c1
    1
    1
    e1
    f1
    g1
    h1
    a2
    b2
    c2
    1
    1
    e1
    f1
    g1
    h1
    a4
    b4
    c4
    3
    3
    e2
    f2
    g2
    h2
    |--||||||||--|
    Example
    Output a list of all flights from Frankfurt to New York between September 10th and 20th, 2001 that are not sold out:
    DATA: DATE LIKE SFLIGHT-FLDATE,
    CARRID LIKE SFLIGHT-CARRID,
    CONNID LIKE SFLIGHT-CONNID.
    SELECT FCARRID FCONNID F~FLDATE
    INTO (CARRID, CONNID, DATE)
    FROM SFLIGHT AS F INNER JOIN SPFLI AS P
    ON FCARRID = PCARRID AND
    FCONNID = PCONNID
    WHERE P~CITYFROM = 'FRANKFURT'
    AND P~CITYTO = 'NEW YORK'
    AND F~FLDATE BETWEEN '20010910' AND '20010920'
    AND FSEATSOCC < FSEATSMAX.
    WRITE: / DATE, CARRID, CONNID.
    ENDSELECT.
    If there are columns with the same name in both tables, you must distinguish between them by prefixing the field descriptor with the table name or a table alias.
    Note
    In order to determine the result of a SELECT command where the FROM clause contains a join, the database system first creates a temporary table containing the lines that meet the ON condition. The WHERE condition is then applied to the temporary table. It does not matter in an inner join whether the condition is in the ON or WHEREclause. The following example returns the same solution as the previous one.
    Example
    Output of a list of all flights from Frankfurt to New York between September 10th and 20th, 2001 that are not sold out:
    DATA: DATE LIKE SFLIGHT-FLDATE,
    CARRID LIKE SFLIGHT-CARRID,
    CONNID LIKE SFLIGHT-CONNID.
    SELECT FCARRID FCONNID F~FLDATE
    INTO (CARRID, CONNID, DATE)
    FROM SFLIGHT AS F INNER JOIN SPFLI AS P
    ON FCARRID = PCARRID
    WHERE FCONNID = PCONNID
    AND P~CITYFROM = 'FRANKFURT'
    AND P~CITYTO = 'NEW YORK'
    AND F~FLDATE BETWEEN '20010910' AND '20010920'
    AND FSEATSOCC < FSEATSMAX.
    WRITE: / DATE, CARRID, CONNID.
    ENDSELECT.
    Note
    Since not all of the database systems supported by SAP use the standard syntax for ON conditions, the syntax has been restricted. It only allows those joins that produce the same results on all of the supported database systems:
    Only a table or view may appear to the right of the JOIN operator, not another join expression.
    Only AND is possible in the ON condition as a logical operator.
    Each comparison in the ON condition must contain a field from the right-hand table.
    If an outer join occurs in the FROM clause, all the ON conditions must contain at least one "real" JOIN condition (a condition that contains a field from tabref1 amd a field from tabref2.
    Note
    In some cases, '*' may be specified in the SELECT clause, and an internal table or work area is entered into the INTO clause (instead of a list of fields). If so, the fields are written to the target area from left to right in the order in which the tables appear in the FROM clause, according to the structure of each table work area. There can then be gaps between table work areas if you use an Alignment Request. For this reason, you should define the target work area with reference to the types of the database tables, not simply by counting the total number of fields. For an example, see below:
    Variant 3
    ... FROM tabref1 LEFT [OUTER] JOIN tabref2 ON cond
    Effect
    Selects the data from the transparent database tables and/or views specified in tabref1 and tabref2. tabref1 und tabref2 both have either the same form as in variant 1 or are themselves join expressions. The keyword OUTER can be omitted. The database tables or views specified in tabref1 and tabref2 must be recognized by the ABAP-Dictionary.
    In order to determine the result of a SELECT command where the FROM clause contains a left outer join, the database system creates a temporary table containing the lines that meet the ON condition. The remaining fields from the left-hand table (tabref1) are then added to this table, and their corresponding fields from the right-hand table are filled with ZERO values. The system then applies the WHERE condition to the table.
    Left outer join between table 1 and table 2 where column D in both tables set the join condition:
    Table 1 Table 2
    A
    B
    C
    D
    D
    E
    F
    G
    H
    a1
    b1
    c1
    1
    1
    e1
    f1
    g1
    h1
    a2
    b2
    c2
    1
    3
    e2
    f2
    g2
    h2
    a3
    b3
    c3
    2
    4
    e3
    f3
    g3
    h3
    a4
    b4
    c4
    3
    |--|||--|
    Left Outer Join
    A
    B
    C
    D
    D
    E
    F
    G
    H
    a1
    b1
    c1
    1
    1
    e1
    f1
    g1
    h1
    a2
    b2
    c2
    1
    1
    e1
    f1
    g1
    h1
    a3
    b3
    c3
    2
    NULL
    NULL
    NULL
    NULL
    NULL
    a4
    b4
    c4
    3
    3
    e2
    f2
    g2
    h2
    |--||||||||--|
    Example
    Output a list of all custimers with their bookings for October 15th, 2001:
    DATA: CUSTOMER TYPE SCUSTOM,
    BOOKING TYPE SBOOK.
    SELECT SCUSTOMNAME SCUSTOMPOSTCODE SCUSTOM~CITY
    SBOOKFLDATE SBOOKCARRID SBOOKCONNID SBOOKBOOKID
    INTO (CUSTOMER-NAME, CUSTOMER-POSTCODE, CUSTOMER-CITY,
    BOOKING-FLDATE, BOOKING-CARRID, BOOKING-CONNID,
    BOOKING-BOOKID)
    FROM SCUSTOM LEFT OUTER JOIN SBOOK
    ON SCUSTOMID = SBOOKCUSTOMID AND
    SBOOK~FLDATE = '20011015'
    ORDER BY SCUSTOMNAME SBOOKFLDATE.
    WRITE: / CUSTOMER-NAME, CUSTOMER-POSTCODE, CUSTOMER-CITY,
    BOOKING-FLDATE, BOOKING-CARRID, BOOKING-CONNID,
    BOOKING-BOOKID.
    ENDSELECT.
    If there are columns with the same name in both tables, you must distinguish between them by prefixing the field descriptor with the table name or using an alias.
    Note
    For the resulting set of a SELECT command with a left outer join in the FROM clause, it is generally of crucial importance whether a logical condition is in the ON or WHERE condition. Since not all of the database systems supported by SAP themselves support the standard syntax and semantics of the left outer join, the syntax has been restricted to those cases that return the same solution in all database systems:
    Only a table or view may come after the JOIN operator, not another join statement.
    The only logical operator allowed in the ON condition is AND.
    Each comparison in the ON condition must contain a field from the right-hand table.
    Comparisons in the WHERE condition must not contain a field from the right-hand table.
    The ON condition must contain at least one "real" JOIN condition (a condition in which a field from tabref1 as well as from tabref2 occurs).
    Note
    In some cases, '*' may be specivied as the field list in the SELECT clause, and an internal table or work area is entered in the INTO clause (instead of a list of fields). If so, the fields are written to the target area from left to right in the order in which the tables appear in the llen in der FROM clause, according to the structure of each table work area. There can be gaps between the table work areas if you use an Alignment Request. For this reason, you should define the target work area with reference to the types of the database tables, as in the following example (not simply by counting the total number of fields).
    Example
    Example of a JOIN with more than two tables: Select all flights from Frankfurt to New York between September 10th and 20th, 2001 where there are available places, and display the name of the airline.
    DATA: BEGIN OF WA,
    FLIGHT TYPE SFLIGHT,
    PFLI TYPE SPFLI,
    CARR TYPE SCARR,
    END OF WA.
    SELECT * INTO WA
    FROM ( SFLIGHT AS F INNER JOIN SPFLI AS P
    ON FCARRID = PCARRID AND
    FCONNID = PCONNID )
    INNER JOIN SCARR AS C
    ON FCARRID = CCARRID
    WHERE P~CITYFROM = 'FRANKFURT'
    AND P~CITYTO = 'NEW YORK'
    AND F~FLDATE BETWEEN '20010910' AND '20010920'
    AND FSEATSOCC < FSEATSMAX.
    WRITE: / WA-CARR-CARRNAME, WA-FLIGHT-FLDATE, WA-FLIGHT-CARRID,
    WA-FLIGHT-CONNID.
    ENDSELECT.
    reward points if useful
    regards
    Anji

  • How to use select statement for one field

    I want to fetch the data from table and only one field  , the below code i written is correct or not , because only for one field i used endselct  if i am not giving endselect it is  showing error. Please suggest me.
    DATA : SBELN TYPE VBAK-VBELN.
    parameters : s_vbeln type vbak-vbeln.
    select vbeln from vbak into sbeln
    where vbeln = P_VBELN.
    endselect.

    Hi ,
    As because you want single field but not single record so SELECT  SINGLE is not correct .
    You need to create a internal table with the field of VBELN.
    Then you need to fetch the records from the VBELN field of table VBAK.
    Try this code --
    DATA : t_itab like table of VBAK-VBELN.
    parameters : s_vbeln type vbak-vbeln.
    select vbeln from vbak into table t_itab
    where vbeln = s_VBELN.
    Regards
    Pinaki

  • Can i select Records from two tables into an itab.

    Hi,
        Suppose that i have two tables spfli and sflight.
        Now i want the records from both the tables into a single internal table.
        If so please let me know how this can be done.
        itab should consist of all the columns in sflight and spfli.
    Regards,
    Sai

    Sai,
    Yes u can do it using JOINs.
    Use this link for ref
    http://www.sap-img.com/abap/inner-joins.htm
    INNER JOIN results are an intersection of the tables being joined where in only if both the tables havethe data the result is pused onto the result set.
    WHERE as in LEFT OUTR JOIN you can push the data of the LEF T table on the resultset even when the join condition is not met.
    The use is that you wantto have all the data that is there in left table and also the right table if the join condition is a success then right table fileds will have data else they are initial.
    OUTJOIN's are used in MAINTENANNCE VIEWS, HELP VIEWS .
    INNER JOINS are used DATABSE VIEWS.
    Inner Join:-
    SELECT pcarrid pconnid ffldate bbookid
    INTO CORRESPONDING FIELDS OF TABLE itab
    FROM ( ( spfli AS p
    INNER JOIN sflight AS f ON pcarrid = fcarrid AND
    pconnid = fconnid )
    INNER JOIN sbook AS b ON bcarrid = fcarrid AND
    bconnid = fconnid AND
    bfldate = ffldate )
    WHERE p~cityfrom = 'FRANKFURT' AND
    p~cityto = 'NEW YORK' AND
    fseatsmax > fseatsocc.
    Left Outer Join
    SELECT scarrid scarrname p~connid
    INTO CORRESPONDING FIELDS OF TABLE itab
    FROM scarr AS s
    LEFT OUTER JOIN spfli AS p ON scarrid = pcarrid AND
    p~cityfrom = 'FRANKFURT'.
    Reward if helpful,
    Karthik

  • Inserting a value from page field into an xml file

    Hi there,
    I have added a field 'Comments' on a create vacancy page.
    There are other fields on that page and the values from those fields are getting stored in an xml file.
    This xml file is getting stored in TRANSACTION_DOCUMENT column of table HR_API_TRANSACTIONS.
    Is it possible to add the value from the field (that I've added on the page) into the same xml file?
    If yes, please tell me how
    and if no, tell me what should I do to store that value.
    Regards,
    Gaurav.

    Hi Gaurav,
    You need to check in seeded files for the logic of generation of XML file and setting it in DB column. May be in PLSQL API this code would exist.
    Once you get that logic you can append your column value in XML tag (need to create new tag) if you are allowed to modify seeded API. Otherwise use free additional attributes of the table.
    Hope I am clear.
    Regards,
    Mukesh Uchaniya

  • Import Text From Form Field into Subject Line of Email

    Hello,
    Is there a way to import text from a form field into the subject line of the email when sending back (attaching) the PDF form?  In other words, there is an "applicant name" and I would like that name to be the subject line of the email.
    I am using Adobe Acrobat X (10.1.7)
    If any one has aby guidance or resources online where I can locate this information I would greatly appreciate it!  I have been searching all day but have not found a solution yet. 
    Thanks!

    Thank you so much for the help.  For some reason I cannot get it to work though.   Now, when I hit the submit button it does not do anything.
    Previously, I had the following code under
    ACTIONS>Mouse Up>Submit a Form
    mailto:[email protected]?subject=Employee Application
    I removed the above mailto URL and put in your code as a Javascript function. I made sure that my field name matched the name in quotes within the code.
    I used the following:
    var subject = getField("lastname").value 
    this.mailDoc({
    bUI: false,
    cTo: "[email protected]",
    cSubject: subject,
    cMsg: "Type message here"
    Do you see anything obvious that I am doing wrong?
    Many thanks!

Maybe you are looking for