Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Table Maintenance Generator with Packed Fields

former_member531036
Participant
0 Likes
1,837

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,615

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

6 REPLIES 6
Read only

former_member531036
Participant
0 Likes
1,615

Is there anyone that can help me with this? I've not been able to solve this yet.

Thanks!

Julie

Read only

manukapur
Active Participant
0 Likes
1,615

Have you tried using the same in Event 05.

Also check the values which are passed from PAI.

Regards,

Manu

Read only

0 Likes
1,615

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

Read only

Former Member
0 Likes
1,616

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

Read only

0 Likes
1,615

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

Read only

0 Likes
1,615

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