Application Development and Automation 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: 
Read only

Longtext for Routing

Former Member
0 Likes
2,777

HI,

I am USing LSMW to upload the longtext for Recipe for transaction C202.

I am using the

Object 0001 Long texts

Method 0001

to upload the long text and it shows that the data is transfered but when i see the transaction C202 i dont see the long text being updated.

i have checked that i have passed all the values like TDNAME, TObjectas Routing, TDID as PLKO corrctly.

Kindly please help why the long text is ot updated or for routing some prior steps are required.

Thanks

HI,

I am USing LSMW to upload the longtext for Recipe for transaction C202.

I am using the

Object 0001 Long texts

Method 0001

to upload the long text and it shows that the data is transfered but when i see the transaction C202 i dont see the long text being updated.

i have checked that i have passed all the values like TDNAME, TObjectas Routing, TDID as PLKO corrctly.

Kindly please help why the long text is ot updated or for routing some prior steps are required.

Thanks

6 REPLIES 6
Read only

royolav_johansen
Explorer
0 Likes
1,588

The text in the receipe is not just the text. The fields TXTSP in table PLKO needs to be

updated too, otherwhise the program doesn't know that it has a text.

If you use object 0170 Routing and Method 0001 Batch input.

The choose transaction C202 and set TXTSP to 'E' for english and field KTEXT as first line of TEXT.

Regards

Roy

Read only

0 Likes
1,588

Hi Roy,

Thanks for the Reply ,

I am using

Object 0001 Long texts

Method 0001

in LSMW and not using the Routing Object for longtext update.

So do i have to use the ROutiong object to update the longtext.

as i have to update the longtext at recipe header and opeartion level and also the RECipe are already created so

how would I update the recipe with longtext in the LSMW and where do i update the TXTSP field ?

Help would be appreciated.

Read only

0 Likes
1,588

Hi SAP gurus,

I have also tried ity with the save_text FM but it doesnt work.

see the sample code below.


DATA: e_header  TYPE thead,
  i_header  TYPE TABLE  OF thead,
        w_tline   TYPE tline,
  i_tline   TYPE TABLE  OF tline,
  wa_tline TYPE tline.


e_header-tdobject =  'ROUTING'.
e_header-tdid =  'PLKO'.
e_header-tdspras = sy-langu.
*   e_header-tdlinesize =  72.

e_header-tdname =  '1002DE0015070300000003'.
wa_tline-tdformat = '*' .
APPEND wa_tline TO i_tline.
*
*
wa_tline-tdline = ' longtext test after the read statemaent'.
APPEND wa_tline TO i_tline.

CALL FUNCTION 'SAVE_TEXT'
  EXPORTING
    client          = sy-mandt
    header          = e_header
    savemode_direct = 'X'
*    INSERT        = 'X'
  TABLES
    lines           = i_tline
  EXCEPTIONS
    id              = 1
    language        = 2
    name            = 3
    object          = 4
    OTHERS          = 5.

IF sy-subrc <>  0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.


  CALL FUNCTION 'COMMIT_TEXT'
    EXPORTING
      object          = e_header-tdobject
      name            = e_header-tdname
      id              = e_header-tdid
      language        = e_header-tdspras
      savemode_direct = 'X'.

  COMMIT WORK AND WAIT.

*    UPDATE PLKO SET TXTSP = sy-langu
*    where
*PLNNR = 'DE001507' AND PLNAL = '02'.
ENDIF.

With LSMW it doesnt wrk also with ABAP code its not working .

Read only

0 Likes
1,588

Hi,

Check the below links

Regards,

Nagaraj

Read only

0 Likes
1,588

thanks Nagaraj

thats was really verry helpful.

but my question is there no oher way to update the longtext as i wud have to create 2 objects for this one to update and another to upload .

so is there no other FM or way to upload longtext in Routing?

Thanks

Read only

0 Likes
1,588

Hi,

There was no thoer way to solve this had to update the TXTSp field bu using update.

thanks