This code performs data manipulation on the tables `tcurf` and...

March 29, 2023 at 06:28 AM

IF gt_tcurf[] IS NOT INITIAL. SELECT * INTO TABLE gt_tcurf_del FROM tcurf WHERE ( fcurr IN lr_curr_i OR tcurr IN lr_curr_i ) AND ( fcurr NOT IN lr_curr_e AND tcurr NOT IN lr_curr_e ) . IF sy-subrc = 0. DELETE tcurf FROM TABLE gt_tcurf_del. ENDIF. WRITE |{ text-001 } 'TCURF': { lines( gt_tcurf_del ) }|. MODIFY tcurf FROM TABLE gt_tcurf. WRITE |{ text-002 } 'TCURF': { lines( gt_tcurf ) }|. ENDIF. IF lr_curr_i IS NOT INITIAL. DELETE gt_tcurs WHERE fcurr NOT IN lr_curr_i AND tcurr NOT IN lr_curr_i. ENDIF. IF lr_curr_e IS NOT INITIAL. DELETE gt_tcurs WHERE fcurr IN lr_curr_e OR tcurr IN lr_curr_e. ENDIF.

This code performs data manipulation on the tables tcurf and gt_tcurs.

For tcurf:

  • If the internal table gt_tcurf[] is not empty, select all records from tcurf where either the fcurr or tcurr fields match any values in the lr_curr_i internal table AND do not match any values in the lr_curr_e internal table. Store the selected records in the internal table gt_tcurf_del.
  • If any records were selected (indicated by sy-subrc = 0), delete them from tcurf.
  • Write a message with the number of records in gt_tcurf_del.
  • Modify tcurf by adding any records in the internal table gt_tcurf.

For gt_tcurs:

  • If the internal table lr_curr_i is not empty, delete any records from gt_tcurs where the fcurr and tcurr fields do not match any values in lr_curr_i.
  • If the internal table lr_curr_e is not empty, delete any records from gt_tcurs where the fcurr field matches any value in lr_curr_e OR the tcurr field matches any value in lr_curr_e.
Generate your own explanations
Download our vscode extension
Read other generated explanations

Built by @thebuilderjr
Sponsored by beam analytics
Read our terms and privacy policy
Forked from openai-quickstart-node