Skip to Content
author's profile photo Former Member
Former Member

Long Text for IA05 Transaction

I'm using LSMW for Task List Creation (IA05 Transaction). I'm passing long text for each operation. Whatever long Text, I'm passing through file is replacing the description of operation. Can anyone please let me know how to proceed further.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on May 05, 2015 at 06:01 PM

    Try creating one manually and check in STXH table, the long text parameters you would be able to see there. the Same has to be passed as the parameters in your LSMW. Hope this works.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 05, 2015 at 03:15 PM

    Tasklists Operation Longtexts are extension of Operation text LTXA1. So you prepare your Longtexts in such a manner that they start with the Operation texts. There is no other way whether it is LSMW or BDC program.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 06, 2015 at 07:11 AM

    Hi Snehal gandham,

    i wrote BDC program for IA05..

    It may useful for u..

    REPORT ZC_PM_IA05_BDC_TASK_LIST MESSAGE-ID ZPM_IA05.

    TYPES: BEGIN OF GTY_FINAL,

    PLNNR TYPE RC271-PLNNR,

    STTAG(10) TYPE C,

    PLNAL TYPE PLKOD-PLNAL,

    KTEXT TYPE PLKOD-KTEXT,

    WERKS TYPE PLKOD-WERKS,

    ARBPL TYPE RCR01-ARBPL,

    WERKS1 TYPE RCR01-WERKS,

    VERWE TYPE PLKOD-VERWE,

    VAGRP TYPE PLKOD-VAGRP,

    STATU TYPE PLKOD-STATU,

    LTXA1(250) type c,

    END OF GTY_FINAL.

    TYPES: BEGIN OF GTY_FINAL1,

    PLNNR TYPE RC271-PLNNR,

    PLNAL TYPE PLKOD-PLNAL,

    STTAG(10) TYPE C,

    KTEXT TYPE PLKOD-KTEXT,

    WERKS TYPE PLKOD-WERKS,

    ARBPL TYPE RCR01-ARBPL,

    WERKS1 TYPE RCR01-WERKS,

    VERWE TYPE PLKOD-VERWE,

    VAGRP TYPE PLKOD-VAGRP,

    STATU TYPE PLKOD-STATU,

    LTXA1(250) type c,

    END OF GTY_FINAL1.

    TYPES : BEGIN OF GTY_S_ERROR,

    MSG(60) TYPE C,

    END OF GTY_S_ERROR.

    *& DEFINING FIRST ITAB AND WORKAREA FOR UPLOADING THE DATA

    *****************************************************************

    DATA : GT_FINAL TYPE TABLE OF GTY_FINAL,

    GS_FINAL TYPE GTY_FINAL,

    GT_FINAL_T TYPE TABLE OF GTY_FINAL1,

    GS_FINAL_T TYPE GTY_FINAL1,

    GT_FINAL1 TYPE TABLE OF GTY_FINAL1,

    GS_FINAL1 TYPE GTY_FINAL1.

    DATA : GT_ERROR TYPE TABLE OF GTY_S_ERROR,

    GS_ERROR LIKE LINE OF GT_ERROR.

    DATA : GT_SUCCESS TYPE TABLE OF GTY_S_ERROR,

    GS_SUCCESS LIKE LINE OF GT_SUCCESS.

    TYPES : BEGIN OF gty_text,

    text(40) TYPE c,

    END OF gty_text.

    DATA : gt_text TYPE TABLE OF gty_text,

    gt_text2 TYPE TABLE OF gty_text,

    gw_text LIKE LINE OF gt_text,

    gw_text2 LIKE LINE OF gt_text.

    DATA :

    l_counti TYPE i VALUE 0,

    l_countc(3) TYPE c VALUE 0,

    l_counti2 TYPE i VALUE 0,

    l_countc2(3) TYPE c VALUE 0,

    l_lines TYPE i,

    l_linesc(3) TYPE c,

    l_tcontrol(125) TYPE c.

    CONSTANTS:

    co_max TYPE i VALUE 40.

    DATA:

    lv_string TYPE string,

    lv_sum TYPE i,

    lv_len1 TYPE i,

    lv_txt2(co_max) TYPE c,

    lv_len2 TYPE i.

    DATA :

    L_PATH1 TYPE RLGRAP-FILENAME.

    DATA : GT_BDCDATA TYPE TABLE OF BDCDATA,

    GS_BDCDATA TYPE BDCDATA,

    GT_BDCMSGCOLL TYPE TABLE OF BDCMSGCOLL,

    GS_BDCMSGCOLL LIKE LINE OF GT_BDCMSGCOLL.

    DATA :COUNT TYPE I,

    V_COUNT(3) TYPE C,

    V_FNAM(132) TYPE C.

    DATA :

    GT_DATA TYPE STANDARD TABLE OF GTY_FINAL ,

    GT_RAW TYPE TRUXS_T_TEXT_DATA.

    ********************* SELECTION-SCREEN **********************

    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

    PARAMETERS : P_FILE LIKE IBIPPARMS-PATH OBLIGATORY.

    SELECTION-SCREEN END OF BLOCK B1.

    ********************* SELECTION-SCREEN **********************

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.

    PERFORM BROWSE_FILE.

    START-OF-SELECTION.

    PERFORM GUI_UPLOAD.

    PERFORM MAP_DATA.

    END-OF-SELECTION.

    PERFORM DISPLAY_RESULT.

    FORM BROWSE_FILE .

    CALL FUNCTION 'F4_FILENAME'

    EXPORTING

    PROGRAM_NAME = SYST-CPROG

    DYNPRO_NUMBER = SYST-DYNNR

    IMPORTING

    FILE_NAME = P_FILE.

    l_path1 = p_file.

    ENDFORM. " BROWSE_FILE

    FORM GUI_UPLOAD .

    l_path1 = p_file.

    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'

    EXPORTING

    I_TAB_RAW_DATA = GT_RAW

    I_FILENAME = l_path1

    TABLES

    I_TAB_CONVERTED_DATA = GT_DATA

    EXCEPTIONS

    CONVERSION_FAILED = 1

    OTHERS = 2.

    IF SY-SUBRC = 0.

    DELETE GT_DATA INDEX 1 .

    GT_FINAL = GT_DATA.

    ELSE.

    MESSAGE I000(ZPM_IA05).

    CALL TRANSACTION 'ZIA05'. "#EC CI_CALLTA.

    ENDIF.

    ENDFORM.

    FORM MAP_DATA .

    SORT GT_FINAL BY PLNNR.

    LOOP AT GT_FINAL INTO GS_FINAL.

    MOVE-CORRESPONDING GS_FINAL TO GS_FINAL_T.

    APPEND GS_FINAL_T TO GT_FINAL_T.

    CLEAR : GS_FINAL,GS_FINAL_T.

    ENDLOOP.

    LOOP AT GT_FINAL_T INTO GS_FINAL_T.

    MOVE-CORRESPONDING GS_FINAL_T TO GS_FINAL1.

    AT NEW PLNAL. "for every PLNAL

    APPEND GS_FINAL1 TO GT_FINAL1.

    ENDAT.

    CLEAR : GS_FINAL1,GS_FINAL_T.

    ENDLOOP.

    LOOP AT GT_FINAL1 INTO GS_FINAL1.

    ************** SCREEN 3010 ****************

    PERFORM BDC_DYNPRO USING 'SAPLCPDI' '3001'.

    PERFORM BDC_FIELD USING 'BDC_CURSOR'

    'RC271-PLNNR'.

    PERFORM BDC_FIELD USING 'BDC_OKCODE'

    '=ALUE'.

    PERFORM BDC_FIELD USING 'RC271-PLNNR'

    GS_FINAL1-PLNNR.

    PERFORM BDC_FIELD USING 'RC271-STTAG'

    GS_FINAL1-STTAG.

    ************** SCREEN 3200 ****************

    PERFORM BDC_DYNPRO USING 'SAPLCPDI' '3200'.

    PERFORM BDC_FIELD USING 'BDC_CURSOR'

    'RC27X-ENTRY_ACT'.

    PERFORM BDC_FIELD USING 'BDC_OKCODE'

    '=ANLG'.

    ************** SCREEN 3010 ****************

    PERFORM BDC_DYNPRO USING 'SAPLCPDA' '3010'.

    PERFORM BDC_FIELD USING 'BDC_CURSOR'

    'PLKOD-STATU'.

    PERFORM BDC_FIELD USING 'BDC_OKCODE'

    '=VOUE'.

    *PERFORM BDC_FIELD USING 'PLKOD-PLNAL'

    * GS_FINAL1-PLNAL.

    PERFORM BDC_FIELD USING 'PLKOD-KTEXT'

    GS_FINAL1-KTEXT.

    PERFORM BDC_FIELD USING 'PLKOD-WERKS'

    GS_FINAL1-WERKS.

    PERFORM BDC_FIELD USING 'RCR01-ARBPL'

    GS_FINAL1-ARBPL.

    PERFORM BDC_FIELD USING 'RCR01-WERKS'

    GS_FINAL1-WERKS1.

    PERFORM BDC_FIELD USING 'PLKOD-VERWE'

    GS_FINAL1-VERWE.

    PERFORM BDC_FIELD USING 'PLKOD-VAGRP'

    GS_FINAL1-VAGRP.

    PERFORM BDC_FIELD USING 'PLKOD-STATU'

    GS_FINAL1-STATU.

    CLEAR COUNT.

    CLEAR L_COUNTI2.

    LOOP AT GT_FINAL_T INTO GS_FINAL_T WHERE

    PLNNR = GS_FINAL1-PLNNR

    AND PLNAL = GS_FINAL1-PLNAL.

    L_COUNTI2 = L_COUNTI2 + 1.

    L_COUNTC2 = L_COUNTI2.

    CONDENSE L_COUNTC2.

    CLEAR L_TCONTROL.

    PERFORM BDC_DYNPRO USING 'SAPLCPDI' '3400'.

    PERFORM BDC_FIELD USING 'BDC_OKCODE' '/00'.

    * &------------LOGIC FOR SPLITING LONG TEXT---------------&*

    LV_STRING = GS_FINAL_T-LTXA1.

    REFRESH GT_TEXT.

    SPLIT LV_STRING AT '' INTO TABLE GT_TEXT.

    CLEAR : GT_TEXT2,GW_TEXT2,LV_TXT2.

    REFRESH : GT_TEXT2.

    LOOP AT GT_TEXT INTO GW_TEXT.

    LV_LEN1 = STRLEN( GW_TEXT ).

    ASSERT LV_LEN1 <= CO_MAX.

    LV_LEN2 = STRLEN( LV_TXT2 ).

    LV_SUM = LV_LEN1 + LV_LEN2 + 1.

    IF LV_SUM <= CO_MAX.

    CONCATENATE LV_TXT2 GW_TEXT INTO LV_TXT2 SEPARATED BY ' '.

    CONDENSE LV_TXT2.

    ELSE.

    APPEND LV_TXT2 TO GT_TEXT2.

    LV_TXT2 = GW_TEXT.

    ENDIF.

    ENDLOOP.

    APPEND LV_TXT2 TO GT_TEXT2.

    CLEAR L_LINES.

    LOOP AT GT_TEXT2 INTO GW_TEXT2. " COUNTING NUMBER OF LINES

    L_LINES = L_LINES + 1.

    ENDLOOP.

    * &-------------------END_OF_LOGIC------------------------&*

    READ TABLE GT_TEXT2 INTO GW_TEXT2 INDEX 1.

    CONCATENATE 'PLPOD-LTXA1(' L_COUNTC2 ')' INTO L_TCONTROL.

    PERFORM BDC_FIELD USING L_TCONTROL GW_TEXT2-TEXT.

    CLEAR L_TCONTROL.

    PERFORM BDC_DYNPRO USING 'SAPLCPDI' '3400'.

    PERFORM BDC_FIELD USING 'BDC_OKCODE' '/00'.

    IF L_LINES GT 1.

    CONCATENATE 'RC270-TXTKZ(' L_COUNTC2 ')' INTO L_TCONTROL.

    PERFORM BDC_FIELD USING 'BDC_CURSOR' L_TCONTROL.

    CLEAR L_TCONTROL.

    PERFORM BDC_FIELD USING 'BDC_OKCODE'

    '=PICK'.

    PERFORM BDC_DYNPRO USING 'SAPLSTXX' '1100'.

    CLEAR L_LINESC.

    L_LINESC = L_LINES + 1.

    CONDENSE L_LINESC.

    CONCATENATE 'RSTXT-TXLINE(' L_LINESC ')' INTO L_TCONTROL.

    PERFORM BDC_FIELD USING 'BDC_CURSOR' L_TCONTROL.

    CLEAR : L_TCONTROL,L_LINESC.

    PERFORM BDC_FIELD USING 'BDC_OKCODE'

    '=TXBA'.

    "&---------INSERTING LONG-TEXT IN 1100 SCREEN----------&*

    CLEAR : L_COUNTI, L_COUNTC.

    L_COUNTI = 1.

    LOOP AT GT_TEXT2 INTO GW_TEXT2.

    L_COUNTI = L_COUNTI + 1.

    L_COUNTC = L_COUNTI.

    CONDENSE L_COUNTC.

    CLEAR L_TCONTROL.

    * IF L_COUNTC >< 1.

    CONCATENATE 'RSTXT-TXLINE(' L_COUNTC ')' INTO L_TCONTROL.

    PERFORM BDC_FIELD USING 'BDC_CURSOR'

    L_TCONTROL.

    PERFORM BDC_FIELD USING L_TCONTROL

    GW_TEXT2-TEXT.

    CLEAR : GW_TEXT2.

    * ENDIF.

    ENDLOOP.

    CLEAR : L_COUNTI , L_COUNTC.

    REFRESH : GT_TEXT2.

    ENDIF.

    "&------------------END OF INSERT---------------------&*

    IF COUNT => 16.

    COUNT = 1.

    ENDIF.

    CLEAR :GS_FINAL_T.

    ENDLOOP.

    ************** SCREEN 3400 ****************

    PERFORM BDC_DYNPRO USING 'SAPLCPDI' '3400'.

    CLEAR V_FNAM.

    CONCATENATE 'PLPOD-VORNR(' V_COUNT ')' INTO V_FNAM.

    PERFORM BDC_FIELD USING 'BDC_CURSOR'

    V_FNAM.

    PERFORM BDC_FIELD USING 'BDC_OKCODE'

    '=BU'.

    CALL TRANSACTION 'IA05' USING GT_BDCDATA MODE 'A' UPDATE 'S' MESSAGES INTO GT_BDCMSGCOLL."#EC CI_CALLTA.

    IF SY-SUBRC = 0.

    PERFORM DISPLAY_SUCCESS_REC.

    ELSE.

    PERFORM DISPLAY_ERROR_REC.

    ENDIF.

    CLEAR :GS_BDCDATA,GS_FINAL1.

    REFRESH GT_BDCDATA.

    ENDLOOP.

    ENDFORM. " MAP_DATA

    FORM BDC_DYNPRO USING PROGRAM DYNPRO.

    CLEAR GS_BDCDATA.

    GS_BDCDATA-PROGRAM = PROGRAM.

    GS_BDCDATA-DYNPRO = DYNPRO.

    GS_BDCDATA-DYNBEGIN = 'X'.

    APPEND GS_BDCDATA TO GT_BDCDATA.

    ENDFORM. "BDC_DYNPRO

    FORM BDC_FIELD USING FNAM FVAL.

    CLEAR GS_BDCDATA.

    GS_BDCDATA-FNAM = FNAM.

    GS_BDCDATA-FVAL = FVAL.

    APPEND GS_BDCDATA TO GT_BDCDATA.

    * ENDIF.

    ENDFORM. "BDC_FIELD

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 08, 2015 at 01:37 PM

    I'm getting this error


    Capture.PNG (7.4 kB)
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.