on 04-07-2006 12:59 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Hi
Use function module WRITE_TEXT,SAVE_TEXT,READ_TEXT and
COMMIT_TEXT and Commit work and wait,
regards
vinod
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.