07-23-2007 2:31 PM
Hi All,
I want to implement BADI ME_PROCESS_PO_CUST for the PO line item net pr.
I created a implementation of this BADI and used the get method and set method,but the PO is not effecting with this code.
Did you implemented this BADI..
Please help me out on this.
Thanks,
Praveen
07-23-2007 2:33 PM
Hi,
Probably u missed to activate the current implementation and deactivate previous implementation as only one implementation is active at a time.
Pls reward points if useful.
Regards,
Ameet
07-23-2007 2:33 PM
Hi,
Probably u missed to activate the current implementation and deactivate previous implementation as only one implementation is active at a time.
Pls reward points if useful.
Regards,
Ameet
07-23-2007 2:33 PM
Hi,
put a break-point in your coding.. u will came to know wheter ur coding is getting callled or not.....
in SE19 you can chane implementation..
regards,
shardul shah
07-23-2007 2:34 PM
Hello,
See the sample code for this BADI
Use the POST method for changing some data and see
BAdI Name: ZCHECK_PO_LINE_ITEM (Implementation name) PO Account assignment
Definition Name: ME_PROCESS_PO_CUST
Interface Name : IF_EX_ME_PROCESS_PO_CUST
Implementing Class: ZCL_IM_BADIN_ACCOUNT_ASSGN
Method : PROCESS_HEADER
************************************************************************
METHOD if_ex_me_process_po_cust~process_header .
DATA : re_data TYPE mepoheader.
*get the item data
CALL METHOD im_header->get_data
RECEIVING
re_data = re_data.
re_header = re_data.
IF ( re_data-bsart NE 'ZOC' AND re_data-bsart NE 'ZPC' ).
IF ( re_data-bsart <> 'ZIC' AND re_data-bsart <> 'UB' ).
IF re_data-bukrs NE '1001'.
MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'Use only Sipchem Company'
'Code for External Procurement'.
ENDIF.
ENDIF.
ENDIF.
ENDMETHOD.
************************************************************************
Method : PROCESS_ITEM
************************************************************************
METHOD if_ex_me_process_po_cust~process_item .
DATA: v_menge TYPE bamng, " PR Quantity
v_statu. " PR Status
DATA : re_data TYPE mepoitem,
re_data1 TYPE mepoaccounting,
re_accountings TYPE purchase_order_accountings ,
header TYPE purchase_order_accounting.
*get the item data
CALL METHOD im_item->get_data
RECEIVING
re_data = re_data.
IF ( re_header-bsart NE 'ZOC' AND re_header-bsart NE 'ZPC' ).
IF re_header-bsart EQ 'ZRL'.
IF re_data-konnr EQ space.
MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'You cant create a Release order'
'without a reference to Outline Agreeement'.
ENDIF.
ENDIF.
IF ( re_data-banfn EQ space AND re_data-anfnr EQ space ).
MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'You can create a Purchase order'
'only with reference to a PR or RFQ'.
ENDIF.
IF re_data-knttp NE 'K' AND re_data-pstyp NE '9' .
IF syst-cprog EQ 'RM_MEPO_GUI'.
IF re_data-uebto IS NOT INITIAL OR
re_data-uebtk IS NOT INITIAL OR
re_data-untto IS NOT INITIAL.
MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'You cant change delivery settings'.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDMETHOD.
Reward points for useful Answers
Regards
Deepu.K
07-23-2007 3:09 PM
Hi Deepu,
Thanks for your reply.
I used this BADI but no luck, instead I want to try with another BADI ME_PO_PRICING_CUST.
In this BADI I want to use PROCESS_KOMP.
Thanks
07-23-2007 2:36 PM