‎2008 Aug 25 4:41 PM
the program is dumping at the below stmt.
*-- Check whether any entry is present in the the table BSIP
SELECT * INTO LS_BSIP FROM BSIP
WHERE (LT_SEL_DATA).
LT_SEL_DATA is declared as
TYPES : BEGIN OF T_SEL_DATA,
FIELD(72) TYPE C,
END OF T_SEL_DATA.
DATA : LT_SEL_DATA TYPE STANDARD TABLE OF T_SEL_DATA WITH HEADER LINE.
. So the dump is because of the no data in LT_SEL_DATA ?
Shall I put below code to solve the dump ?
IF NOT LT_SEL_DATA[] IS INITIAL.
SELECT * INTO LS_BSIP FROM BSIP
WHERE (LT_SEL_DATA).
ENDIF .
Thanks IN ADV
‎2008 Aug 25 7:16 PM
Is that you suggestion to remove ( ) ' '
and check the program ?
I am looking the issue in production.
Do I needto ask test data and do investigation in development ?
I am not able to figure this our.
Could you guys help me by explaining clearly ?
Thanks in ADV.
‎2008 Aug 25 4:45 PM
Hi Sam,
the way I use dynamic WHERE statements is that I pass a string, not an ITAB, into them.
Maybe you can catch the system exception that is thrown in a try-catch-block and check in the debugger what instance of an exception class hierarchy is thrown; this would provide a first pointer.
Best of luck
Joerg
‎2008 Aug 25 4:45 PM
SELECT * INTO LS_BSIP FROM BSIP
WHERE (LT_SEL_DATA).
Where ru filling LT_SEL_DATA....
also, u need to use for all entries concept when fetching data from BSIP based on LT_SEL_DATA data...
‎2008 Aug 25 4:51 PM
Sam,
SELECT * INTO LS_BSIP FROM BSIP
WHERE (LT_SEL_DATA).Where is the where codition for where (LT_SEL_DATA)?
‎2008 Aug 25 5:15 PM
Create a new variable LV_WHERE AS STRING.
And then loop through internal table LT_SEL_DATA and fill the variable LV_WHERE and pass this to the select statement.
Thanks,
Srinivas
‎2008 Aug 25 5:15 PM
Which one is the correct one ?
1). How to use try catch in ABAP.
I did not use try catch block.
if
SELECT * INTO LS_BSIP FROM BSIP
WHERE (LT_SEL_DATA).
Where ru filling LT_SEL_DATA....
also, u need to use for all entries concept when fetching data from BSIP based on LT_SEL_DATA data...
LT_SEL_DATA is filling at 2 or 3 places.
however it is of FIELD(72) TYPE C,
how it selects from BSIP ?
I don't understand ....
and how to solve this by avaoiding dump.
Please help me.
‎2008 Aug 25 5:26 PM
Is that a custom program?
LT_SEL_DATA gets filled with a common condition, that's how it works. The table can be empty acording to the documentation, that's not the problem.
Post the real Dump description not the suggestions
‎2008 Aug 25 5:34 PM
The below is dump analysis...
Can any body also explain how it selects from bsip table id LT_SEL_DATA is declared as FIELD(72) TYPE C, ?
SELECT * INTO LS_BSIP FROM BSIP
WHERE (LT_SEL_DATA).
====================================
Error analysis
The current ABAP/4 program attempted to execute an ABAP/4 Open SQL
statement containing a WHERE condition of the form WHERE (itab) or
WHERE ... AND (itab). The part of the WHERE condition specified at
runtime in the internal table itab is incorrectly parenthesized.
How to correct the error
If the error occurred in a non-modified SAP program, you may be
able to find a solution in the SAP note system.
If you have access to the note system yourself, use the following
search criteria:
"SAPSQL_WHERE_PARENTHESES"
"SAPLZADI_F_DUPLICATE_INV_CHECK " or "LZADI_F_DUPLICATE_INV_CHECKU01 "
"Z_ADI_F_DUPLICATE_INVOICE_CHK"
If you cannot solve the problem yourself, please send the
following documents to SAP:
1. A hard copy print describing the problem.
To obtain this, select the "Print" function on the current screen.
-
Source code extract
001310 INTO LT_SEL_DATA-FIELD.
001320 APPEND LT_SEL_DATA.
001330 ENDIF.
001340
001350 CLEAR LT_SEL_DATA.
001360 CONCATENATE 'AND SHKZG NE '''
001370 LV_SHKZG
001380 ''''
001390 INTO LT_SEL_DATA-FIELD.
001400 APPEND LT_SEL_DATA.
001410
001420
001430 IF I_XBLNR IS INITIAL.
001440
001450 * Include the field for Amount in local currency in the selection
001460 * criteria on BSIP table
001470 LV_WRBTR = I_WRBTR.
001480 CONDENSE LV_WRBTR.
001490
001500 CLEAR LT_SEL_DATA.
001510 CONCATENATE 'AND WRBTR = '''
001520 LV_WRBTR
001530 ''''
001540 INTO LT_SEL_DATA-FIELD.
001550 APPEND LT_SEL_DATA.
001560
001570 ENDIF.
001580
001590 * Check whether any entry is present in the the table BSIP
001600 SELECT * INTO LS_BSIP FROM BSIP
> WHERE (LT_SEL_DATA).
001620
001630 * Check credit memos or not
001640 CHECK NOT ( I_SHKZG = LC_DB_IND AND LS_BSIP-SHKZG EQ SPACE ).
001650
001660 * Check if BSIP entry refers to the same document or not
001670 CHECK NOT ( I_BELNR = LS_BSIP-BELNR AND
001680 I_BUKRS = LS_BSIP-BUKRS AND
001690 I_GJAHR = LS_BSIP-GJAHR ).
001700
001710 * Get the reverse document number for the document selected
001720 CLEAR LV_STBLG.
001730 SELECT SINGLE STBLG
001740 INTO LV_STBLG
001750 FROM BKPF
001760 WHERE BELNR = LS_BSIP-BELNR
001770 AND BUKRS = LS_BSIP-BUKRS
001780 AND GJAHR = LS_BSIP-GJAHR.
001790
001800 * Only if NO Vendor Invoice reversal has taken place, throw
‎2008 Aug 25 5:39 PM
Enter debug mode and post the contents of LT_SEL_DATA at the crash. The dump says it's something about that.
If there is sensible information, just edit it before posting it here
‎2008 Aug 25 5:50 PM
Look at you internal table string
- The AND should stand between two logical tests, not at beginning or at end
- As the dump suggested, look for parenthesis, are there so many parentheses opening "(" than closing ")".
- Are the quotes '"' grouped by pair
- If you cannot found, remove every test one per one until you get the faulty one
Regards
‎2008 Aug 25 7:16 PM
Is that you suggestion to remove ( ) ' '
and check the program ?
I am looking the issue in production.
Do I needto ask test data and do investigation in development ?
I am not able to figure this our.
Could you guys help me by explaining clearly ?
Thanks in ADV.
‎2008 Aug 25 9:20 PM
Sorry if it's too late.
Post all the appends to the where table.
Maybe we can figure out what is going wrong
‎2008 Aug 25 7:17 PM
I needto give solution by debugging in production.
Please help me.
Thanks,
‎2008 Aug 25 7:44 PM
As Ramiro has asked, when debugging your code, what is the Contents of your Internal Table (LT_SEL_DATA) before you execute the Select Statement? Why debug in Proudction, can't you dedug in Development or Quality or Sandbox?