2007 Nov 21 5:46 AM
Hello,
The data come from infotype 0041.
The Date is stored in the field DATxx when DARxx is equal to 05. [xx can have the values from 01 to 12].
Can anyone suggest that how to to the retrieval for this.
Best Regards,
Pramod Upadhyay
Hello,
The data come from infotype 0041.
The Date is stored in the field DATxx when DARxx is equal to 05. [xx can have the values from 01 to 12].
Can anyone suggest that how to to the retrieval for this.
Best Regards,
Pramod Upadhyay
2007 Nov 21 5:55 AM
Hi Pramod,
Infotype 0041 is a Repetitive Structure.
u can use Macro RP-PROVIDE-FROM-LAST P0041 "Sapce" PN-BEGDA PN-ENDADA.
after that u can use DO loop.
FROM P0041-DAR01
NEXT P0041-DAR12.
Try this & Revert.....!!!
Reward Points if useful...!!!
2007 Nov 21 5:59 AM
Can you please explain more as new to HR Programming.
I am doing this
rp-provide-from-last p0041 space pn-begda pn-endda.
MOVE: p0041 TO it_extract-p0041.
Next please explain more
Thanks
Pramod
2007 Nov 21 6:13 AM
U can write as above.
But you cannot say which field has '05' ..
so U need to loop thru and get the value of Datxx when Darxx = '05'.
you have all the values in it_extract-p0041 ..
then write as..
do 12 times varying DARXX
from it_extract-p0041-dar01 next it_extract-p0041-dar02
varying DATXX it_extract-p0041-dat01 next it_extract-p0041-dat02.
case DARXX
when '05'.
Take the value of DATxx ...
endcase.
enddo.
2007 Nov 21 6:28 AM
If u want to Retrieve all the values of that infotype ...
use Do or any other Loop statement....!!!
Becoz it is a Repetitive Structure ...so use Do statement for Loop ..!!!
U can code like that:
do 12 times varying DARXX
from it_extract-p0041-dar01 next it_extract-p0041-dar02
varying DATXX it_extract-p0041-dat01 next it_extract-p0041-dat02.
case DARXX
when '05'.
Take the value of DATxx ...
endcase.
enddo.
.
2007 Nov 21 5:59 AM
Hi
Retrive the data from this infotype similar to 008 infotype data in which similar type of fields are there
see the sample code
Report Zabc.
tables:pernr.
infotypes:0008.
data: begin of wagetypes,
lga like pa0008-lga01,
bet like pa0008-bet01,
anz like pa0008-anz01,
end of wagetypes.
get pernr.
rp_provide_from_last p0008 space pn-begda pn-endda.
do 20 times varying wagetypes
from p0008-lga01 next p0008-lga02.
if not wagetypes-lga is initial.
write:/ wagetypes-lga, wagetypes-bet, wagetypes-anz.
endif.
enddo.
Regards
Anji
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |