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: 

Update work order Operations Long text in IW31

Former Member
0 Kudos

Hi Folks,

I have to update the long text in operations tab of IW31 work order screen using ABAP code. Please tell me if it can be done by using FM  BAPI_ALM_ORDER_MAINTAIN. If yes then what all fields to be passed? If no, then what is the alternate solution. Thanks.

1 REPLY 1

naimesh_patel
Active Contributor
0 Kudos

You need use the tables ET_TEXTS and ET_TEXT_LINES to populate the text.

Things to remember:

  • Add all text in the table ET_TEXT_LINES
  • In the TEXTS table, add TEXTSTART as the starting index from ET_TEXT_LINES. Also TEXTEND is the ending index from the same table. Also populate the relevant activity, operation etc.


  ls_text_h-orderid    = P_ORDER.

  ls_text_h-langu      = sy-langu.

  ls_text_h-textstart  =  1.

  ls_text_h-textend    =  n_text_end.

  APPEND ls_text_h TO t_text_h.

 

* Move text   

    ls_text-tdline = e_txt_editor-tdline.

    APPEND ls_text TO t_text.

    CALL FUNCTION 'BAPI_ALM_ORDER_GET_DETAIL'

      EXPORTING

        number        = pa_aufnr

      IMPORTING

        es_header     = e_head_e

      TABLES

        et_operations = t_oper_e[]

        et_components = t_comp_e[]

        et_texts      = t_text_h[]

        et_text_lines = t_text[]

        return        = t_return[].

Regards,
Naimesh Patel