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

Long Text problem in Process order header

Former Member
0 Likes
3,107

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,965

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

7 REPLIES 7
Read only

Former Member
0 Likes
1,966

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

Read only

0 Likes
1,965

Dear Sandeep,

Please go to their documentation of that FM.

Go through below link Good code given by Jose.

Regards,

Madhu.

Edited by: madhurao123 on Feb 4, 2011 5:47 AM

Read only

0 Likes
1,965

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

Read only

0 Likes
1,965

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

Read only

Former Member
0 Likes
1,965

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

Read only

0 Likes
1,965

Hi Nikhil,

You must append the client number to TDNAME.

Check in table STXH for an example.

Thanks,

Sandeep

Read only

Former Member
0 Likes
1,965

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!