cancel
Showing results for 
Search instead for 
Did you mean: 

Production Order Component Sorting Options

Former Member
0 Kudos

Hi, We are creating a Shop Floor Production Order Packet Print which needs to contain the components of the BOM (Including Phantom Materials)

When Printing the BOM components on the report we want it to be sorted in such a way that it maintain the BOM level integrity.

If I display a Production order (CO03) and display the Component Overview I have a selection box where I can choose from different sort options.

Sort option ST_BOM will sort the component list in the order I wish to use.  (See attachment) Is there a function module or some way in configuration to determine the sort logic being used for this sort?  I have tried looking in RESB table to see if I can recreate the logic but it seems as though a number of different fields are involved.  Since ST_BOM already does the work for me I was hoping to reproduce it's logic in my report.

Any ideas.

Accepted Solutions (1)

Accepted Solutions (1)

sjeevan
Active Contributor

Check out the function module : CO_FS_SORT_COMPONENT_LIKE_BOM, from the note 142902.

Former Member
0 Kudos

Hi Jeevan,  Thanks for your reply.  I took a quick look at the function module CO_FS_SORT_COMPONENT_LIKE_BOM.  When trying to test it, there does not appear to be a place to pass any parameters to preview the results.  Any ideas?

sjeevan
Active Contributor
0 Kudos

You transfer your reports internal table data to the function module through SORT_TAB which will sort it and return the sorted output in the same table.

DATA: i_sort type table of RESBK with header line.

...

" transfer your own report's internal table contents to i_sort using statement such as

move-corresponding

...

CALL FUNCTION 'CO_FS_SORT_COMPONENT_LIKE_BOM' "

  TABLES

  sort_tab = i_sort.

...

" transfer i_sort contents back to your reports internal table.

... .

Answers (1)

Answers (1)

kiran_kumar179
Active Contributor
0 Kudos

Hello Adam,

Did you check CS_BOM_EXPL_MAT_V2 and CSAP_MAT_BOM_READ either of one should have sorting logic.

Br

KK