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: 

write long text

Former Member
0 Kudos
477

Hi,

i want to write long text to production order header. code as below:

  • write header long text

TEXT_HEADER-TDID ='KOPF'.

TEXT_HEADER-TDOBJECT = 'AUFK'.

TEXT_HEADER-TDSPRAS = 1.

CONCATENATE SY-MANDT t_ponum INTO TEXT_HEADER-TDNAME.

clear text_lines.

text_lines-TDFORMAT = '*'.

text_lines-TDLINE = IT_component-Gline1.

append text_lines.

text_lines-TDFORMAT = '*'.

text_lines-TDLINE = IT_component-Gline2.

append text_lines.

text_lines-TDFORMAT = '*'.

text_lines-TDLINE = IT_component-Gline3.

append text_lines.

text_lines-TDFORMAT = '*'.

text_lines-TDLINE = IT_component-Gline4.

append text_lines.

text_lines-TDFORMAT = '*'.

text_lines-TDLINE = IT_component-Gline5.

append text_lines.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

HEADER = TEXT_HEADER

TABLES

LINES = text_lines.

But with no long text in PO. any problem?

1 ACCEPTED SOLUTION

former_member214131
Active Contributor
0 Kudos
155

Hello,

There are 2 points to check.

1. enable 'SAVEMODE_DIRECT'. i.e. SAVEMODE_DIRECT = 'X' and try.

2. The PO number has a conversion exit. use FM CONVERSION_EXIT_ALPHA_INPUT for PO number before you derive the text object name.

hope this helps.

Murugesh AS

8 REPLIES 8

former_member214131
Active Contributor
0 Kudos
156

Hello,

There are 2 points to check.

1. enable 'SAVEMODE_DIRECT'. i.e. SAVEMODE_DIRECT = 'X' and try.

2. The PO number has a conversion exit. use FM CONVERSION_EXIT_ALPHA_INPUT for PO number before you derive the text object name.

hope this helps.

Murugesh AS

naimesh_patel
Active Contributor
0 Kudos
155

Hello,

Pass insert and savemode to the FM

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

client = sy-mandt

header = header

insert = 'I'

savemode_direct = 'X'....

Regards,

Naimesh

0 Kudos
155

hi,

Use FM <b>'SAVE_TEXT'</b>

0 Kudos
155

without long text created. code

TEXT_HEADER-TDID ='KOPF'.

TEXT_HEADER-TDOBJECT = 'AUFK'.

TEXT_HEADER-TDSPRAS = 1.

CONCATENATE SY-MANDT t_ponum INTO TEXT_HEADER-TDNAME.

....

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

CLIENT = SY-MANDT

HEADER = TEXT_HEADER

INSERT = 'I'

SAVEMODE_DIRECT = 'X'

  • OWNER_SPECIFIED = ' '

  • LOCAL_CAT = ' '

TABLES

LINES = text_lines

.

Former Member
0 Kudos
155

Hi Gang

Please refer to the following useful SDN link.

Award points if found useful.

Regards

Inder

Former Member
0 Kudos
155

You will have to call COMMIT_TEXT after calling SAVE_TEXT. Only then you will be able to see the changes on the PO.

Regards,

Ravi

Note : Please mark the helpful answers

0 Kudos
155

thanks for u time.

but still with no long text after call 'commit_text'.

0 Kudos
155

Try replacing the value of TDSPRAS to SY-LANGU / 'EN'.

Regards,

Ravi

Note :Please mark all the helpful answers