Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Text is not uploading for co03 ( Andreas)

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

its overwriting the existing text

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.

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

Tags:

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question