cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic action not updating until Back button clicked in PA40

Former Member
0 Kudos

Hi all,

Not been able to find an answer for this on the forums so thought I'd post a question.

We are performing a leaver action in PA40 and all the data for the infotypes gets written up front except for 2 entries into It0015.

We have discovered that the data only gets written to the DB once you click the "Back" button in the menu bar (after the action is finished).

If we exit using /n etc the data isnt written.

It seems like this is some sort of commit that needs to be done at some point but can't get the system to commit the data using COMMIT WORK etc.

The It0015 is written using dynamic actions as are other infotypes but the other Dynamic actions are commiting.

I did orginally write a routine using HR_INFOTYPE_OPERATION but this didnt write anything at all so moved to dynamic action which we thought was working but now seems like it is not working as expected.

Anyone had any problems with this in the past and managed to overcome it.

Many thanks

Gaz

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Got it!!!!

In the function call (type F) I commented out the code and put the code into a separate program.

Then in the Function call in the dynamic action I do a :

submit ZHRPROGXXX
   with p_pernr = p0000-pernr
   with p_date = p0000-begda
   and RETURN.


This runs the program in s different session and allows all dynamic action to work and do the update itself as well...


also note to use the following in the called program to stop short dump:


LOAD-OF-PROGRAM.
*    an event to avoid a short dump due to CE framework*
*    refer to SAP NOTES: 0000611782 / 0000716914
PERFORM do_nothing(sapfp50p).

Answer was in this thread:

Thanks for all the input it is appreciated

Cheers

Gaz

former_member201275
Active Contributor
0 Kudos

Thank you for providing answer... was puzzling me to.

Former Member
0 Kudos

Hi,

Done a bit of testing with some other code and found something that may be significant.

There is another dynamic action (type F)  fired off later than the one listed above that calls a routine in a program that delimits current records and deletes future records from a number of infotypes.

this is done using HR_INFOTYPE_OPERATION with a the no_commit set as space (so it does commit).

If I exit out of this routine without doing any processing the IT0015 records are commited (without having to Back arrow out of PA40).

I have tried setting the no_commit to 'X' but this didnt make a difference to the overall processing.

So it seems that HR_INFOTYPE_OPERATION is causing an issue.... is this because it is called from a dynamic action?

Also why do some Dynamic actions work and others not.... very odd.

Any ideas or suggestions welcomed... will keep testing and update with anything I else I find.

Many Thanks

Gaz

Former Member
0 Kudos

Hi Gaz,

Can you duplicate your rules and try? I put a sample below:

*---- First Entry ------------

P     P0000-MASSN='D3'

P     T001P-MOLGA='08'/X

P     T001P-MOLGA='11'/X

F     GET_DATE(ZSDATE)

P     P0000-MASSN='D3'

P     T001P-MOLGA='08'/X

P     T001P-MOLGA='11'/X

I     INS,0015/D

W     P0015-BEGDA=RP50D-DATE1

W     P0015-LGART='7541'

W     P0015-ANZHL='1.00'

W     P0015-ZEINH='025'

Former Member
0 Kudos

Hi Chris,

I may try this but just wanted to clarify that the function (type F) call to delete and delimt is not within the dynamic action above .

as in:

    

*---- First Entry ------------
P P0000-MASSN='D3'
P T001P-MOLGA='08'/X
P T001P-MOLGA='11'/X
I INS,0015/D
F GET_DATE(ZSDATE)
W P0015-BEGDA=RP50D-DATE1
W P0015-LGART='7541'
W P0015-ANZHL='1.00'
W P0015-ZEINH='025'
  *---- Second entry ------------
P P0000-MASSN='D3'
P T001P-MOLGA='08'/X
P T001P-MOLGA='11'/X
I INS,0015/D
F GET_DATE(ZSDATE)
W P0015-BEGDA=RP50D-DATE1
W P0015-LGART='7519'
W P0015-ANZHL='1.00'
W P0015-ZEINH='025'
**--- THIRD ACTION TO DEL --
FDEL_STUFF(ZSDELSTUFF)
former_member201275
Active Contributor
0 Kudos

Please paste your dynamic action entries here.

Former Member
0 Kudos

Hi Glen,

The actions that create the entries are below:

Many thanks

Gaz

  *---- First Entry ------------
P P0000-MASSN='D3'
P T001P-MOLGA='08'/X
P T001P-MOLGA='11'/X
I INS,0015/D
F GET_DATE(ZSDATE)
W P0015-BEGDA=RP50D-DATE1
W P0015-LGART='7541'
W P0015-ANZHL='1.00'
W P0015-ZEINH='025'
  *---- Second entry ------------
P P0000-MASSN='D3'
P T001P-MOLGA='08'/X
P T001P-MOLGA='11'/X
I INS,0015/D
F GET_DATE(ZSDATE)
W P0015-BEGDA=RP50D-DATE1
W P0015-LGART='7519'
W P0015-ANZHL='1.00'
W P0015-ZEINH='025'
former_member201275
Active Contributor
0 Kudos

Have you tried this without background mode?

i.e. INS,0015

instead of INS,0015/D

Former Member
0 Kudos

Hi Glen,

Yes we did try this.

For some reason it didnt display in foreground.

But the IT does update still (when we click the back button in PA40 of course )

Many thanks

Gaz