Thanks MD and Krishna.
Let me explain the finer details of the program logic.
I'm uploading service master records from an excel sheet. Now service numbers can be externally provided or internally generated.
Currently, I am passing the records using BAPI_SERVICE_CREATE and the long text using CREATE_TEXT. The problem is that create_text takes service number as an input and for service numbers created using internal number range, its practically not feasible to retreive the created number during the program execution itself, to be further used in create_text.
So I hope Krishna you must have understood that your solution is good, but in my case, it is not feasible. This you can check from the transaction text area properties itself.
MD, as you have asked for the values I'm passing, so here they are:
SERVICE_LONG_TEXTS-LANGUAGE : 'E'
*SERVICE_LONG_TEXTS-LANGUAGE_ISO
*SERVICE_LONG_TEXTS-FORMAT
SERVICE_LONG_TEXTS-LINE : Any long text
SERVICE_LONG_TEXTSCHANGE_ID : 'X'
My only hope is that using the SERVICE_LONG_TEXTS I may be able to pass data. But it is not happening for my test cases.
Thanks and Regards,
Anuj.
Usuall for long text you may have to explicitly call SAVE_TEXt upon successfull completion of BAPI. Something like shown below
call function 'SAVE_TEXT'
EXPORTING
header = s_thead
insert = 'X'
TABLES
lines = tlines
EXCEPTIONS
others = 1.
if sy-subrc = 0.
call function 'COMMIT_TEXT'
EXPORTING
savemode_direct = 'X'.
endif.
Add comment