09-22-2008 10:54 AM
HI.
I have created and activated user exit for enhancement : COZF0001 and COZF0002 from SMOD and CMOD.
But when I execute IW31, its not stoping at break point of
user exit.
please let me know if any other user exit or badi i can get
os SAVE of IW31.
Regards,
Tamseel Hashmi
09-22-2008 10:59 AM
Enhancement
IWO10012 Maintenance order: Priority handling on central header
Business Add-in
IWO_UI_USEFLEX BAdI for Calling Up an Alternative UI
09-22-2008 11:16 AM
Tamseel Hashmi,
It would help if you explain what you are trying to achieve...
PeteA
09-22-2008 11:50 AM
HI,
while creating order using IW31 i wan to validate services assigned to line item againsed a contacrt number.
"Operation" Tab : if line item is of type PMSE (service control key ). than
select item and click on "Genral" button. it will give you one poopup . here give "Agreement" thank click on ok..
new screen or service will appeare.
now i want to put validation that service entered in this table should belongs to Agreement.
Regards,
Tamseel Hashmi
09-22-2008 12:31 PM
Tamseel Hashmi,
Have a look [here|http://pjatkin.users.btopenworld.com/documents/PMCSUserExits.pdf] under the Material/External Services section
PeteA
09-22-2008 1:49 PM
09-24-2008 1:11 PM
Thanks to all for your comments.
I used BADI : IWO1_PREQ_BADI and user exit : EXIT_SAPLMLSP_031 for this.
System calls badi first and than it goes in to exit.
write following code in badi .
METHOD if_ex_iwo1_preq_badi~determine_date_for_service .
DATA : wa_afvgd TYPE afvgd ,
wa_caufvd TYPE caufvd.
BREAK-POINT.
wa_caufvd = is_caufvd.
wa_afvgd = is_afvgd.
IF NOT wa_afvgd-konnr IS INITIAL.
SET PARAMETER ID 'KTR' FIELD wa_afvgd-konnr.
SET PARAMETER ID 'BSP' FIELD wa_afvgd-KTPNR.
ELSE.
CLEAR: wa_afvgd-konnr,
wa_afvgd-KTPNR.
SET PARAMETER ID 'KTR' FIELD wa_afvgd-konnr.
SET PARAMETER ID 'BSP' FIELD wa_afvgd-KTPNR.
ENDIF.
ENDMETHOD.
than in user exit write :
DATA : v_konnr TYPE konnr,
v_ktpnr TYPE ktpnr.
DATA : BEGIN OF it_ekpo OCCURS 0,
ebeln TYPE ebeln ,
ebelp TYPE ebelp ,
packno TYPE packno,
END OF it_ekpo,
BEGIN OF it_esll1 OCCURS 0 ,
packno TYPE packno ,
srvpos TYPE asnum ,
sub_packno TYPE sub_packno,
END OF it_esll1,
BEGIN OF it_esll2 OCCURS 0 ,
packno TYPE packno ,
srvpos TYPE asnum ,
sub_packno TYPE sub_packno,
END OF it_esll2.
****BREAK-POINT.
IF sy-tcode EQ 'IW31' OR sy-tcode EQ 'IW32'.
Get the agreement number.
GET PARAMETER ID 'KTR' FIELD v_konnr.
GET PARAMETER ID 'BSP' FIELD v_ktpnr.
IF NOT v_konnr IS INITIAL.
Get pack no. from ekpo table
SELECT ebeln
ebelp
packno
INTO CORRESPONDING FIELDS OF TABLE it_ekpo
FROM ekpo
WHERE ebeln EQ v_konnr
AND ebelp EQ v_ktpnr.
IF sy-subrc EQ 0.
Get sub pack number from esll table
SELECT *
INTO CORRESPONDING FIELDS OF TABLE it_esll1
FROM ekpo
FOR ALL ENTRIES IN it_ekpo
WHERE packno EQ it_ekpo-packno.
IF sy-subrc EQ 0.
Get services for selected sub_pack number
SELECT *
INTO CORRESPONDING FIELDS OF TABLE it_esll2
FROM ekpo
FOR ALL ENTRIES IN it_esll1
WHERE packno EQ it_esll1-sub_packno.
ENDIF. " IF sy-subrc EQ 0.
ENDIF. " IF sy-subrc EQ 0.
Compare that entered service belongs to contract or not.
READ TABLE it_esll2 WITH KEY srvpos = srv_esll-srvpos.
IF sy-subrc NE 0.
MESSAGE e001(00) WITH 'Service item Line no' srv_esll-srvpos 'not included in contract'.
ENDIF.
ENDIF. " IF NOT v_konnr IS INITIAL.
ENDIF. " IF sy-tcode EQ 'IW31' OR sy-tcode EQ 'IW32'
Like this i have done this.
Regards,
Tamseel Hashmi