2007 Jun 20 5:20 AM
Hi,
I have two fields in the UI screen..Plant and Work Center.
Based on whatever the user enters in the Plant field, the search help for work center should come up. i.e, if the user enters the Plant as 0001, the search help for work center should show up the work center values only for Plant 0001.
Dialog box restriction wont help because the user needs to enter the plant again.
Do I need to write a search help exit for this?
Could you send me some sample code for search help exits?
Regards,
Srilakshmi B
2007 Jun 20 5:24 AM
Use the FM : CR_WORKSTATION_READ_ROUTING
* Validate Work Centre
if not ZES_PO_ITEM-ST_ARBPL is initial.
clear : T399X.
select single * from T399X where WERKS = ZES_PO_ITEM-ST_SWERK
and AUART = ZES_PO_ITEM-ST_AUART.
if SY-SUBRC = 0.
call function 'CR_WORKSTATION_READ_ROUTING'
exporting
ARBPL = ZES_PO_ITEM-ST_ARBPL
DATE = SY-DATUM
PLNTY = T399X-PLNTY
WERKS = ZES_PO_ITEM-ST_SWERK."L_SWERK.
if SY-SUBRC <> 0.
message E138(ZSM) with 'Work Centre not maintained for plant' ZES_PO_ITEM-ST_IWERK.
endif.
endif.
endif.Regards
Gopi
Use the FM : CR_WORKSTATION_READ_ROUTING
* Validate Work Centre
if not ZES_PO_ITEM-ST_ARBPL is initial.
clear : T399X.
select single * from T399X where WERKS = ZES_PO_ITEM-ST_SWERK
and AUART = ZES_PO_ITEM-ST_AUART.
if SY-SUBRC = 0.
call function 'CR_WORKSTATION_READ_ROUTING'
exporting
ARBPL = ZES_PO_ITEM-ST_ARBPL
DATE = SY-DATUM
PLNTY = T399X-PLNTY
WERKS = ZES_PO_ITEM-ST_SWERK."L_SWERK.
if SY-SUBRC <> 0.
message E138(ZSM) with 'Work Centre not maintained for plant' ZES_PO_ITEM-ST_IWERK.
endif.
endif.
endif.Regards
Gopi
2007 Jun 20 5:24 AM
Use the FM : CR_WORKSTATION_READ_ROUTING
* Validate Work Centre
if not ZES_PO_ITEM-ST_ARBPL is initial.
clear : T399X.
select single * from T399X where WERKS = ZES_PO_ITEM-ST_SWERK
and AUART = ZES_PO_ITEM-ST_AUART.
if SY-SUBRC = 0.
call function 'CR_WORKSTATION_READ_ROUTING'
exporting
ARBPL = ZES_PO_ITEM-ST_ARBPL
DATE = SY-DATUM
PLNTY = T399X-PLNTY
WERKS = ZES_PO_ITEM-ST_SWERK."L_SWERK.
if SY-SUBRC <> 0.
message E138(ZSM) with 'Work Centre not maintained for plant' ZES_PO_ITEM-ST_IWERK.
endif.
endif.
endif.Regards
Gopi
2007 Jun 20 5:24 AM
Hi
see this
See the links:
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm
https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=2176485
https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=3601619
pls go through this for search help creation
http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
Search Help Exits:
Reward points for useful Answers
Regards
Anji
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |