10-09-2008 2:58 PM
Hi Experts,
i am developing outbound interface in HR module. in that i got stckup.
i ve Ztable like YSHR_NRIC there are some ICNUM and in my code every PERNR which am reading
through GET pernr. i want to compare my current Pernr(ICNUM) with YSHR_NRIC table ICNUM, if my
curreny ICNUM is there in my Ztable, then i want Bypass the pernr.
if not there in Ztable then i want to INSERT my Current Pernr-icnum into Ztable...
how can i procede in this ...i need logic...
Thanks in advance...
sudeer.
10-09-2008 3:09 PM
Hi,
GET PERNR.
READ TABLE yshr_nric WITH KEY icnum = pernr-icnum.
if sy-subrc = 0.
"it is there, then bypass
REJECT.
else.
"is not there, then insert
yshr_nric-icnum = pernr-icnum.
INSERT yshr_nric INTO TABLE yshr_nric.
endif.
Regards
Marcin
10-09-2008 3:09 PM
Hi,
GET PERNR.
READ TABLE yshr_nric WITH KEY icnum = pernr-icnum.
if sy-subrc = 0.
"it is there, then bypass
REJECT.
else.
"is not there, then insert
yshr_nric-icnum = pernr-icnum.
INSERT yshr_nric INTO TABLE yshr_nric.
endif.
Regards
Marcin
10-09-2008 3:28 PM
Hi Marcin,
thank you verymuch for ur replay. and here i have doubt.
i.e suppose in my Ztable i ve 10 (ICNUM) records, if i use Read statement will it be compare with all 10 recors r not?
bcoz in my case i should compare with all 10 (ICNUM)records with current ICNUM. then it will be inserted into Ztable...
Thanks & Regards,
sudeer.
10-09-2008 3:36 PM
Hi sudeer,
Yes it will check all 10 records against your ICNUM, so you will be sure wheter the entry is inside or not.
Regards
Marcin