Hi Sri,
Thanks for your Reply.
FYI am not trying to create operation text, what am doing is am just creating an order with Long text in that case what should be my input. For now am passing the below Inputs.
* Splitting the Long text.
CALL FUNCTION 'SWA_STRING_SPLIT'
EXPORTING
input_string = i_longtext
max_component_length = 132
TABLES
string_components = lt_str
EXCEPTIONS
max_component_length_invalid = 1
OTHERS = 2.
LOOP AT lt_str INTO lwa_str.
IF sy-tabix EQ 1.
lwa_text_lines-tdformat = '*'.
ELSE.
CLEAR lwa_text_lines-tdformat.
ENDIF.
lwa_text_lines-tdline = lwa_str-str.
APPEND lwa_text_lines TO lt_text_lines. * Am filling the text_lines table
CLEAR lwa_text_lines.
ENDLOOP.
DESCRIBE TABLE lt_text_lines LINES lv_endline.
CLEAR lwa_longtxthdr.
lwa_text-langu = 'E'
lwa_text-langu_iso = 'EN'.
lwa_text-textstart = 1.
lwa_text-textend = lv_endline.
APPEND lwa_text TO lt_text. " Filling text table
ENDIF.
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
TABLES
it_methods = lt_methods
it_header = lt_header
it_text = lt_TEXT
it_text_lines = lt_text_lines
return = lt_return
et_numbers = lt_numbers.
Please tellme where am going wrong.