01-16-2008 1:04 PM
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
01-16-2008 1:06 PM
Hello,
Use these two line once u called the FM SAVE_TEXT
CALL FUNCTION 'COMMIT_TEXT'.
COMMIT WORK AND WAIT.
Cheers,
Vasanth
01-16-2008 1:06 PM
Hello,
Use these two line once u called the FM SAVE_TEXT
CALL FUNCTION 'COMMIT_TEXT'.
COMMIT WORK AND WAIT.
Cheers,
Vasanth
01-16-2008 2:16 PM
01-16-2008 2:22 PM
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
01-16-2008 2:30 PM
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
01-16-2008 2:52 PM
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
01-16-2008 3:20 PM
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.
01-16-2008 3:22 PM
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
01-16-2008 3:32 PM
01-16-2008 4:06 PM
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
01-16-2008 4:17 PM
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.
01-16-2008 4:22 PM
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
01-16-2008 4:38 PM
hi vasanth,
you are absolutely right.
your solution has solved my problem..thanks for your continuous replies...thanks a ton
01-16-2008 4:58 PM
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.
01-16-2008 1:10 PM
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
01-16-2008 2:16 PM
01-16-2008 2:19 PM
Hi,
Instead of commenting both, try commenting either of the one.
Regards,
Satish
01-16-2008 2:23 PM
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.