‎2009 Aug 22 12:59 PM
Hello experts,
I m not getting data in my internal table
if i_mseg[] is not initial.
select zzlcno zzlcdt
into i_ekpo from ekpo
where ebeln = '0020002943'.
for all entries in i_mseg
where ebeln = i_mseg-ebeln and
ebelp = i_mseg-ebelp.
append i_ekpo.
endselect.
endif.
Plz suggest where I wrong.
Ravi
‎2009 Aug 24 7:26 AM
Hello Ravi,
Please confirm if there is data in ekpo table.
Thanks,
Amit
‎2009 Aug 22 1:15 PM
Hello
Since we do not see the definitions of your itab's it is difficult (but not impossible) to answer.
Are the fields zzlcno zzlcdt appended to EKPO? What is the line type of I_EKPO.
Assuming that the two z-fields are appended to EKPO and I_EKPO has line type EKPO you may succeed with::
select zzlcno zzlcdt
into CORRESPONDING FIELDS OF i_ekpo from ekpo
* where ebeln = '0020002943'.
for all entries in i_mseg
where ebeln = i_mseg-ebeln and
ebelp = i_mseg-ebelp.
append i_ekpo.
endselect.
endif.
Regards
Uwe
‎2009 Aug 24 5:20 AM
Hello experts,
My table declaration part and i_mseg has data in it.
data: begin of i_ekpo occurs 0,
zzlcno like ekpo-zzlcno,
zzlcdt like ekpo-zzlcdt,
end of i_ekpo.
Ravi
‎2009 Aug 24 7:24 AM
Hi,
Firstly in the debugging mode check if you are getting entries in i_mseg table... whether it goes to that select queries or not....
Then from SE11 check in the ekpo table if there are any values for the fields you have mentioned in the select query...
Regards,
Siddarth
‎2009 Aug 22 1:19 PM
Hi,
Just try with the code given below... hope that helps you out....
also write a break-point statement just before the if statement and check in the debugging mode if it i_mseg table has some values or not...
if i_mseg[] is not initial.
select zzlcno zzlcdt
into i_ekpo from ekpo
for all entries in i_mseg
where ebeln = i_mseg-ebeln.
append i_ekpo.
endselect.
endif.OR
if i_mseg[] is not initial.
select zzlcno zzlcdt
into corresponding fields of i_ekpo from ekpo
for all entries in i_mseg
where ebeln = i_mseg-ebeln.
append i_ekpo.
endselect.
endif.Regards,
Siddarth
‎2009 Aug 22 4:28 PM
HI Ravi...Avoid Endselect and use Into table...
Paste your itab declaration part ...
‎2009 Aug 22 7:23 PM
1. avoid select endselect.
use..
select x y z from tt into TABLE i_ekpo where...2. check the structure declarations
3. keep a break point on the select statement and when execute. when debugger starts check values in i_mseg.
4.if values are there in i_mseg. take those values, goto se16->ekpo table. pass those i_mseg entries in to it and check data is available or not.
‎2009 Aug 24 7:26 AM
Hello Ravi,
Please confirm if there is data in ekpo table.
Thanks,
Amit
‎2009 Aug 24 7:28 AM
Hi,
1. Directly populate the itab using 'INTO TABLE' addition.
2. Check whether you have data in I_MSEG[].
3. Avoid using 'SELECT...ENDSELECT'.
4. Also pls check whether you have data in EKPO corresponding to I_MSEG condition.
Thanks and Regards
Pradipta K Mishra
‎2009 Aug 24 7:55 AM
Always check sy-subrc after a select. In case of update and delete, check sy-dbcnt, too. If you ask in SDn, post all necessary information.
‎2009 Aug 24 8:02 AM
hi try this
if i_mseg[] is not initial.
select zzlcno zzlcdt
into table i_ekpo from ekpo
where ebeln = '0020002943'.
for all entries in i_mseg
where ebeln = i_mseg-ebeln and
ebelp = i_mseg-ebelp.
endif.