Skip to Content
0

Automatic Settlement Rule creation for WBS in Maintenance order

May 01, 2017 at 02:07 PM

93

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Evgeny Gubenko May 02, 2017 at 02:55 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Peter Atkin May 03, 2017 at 07:22 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
sasko maleek May 16, 2017 at 09:24 AM
0

Dear Evgeny Gubenko & Peter Atkin

thanks for sharing your knowledge .... :)

sasko

Share
10 |10000 characters needed characters left characters exceeded