cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

uploading routing long text with LSMW object 0170 and RCPTRA02 Direct input

394

hello all

I managed to change routings with LSMW object 0170 and direct input.

what I did not manage and also do not understand how it works, is the long text upload.

there is structure TXT:OBJ_DSwhere the information about group counter and operation goes but there are other fields where it is not clear to me how to fill them.

TLINE_DS should contain the text but how to enter it? how should it look in the upload file?

has anyone used it in the past?text-in-lsmw-di.png

Accepted Solutions (0)

Answers (1)

Answers (1)

christianlima
Explorer
0 Kudos

Hi,

In the TXT_OBJ_DS you have to assign your operations structure/file, and in the TLINE_DS you have to assign your long text structure/file. The structure of the long text must be a lower level of the operations one. The key between the operation and long text file can be MATNR, WERKS_D, PLNAL, PLNFOLGE and VORNR. (You will not find all those fields in the TLINE_DS, but you can use them in your file. This is how SAP can define a key between the files).

1 step: maintain the source structures - long text structure in the lower level of the operations.

2 step: maintain the source fields - both  routing and long text structures must have the key fields informed above.

3 step: assign the operations structure to the TXT_OBJ_DS and assign the long text structure to the TLINE_DS.

4 step: Field mapping and conversion rules - review the fields of TXT_OBJ_DS. I'm using like this:

BEGIN_OF_RECORD: TXT_OBJ_DS = INIT_TXT_OBJ_DS.
RECTY: TXT_OBJ_DS-RECTY = '21'.

ACTTYP: TXT_OBJ_DS-ACTTYP = 'H'.

OBJ:TXT_OBJ_DS-OBJ = 'O'.

PLNAL: TXT_OBJ_DS-PLNAL = '1'.      (This is the Group Counter, in my case is always 1).

PLNFL: TXT_OBJ_DS-PLNFL = routing_op-plnfolge.      (routing_op is the name of my structure)

VORNR: TXT_OBJ_DS-VORNR = routing_op-vornr.

TEXT_FROM: TXT_OBJ_DS-TEXT_FROM = ROUTING_OP-FROM.  (This is really important, will dictate which lines should be read for each operation).

TEXT_TO:  TXT_OBJ_DS-TEXT_TO = ROUTING_OP-TO. (This is really important, will dictate which lines should be read for each operation).

Review the fields of TLINE_DS. I'm using like this:

_BEGIN_OF_RECORD_:  TLINE_DS = INIT_TLINE_DS.

RECTY: TLINE_DS-RECTY = '22'.

TDFORMAT: TLINE_DS-TDFORMAT = '*'.           (* = this is a paragraph)

TDLINE:  TLINE_DS-TDLINE = OPLONGTEXT-LTXT.        (OPLONGTEXT is the name of my structure)