04-17-2009 10:14 AM
Hi,
I´m not a developer, but must do that part now in my company.
We have a 46C with actual packages.
In a customer report I have to add 2 fields to an output.
It selects from PNP and provides data like follows:
GET PERNR.
PROVIDE * FROM P0000
FROM P0001
FROM P0002
FROM P0006
FROM P0007
FROM P0013
FROM P0016
FROM P0053
BETWEEN PN-BEGDA
AND PN-ENDDA.
That worked fine.
Now I liked to set 2 fields with contents of IT 0000 (table PA0000):
IF P0000-MASSG = '01'. " MA aktuell im Vorruhestand ?
TRANS-BEGVORRST = P0000-BEGDA.
TRANS-ENDVORRST = P0000-ENDDA.
ENDIF.
At debugging I can see, that the requested fields from P0000 are set to the actual date, not to the value I can select from table or shown in the SAP transaction.
All other fields from PA0000 are matching the row I expect, but not the date fields
Any idea?
04-17-2009 10:26 AM
Hi,
That is the behavior of PROVIDE statement. If you combine (JOIN) several tables (P0001, P0002, etc) together, it will give you all the intersected dates.
For example, in two tables itab1 and itab2, the respective columns col1 and col2 are interval limits of type i. The filling of the internal tables results in the following intervals (rows two and three):
-------------------------------------------
| Itab1 Int1 | |Itab1 Int2 | |
-------------------------------------------
| | Itab2 Int1 | |
-------------------------------------------
| | ... BETWEEN ... |
-------------------------------------------
| | i1 | i2 | i3 | i4 |i5| | <<<< This is the result
Regards,
Lim...
Edited by: Ruslim Chang on Apr 17, 2009 11:26 AM
04-17-2009 11:57 AM
thanks for your answer.
How does it works with the selection from logical PNP?
With "get PERNR." I read all rows defined in PERNR matching the selection, I have done on PNP selection screen?
That could be only one row from IT0000, when I select "today" on "period", or?
I deactivated the provide statement, to see what happens.
But I get the row back, which was created last, the actual date is not between begdat and enddat.
That must be terrible for an experied developer, but maybe someone could set me on the right way.
Thanks
Udo