Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Long Text in BDC

Former Member
0 Kudos
153

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos
111

You have to use SAVE_TEXT and than COMMIT_TEXT after PO is created.

Regards,

Mohaiyuddin

6 REPLIES 6

former_member1245113
Active Contributor
0 Kudos
111

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

Former Member
0 Kudos
112

You have to use SAVE_TEXT and than COMMIT_TEXT after PO is created.

Regards,

Mohaiyuddin

0 Kudos
111

send me code if U have.........

0 Kudos
111

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

0 Kudos
111

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

Former Member
0 Kudos
111

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