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: 

Save_text

Former Member
0 Kudos

Hi all,

I want to create or store the condition text for condition records in vk11.

I am using the function module save_text.But in vk13 i am not seeing the conditon texts i gave for that particular condition record

Below is the code..please go thru and help.its really urgent

select SINGLE knumh from a911 INTO lv_knumh where matnr =

'06ASA10511D141'

and werks = '8380' and datab = '20080323' and datbi = '99991231'.

theader-TDOBject = 'KONP'.

THEADER-tdname = lv_knumh. (condition number as name)

THEADER-tdid = '0001'.

THEADER-tdspras = 'E'.

THEADER-mandt = sy-mandt.

wtline-tdformat = ''.*

wtline-tdline = 'savetext test'.

append wtline to tline.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

    • CLIENT = SY-MANDT*

header = theader

    • INSERT = 'X'*

    • SAVEMODE_DIRECT = 'X'*

    • OWNER_SPECIFIED = ' '*

    • LOCAL_CAT = ' '*

IMPORTING

FUNCTION = lv_func

NEWHEADER = nheader

tables

lines = tline

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

OBJECT = 4

OTHERS = 5

points will be rewarded if problem sovled

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello,

Use these two line once u called the FM SAVE_TEXT

CALL FUNCTION 'COMMIT_TEXT'.

COMMIT WORK AND WAIT.

Cheers,

Vasanth

17 REPLIES 17

Former Member
0 Kudos

Hello,

Use these two line once u called the FM SAVE_TEXT

CALL FUNCTION 'COMMIT_TEXT'.

COMMIT WORK AND WAIT.

Cheers,

Vasanth

0 Kudos

Hi vasanth,

i tried ypur approach .it doesnt work

0 Kudos

Hello Hema,

Could you able to see the created the Text in the table STXH.

If u r able to see the text in STXH, then there may be some problem in customization.

Regards,

Vasanth

0 Kudos

Hi vasanth,

u r right..i am able to see the record in stxh..

but not able to see the text in vk13 transaction..

My question is if i am creating the condition record through transaction vk11 and if i enter the text in the transaction itself ... i am able to see the text in vk13.

if config is the issue then how the abov ething is working

0 Kudos

Hello Hema,

Please check this point.

The KNUMH u r passing to the FM SAVE_TEXT is having the leading zero's.

Check whether u r passing the values like this.

Text name 000070057001

Language EN

Text ID 0001 Internal comment

Text object KONP Condition texts

Regards,

Vasanth

0 Kudos

hi vasanth,

I couldnt understand what you are saying..

i have passed the same values in the code. right..

theader-TDOBject = 'KONP'.

THEADER-tdname = lv_knumh.

THEADER-tdid = '0001'.

THEADER-tdspras = 'E'.

THEADER-mandt = sy-mandt.

0 Kudos

Hi Hema,

Could you please show the record which is created in the STXH table.

I want to know whether the KNUMH is having the leading zero.

Vasanth

0 Kudos

230 KONP 0000009851 0001 E

0 Kudos

Hello Hema,

I got the problem.

The TDNAME should the combination of the KNUMH and KOPOS

SO do like this.

select SINGLE knumh from a911 INTO lv_knumh where matnr =

'06ASA10511D141'

and werks = '8380' and datab = '20080323' and datbi = '99991231'.

concatenate lv_knumh '01' into lv_knumh.

make this changes.

Hope this will work out.

Regards,

Vasanth

0 Kudos

Hi,

I am also having a problem with save_text

I already have some data in a form and have to append other data to it.

But when I am using SAVE_TEXT the data is being overwritten.

Is there anyway I can save the text using the index?

Since this discussion is regarding SAVE_TEXT, I am posting this question.

please give me your suggestions.

Thanks,

goldie.

0 Kudos

Hello Goldie,

If u want to append the text to an existing text then pass the INSERT Parameter as SPACE

Hope it will helps you.

Vasanth

0 Kudos

hi vasanth,

you are absolutely right.

your solution has solved my problem..thanks for your continuous replies...thanks a ton

0 Kudos

Hello vasanth,

even with insert = ' ', it is still getting overwritten.

Do you think edit_text would append the data.

If not I will have to read the data using READ_TEXT and the append the added data to itab

and then call SAVE_TEXT.

Former Member
0 Kudos

Hi,

Uncomment the below statements

INSERT = 'X'

SAVEMODE_DIRECT = 'X'

And after calling the FM, do like this

if sy-subrc = 0.

commit work.

endif.

Regards,

Satish

0 Kudos

Hi satish,

still it doesn't work

0 Kudos

Hi,

Instead of commenting both, try commenting either of the one.

Regards,

Satish

0 Kudos

Hi satish,

it didnt work.

for commit_text...do we need to pass all inputs.

or can we use the FM as bapi_transaction _commit.