2010 Dec 03 2:56 PM
Hi,
I have requirement for which I was coding...
On the selction screen, I have an object field... say I have multiple values like 101, 102, 103
select-options: s_3 for hrp1000-objid.
i_1001 type standard table of HRP1001 with header line
i_temp_1001 type standard table of HRP1001 occurs 0.
Need to create an hrp1001 record for these based on a template record available in hrp1001.
I need to read all the records of the template record (say 100) from hrp1001 and need to create the same set for the objects 101, 102 and 103. How to do that? ofcourse I need to replace the object id 100 with 101, 102 and so on for the complte set..
How can I accomplish without using nested loops.
tried something like this..
select * from HRP1001 into corresponding fields of i_1001 where otype = '51' and objid = '100' and endda = '99991231'.
if sy-subrc = 0.
clear i_hrp1000-objid.
append i_1001.
endselect.
loop at s_3.
loop at i_1001.
move-corresponding i_1001 to i_temp_1001.
endloop.
i_temp_1001-objid = s_brd3-low.
append i_temp_1001.
endloop..
Looking to avoid nested loops... Any thoughts?
Thanks,
VG
Hi,
I have requirement for which I was coding...
On the selction screen, I have an object field... say I have multiple values like 101, 102, 103
select-options: s_3 for hrp1000-objid.
i_1001 type standard table of HRP1001 with header line
i_temp_1001 type standard table of HRP1001 occurs 0.
Need to create an hrp1001 record for these based on a template record available in hrp1001.
I need to read all the records of the template record (say 100) from hrp1001 and need to create the same set for the objects 101, 102 and 103. How to do that? ofcourse I need to replace the object id 100 with 101, 102 and so on for the complte set..
How can I accomplish without using nested loops.
tried something like this..
select * from HRP1001 into corresponding fields of i_1001 where otype = '51' and objid = '100' and endda = '99991231'.
if sy-subrc = 0.
clear i_hrp1000-objid.
append i_1001.
endselect.
loop at s_3.
loop at i_1001.
move-corresponding i_1001 to i_temp_1001.
endloop.
i_temp_1001-objid = s_brd3-low.
append i_temp_1001.
endloop..
Looking to avoid nested loops... Any thoughts?
Thanks,
VG
2010 Dec 03 3:11 PM
Moderator message - When closing old threads, there is no need to add a comment. Adding a pasted answer like "Resolved myself " only brings old threads to the top of the forum list and pushes current ones down. If you do add a comment, please indicate just how the problem was resolved. And please use code tags to format code. Rob
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |