cancel
Showing results for 
Search instead for 
Did you mean: 

Sorting on Z fields not working in CTM

0 Kudos

Hi

We added a Z field (ZDATE) to the sales order items in APO. The Z field is filled in APO and available in table /SAPAPO/SDFIELD.

We use EXIT_/SAPAPO/SAPLBOP_SORT_020 to sort on this Z field in the BOP, which is working fine. However, we use CTM and we would like to sort also on this Z field during demand prioritization. We created a sort profile and defined in this profile to sort ascending on this Z field.

According to SAP note 450794, we added the Z field in structure /sapapo/ctm_demand. However, when we run CTM, the sales orders are not sorted on this Z field. Do you have any ideas how to solve this?

Example:

Sales orders      ZDATE

123456                02.04.2012

123457                 04.04.2012

When we run CTM no sorting takes place on ZDATE. First sales order 123457 has highest priority, then sales order 123456  . But in reality sales order 123456   should come first. No sorting takes place on ZDATE.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Peter,

  We are looking to do similar enhancement.

  where in we have GITime00002 field in /SAPAPO/SDFIELD. Planning to sort based on GI Time Field    in CTM prioritization user exist EXIT_/SAPAPO/SAPLBOP_SORT_020.

But struggling to get the order / line item information or POSID. CT_LIST does not hold order information. only material id & location id exists.

It would be great if you provide me - how to pulled order from user exists.


Thanks

Sadeeesh

Former Member
0 Kudos

Hi


EXIT_/SAPAPO/SAPLBOP_SORT_020 to sort sales order items?

I have to sort sales order by sales order input time(hhmmss),so I think it has to get sales order infor in EXIt(APO),and then use get sales order infor to get input time(hhmmss) from R3.

So  could you tell me how to get sales order ID or No when we use
EXIT_/SAPAPO/SAPLBOP_SORT_020?

Thank you so much.

Ellen

rajkj
Active Contributor
0 Kudos

Hi Peter,

Please refer the user exit's function module EXIT_/SAPAPO/SAPLBOP_SORT_020 documentation (t.code SE37, select the tables tab and hit on the last column 'long text'). Per SAP's documentation, for the sort in CTM, this function module is called several times, once per criterion and once at the end of the sort.

If you restrict the function module execution to gATP's BOP and block it for CTM in your ABAP code, CTM sorting will follow the standard functionality. You may use the IF_SORTFIELD for controlled execution of this user exit.

Thanks,
Rajesh