2005 Oct 26 7:35 AM
Hi friends,
I am writing an interface to load Sales Orders into SAP (4.7) from an external system. I need to store information such as the sales order number, person who approved, date, time, etc from the external system into SAP for auditing purposes.
I have 2 options: extend VBAK / VBAP and paint the extra fields to Additional Data B; or put these fields in Standard Text. But because these fields are for auditing, we do not want anyone to be able to change the Standard Text once they have been saved.
My client wants to fully investigate the Standard Text option before going ahead with extending VBAK / VBAP. I have looked at where the Standard texts are defined in the IMG but can't find anywhere where you can lock the object from changes.
If anyone has any ideas or can share similiar experiences that would be appreciated.
Cheers,
Pat.
2005 Oct 26 8:42 AM
Pat,
If its just for auditing purpose, why cant you create a custom table and update the same information using some exit ?
I am sure you would have considered this option.
Ravi.
2005 Oct 26 8:06 AM
Hi Patrick,
I am not sure whether it is going to work out or not, but I think you can try this..
here are fields that can be filled with reference object and so on and then standard text will get locked..
The fields are TDREFOBJ, TDREFNAME, TDREFID in THEAD structure. If you can fill these while creating standard texts for these sales order then I think the text stays locked.
NOTE: I think there is a flag called REDUP in TTXER which has some impact on the above fields. (If REDUP is set to 'X' then the reference fields are cleared).
Hope this helps..
Sri
2005 Oct 26 8:42 AM
Pat,
If its just for auditing purpose, why cant you create a custom table and update the same information using some exit ?
I am sure you would have considered this option.
Ravi.
2005 Oct 26 12:16 PM
Hi Patrick,
I was trying to be too adventurous in my last reply I guess..
There is an enhancement V45T0001 !!
So try one of the two solutions, the one I gave you previously or this one..
Hope this helps..
Sri
Message was edited by: Srikanth Pinnamaneni
2005 Oct 27 12:51 AM
Hi Sri and Ravi,
Sri, I can not referencing any existing Texts so I don't see how by entering a value in THEAD-TDREFID will lock the Text from being edited. I have also looked at the User Exit you suggested. It seems that this User Exit gets called by the FM 'RV_TEXT_COPY'. Once again, because I am not copying the text from an object like customer master, it doesn't kick in at the right time for me.
Ravi, yes I have considered this option, but I would still need to paint the fields on the Sales Order Additional Data tabs. If I use the Standard Text, it comes up automatically in the Texts tab. It is my opinion that this is the better way to do it, but my client wants me to investigate the Standard Text method as well.
Thanks for your help so far, if you have any other suggestions I will appreciate hearing from you.
Cheers,
Pat.
PS. will assign Reward Points once the CRP System is back up.
Message was edited by: Patrick Yee
2005 Oct 28 8:59 AM
Hi Patrick,
One more suggestion..if your client is not reluctant for a small core modification then take a look at subroutine sd_word_processing_put in SAPMV45A called in module sd_word_processing_put (screen 4152)
There is a local variable called da_display in it which you can influence based on the TDID that is in focus (just set it to 'X' if you want to lock a particular TDID).
Normally (SAPLV70T)LV70T-TDID contains the TDID that user has clicked on. If it is empty then it means the user is navigating for the first time into header texts (in this case you can read XTHEAD index 1 and see whether it is the same TDID that you want to lock).
So you can check whether da_display is SPACE and T180-TRTYP is V(change mode) and T180-TCODE is VA02 and then whether (SAPLV70T)LV70T-TDID is the id that you want to lock down and then set da_display to 'X'.
Even adding fields in additional data tabs is a repair technically may be you can try the above approach (if possible)..
Hope this helps..
Sri