Application Development 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: 

SY-SUBRC = 5 i am getting when i execute SAVE_TEXT FM

Former Member
0 Kudos

Hi Experts,

i am trying to update longtext of PM order through SAVE_TEXT function module. But whenever i execute this with requried input i am getting SY-SUBRC as 5, please help me out in resolving this problem.

below is my piece of code.

CONCATENATE SY-MANDT V_NEW_ORDER INTO V_TEXT_HEADER-TDNAME.

V_TEXT_HEADER-TDID = V_TEXTID.

V_TEXT_HEADER-TDSPRAS = V_LANG.

V_TEXT_HEADER-TDOBJECT = V_TEXT_OBJ.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

CLIENT = SY-MANDT

HEADER = V_TEXT_HEADER

INSERT = 'X'

SAVEMODE_DIRECT = 'X'

  • OWNER_SPECIFIED = ' '

  • IMPORTING

  • FUNCTION =

  • NEWHEADER =

TABLES

LINES = T_LINES[]

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

OBJECT = 4

OTHERS = 5.

ENDLOOP.

looking forward for ur reply..

Regards,

Kali Prasad

6 REPLIES 6

Former Member
0 Kudos

Hello kali,

what do you have in your tdname?

The text name for a PM work order should be sy-mandt, afvc-aufpl and afvc-aplzl.

Check if this is what you are doing.

or else concatenate these 3 fields into your tdname an try.

cheers,

~goldie.

0 Kudos

Hi Thanks for your reply.

but what your saying abt concatenation is for operation level.. i am trying to upload Longtext at header level

i am passing concatenation of sy-mandt aufk-aufnr

please help me it is bit urgent

Regards,

Kali Pramod

0 Kudos

im gettting the same error with save_text.

plz inform me how ur problem is solved .

0 Kudos

Hi Vijay Prasad,

I faced this problem when i am uploading the PM order longtext.

This problem got solved when i changed the LTEXT field value of the Table AUFK from space to that particular PM Order starting letter of the Language the Text is.

ex: if ur uploading text in English make AUFK-LTEXT values as 'E'.

For GERMAN make it as 'D'.

French make it value from space to 'F'.

and change INSERT_MODE FM to update mode from insert mode.

It will work.

Regards,

Kali

0 Kudos

Hi Kali,

I am facing similar issue updloading the Header text in IW31/IW32/IW33.I have done the same as you had mentioned above, however did not help me.Could you please mention in detail how you went about with the problem.Can you mention the exit where you invoked the Save_text and other funtion modules.I wonder if I need to process any BAPI and run it in the form of a batch program.I've been working on the BAPI "BAPI_ALM_ORDER_MAINTAIN" however even this did not suffice my requirement.Actually Meter reading results or some text needs to be created at Header level (header text ) on save in IW32.

Thanks,

Chakram Govindarajan

0 Kudos

This message was moderated.