Ansicht
Dokumentation

W_PRICAT_IN_BADI_009 - BAdI: Add Sort Rules

W_PRICAT_IN_BADI_009 - BAdI: Add Sort Rules

BAL_S_LOG - Application Log: Log header data   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.
SAP E-Book

Implement this BAdI if you require additional sort criteria alongside the standard sorting method at item level. When you have implemented this BAdI, the "Sort" pushbutton appears in online processing automatically. You can use this pushbutton to select different sort rules in online processing. You must define your own sort rules. In your BAdI implementation, you can select one of these sort rules as your default rule. The system chooses this sorting method automatically when you enter the PRICAT online transaction.

The fields by which you want to sort must be located in the PRICAT items in the relevant working records.

The system sorts the PRICAT item table in accordance with the following fields and in the following sequence:

  • "GROUP" in ascending order
    Generic material, single material, or display block.
  • "SEQUENCE" in descending order
    '0','1' or '2': Generic material headers ('2') and master variant copy rows ('1') at the start of a block.
  • "GROUP4" in ascending order
    This field has to be filled in the BAdI method "GET_SORTFIELD" to affect the sorting method in a block.
  • "REFNR" in ascending order
    Takes account of EAN and date.
  • "LINETYP" in ascending order
    '13' for master data rows, '20' for original records and '30' for working rows so that this sequence will be followed when several rows are displayed.

In the standard system, the BAdI is not implemented and the online pushbutton "Sort" does not appear. The sort field GROUP4 is filled with the initial value. Bear in mind that you CANNOTchange the sort sequence specified here. By making the required entry in field GROUP4 for the various items, you can determine the sort result within the specified parameters.

Implement the BAdI methods GET_SORTRULES and GET_SORTFIELD.

In the method GET_SORTRULES, you name each of your sort rules and specify a rule as the "default" rule (see example implementation). For each sort rule, you must enter the required content of the field GROUP4 for the particular items in the BAdI method GET_SORTFIELD to attain the required sorting method in the groups. Bear in mind that the content of the field is always relevant for a block of identical EANs. In other words, a master data record, its original record, and the relevant working record are always assigned the same field content for the field GROUP4, so that they cannot affect this detailed structure.

Copy the example implementation if you want to sort by color, size, or secondary size.






Addresses (Business Address Services)   CPI1466 during Backup  
This documentation is copyright by SAP AG.

Length: 2772 Date: 20240523 Time: 152446     sap01-206 ( 66 ms )