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: 

create_text function module

Former Member
0 Kudos

hi,

ihave bdc in that i having field like long text i have to upload the long text using create_text function module how to use and where to use in bdc. wat parameters i have to pass exactly.

6 REPLIES 6

Former Member
0 Kudos

long text can not be updated in BDC. you can do it only after completing BDC , by call function SAVE_TEXT

if u can tell the transaction & long text, then it's possible to find what values to pass to this FM. each text obj need diff attibutes.

Former Member
0 Kudos

transaction code is qa11

perform bdc_field using 'RSTXT-TXLINE(02)'

'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'

& 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'.

perform bdc_field using 'RSTXT-TXLINE(03)'

'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

& 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'.

perform bdc_field using 'RSTXT-TXLINE(04)'

'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'

& 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'.

perform bdc_field using 'RSTXT-TXLINE(05)'

'hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh'

& 'hhhhhhhhhhhhhhhhhhhhhh'.

0 Kudos

Hi,

Instead of this use the following code for uploading the long text.

You have to take the long text in the separate internal table.

it_text is the internal table you have to use to put the long text.

Use this code after ur record code.

The value to be passed to ls_thead-TDNAME field is the number you got from BDC program that is the number of the created object.

{

DATA it_text TYPE STANDARD TABLE OF tline.

DATA: ls_thead TYPE thead.

LS_THEAD-TDOBJECT = 'QPRUEFLOS'

LS_THEAD-TDNAME = 'inspection log number'

LS_THEAD-TDID = (QALS "Long text on inspection lot

QAVE "Long text on usage decision

QBST "Inventory posting log)

LS_THEAD-TDSPRAS = 'E'.

call function 'SAVE_TEXT'

exporting

client = sy-mandt

header = ls_thead

insert = 'X'

savemode_direct = 'X'

  • OWNER_SPECIFIED = ' '

  • IMPORTING

  • FUNCTION =

  • NEWHEADER =

tables

lines = lt_text

exceptions

id = 1

language = 2

name = 3

object = 4

others = 5.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

}

reward points if you find it helpful.

Thanks,

Prasanna

0 Kudos

you need to pass following values to function module along with internal table with text lines.

Text Name 800160000000050L

Language EN

Text ID QAVE (Long text on usage decision

Text Object QPRUEFLOS (Inspection lot texts

Text name you will have to build by concatenating Sy-mandt, inspection lot number + "L"

0 Kudos

hi ,

this is saigeetha.

thks for sending one more doubt like ihave pass that textfield in recording or not and also for updating in to database create_text is enough or i have pass save_text also.

thksans regards

saigeetha.

0 Kudos

don't pass in recording.

SAVE_TEXT will create /update both no need to use create_text