2007 Jun 13 8:22 AM
Dear Friends,
We are using the following query ...
select single SECTION_ID from <Table>
into B
where DEPT_ID = a.
Here dept_id is a non key field. This query is returning sy-subrc as 4 when A = '0000000' . But for other, query is successful.
We have used this table as check table in so many tables and not able to change the primary key.
Plz sugest us how we should change the query.
Regards,
Vivek K
2007 Jun 13 8:27 AM
Hi,
Try this.
IF DEPT_ID = '00000000'.
select single SECTION_ID from <Table>
into B
where DEPT_ID = '00000000' .
ELSE.
select single SECTION_ID from <Table>
into B
where DEPT_ID = a .
ENDIF.
Regards,
Suruchi
Message was edited by:
Suruchi Mahajan
Dear Friends,
We are using the following query ...
select single SECTION_ID from <Table>
into B
where DEPT_ID = a.
Here dept_id is a non key field. This query is returning sy-subrc as 4 when A = '0000000' . But for other, query is successful.
We have used this table as check table in so many tables and not able to change the primary key.
Plz sugest us how we should change the query.
Regards,
Vivek K
2007 Jun 13 8:27 AM
Hi,
Try this.
IF DEPT_ID = '00000000'.
select single SECTION_ID from <Table>
into B
where DEPT_ID = '00000000' .
ELSE.
select single SECTION_ID from <Table>
into B
where DEPT_ID = a .
ENDIF.
Regards,
Suruchi
Message was edited by:
Suruchi Mahajan
2007 Jun 13 8:28 AM
solved the problem by checking the "NOT NULL" Indicator ...
Thanks,
Vivek
2007 Jun 13 8:29 AM
Hi,
Tried hardcoding also it did not work ... Thanks for the reply ...
Regards,
Vivek