‎2013 Sep 09 11:33 AM
Hi experts,
I've a question.
We made a database migration from Oracle to Sybase ASE.
And now I think, that the coding below is not working anymore.
If I check the tables and entries directly via se16 I get a result - like in the past.
But in the program the statement don't delivers any result.
May it be, that the syntax has to be changed for Sybase ASE????
Thank you
btw: header_guid is filled with a correct guid
select single b~partner_guid
from crmv_linkpartner as a
inner join but000 as b
on a~partner_no eq b~partner_guid
into lv_bupa_guid
where a~guid_hi eq header_guid
and a~partner_fct eq 'SLFN0002'
and a~mainpartner eq 'X'.
IF sy-subrc EQ 0.
‎2013 Sep 09 12:08 PM
HI,
I would suggest doing the same SQL on a SYBASE client tool that will show the internal representation of the data. See if the Type of the fields in the where clause have the right internal format and type. Often there can be misinterpretation due to VARCHAR and CHAR representation resulting in SQL failure.
Cheers,
Arindam
‎2013 Sep 09 11:51 AM
It might be due to type issues or simillar. Do you recieve any errors?
‎2013 Sep 09 12:08 PM
HI,
I would suggest doing the same SQL on a SYBASE client tool that will show the internal representation of the data. See if the Type of the fields in the where clause have the right internal format and type. Often there can be misinterpretation due to VARCHAR and CHAR representation resulting in SQL failure.
Cheers,
Arindam
‎2013 Sep 09 1:02 PM
Hi Arindam,
thank you so much for the tip.
Do you have a guide how I can do this in SAP?
Kind regards
‎2013 Sep 09 1:56 PM
Hi,
Check the link below:
http://www.sybase.com/detail?id=1087327
Download the trail version SQL Anywhere 12.0.1. Then you can connect to your Sybase DB vis this and check the Syntax of the SQL that you have may check out how the data comes up when you do a SELECT * on the tables but000 and crmv_linkpartner and see the data representations.
That should remove the doubts on the data format and also help to understand in the JOIN condition fields and WHERE clause fields have the right values being compared. I mean sometimes the internal and screen representation of a value are different like say for date externally it could be 10.10.2012 internally it might be 20121010.
Cheers,
Arindam
‎2013 Sep 09 2:42 PM
I know what you mean, and thx for help.
But we have now tested the following coding below and this works.
So I don't think that it is an conversion issue and so on.
But I've also opened an request at SAP and hope to get an answer.
SELECT SINGLE *
FROM crmv_linkpartner
INTO ls_link
WHERE guid_hi EQ header_guid
AND partner_fct EQ 'SLFN0002'
AND mainpartner EQ 'X'.
SELECT SINGLE *
FROM but000
INTO ls_but000
WHERE partner_guid EQ ls_link-partner_no.
lv_bupa_guid = ls_but000-partner_guid.
‎2014 Mar 06 4:26 PM
Dear Christian,
I have the same problem adter migration from ORACLE to DB6, and raised to SAP. But surprisingly they would not release any Note or Correction for this problem. so i am muself looking for options..
Was your problem solved ? Is there any other workaround ??
Regards,
Abhishek
‎2014 Mar 06 6:23 PM
Hello,
We too had the same problem, we migrated from ORACLE to DB6 and in the beginning the system gave lot of ST22 dumps with TIME_OUT and the execution point shows the SELECT INNER JOINS statements. Our BASIS team has done some maintenance and it solved our issue.
Regards,
Thanga
‎2014 Mar 10 6:47 AM
Hello Everyone,
we did maintain the sql-select (removed inner join) and after this change it did work.
Kind regards