‎2010 Jan 18 4:55 AM
Hi,
i have to Add restriction in search functionality of some Z transactions , a restriction should
be added that prevents showing inactive SAP numbers.
This means a restriction on end date 31.12.9999 and on position
99999999. i need to attach this functionality to screen field perner of a z transaction
currently standard collective search help "PREM" is attached to it and Help exit FM "HRMC_PREM_EXIT"
i don't know how to use " SHLP_TAB " and "RECORD_TAB"
Fetching data from Infotype0 with restrictiion on date field and restricting INACTIVE numbers
free wt_pa0000.
SELECT pernr
endda
stat2
FROM pa0000
INTO TABLE wt_pa0000
WHERE endda LE c_31129999
AND stat2 NE c_1.
IF sy-subrc EQ 0.
FREE wt_pa0001.
Fetching data from Infotype1 with restriction on position
SELECT pernr
plans
FROM pa0001
INTO TABLE wt_pa0001
FOR ALL ENTRIES IN wt_pa0000
WHERE pernr EQ wt_pa0000-pernr
AND plans LT c_99999999 .
ENDIF.
*Following is the Logic to combine the data of 2 internal Tables
CLEAR wa_pa0000 .
LOOP AT wt_pa0000 INTO wa_pa0000 .
MOVE : wa_pa0000-pernr TO wa_combine-pernr ,
wa_pa0000-endda TO wa_combine-endda ,
wa_pa0000-stat2 TO wa_combine-stat2 .
LOOP AT wt_pa0001 INTO wa_pa0001 WHERE pernr = wa_pa0000-pernr .
MOVE : wa_pa0001-plans TO wa_combine-plans .
APPEND wa_combine to wt_combine .
ENDLOOP . " LOOP AT wt_pa0001
ENDLOOP. " LOOP AT wt_pa0000
‎2010 Jan 18 5:28 AM
Hi Gaurav,
You can refer to the following link for ur requirement
Thanks,
Manish