cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in text upload program for co03

Former Member
0 Kudos

hi friends ihave done a text upload program for production order co03 i did it and in log file its created and also in debug sy0subrc = 0 but when i want to see the uploaded text it doesnt appear in co03..pls help me out its urgent

regards and thanks in advance .

following is the code

LOOP AT isales_text.

ilines-tdline = isales_text-tDLINE.

APPEND ilines.

AT END OF TDid.

PERFORM cr_text.

REFRESH ilines.

ENDAT.

ENDLOOP. " loop at isales_text

FORM cr_text.

  • REFRESH ilines.

  • SPLIT isales_text-ttext AT '|' INTO TABLE i_line.

  • LOOP AT i_line.

  • ilines-tdline = i_line-tdline.

  • APPEND ilines.

  • ENDLOOP.

IF NOT ilines[] IS INITIAL.

thead-tdid = isales_text-tdid.

  • UNPACK isales_text-aufnr TO isales_text-aufnr.

CONCATENATE sy-mandt isales_text-aufnr INTO THEAD-TDNAME .

thead-tdobject = 'AUFK'.

CALL FUNCTION 'CREATE_TEXT'

EXPORTING

fid = thead-tdid

flanguage = sy-langu

fname = thead-tdname

fobject = thead-tdobject

  • SAVE_DIRECT = 'X'

  • FFORMAT = '*'

TABLES

flines = ilines

EXCEPTIONS

no_init = 1

no_save = 2

OTHERS = 3.

IF sy-subrc <> 0.

ilog-aufnr = isales_text-aufnr.

ilog-msgcode = 'ERROR_HDR_TEXT'.

ELSE.

ilog-aufnr = isales_text-aufnr.

ilog-msgcode = 'CREATED_HDR_TEXT'.

ENDIF. " IF sy-subrc <> 0 .

APPEND ilog.

ENDIF.

ENDFORM.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Farukh,

Try using the COMMIT_TEXT at the end of the code and then see if its reflecting in the CO03 transaction.

Also, please validate the parameters being passed to the CREATE_TEXT against to the ones displayed in the TEXT editor in CO03. In the menu Go TO --> Header and you will be able to see the parameters

Regards,

Ravi

Note : Please mark the helpful answers

Answers (2)

Answers (2)

Former Member
0 Kudos

hi vinod and ravi thnks for reply ...

but iused all ur suggestion but its not working i did call the functions in form and as well as tried in loop too but its not working..

waiting for remedies.

farukh

Former Member
0 Kudos

Farukh,

Then I am sure the issue will be with the parameters.

In the debug mode look at the values you are passing to CREATE_TEXT and make a note. Now go to SE37, run READ_TEXT and give the exact parameters that you got in the debug mode. Does it return values?

If yes, then the values that CO03 uses are different.

Regards,

Ravi

Note : Please mark the helpful answers

vinod_gunaware2
Active Contributor
0 Kudos

Hi

Use function module WRITE_TEXT,SAVE_TEXT,READ_TEXT and

COMMIT_TEXT and Commit work and wait,

regards

vinod