‎2008 Sep 05 7:31 AM
Hi,
Please help me out for the below issue.
Problem:
Two servers, NSA and NDA.
Select statement to a particular table correctly retrieves data from NSA server.
The same select statement to the same table swaps the values between 2 fields and retrieves incorrect data from NDA server.
Investigation:
When debuggin in NDA, i found that the values are getting swapped between 2 fields which are adjacent to each other in NDA server.
Solution
Please help:(
Regards,
Raja
‎2008 Sep 05 7:43 AM
Hi,
Check the table field names both in NDS and NDA server are same. fetching from the table in the select query.
Otherwise write two separate select queries that differentiate between the servers with the appropriate field names of the tables that are present in both the servers
‎2008 Sep 05 7:55 AM
Hi,
Everything is identical 100% in both the servers but the value swap happens only in NDA.
‎2008 Sep 05 8:03 AM
Hi,
Use the following code.
types: begin of y_test,
field1 type tablename-fieldname1,
field2 type tablename-fieldname2,
-
,
end of y_test.
data: t_test type standard table of y_test.
select fieldname1 fieldname2 -
from tablename
into corresponding fields of table t_test
where condition.
‎2008 Sep 05 7:44 AM
Hi Raja .,
Please check the fields Sequence in Select Query And internal table declaration .
otherwise , Ofcource it is not recomanded use ' into Corresponding Fields .
thanks
Sreenivas Reddy
‎2008 Sep 05 7:57 AM
Hi sreenivas,
Everything is identical 100%, that includes field sequence also.Correspond fields addition is also not used.
Any other clue?
‎2008 Sep 05 8:02 AM
is it a custom table. or Standard one.
Did you check the internal table definition properly...
‎2008 Sep 05 8:29 AM
Hi Vijay,
It is a custom table and the Data fetch is a "SELECT SINGLE" so no need of internal table.
The values are fetched into individual fields as export parameters for the function module.
‎2008 Sep 05 8:13 AM
Chech that the internal table declaration in both the server are exactly the same and fileds are in same order.
Use INTO CORRESPONDING if possible.
‎2008 Sep 05 8:45 AM
The values maintained in the tables in both the servers could be swapped.
Like :
Tab1 on server 1
field 1 = 5
field 2 = 6
Tab1 on server 2
field 1 = 6
field 2 = 5
hope this helps.
raegrds,
‎2008 Sep 08 6:09 AM
hello everyone,
This problem had something to do with my Previous thread on "Open SQL error". The problem was the ABAP Dictionary structure was inconsistent with the Database structure, hence in one situation i was getting an "ORACLE error:12839" and Values were getting swapped among certain fields(Inconsistent fields) in another situatuion.
Now that the Table structure is made consistent with the database structure, things should be working fine.
If anything i will get back:)
Thanks for your support,
Cheers,
Raja