2009 Aug 21 10:59 AM
Hello Colleagues,
I have implemented a search help exit for restricting values of a domain.The selection method used in search help is DD07T.
The values are getting restricted properly.
Now,I need to restrict the values based on some condition(screen or view name) which uses this search help.I see the sy-tcode returns sm30 and sy-dynnr returns 0600.
When the search help exit is called the sy-dynnr changes to the screen 0600 of the program SAPMSHLP. But I want to check based on the sy-dynnr of the calling screen/view.
I have written the following code but it doesnt work since the sy-dynnr changes to 0600 as soon as the search help exit gets called.
TYPES: my_type TYPE dd07t.
DATA: BEGIN OF ls_record.
INCLUDE STRUCTURE seahlpres.
DATA: END OF ls_record.
FIELD-SYMBOLS: <fs> TYPE my_type.
CHECK callcontrol-step = 'DISP'.
IF sy-dynnr = '0800'.
LOOP AT record_tab ASSIGNING <fs> CASTING.
IF <fs>-domvalue_l <= '10'.
DELETE record_tab INDEX sy-tabix.
ENDIF.
ENDLOOP.
ELSEIF sy-dynnr = '0400'.
LOOP AT record_tab ASSIGNING <fs> CASTING.
IF <fs>-domvalue_l > '10'.
DELETE record_tab INDEX sy-tabix.
ENDIF.
ENDLOOP.
ENDIF.
Could anyone tell me how can i check. Viewname and screen number is the only way. But in search help exit i dont get the correct screen number or transaction code.
Thanks,
Priyanka
Hello Colleagues,
I have implemented a search help exit for restricting values of a domain.The selection method used in search help is DD07T.
The values are getting restricted properly.
Now,I need to restrict the values based on some condition(screen or view name) which uses this search help.I see the sy-tcode returns sm30 and sy-dynnr returns 0600.
When the search help exit is called the sy-dynnr changes to the screen 0600 of the program SAPMSHLP. But I want to check based on the sy-dynnr of the calling screen/view.
I have written the following code but it doesnt work since the sy-dynnr changes to 0600 as soon as the search help exit gets called.
TYPES: my_type TYPE dd07t.
DATA: BEGIN OF ls_record.
INCLUDE STRUCTURE seahlpres.
DATA: END OF ls_record.
FIELD-SYMBOLS: <fs> TYPE my_type.
CHECK callcontrol-step = 'DISP'.
IF sy-dynnr = '0800'.
LOOP AT record_tab ASSIGNING <fs> CASTING.
IF <fs>-domvalue_l <= '10'.
DELETE record_tab INDEX sy-tabix.
ENDIF.
ENDLOOP.
ELSEIF sy-dynnr = '0400'.
LOOP AT record_tab ASSIGNING <fs> CASTING.
IF <fs>-domvalue_l > '10'.
DELETE record_tab INDEX sy-tabix.
ENDIF.
ENDLOOP.
ENDIF.
Could anyone tell me how can i check. Viewname and screen number is the only way. But in search help exit i dont get the correct screen number or transaction code.
Thanks,
Priyanka
2009 Aug 21 11:16 AM
null
Edited by: Nikhil Poojari on Aug 21, 2009 12:17 PM
Edited by: Nikhil Poojari on Aug 21, 2009 12:17 PM
2009 Aug 21 11:37 AM
Hi Nikhil,
No I cannot hard code the screen number because different screens will be calling the same search help exit. Based the on screen which is calling, I want to restrict the values.
Regards,
Priyanka
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |