Creating Settlement Rule for WBS Element
To create Settlement Rules via ABAP use the K_SRULE_SAVE_UTASK function module. View code:
DATA: t_prps TYPE TABLE OF prps,
wa_prps TYPE prps, “Select WBS Elements LOOP AT t_prps INTO wa_prps. wa_cobrb-objnr = im_projectdefinition-objnr. *** USE THE CONVERSION EXITS !!! CALL FUNCTION ‘CONVERSION_EXIT_OBART_INPUT’ IF sy-subrc NE 0. ENDIF. wa_cobrb-prozs = ‘100.00’. APPEND wa_cobrb TO t_cobrb. ENDLOOP.
“Create Settlement Rule IF sy-subrc NE 0. |
This code can be used in Z report program or in BADI PROJECTDEF_UPDATE.
Best Regards,
Rodrigo Abreu Costa
Good job man,
Now we can create fixed assets by ps projects.
This code will be used very hard here in Brasilia/DF
Alon is using this code. It worked!
With this approach we can generate only 999 settlement rules per WBS. If it exceeds , it will given a dump. How do u resolve this issue ?
Hi Selva.
I think this is not possible because of the limited size of the field LFDNR.
Yes Rodrigo. For one of my requirements, I need to achieve this functionality. They may create more than 999 settlement rules .I need to generate the respective number of profit segments. I am checking the possibilities to implement it. Please let me know if you have any thoughts on this.
How do you populate BUREG in COBRB ?
I didn't fill this field. Sorry but you have a technical issue. Search for SAP Notes.