09-11-2013 5:01 PM
I have coded an implicit enhancement in the FM F4_GET_RESULT according to my requirement . But the problem i am facing is to change the original value of the parameter RESULT_REF. This parameter has been ASSIGNED to <itab> using RESULT_REF->* <itab> and it gets the value of <itab> as soon as <itab> is filled. I have made some modifcation in <itab> , but the changes are not getting reflected on RESULT_REF. Please let me know where i am going wrong.
Regrds.
Lohit
09-11-2013 5:05 PM
Go into debug and check that the reference RESULT_REF->* and <itab> really are the same. Also, how have you modified <itab>?
Perhaps you should post your code.
09-11-2013 5:05 PM
Go into debug and check that the reference RESULT_REF->* and <itab> really are the same. Also, how have you modified <itab>?
Perhaps you should post your code.
09-11-2013 5:29 PM
I have added my implicit enhn where i am getting data into a internal table ITAB and then assigning ITAB[] to <itab>. The <itab> data is changed but RESULT_REF still contains old data.
09-11-2013 5:42 PM
Yes. I understand your problem. But what CODE have you used, precisely?
09-11-2013 5:55 PM
My code
SELECT * FROM (sel_method) INTO TABLE ITAB
WHERE (where_clause)
%_HINTS ORACLE '&SUBSTITUTE LITERALS&'.
SORT ITAB BY VKORG VTWEG MATNR WERKS CHARG CLABS VFDAT.
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING VKORG VTWEG MATNR WERKS CHARG CLABS VFDAT.
ASSIGN ITAB[] TO <ITAB>.
I have done this to delete duplicates which was difficult to delete from <itab> .
At this moment i get the data which i need in <itab> but the RESULT_REF still holds the duplicate data .
09-11-2013 6:03 PM
The problem is that ITAB is in one area of memory, and result_ref in another. When you assign ITAB to <itab>, <itab> is no longer the result_ref, it's the ITAB.
Try
<itab> = ITAB[].
Or
INSERT LINES OF ITAB INTO TABLE <itab>.
Or
GET REFERENCE OF itab INTO result_ref.
By the way. ITAB is a terrible name for an internal table! Try giving all your variables meaningful names.
09-11-2013 6:19 PM
Thanks Matthew . got the reason where I was going wrong..... and the name ITAB was just for testing purpose ...and that's the best name for testing
Thank You once again..
09-11-2013 8:26 PM
lohit devadiga wrote:
Thanks Matthew . got the reason where I was going wrong..... and the name ITAB was just for testing purpose
OK - just checking!
09-12-2013 9:26 AM
ITAB is a terrible name for internal table, but a good name for a computing device, like IPAD.