Skip to Content

Automatic Settlement Rule creation for WBS in Maintenance order

Hi Experts ,

We are adding WBS in other Equipment and for the other equipment add Cost center ...in the settlement profile add the cost center Default object type ...my client need automatic settlement rule for WBS if equipment assigned to WBS..Is there a way to do that by standard or by enhancement

Help is highly appreciated.

Best regards

Sasko

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    May 02, 2017 at 02:55 PM

    Hi!

    Try to use construction like this:

    DATA: srules    TYPE srules_ext OCCURS 0.
    DATA: srules_wa TYPE srules_ext.
    
    
      CALL FUNCTION 'K_SRULE_CREATE'
        EXPORTING
          i_objnr                   = caufvd_imp-objnr
       EXCEPTIONS
         rule_already_exists       = 1
         OTHERS                    = 2.
    
    
        srules_wa-settl_type = 'FUL'.
        srules_wa-percentage = 100.
        srules_wa-amount     = 0.
        srules_wa-costcenter  = caufvd_imp-kostl.
        APPEND srules_wa TO srules.
    
    
      CALL FUNCTION 'K_ORDER_SRULE_ADD'
        EXPORTING
          object_no                  = caufvd_imp-objnr
       TABLES
         srules                     = srules
       EXCEPTIONS
         wrong_input                = 1
         error_occurred             = 2
         object_not_found           = 3
         activity_not_allowed       = 4
         OTHERS                     = 5.
    

    Evgeny

    Add comment
    10|10000 characters needed characters exceeded

  • May 03, 2017 at 07:22 AM

    Sasko,

    You can manipulate the settlement rules via user-exit IWO10027 (see SMOD).

    Talk to your ABAP Team who should be able to help.

    PeteA

    Add comment
    10|10000 characters needed characters exceeded

  • May 16, 2017 at 09:24 AM

    Dear Evgeny Gubenko & Peter Atkin

    thanks for sharing your knowledge .... :)

    sasko

    Add comment
    10|10000 characters needed characters exceeded