2006 Jul 31 9:27 AM
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?
2006 Jul 31 9:38 AM
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
2006 Jul 31 9:38 AM
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
2006 Jul 31 9:44 AM
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
2006 Jul 31 9:51 AM
2006 Jul 31 10:00 AM
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
.
2006 Jul 31 9:50 AM
2006 Jul 31 10:00 AM
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
2006 Jul 31 10:14 AM
thanks for u time.
but still with no long text after call 'commit_text'.
2006 Jul 31 10:25 AM
Try replacing the value of TDSPRAS to SY-LANGU / 'EN'.
Regards,
Ravi
Note :Please mark all the helpful answers