11-07-2006 7:33 PM
I have two selection fields like effective date and created date on the selection screen..I need to get the data based on these dates as per the conditions..How do I do this?
The first four fields presented in this section will be Action Type, Action Reason, Exempt/Non Exempt identification and Average Work Week Hours. These will be pulled from Actions (IT0000), Organization Assignment (IT0001) and Planned Working Time (P0007). Records should be selected using SY-DATUM unless an effective date or created on date are entered in the selection screen:
If No date entered on selection screen, select applicable P0000 record where SY-DATUM between P0000-BEGDA and P0000-ENDDA. Use P0000-BEGDA to pull applicable records from P0000, P0001 and P0007.
If effective date is entered on the selection screen, select applicable P0000 record where date entered between P0000-BEGDA and P0000-ENDDA. Use P0000-BEGDA to pull applicable records from P0000, P0001 and P0007.
If created date is entered on the selection screen, select applicable P0000 record where date entered equals P0000-AEDTM.
How do i do this?
Thanks
Vicky
11-07-2006 7:53 PM
Try the following..
tables: pernr.
infotypes:0000,0001,0007.
get pernr.
clear: p0000,p0001,p0007.
if not p_effdt is initial.
rp-provide-from-last p0000 space p_effdt p_effdt.
elseif p_credt is initial.
loop at p0000 where aedtm = p_credt.
****
****
endloop.
else.
rp-provide-from-last p0000 space sy-datum sy-datum.
endif.
* Now select the infotype 0001 & 0007 records baseed on
* 0000 records.
end-of-selection.
~Suresh
11-07-2006 8:22 PM
Thanks For Your Reply..Could you please brief me in detail like I also need to get the usrid and first name, last name from infotypes 0105 and 0002..
Thanks
Vicky