Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

records fetch which not exist in both tables

hi all

i have 2 tables like zlease and zcust. the common field is zempno and i want to get the records which are no similar in both records eg:

records of both the tables

i_emp|zempno

********

VMX020|

3 |

1 |

10 |

10522 |

i_cust empno

**************

10522

3

vmx020

and i supposed to get 2 records like : 1 and 10.

i hav written the code but that doent give me just see my code pls

*****************************************************************************

loop at i_cust.

read table i_cust with key zempno = i_emp-zempno.

if not i_cust-zempno = i_emp-zempno.

move i_cust to itab.

append itab.

endif.

endloop.

loop at itab.

write : / itab-zempno, itab-zcustnumber, itab-zcustname, itab-zcustbd, itab-zno_chil.

endloop.

records of both the tables

i_emp|zempno

********

VMX020|

3 |

1 |

10 |

10522 |

i_cust empno

**************

10522

3

vmx020

and i supposed to get 2 records like : 1 and 10.

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question