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: 

regarding Long text value entered through BDC.

Former Member
0 Kudos

Hi

I have one problem I have created one module pool which containssome fields and one editor object on my screen.

now when i try to enter the data in the module pool then BDC excutes for QM01. All the data updated in TCODE: QM01 except one that is long text field

Please suggest me how to enter the long text data in bdc through my module pool

Thanks in advance.

14 REPLIES 14

Former Member
0 Kudos

Hi,

After the BDC is executed..You can use the FM SAVE_TEXT to add the long text.

Thanks,

Naren

0 Kudos

Hi Naren,

But how could i use FM SAVE_TEXT.

Please suggest.

I fetch the data thru get_text_r3table. then how would i proceed.

Former Member
0 Kudos

Hi,

You can get the text details..

Go to the transaction QM01...Then go to the text ...

Double click on the text..

Then in the menu..Goto -> header..You will get the details like..

TEXT NAME. "Will be your document number that gets generated.

TEXT OBJECT

TEXT ID.

Use the same information..

lwa_thead-mandt = sy-mandt.

lwa_thead-tdspras = sy-langu.

lwa_thead-tdobject = 'Object name'.

lwa_thead-tdid = 'Object id'.

lwa_thead-tdname = 'The number that will be generated after QM01'.

  • Call the function module to save the text.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

client = sy-mandt

header = lwa_thead

savemode_direct = 'X'

TABLES

lines = lt_texts

EXCEPTIONS

id = 1

language = 2

name = 3

object = 4

OTHERS = 5.

THanks,

Naren

0 Kudos

Hi Naren,

When i enter the values which you mentioned like

lwa_thead-mandt = sy-mandt.

lwa_thead-tdspras = 'EN'

lwa_thead-tdobject = 'QMEL'.

lwa_thead-tdid = 'LTQM'.

lwa_thead-tdname = ' WHICH IS ALREADY GENERATED.The number that will be generated after QM01'.

Executed in SE37.

but no updation on the QM01 data.

Former Member
0 Kudos

Hi,

did you pass savemode_direct = 'X' in the parameter..

THanks,

Naren

0 Kudos

Yes i pass savemode_direct = 'X'

Former Member
0 Kudos

Hi,

Make sure the number generated is having leading zeroes..

Example..If the number generated is 123456789

WHen you give in SE37..

you should give 0123456789.

If the total number of characters in the table is ten ..

THanks,

Naren

0 Kudos

Hi Naren,

I entered the Leading zerors but still it is not updating the long text.

I think some thing i am missing.............???

Former Member
0 Kudos

Hi,

Not sure..why it is not working..

Also try giving INSERT = 'X'

Thanks,

Naren

0 Kudos

Hi Naren,

No still not updating the long text value

any other solution for this

Former Member
0 Kudos

Hi,

Do one thing..

Manually create the document in QM01..Then enter the long text there in the transaction..

Then save the document ...

Go to SE37..use the function module READ_TEXT with the values..

Check if you were able to see the values..

Then you can use the same values for SAVE_TEXT also.

Thanks,

Naren

0 Kudos

Hi Naren,

If i pass all the previous parameter which i used for SAVE_TEXT . then it is showing me the text but when i go into the Tcode: QM02 and check than i am not able to see the text.

I think my TDID and TDOBJECT is wrong. can you please look into the table and tell me the exact field value TDID and TDOBJECT

Thanks

Former Member
0 Kudos

Hi,

This is what I am getting in QM01..

Text name %00000000001

Language EN

Text ID LTQM

Text object QMEL

Form <b>PM_QMEL</b>

Do you have to give the form name???

Thanks,

Naren

Former Member
0 Kudos

Hi,

Check this sample code..It worked for me..

PARAMETERS: p_qmnum TYPE qmnum OBLIGATORY.

DATA: header LIKE thead.

DATA: tline LIKE tline OCCURS 0 WITH HEADER LINE.

  • Fill the header.

header-tdobject = 'QMEL'.

header-tdname = p_qmnum.

header-tdid = 'LTQM'.

header-tdspras = 'EN'.

  • Fill the lines.

tline-tdformat = '*'.

tline-tdline = 'Test from SAVE_TEXT'.

APPEND tline.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

header = header

savemode_direct = 'X'

TABLES

lines = tline

EXCEPTIONS

id = 1

language = 2

name = 3

object = 4

OTHERS = 5.

IF sy-subrc <> 0.

WRITE: / 'Error'.

ELSE.

WRITE: / 'Successful'.

ENDIF.

Thanks,

Naren