Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Get BOM Component with BADI ME_PROCESS_PO_CUST

Former Member
0 Kudos

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

6 REPLIES 6

kesavadas_thekkillath
Active Contributor
0 Kudos

If you are looking for BOM components

You can use fm CSAP_MAT_BOM_READ

0 Kudos

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

0 Kudos

Hi,

Any Solution for this. Thanks in advance

0 Kudos

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..

0 Kudos

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.

Former Member
0 Kudos

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.