08-31-2011 7:22 AM
Dear SAP Gurus,
My requirement is as follows,
I need to put a check in BADI "IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM" based on KSCHL filed, It is available in the BADI(GET_CONDITIONS, SET_CONDITIONS). I am not able to get the values in internal table.
Please help,
Thanks & Regards,
pavan
08-31-2011 7:47 AM
Hi Pavan,
You have to check your code and get the item data using class. Then do your check points here. Please paste your code here.Have you seen sample code of that badi.
MESSAGE 'God' TYPE 'I'.
BREAK-POINT.
INCLUDE mm_messages_mac.
**
DATA: header TYPE mepoheader,
items TYPE purchase_order_items,
po_line TYPE mepoitem,
line_item TYPE purchase_order_item.
**
header = im_header->get_data( ).
items = im_header->get_items( ).
**
LOOP AT items INTO line_item where matnr = ekpo-matnr.
**
po_line = line_item-item->get_data( ).
**
"here, you must have all data, so, check that matnr is not repeated.
"after, with message 398(00) as example
mmpur_message 'E' '00' '398'
string1 string2 string3 string4.
**
ENDLOOP.
Can you check like this.
Regards,
Madhu.
Edited by: madhurao123 on Aug 31, 2011 12:21 PM
08-31-2011 7:47 AM
Hi Pavan,
You have to check your code and get the item data using class. Then do your check points here. Please paste your code here.Have you seen sample code of that badi.
MESSAGE 'God' TYPE 'I'.
BREAK-POINT.
INCLUDE mm_messages_mac.
**
DATA: header TYPE mepoheader,
items TYPE purchase_order_items,
po_line TYPE mepoitem,
line_item TYPE purchase_order_item.
**
header = im_header->get_data( ).
items = im_header->get_items( ).
**
LOOP AT items INTO line_item where matnr = ekpo-matnr.
**
po_line = line_item-item->get_data( ).
**
"here, you must have all data, so, check that matnr is not repeated.
"after, with message 398(00) as example
mmpur_message 'E' '00' '398'
string1 string2 string3 string4.
**
ENDLOOP.
Can you check like this.
Regards,
Madhu.
Edited by: madhurao123 on Aug 31, 2011 12:21 PM
08-31-2011 8:01 AM
Hi,
Thanks for the reply,
However,
I need to get condition records(KOMV),
Thanks & Regards,
Pavan.
08-31-2011 8:55 AM
Hello Pavan ,
Hi once you call the instance methode get_condition it returns you a export parameter MMPUR_TKOMV which is a type pool and contains TKOMV , TKOMK ,and TKOMP that is all you want .
Data : l_tkomv type mmpur_tkomv .
CALL METHOD im_item->get_conditions
IMPORTING
EX_CONDITIONS = l_tkomv. .
IM_TYPE is already there in process_item as import parameter refering to IF_PURCHASE_ORDER_ITEM_MM .
You will have everrthing in your l_tkomv and do what you want based on that .
Hope that solves your problem .
Thanks,
Anjaneya .
Edited by: Anjaneya Bhardwaj on Aug 31, 2011 9:55 AM
Edited by: Anjaneya Bhardwaj on Aug 31, 2011 9:56 AM
08-31-2011 10:59 AM
08-31-2011 11:49 AM
Hi,
Thanks for the reply, SOLVED....
Regards,
Pavan.