2009 Jun 10 10:48 AM
Hi
I am using this function to save material data and I have some questions about long texts; I see that bapi_mltx is the structure I have to use for long texts having this structure:
APPLOBJECT TDOBJECT CHAR 10 0 Testi: oggetto applicazione
TEXT_NAME TDOBNAME CHAR 70 0 Nome
TEXT_ID TDID CHAR 4 0 ID testo
LANGU TDSPRAS LANG 1 0 Chiave lingua
LANGU_ISO LAISO CHAR 2 0 Lingua (ISO 639)
FORMAT_COL TDFORMAT CHAR 2 0 Colonna formato
TEXT_LINE TDLINE CHAR 132 0 Riga testo
DEL_FLAG DELETE_FLAG CHAR 1 0 Canc. record dati (nelle tabelle di ripetizione)
The questions are:
1) if I have to set more texts (descriptions, sales texts ecc) for more views, I have anyway to put all of them together in bapi_mltx?
2) what should i put in text_line field? if I have a text more than 132 characters have I to put more lines splitting them at 132 characters?
thanks to anyone can halp me
gabriele
Edited by: Gabriele Montori on Jun 10, 2009 11:49 AM
2009 Jun 10 11:01 AM
Hi,
You can use MATERIALLONGTEXT to enter multiple long texts for a material .
Pass the parameters as follows
APPLOBJECT = 'MATERIAL'
TEXT_NAME = Material Number (MATNR)
TEXT_ID = ID for corresponding Long text
TEXT_LINE = 'Entera Some text '
then append to MATERIALLONGTEXT. Liek this u can create change or create multiple longtexts.
Regards,
Ananth
2009 Jun 10 11:01 AM
Hi,
You can use MATERIALLONGTEXT to enter multiple long texts for a material .
Pass the parameters as follows
APPLOBJECT = 'MATERIAL'
TEXT_NAME = Material Number (MATNR)
TEXT_ID = ID for corresponding Long text
TEXT_LINE = 'Entera Some text '
then append to MATERIALLONGTEXT. Liek this u can create change or create multiple longtexts.
Regards,
Ananth
2009 Jun 10 11:07 AM
yes
excuse me if I was not clear while explaining
I know I have to use MATERIALLONGTEXT ... I wrote the type and not the name of the field:
MATERIALLONGTEXT LIKE BAPI_MLTX
My question is: if I have more than 132 characters for texts, what I have to do?
split on 132 and then make two insert in this table?
2009 Jun 10 11:11 AM
ok.. first split at 132 then for first time put FORMAT_COL as '*' and from the next time onwards put FORMAT_COL as '=' .
Regards,
Ananth
2025 Feb 06 5:36 AM
hi,
We faced the same issue and resolved it as follows.
When is length of purchase order text is greater than 132 characters, split it using FM 'SWA_STRING_SPLIT' and append it to mltx.
The code should be something like below.
DATA: lt_string_comp TYPE STANDARD TABLE OF swastrtab,
lv_input_str TYPE string.
lv_input_str = wa_matmaster-tdline. "The input string
CALL FUNCTION 'SWA_STRING_SPLIT'
EXPORTING
input_string = lv_input_str "string to be split
max_component_length = 132
TABLES
string_components = lt_string_comp.
LOOP AT lt_string_comp INTO DATA(ls_string_comp).
it_mltx-text_name = wa_matmaster-matnr. "Material id
it_mltx-langu = 'EN'.
it_mltx-applobject = 'MATERIAL'.
it_mltx-text_id = 'BEST'.
it_mltx-text_line = ls_string_comp-str.
APPEND it_mltx.
CLEAR ls_string_comp.
ENDLOOP.