‎2009 Dec 03 8:34 PM
Hi,
I am getting data into final_itab but nothing is coming into IT_TRACT_DOCUMENT. May I know why?
This my code,
loop at final_itab.
select * from TRACT_DOCUMENT into corresponding fields of table IT_TRACT_DOCUMENT
FOR ALL ENTRIES IN FINAL_ITAB
where ACREVERSALDATE = FINAL_ITAB-POSTINGDATE
WHERE TR_ACC_CODE = FINAL_ITAB-COMP_CODE
and DEAL_NUMBER = FINAL_ITAB-TRANSACTION.
if not it_TRACT_DOCUMENT[] is initial.
select * from TRACT_ACCITEM into corresponding fields of table IT_TRACT_ACCITEM
FOR ALL ENTRIES IN it_TRACT_DOCUMENT
where DOCUMENT_GUID = IT_TRACT_DOCUMENT-OS_GUID.
endloop.
Moderator message - Moved to the correct forum
Edited by: Rob Burbank on Dec 3, 2009 4:09 PM
‎2009 Dec 04 4:59 AM
if FINAL_ITAB[] is not initial.
sort FINAL_ITAB by COMP_CODE TRANSACTION.
select * from TRACT_DOCUMENT into
corresponding fields of table IT_TRACT_DOCUMENT
FOR ALL ENTRIES IN FINAL_ITAB
WHERE TR_ACC_CODE = FINAL_ITAB-COMP_CODE
and DEAL_NUMBER = FINAL_ITAB-TRANSACTION.
if it_TRACT_DOCUMENT[] is not initial.
select * from TRACT_ACCITEM into
corresponding fields of table IT_TRACT_ACCITEM
FOR ALL ENTRIES IN it_TRACT_DOCUMENT
where DOCUMENT_GUID = IT_TRACT_DOCUMENT-OS_GUID.
endif.
endif.
‎2009 Dec 03 9:00 PM
Well, I don't know what's in FINAL_ITAB, but my first guess would be that the values are initial. Are these fields actually populated in FINAL_ITAB, and if so, can you pick a row and look into your second table with SE11 and find that data?
‎2009 Dec 03 9:08 PM
Thank you so much for your reply.
In debug I can see values for FINAL_ITAB-COMP_CODE = 'AADO'
and FINAL_ITAB-TRANSACTION = 10000008 like that..but nothing is coming to IT_TRACT_Document....that's the issue.
‎2009 Dec 03 9:23 PM
One question, why are you using LOOP AT FINAL_ITAB when you are using for all entries.
second, when the the table FINAL_ITAB is not initial before using for all entries.
third, check the DB table actually has data that corresponds to the entries in FINAL_ITAB.
Regards
Prasenjit
‎2009 Dec 04 12:07 AM
Hi Tanvi,
Loop - Endloop statement not required.Please check your logic again.
As per my understanding , if table is initial then your select statements will not be executed .
You should check this table for initial before use of for all entries.
Hope you understand it.
‎2009 Dec 04 2:38 AM
Hi Thanvi,
make sure you have matching entries in database table TRACT_DOCUMENT. Also make sure that the data elements are the same for the fields and that the formatiing (i.e. leading zeros) is correct.
Regards,
Clemens
‎2009 Dec 04 4:59 AM
if FINAL_ITAB[] is not initial.
sort FINAL_ITAB by COMP_CODE TRANSACTION.
select * from TRACT_DOCUMENT into
corresponding fields of table IT_TRACT_DOCUMENT
FOR ALL ENTRIES IN FINAL_ITAB
WHERE TR_ACC_CODE = FINAL_ITAB-COMP_CODE
and DEAL_NUMBER = FINAL_ITAB-TRANSACTION.
if it_TRACT_DOCUMENT[] is not initial.
select * from TRACT_ACCITEM into
corresponding fields of table IT_TRACT_ACCITEM
FOR ALL ENTRIES IN it_TRACT_DOCUMENT
where DOCUMENT_GUID = IT_TRACT_DOCUMENT-OS_GUID.
endif.
endif.