‎2006 Jun 08 3:38 PM
Hello all i have an internal table. If i am not looping it it is doign everything fine. However if i am looping it i dont see any results.
I guess it a small error but unable to figure it.
here is the code without loop.
data : i_output_details like ZSD_INQUIRY_OUTPUT_DETAILS occurs 0
with header line.
data : i_errors like ZSD_INQUIRY_ERRORS occurs 0 with header line.
*Output Results
i_output_details-CHARGE_TYPE = ' '.
i_errors-ERROR_MESSAGE = 'ERROR'.
if i_output_details-CHARGE_TYPE = ' '.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
TITEL = i_errors-ERROR_MESSAGE
TXT1 = 'error'
TXT2 = 'error'
TXT3 = ' '
TXT4 = ' '
.
else.
write 😕 'hello'.
endif.
HERE IS THE CODE WITH PROBLEM AFTER I HAVE LOOP.... ENDLOOP.
data : i_output_details like ZSD_INQUIRY_OUTPUT_DETAILS occurs 0
with header line.
data : i_errors like ZSD_INQUIRY_ERRORS occurs 0 with header line.
*Output Results
i_output_details-CHARGE_TYPE = ' '.
i_errors-ERROR_MESSAGE = 'ERROR'.
Loop at i_output_details.
if i_output_details-CHARGE_TYPE = ' '.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
TITEL = i_errors-ERROR_MESSAGE
TXT1 = 'error'
TXT2 = 'error'
TXT3 = ' '
TXT4 = ' '
.
else.
write 😕 'hello'.
endif.
endloop.
Thanks ,
Shejal.
‎2006 Jun 08 3:44 PM
Hi,
Check if there is data in the table.
or
if i_output_details-CHARGE_TYPE = ' '
do it like this
if i_output_details-CHARGE_TYPE is initial.
‎2006 Jun 08 3:41 PM
hi shejal,
u did not write <b>append i_output_details</b> and u are looping onto the table.
<b>i_output_details-CHARGE_TYPE = ' '.
append i_output_details.</b>hope this helps,
do reward if it helps,
priya.
‎2006 Jun 08 3:41 PM
‎2006 Jun 08 3:43 PM
hi,
append i_output_details. is missing after i_output_details-CHARGE_TYPE = ' '...
i.e, i_output_details-CHARGE_TYPE = ' '
append i_output_details.
by this data is not getting populated in to your internal table.
Regards,
santosh
‎2006 Jun 08 3:44 PM
Hi,
Check if there is data in the table.
or
if i_output_details-CHARGE_TYPE = ' '
do it like this
if i_output_details-CHARGE_TYPE is initial.
‎2006 Jun 08 3:46 PM
‎2006 Jun 08 4:05 PM
‎2006 Jun 08 8:30 PM
Hi Priya,
I did check your reply and it helped. My problem is solved. Thanks Priya for your reply.
Shejal.
‎2006 Jun 08 3:47 PM
hi,
you need to use <b>append i_output_details.
clear i_output_details.</b>
regards
vijay