2008 Nov 21 8:50 AM
Hi Experts,
I am doing BDC on Purchase Order.
How can I upload long texts to item texts, info record PO text, Material PO Text.
These texts are available under Item texts.
Thanks and Regards
Ganesh Reddy
2008 Nov 21 9:14 AM
You have to use SAVE_TEXT and than COMMIT_TEXT after PO is created.
Regards,
Mohaiyuddin
2008 Nov 21 9:13 AM
In bdc you have inbuilt bdctab which has fnam fval
which are of 40 char length.
just pass your long text
this is to best of my knowledge.
regards
ram
2008 Nov 21 9:14 AM
You have to use SAVE_TEXT and than COMMIT_TEXT after PO is created.
Regards,
Mohaiyuddin
2008 Nov 21 9:18 AM
2008 Nov 21 9:31 AM
Dont ask code for already discussed topics, you can find lots of threads with sample code by searching the forum.
If you dont know how to search, enter "save_text" in the search box at the top right corner of the forum page and hit enter.
Regards
Karthik D
2008 Nov 21 10:12 AM
The below code is the sample code to pass the flat file text to SAP Long text for items.
You can get the values below from the header details in the text element list
I_THEAD-TDOBJECT = 'CCSS'.
I_THEAD-TDID = 'COSP'.
I_THEAD-TDNAME = TNAME.
I_THEAD-TDSPRAS = 'E'.
APPEND I_THEAD.
I_TLINE-TDFORMAT = '*'.
I_TLINE-TDLINE = RECORD-LONGTEXT.
APPEND I_TLINE.
LOOP AT I_THEAD.
CALL FUNCTION 'CREATE_TEXT'
EXPORTING
FID = I_THEAD-TDID
FLANGUAGE = I_THEAD-TDSPRAS
FNAME = I_THEAD-TDNAME
FOBJECT = I_THEAD-TDOBJECT
SAVE_DIRECT = 'X'
FFORMAT = '*'
TABLES
FLINES = I_TLINE
EXCEPTIONS
NO_INIT = 1
NO_SAVE = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Endloop.
CLEAR I_TLINE.
REFRESH I_TLINE.
CLEAR I_THEAD.
REFRESH I_THEAD.
Regards,
Kalpana
2008 Nov 21 9:17 AM
You need to use FM SAVE_TEXT to store long texts.
Search the forum with the above FM, you will get lots of threads with sample code.
Also read the FM documentation.
Regards
Karthik D