cancel
Showing results for 
Search instead for 
Did you mean: 

For all entries for Tabletype without field

sagar15884
Explorer
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

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.

Answers (1)

Answers (1)

lbreddemann
Active Contributor
0 Kudos

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:

Selecting Lines

regards,

Lars