Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

search help modiification

Former Member
0 Likes
355

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

1 REPLY 1
Read only

manish_gupta32
Product and Topic Expert
Product and Topic Expert
0 Likes
309

Hi Gaurav,

You can refer to the following link for ur requirement

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/daeda0d7-0701-0010-8caa-edc98338...

Thanks,

Manish