07-23-2014 11:30 PM
Hi,
We have a Z table which contains Sales org(VKORG) as one of the fields. When the entries in this table are maintained through table maintenance SM30, sales org which is for example 0800 is getting saved as 800 which means the leading zero is not appearing in the table. So, I am planning to write an event " “Before saving the data in the database” through table maintenance generator to add leading zeroes while saving.
But, the z table also gets updated from some programs. I am not sure how sales org is updated this way (with leading zero or without leading zero).
If I write an event using table maintenance generator as above, will it only apply to sales orgs which are maintained through SM30 or will the event also apply to the programs which update the Z table? I am ok if it applies to Z table as well. Please advise.
Thanks,
Pavan
07-24-2014 2:29 AM
Hi,
The event is in the table maintenance dialog, so it will (of course) only affect items entered using that table maintenance dialog.
Any Z table updates done by other programs will not be affected.
cheers
Paul
07-24-2014 2:29 AM
Hi,
The event is in the table maintenance dialog, so it will (of course) only affect items entered using that table maintenance dialog.
Any Z table updates done by other programs will not be affected.
cheers
Paul
07-24-2014 3:18 AM
Hi Pavan,
Do you refer to data element VKORG? I check the standard table TVKO. The sales org can be saved as leading zero.
You can check it.
Maybe the data saved in table has the leading zero. But displayed as ALV. In ALV layout will hide the leading zero.
Thanks,
Yawa
07-24-2014 5:31 AM
Hi Pavan,
Please find the below steps.
Steps:
FORM APPEND_ZERO.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = ztab-vkorg
IMPORTING
OUTPUT = ztab-vkorg.
ENDFORM.
Please find the following link for detailed screenshots to create the event in Table Maintenance Generator.
EVENTS IN TABLE MAINTENANCE - ABAP 开发 (ABAP Development) - SCN Wiki
Regards
Rajkumar Narasimman.