You are on page 1of 5

Hi,

I'm struggling with a dynamic action that should be very


straightforward. The pseudo logic is: If employee is in one of the
listed country groupings (OR), AND executing one of the listed
actions (OR), then create IT16.
It works for all cases except for MOLGA 40. I've tried every
possible combination but can't get it work.
P T001P-MOLGA='01'/X
P T001P-MOLGA='03'/X
P T001P-MOLGA='06'/X
P T001P-MOLGA='08'/X
P T001P-MOLGA='11'/X
P T001P-MOLGA='23'/X
P T001P-MOLGA='40'/X
P PSPAR-MASSN='A0'/X
P PSPAR-MASSN='A1'/X
P PSPAR-MASSN='A4'/X
I INS,0016,,,(P0000-BEGDA),(P0000-ENDDA)
The closest I got it to working is to strip away two of the actions...
P T001P-MOLGA='01'/X
P T001P-MOLGA='03'/X
P T001P-MOLGA='06'/X
P T001P-MOLGA='08'/X
P T001P-MOLGA='11'/X
P T001P-MOLGA='23'/X
P T001P-MOLGA='40'/X
P PSPAR-MASSN='A0'
I INS,0016,,,(P0000-BEGDA),(P0000-ENDDA)
It's hard for me to believe that I can't do an OR check from multiple
Molgas AND do an OR check from multiple Massns.
Of course I can repeat the code for each Massn but that seems
highly inefficient.
Please help.
Vlad
Answer:
Vlad,
I would try putting the action at the front as follows:
P PSPAR-MASSN='A0'
P T001P-MOLGA='01'/X
P T001P-MOLGA='03'/X
P T001P-MOLGA='06'/X
P T001P-MOLGA='08'/X
P T001P-MOLGA='11'/X
P T001P-MOLGA='23'/X
P T001P-MOLGA='40'/X
I INS,0016,,,(P0000-BEGDA),(P0000-ENDDA)
If this logic works you would probably need to create 3 dynamic
actions, one for each action type.

[b]Default in field BTRTL[/b]

by aleite on Mon Jun 09, 2003 11:04 am

Hi all !
I have a problem: I need to create a default in the field BTRTL (Personnel SubArea), in
infotype 1-Organizational Ass.
Somebody can help me, please.
ALeite

aleite

Posts: 73
Joined: Tue Nov 12, 2002 8:28 am
Location: Sao Paulo, Brasil
Top

by Guest on Tue Jun 10, 2003 1:01 am

use enhancement PBAS0001 and change the PBO - Go to enhancement component


EXIT_SAPFP50M_001 and double click on the program name ZXPADU01.

sample code for org key =

data: i0001 like p0001.

case innnn-infty.

when ‘0001’.
move innnn to i0001.

move ‘XX’ to i0001-vdsk1.

move i0001 to innnn.

endcase.
Guest

Top

by Guest on Tue Jun 10, 2003 1:06 am

opps - the post didn't work correctly ! there are some funny characters in the above !!
Guest

Top

another way...

by sylviac on Wed Jun 11, 2003 11:33 am

assuming you are creating 0001 through actions, you can also do a dynamic action to fill
the field - example:

0000 04 30 ** DEFAULT PERS SUBAREA 0001 ** (US)


0000 04 31 P T001P-MOLGA='10'
0000 04 32 P PSPAR-MASSN='Z0' <<define the action(s) 0000 04 33 I INS,0001
0000 04 34 W P0001-BTRTL='0002'

if you do the above, take out 0001 from the infogroup or it will come up twice.
or, if you are using position management, you can assign the BTRTL to the position in
PD infotype 1008 and it will fill from there. Those might be easier solutions than the user
exit.
Sylvia
sylviac

Top

by sylviac on Wed Jun 11, 2003 11:36 am


got a wierd line break. here is the dyn action again

0000 04 30 ** DEFAULT PERS SUBAREA 0001 ** (US)


0000 04 31 P T001P-MOLGA='10'
0000 04 32 P PSPAR-MASSN='Z0'
0000 04 33 I INS,0001
0000 04 34 W P0001-BTRTL='0002'
sylviac

Top

Default in field BTRTL

by sylviac on Fri Jun 13, 2003 10:04 am

Hi!
Thank you so much Sylvia. I'm using infotype 1008.
Best regards,
A Leite

Question:
Hello,
I have the following conditions in my dynamic actions:
P PSAVE-FAMST='1'/X
P PSAVE-FAMST='4'/X
P PSAVE-FAMST='5'/X
P P0002-FAMST='5'/X
P P0002-FAMST='3'/X
I want to 'AND' the PSAVE-FAMST and P0002-FAMST 'OR' conditions. But at the
moment, since they follow each other up, it is a single 'OR'.
Any ideas on how to achieve this?
Thanks
Answer:
Since you cannot insert the desired AND between the two groups of OR expressions what
you need to do is enter an additional logical expression in between. You can achieve this
by inserting an �always true� expression such as T001P-MOLGA=T001P-MOLGA
between the two groups of OR expressions.
Any expression with the same variable on both sides of the equals sign always evaluates
as true. T001P-MOLGA is a convenient field to use because it is always populated with
the country code.
So for example, you may have:
P PSAVE-FAMST='1'/X
P PSAVE-FAMST='4'/X
P PSAVE-FAMST='5'/X
P T001P-MOLGA=T001P-MOLGA
P P0002-FAMST='5'/X
P P0002-FAMST='3'/X

You might also like