Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Worning in for all entries

Former Member
0 Kudos

My code is following :

  SELECT  NOMTK NOMIT sityp docind docnr docitm
          valuationtype_o   valuationtype_d    locpt
          FROM oijnomi
          INTO TABLE lt_oijnomi
          WHERE locpt NE 0.

check lt_oijnomi is not empty.

  select oihantyp FROM ekpo
                  INTO table lt_oihantyp
                  for all entries in lt_oijnomi
                  where ebeln = lt_oijnomi-docnr
                  AND ebelp = lt_oijnomi-docitm+1(5).

now i am getting a worning in the last line of the second select query which is written in german.

Can you please tell me is "AND ebelp = lt_oijnomi-docitm+1(5)" in the last line is allowed in case of for all entries. Becayse this select is not showing working if i am not using for all entries.

can this worning effect in my logic ??

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Yes, when you are using for all entries it won't allow any offset comparison of fields.

Both the fields should be of same type.

better declare the field docitm in internal table lt_oijnomi as type ebelp and fetch data and

use like this:

if not lt_oijnomi[] is initial..

select oihantyp FROM ekpo

INTO table lt_oihantyp

for all entries in lt_oijnomi

where ebeln = lt_oijnomi-docnr

AND ebelp = lt_oijnomi-docitm.

endif.

Reward points if useful

Regards

Anji

9 REPLIES 9

amit_khare
Active Contributor
0 Kudos

I am unable to fing the table OIJNOMI in SAP 4.7 and ECC 5.0.

Check the same.

Regards,

Amit

0 Kudos

This table (OIJNOMI) will not be available in all R/3 installation. Bkz it is IS-OIL related. The IS-OIL patch needed to be uploaded to get such tables in your system.

former_member186741
Active Contributor
0 Kudos

show us the warning, somebody may uinderstand it....also what is this? I have never seen this statement.

check lt_oijnomi is not empty.

I've seen 'is not initial' but not 'is not empty'.

0 Kudos

sorry u r right, that was actually initial in case of empty. I just wrote that line, so that other people do not concentrate on the performance issue.

The worning is:

Bei der Verwendung von FOR ALL ENTRIES wird die Längenangabe für

"DOCITM" in dieser Bedingung ignoriert.

Former Member
0 Kudos

Hi

Yes, when you are using for all entries it won't allow any offset comparison of fields.

Both the fields should be of same type.

better declare the field docitm in internal table lt_oijnomi as type ebelp and fetch data and

use like this:

if not lt_oijnomi[] is initial..

select oihantyp FROM ekpo

INTO table lt_oihantyp

for all entries in lt_oijnomi

where ebeln = lt_oijnomi-docnr

AND ebelp = lt_oijnomi-docitm.

endif.

Reward points if useful

Regards

Anji

0 Kudos

Thanks Anji and all other exparts who helped me to solve my problem.

Former Member
0 Kudos

hi,

give space before and after '+'.

check wether ebelp and docitm have same length.

Former Member
0 Kudos

Hi,

The table from which u r fetching the records of the fileds

ie, OIJNOMI does not exist, when i tried in SE11.

so first check out ur table name.

****reward points if useful.

all the best

Former Member
0 Kudos

HI abhishek...

U just modify the table contents of lt_oijnomi-docitm in itab lt_oijnomi

before using that second query:

<b>loop at lt_oijnomi.</b>

lt_oijnomi-docitm = lt_oijnomi-docitm+1(5).

<b> modify</b> lt_oijnomi from lt_oijnomi transporting docitm.

<b>endloop.</b>

now use second query,..