‎2013 May 13 9:50 PM
I have created a TMG for a table that contains quantity fields which are packed. I am using the '01' Event to perform some validations. When I look at either the EXTRACT or TOTAL table in debug, the quantity fields are coming across as packed. So when I try to move the record to my work area, I get a short dump with an "Objects_Tables_Not_Compatible" error. I then tried using CASTING and I am no longer receiving a short dump, however, the values are not getting populated correctly into my work area. Has anyone come across this issue and if so, how do I handle it?
I'm also inserting screen shots.
Thanks!
Julie
‎2013 May 18 8:29 AM
Hi Julie,
To get the vlues of table control try below code.
LOOP AT TOTAL.
"within the loop u can get values in <VIM_TOTAL_STRUC>
ENDLOOP.
Regards,
Mordhwaj
‎2013 May 17 3:32 PM
Is there anyone that can help me with this? I've not been able to solve this yet.
Thanks!
Julie
‎2013 May 17 4:34 PM
Have you tried using the same in Event 05.
Also check the values which are passed from PAI.
Regards,
Manu
‎2013 May 17 5:45 PM
Hi Manu,
I also need to do validation upon change, which is why I selected Event 01. I also tried to use Event 21, since that seems to get called all of the time, but for some reason, even though I am sending a message type of 'E' for an error, the record still gets saved.
Thanks!
Julie
‎2013 May 18 8:29 AM
Hi Julie,
To get the vlues of table control try below code.
LOOP AT TOTAL.
"within the loop u can get values in <VIM_TOTAL_STRUC>
ENDLOOP.
Regards,
Mordhwaj
‎2013 May 20 2:07 PM
Hi Mordhwaj,
Thank you! The values show up correctly in the <VIM_TOTAL_STRUC>. But I still have one slight problem. Looping through TOTAL, gives me all of the records in that table. I only want the ones that have been changed/added. For a changed record I see that the last value in the table is 'U', but I don't know how to access that because it's not available in the <VIM_TOTAL_STRUC> table.
Thanks!
Julie
‎2013 May 20 5:04 PM
Hi Mordhwaj,
I've found the answer. I loop through TOTAL table and check field <ACTION> to determine if this record has been changed/created/deleted. Thanks for your help!
Julie