01-25-2013 11:47 AM
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.
01-26-2013 3:33 AM
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.
01-26-2013 3:33 AM
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.
01-28-2013 3:45 AM
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