on 03-30-2012 2:35 PM
Hi,
How do I use for all entries for the internal table of table types without fields?
I have table type CRMT_OBJECT_GUID_TAB which has line type as data element, so does not have any fields.
Example:
data: lt_guid type crmt_object_guid_tab,
lt_customer_i type table of crmd_customer_i.
select * from crmd_orderadm_i into table lt_guid .
select * from crmd_customer_i into table lt_customer_i for all entries in lt_guid
where guid = ?????
What should I write here in where condition?
Regards,
Sagar
Hi Sagar, Try this, select * from crmd_orderadm_i into table lt_guid. select * from crmd_customer_i into table lt_customer_i for all entries in lt_guid where guid = lt_guid-table_line. Thanks & Regards, Adithya M.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sagar,
first of all: this question does not relate to MaxDB but instead to ABAP development and I suggest you move your threat there or open a new one there.
However, the FAE (for all entries) construct has been designed specifically to support looping over selection criteria for DB tables that are stored in an internal table.
If you want to select data from your DB table you need to specify the condition in your where clause - and your codition surely is not "give me the row that is equal to the row I have" (SQL doesn't support that). You always need to specify the condition exactly that should be satisfied.
That means: you've to list what each columns value should be. Let's assume you want to use the GUID of your CRM table instead of the full line, then your code should look like this:
select * from crmd_customer_i
into table lt_customer_i for all entries in lt_guid
where guid in lt_guid-guid.
Please also see the documentation on this:
regards,
Lars
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.