‎2011 Feb 03 11:06 PM
Hi All,
I am using SAVE_TEXT FM to update the header long text in process order.
Also, I am updating the field AUFK-LTEXT = 'E'.
But when i display the order and click on long text, it does not display any thing as the text is not saved.
When I update the text directly in the order using COR2, it gets saved.
Does anyone know why the text is not being saved through FM SAVE_TEXT?
Also tried COMMIT WORK but was not successful.
The paramters I am passing to the FM are
TDOBJECT = 'AUFK'
TDID = 'KOPF'
TDSPRAS = SY-LANGU
TDNAME = sy-mandt+order number with leading zeros.
and the text lines in internal table.
Am I missing anything else here?
Thanks,
Sandeep
‎2011 Feb 04 12:46 AM
Hi Sandeep,
First check table STXH for the order which you saved manually, in order to verify that the values you are passing to the FM SAVE_TEXT are correct.
Also check the documentation which is supplied with this function to determine the INSERT and SAVEMODE_DIRECT values.
Also maybe check function COMMIT_TEXT and its documentation.
Regards,
Robert
PS. also test the scenario in which text s/b added to already existing text. The SAVE_TEXT function wipes out everything and therefore you first should read the existing text (READ_TEXT) to retrieve the current text and save this together with the new text using SAVE_TEXT. (check function group STXD for possible related functions to use).
PPS. Thinking about my comments under PS., I recall now that this was the symptom of the long text passed on through BAPI_SALESORDER_CHANGE and therefore maybe this is not the case for SAVE_TEXT.
Edited by: RJ. Schamhart on Feb 3, 2011 4:53 PM
‎2011 Feb 04 12:46 AM
Hi Sandeep,
First check table STXH for the order which you saved manually, in order to verify that the values you are passing to the FM SAVE_TEXT are correct.
Also check the documentation which is supplied with this function to determine the INSERT and SAVEMODE_DIRECT values.
Also maybe check function COMMIT_TEXT and its documentation.
Regards,
Robert
PS. also test the scenario in which text s/b added to already existing text. The SAVE_TEXT function wipes out everything and therefore you first should read the existing text (READ_TEXT) to retrieve the current text and save this together with the new text using SAVE_TEXT. (check function group STXD for possible related functions to use).
PPS. Thinking about my comments under PS., I recall now that this was the symptom of the long text passed on through BAPI_SALESORDER_CHANGE and therefore maybe this is not the case for SAVE_TEXT.
Edited by: RJ. Schamhart on Feb 3, 2011 4:53 PM
‎2011 Feb 04 4:45 AM
‎2011 Feb 04 5:47 PM
Hi Madhu,
Thanks for pointing me to this post.
I tried everything with FM SAVE_TEXT except for passing the value X to SAVE_DIRECTMODE.
This was teh culprit.
Anyways, my problem is solved and I am awarding you full points.
Sandeep
‎2011 Feb 04 6:59 PM
Hi Sandeep,
Did you even read my reply? I believe I pointed out clearly in my reply for you to check the SAVE_DIRECTMODE parameter(!?)
I would expect to get the full credit for this?
Robert
‎2011 Feb 04 7:35 AM
Hi Sandeep,
Do not use sy-mandt in TDNAME.
it should be
TDOBJECT = 'AUFK'
TDID = 'KOPF'
TDSPRAS = SY-LANGU
TDNAME = Order number with leading zeros.
I hope this should help.
Best Regards,
Nikhil Patil
‎2011 Feb 04 5:45 PM
Hi Nikhil,
You must append the client number to TDNAME.
Check in table STXH for an example.
Thanks,
Sandeep
‎2013 Jan 09 9:34 AM
HI Sandeep,
I would like to know which user exit you used for applying the logic. I want to update the long text in the process order as well but I am still finding an applicable user exit. The only one I found is EXIT_SAPLCOZV_001. Thank you very much!