cancel
Showing results for 
Search instead for 
Did you mean: 

substitute the setttlement profile

Former Member
0 Kudos

Hi,

does anybody know if it´s possible to subsitute the settlement profile (COBRA-APROF) and allocation structure in a network activity.

Are there BADI / Exits / Enhancements for this?

many thanks for replies.

Jürgen

Accepted Solutions (1)

Accepted Solutions (1)

ArturoSenosain
Advisor
Advisor
0 Kudos

Hi Jurgen.

There are 2 ways to do what you need.

1. In dialog when you enter to the SETTLEMENT RULE SCREEN,

Tell your abap try an enhazament point in LKOBSF2J. Table gt_cobrb_buf have the info.

2. In the Save of a PS stuff, you can change with badi ROJECTDEF_UPDATE

Try the following code

       lv_text1 = '(SAPLKOBS)GT_COBRB_BUF[]'.

       ASSIGN (lv_text1) TO  <fs_gt_cobrb_buf>.

With this assign, field symbol <FS_GT_COBRB_BUF> have the data of the settlement rule and you can change it.

Wish this help you.

Arturo.

Former Member
0 Kudos

HI Arturo,

thanks for your reply, the right table for this Approach will be (SAPLKOBS)gt_cobra_buf[], but i think data will be saved to DB with other structures / tables or at another time, because the dirty assign in the BADI you mentioned doesn´t show any effect.

Your first Approach will only take Effekt, if the user enters the Dialog of Settlement Rule; I don´t want the user teeds to go there, the substitution should solve this issue in an efficient way.

Furthermore if possible I like to use SAP-conform programing paradigm, without dirty assign (BADI / Exit / Enhancement). Do you think there is a way to substiute (for example in a subsutution role exit, the settelment profile and the allocation stucture ?

Regards.

Jürgen

ArturoSenosain
Advisor
Advisor
0 Kudos

Hi Jurger.

1. Yes, the 1st method work only if the user enter in dialog to the settlement screen

2. The assign in the badi work well for me, only bear in mind the following:

+ you must doit in the method before safe.

+ The assing only work if the settlement rule is involved in the update task i mean in the initial creation of the settlement rule when you release and then save, or then you enter to the settlement rule screen and change a field. I apply this in the initial creation of the settlement rule, so must be a default.

If you enter to the PS object and save the badi is trigger but the stuctures are not updated.

If you plan to use this way, doit at the creation of the settlement rule save, In this case work well.

3. You can create a FI or CO substitution in GBB1 depending on the settlement object, but remember the substitution is trigger at the settlement process and only change the FI/CO document not the original settlement rule in cobra table.

Arturo,

Former Member
0 Kudos

Hi Arturo,

you are right, the 2nd method only works well in the Initial creation of the settlement. Do you think there is a way to update existing rules too??

So there might not be a way to reach this approach without dirty assign?

regards

Jürgen

ArturoSenosain
Advisor
Advisor
0 Kudos

Hi Jurgen.

Im 80% sure there is no way to change it. The same problem i face in CO Orders and PM order. In this cases, the user exit "at save" work well i mean always update the Settlement rule with the dirty assign, and the code is 100% the same (I work as PP/CO consultant, and join this group to learn PS).

In PS, the behavior is a bit different, some time ago i spend some time analizing the code but i found its only possible to update the settlement rule if the cobrb table is involved in the update task and this happen in background at the 1st creation of the settlement rule or when you enter the settlement rule screen in dialog. Maybe Im wrong,  If you you find a way to doit, please post it help lot of people.

The other way, try the GBB1 substitution with your CO partner.

Im afraid i couldnt help you more =(

Arturo.

Answers (0)