12-10-2009 3:58 AM
Hi all,
I have one requirement of enhancement in which I need to check Components of a line item in subcontracting PO with respect to one Z table data.
For that I am using Badi ME_PROCESS_PO_CUST and in that I am using CHECK method for my coding.How at runtime I can fetch the Component data through a method so that I can put my desired check?
Is there any method available which can get this data?
Regards,
Sunny
12-10-2009 6:06 AM
If you are looking for BOM components
You can use fm CSAP_MAT_BOM_READ
12-10-2009 6:16 AM
Hi,
This will fetch the data from bom but i want data from screen itself.If user has changed the component and yet not saved, with this it will fetch old data not the refreshed one.
Regards,
Sunny
06-12-2010 6:21 PM
06-13-2010 9:02 AM
Sunny,
If you want to process the screen data changed, check if thats an header or item data then accordingly use the methods PROCESS_HEADER or PROCESS_ITEM where u can do the checks requried for the inputs .
Regards..
06-13-2010 12:40 PM
Hi Shakeel,
The PROCESS_ITEM contain only the PO line items but not the BOM components in Subcontrating PO.
Any Solutions for this. Fast reply higly appreciated. Thanks.
03-20-2013 9:12 AM
It is possible. The BOM compoenent data is present at schedule lines level
Go to Post method.
* Get the PO document Items
lit_items = im_header->get_items( ).
LOOP AT lit_items INTO lwa_items.
For each line item,
*" Get schedule lines
lit_schedule = lwa_items-item->get_schedules( ). " this mtd is at item level
For each schedule line there will be BOM version
LOOP AT lit_schedule INTO lwa_schedule.
*" Get BOM data
CALL METHOD
lwa_schedule-schedule->get_bom ( IMPORTING et_bom = lit_bom ).
ENDLOOP.
ENDLOOP.