Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ****************************************************************
- * COMPARE TWO TABLES
- * TWO TABLE COMPARISON
- * LOGIC: 1 - Loop over itab gt_ebill_ca
- * 2 - Read itab gt_fkkvkp with key vkont = gt_ebill-vkont
- * 3 - At this point we have read one line from each table, for the same vkont
- * 4 - Control block
- * 5 - MOVE-CORRESPONDING FROM TABLE A TO OUTPUT WORK AREA (IT HAS SAME NAME AS TABLE)
- * 6 - MOVE-CORRESPONDING FROM TABLE B TO OUTPUT WORK AREA
- * 7 - INCREMENT MISMATCH COUNTER.
- * 8 - APPEND CREATED WORK AREA TO OUTPUT.
- LOOP AT gt_ebill_ca.
- " Reads a table at specified key
- READ TABLE gt_fkkvkp WITH KEY vkont = gt_ebill_ca-vkont.
- IF ( gt_ebill_ca-EMAIL_NOTIFY <> gt_fkkvkp-EMAIL_FIS )
- OR ( gt_ebill_ca-SMS_NOTIFY <> gt_fkkvkp-SMSIN_FIS )
- OR ( gt_ebill_ca-PAPER_NOTIFY <> gt_fkkvkp-PBILL_FIS ).
- " Increment counter
- ADD 1 to mismatch.
- " populate work areas
- MOVE-CORRESPONDING gt_ebill_ca TO gt_ebill_out.
- MOVE-CORRESPONDING gt_fkkvkp TO gt_ebill_out.
- MOVE gt_fkkvkp-MONTHLY TO gt_ebill_out-FKMONTHLY.
- "MOVE gt_ebill_ca-vkont TO gt_ebill_out-VKONT.
- " append to the out_table
- APPEND gt_ebill_out.
- ENDIF.
- ENDLOOP.
- ********************************************************************
Add Comment
Please, Sign In to add comment