2006 Apr 27 9:15 AM
Hi all,
Im curently trying to update PO price with my own calculation's price via ME_PROCESS_PO_CUST , method set_conditions .
It ends up making the PO's loops endlessly, any advice? or is there anything that i missed?
2006 Apr 27 9:22 AM
Hi,
where is that method set_conditions, it is not in the BADI. from where you are calling that method, is it your own method.
Regards
vijay
Hi all,
Im curently trying to update PO price with my own calculation's price via ME_PROCESS_PO_CUST , method set_conditions .
It ends up making the PO's loops endlessly, any advice? or is there anything that i missed?
2006 Apr 27 9:22 AM
Hi,
where is that method set_conditions, it is not in the BADI. from where you are calling that method, is it your own method.
Regards
vijay
2006 Apr 27 9:26 AM
Hi Vijay,
its in class IF_PURCHASE_ORDER_ITEM_MM
the path is: from se18-PROCESS_ITEM-double click on associated type IF_PURCHASE_ORDER_ITEM_MM then u can see set_conditions
2006 Apr 27 9:31 AM
Ester,
can you please post the associated code that you have written for this instance method .. ?
Cheers
Nishanth
2006 Apr 27 9:38 AM
2006 Apr 27 9:41 AM
Hi Nisanth,
i have put the breakpoint at set_conditions and system keeps calling the method again n again
2006 Apr 27 9:51 AM
Ester,
Seems like you have to do some debugging here.Once the break-point reaches the call method statement check for the contents of tcond.There is no visible problem here except for the data being passed.So try this one and hope u find something useful.
Cheers
Nishanth
2006 Apr 27 9:56 AM
Hi all,
I have debugged the method, and it stays still at item '10' , that's the particular item im changing.
If i put extra coding :
leave screen.
the looping will quit set_conditions and the price updated
2006 Apr 27 10:02 AM
Hi all,
i have solved the problem.
here's the coding
LOOP AT tcond INTO vcond.
IF vcond-kschl = 'PB00' OR vcond-kschl = 'PBXX'
and vcond-kbetr ne '9000'.
vcond-kbetr = '9000'.
MODIFY tcond FROM vcond TRANSPORTING kbetr.
CALL METHOD im_item->set_conditions
EXPORTING
im_conditions = tcond
.
ENDIF.
ENDLOOP.
so upon getting the correct price, it wont do the pricing update.
2006 Apr 27 11:17 AM
Ester,
Nice to see that you solved the problem.Please reward helpful answers and close this thread.
Cheers
Nishanth
2006 Apr 27 9:24 AM
Could you please post the code of the implementation where u are updating the PO price.
2006 Apr 27 9:29 AM
Hi Sharath: this is the coding
METHOD if_ex_me_process_po_cust~process_item .
DATA: ls_mepoitem TYPE mepoitem,
ls_customer TYPE mepo_badi_exampl,
ls_tbsg TYPE tbsg.
DATA: tcond TYPE mmpur_tkomv,
vcond LIKE LINE OF tcond.
INCLUDE mm_messages_mac. "useful macros for message handling
----
here we check customers data
----
ls_mepoitem = im_item->get_data( ).
IF ls_mepoitem-loekz EQ 'D'.
ENDIF.
CALL METHOD im_item->get_conditions
IMPORTING
ex_conditions = tcond.
LOOP AT tcond INTO vcond.
IF vcond-kschl = 'PB00' OR vcond-kschl = 'PBXX'.
vcond-kbetr = '9000'.
MODIFY tcond FROM vcond TRANSPORTING kbetr.
ENDIF.
ENDLOOP.
CALL METHOD im_item->set_conditions
EXPORTING
im_conditions = tcond
.
ENDMETHOD.
when i try to change the po , it stops endlessly at set_conditions
2006 Apr 27 9:37 AM
Ester,
Please put a break-point at the call statement.This is just to ensure that the problem is indeed with the call to the method set_conditions and not because of the preceeding LOOP .. ENDLOOP before it.
Cheers
Nishanth
2006 Apr 27 9:26 AM
Ester,
Please check the documentation of the BADI ME_PROCESS_PO_CUST.There is no method by the name set_conditions in the BADI.If you are coding inside a method and calling your own method then please check the code that you have written.As far as my knowledge goes the PO pricing part definitely does not end in any endless loop.Check your code or maybe provide a more descriptive definition of ur problem so that we can help.
Cheers
Nishanth
2006 Apr 27 9:44 AM
Can you check the number of entries VCOND each time the break-point is reached. Is it increasing by any chance?