on 2016 Aug 16 2:33 PM
Hello everyone,
In PA transactions, there is always that structure PSYST in the background that contains pretty useful data. In user exits ZXPADU01 and ZXPADU02 it is even available as a parameter (IPSYST) so you have these values at your disposal in the exit coding.
However, I wonder what the difference between the fields BEGDA and DDATE in that structure is. Browsing a little through the code revealed that DDATE also appears to be filled with a start date, and when I set a break point and inspected the fields in the debugger, both fields contained the same value. However, I reckon that will not always be the case, otherwise DDATE would be useless, no?
Does anybody happen to know the difference?
Thank you in advance,
Jens Petersen
Request clarification before answering.
BEGDA (along with it's good friend, ENDDA) are used to define the "lifespan" of the record itself (ie. when it is "active"....used a lot/mostly for checks against time constraints. This pair of dates is always part of the "header" of an infotype record. Think of it as the "metadata" for the record.
DDATE however is used for a specific date for the record's data itself...such as exactly when some infotype operation occurred. It "may" be equal to the BEGDA date but not always.
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your reply. I would appreciate an example though.
such as exactly when some infotype operation occurred
Seeing that PSYST-DDATE is not part of the (any) infotype itself, but only exists during an infotype operation, I fail to see where the date of "some" other infotype operation should come from.
PSYST is the "general" structure used (at least in PA02/30/40) when we are working with any of the infotypes there....so when I say "some other infotype operation"...I mean it is "holding" data for us to actually use on another/other infotype/structure...not making a record itself. Sorry to confuse you on that. DDATE can be thought of much like an "effective date"...and yes, typically you may see that DDATE is used as the BEGDA when the actual infotype is created/changed....but it does not have to always be that way. I have seen DDATE used in calculating other fields to (for example, you might see something like: RP5OD-DATE1 = PSYST-DDATE - 1. (<-actually used in standard code in SAP). Look at your own user exits for PBO/PAI that you listed.....how do you see it used there? (if at all)
Not at all tbh - which is no surprise, seeing that I did all the coding in them. If I had used it, I would have needed to know what it stands for.
PSYST is the "general" structure used (at least in PA02/30/40) when we are working with any of the infotypes there....so when I say "some other infotype operation"...I mean it is "holding" data for us to actually use on another/other infotype/structure...
That is what I understand. But in order to serve that purpose, its fields need to be well-defined content-wise, no? If it is a general, infotype-spanning structure, then that trait contradicts any of its fields being context-related.
typically you may see that DDATE is used as the BEGDA when the actual infotype is created/changed....but it does not have to always be that way.
Again, what I would like to see is an example. Otherwise your reply is just too abstract to be of any use to me, sorry.
I have seen DDATE used in calculating other fields to (for example, you might see something like: RP5OD-DATE1 = PSYST-DDATE - 1. (<-actually used in standard code in SAP).
Seeing that you mention structure RP50D, the coding you just gave is probably part of a Dynamic Action. Now it would be interesting to see exactly what information SAP hopes to find in PSYST-DDATE at that place (as opposed to what they would find in PSYST-BEGDA there). I could probably locate the piece of code you mentioned (with transaction EWK1 or something), but even if I do, it just proves that PSYST-DDATE can be used for something, but gives no information on its actual content.
Silly question....but in your own system, did you do a "where used" on PSYST-DDATE and then follow a few examples of where/how it is used? That is all I did for above example (which yes, was part of a dynamic action for Finland in standard SAP code).
And for the record, seeing a field used (or not used) in some way by SAP is no particularly that eyebrow raising...par for the course. haha
User | Count |
---|---|
98 | |
15 | |
10 | |
8 | |
5 | |
3 | |
3 | |
3 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.