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: 

Error in updating PO Text in MM02 transaction through LSMW recording

Former Member
0 Kudos

To update PO text in MM02 transaction, LSMW was created to upload 30 lines. But in one system it is updating 30 lines correctly and in other system it is updating 21 lines and showing error field tstxt-txtline(31) does not exist in screen SAPLSTXX1100. May be due to screen resolution. please help me in resolving this issue.

1 ACCEPTED SOLUTION

former_member215575
Active Participant
0 Kudos

HI Gopi,

From question, I assume, BDC recording is done to update texts?

If it is, try calling FM - 'CREATE_TEXT' in user routines of LSMW steps to update the texts. I have done the same to update the sales text on PO and is working fine.

Regards,

SG.

2 REPLIES 2

former_member215575
Active Participant
0 Kudos

HI Gopi,

From question, I assume, BDC recording is done to update texts?

If it is, try calling FM - 'CREATE_TEXT' in user routines of LSMW steps to update the texts. I have done the same to update the sales text on PO and is working fine.

Regards,

SG.

Former Member
0 Kudos

Hi Gopi ,

Please use SAP Standard BAPI for Updating PO Text in Material Master ,  it much better then LSMW,BDC and No Screen Dependent .

BAPI for Updating PO Text "BAPI_MATERIAL_SAVEDATA".

Note : If go for BAPI then Please check this Reference Code otherwise ignore below code .

Reference Code :

DATA:  MHEADER LIKE BAPIMATHEAD,

           S_MLTX            LIKE BAPI_MLTX        OCCURS 0 WITH HEADER LINE,

           BAPIMSG   LIKE BAPIRET2 .


MOVE MAT_NR TO MHEADER-MATERIAL.         " Material Numbber

MOVE 'X'           TO MHEADER-PURCHASE_VIEW.   " Purchase View


LOOP AT MATERIALLONGTEXT.

      MOVE 'MATERIAL'                                   TO S_MLTX-APPLOBJECT.         "MATERIAL

      MOVE  MHEADER-MATERIAL                    TO S_MLTX-TEXT_NAME.         " Your Material Leading with Zero's if Internal

      MOVE 'BEST'                                               TO S_MLTX-TEXT_ID.              " BEST for Material

      MOVE  MATERIALLONGTEXT-LANGU_ISO     TO S_MLTX-LANGU_ISO.        "Language

      MOVE  MATERIALLONGTEXT-FORMAT_COL   TO '/' .

      MOVE  MATERIALLONGTEXT-TEXT_LINE        TO S_MLTX-TEXT_LINE.       " PO Text 132 Character each Row

      APPEND S_MLTX.

      CLEAR  S_MLTX.

    ENDLOOP.

    

  CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'

    EXPORTING

      HEADDATA            = MHEADER

    IMPORTING

      RETURN              = BAPIMSG

    TABLES

      MATERIALLONGTEXT    = S_MLTX .


Regard's

Smruti