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

Upload sales text for material master using LSMW direct input method

Former Member
0 Likes
8,943

Hello Experts,

I was trying to upload sales text for a material master using LSMW direct input method.

I followed the following steps for the same

Tab dlimited Text file format

MATNR LONGTEXT LINE

MATERIAL1 LONGTEXT FOR MATERIAL MATERIAL1 1

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

Step1 -> Maintain object attributes

Object -> 0001

Method-> 0001

Program name -> /SAPDMC/SAP_LSMW_IMPORT_TEXTS

Program type -> D

Step2 -> Maintain Source Structure

Source structure -> LONG_TEXT Source structure for long text

Step 3-> Maintain souce file

Source Fields

ZLONG_TEXT Source structure for long text

MATNR C(018) MATNR

LTEXT C(132) LTEXT

Step 4-> Maintain structure relationship

Structure Relations

/SAPDMC/LTXTH Long Texts: Header <<<< ZLONG_TEXT Source structure for long text

Select Target Structure /SAPDMC/LTXTH .

/SAPDMC/LTXTL Long Texts: Row <<<< ZLONG_TEXT Source structure for long text

Select Target Structure /SAPDMC/LTXTL .

Step 5-> Maintain Field mapping and conversion rules

Here i have assigned constan rules to couple of them like

/SAPDMC/LTXTH Long Texts: Header

Fields

OBJECT Texts: Application Object

Rule : Constant

Code: /SAPDMC/LTXTH-OBJECT = 'MVKE'.

NAME Name

Source: ZLONG_TEXT-MATNR (MATNR)

Rule : Transfer (MOVE)

Code: /SAPDMC/LTXTH-NAME = ZLONG_TEXT-MATNR.

ID Text ID

Rule : Constant

Code: /SAPDMC/LTXTH-ID = '0001'.

SPRAS Language Key

Rule : Constant

Code: /SAPDMC/LTXTH-SPRAS = 'E'.

/SAPDMC/LTXTL Long Texts: Row

Fields

TEXTFORMAT Tag column

Rule : Constant

Code: /SAPDMC/LTXTL-TEXTFORMAT = '/'.

TEXTLINE Text Line

Source: ZLONG_TEXT-LTEXT (LTEXT)

Rule : Transfer (MOVE)

Code: /SAPDMC/LTXTL-TEXTLINE = ZLONG_TEXT-LTEXT.

Step6 -> Specify file

Legacy Data On the PC (Frontend)

Data D:\Sales_Longtext.txt

Step7 -> Assign File

ZLONG_TEXT Source structure for long text

Data D:\Sales_Longtext.txt

Step8 -> Read data

Output result

Source Structure Read Written Not Written

ZLONG_TEXT 1 1 0

Transactions Read: 1

Records Read: 1

Transactions Written: 1

Records Written: 1

Step 8 -> Display read data

Field Name Field Text Field Value

MATNR MATNR MATERIA1

LTEXT LTEXT SALES TEXT FOR Material MATERIAL1

Step 9 -> Convert data

File Read: ZNRD_PRJ1_ZNRD_SUBPRJ2_ZNRD_LTEXT.lsmw.read

File Written: ZNRD_PRJ1_ZNRD_SUBPRJ2_ZNRD_LTEXT.lsmw.conv

Transactions Read: 1

Records Read: 1

Transactions Written: 1

Records Written: 2

Step 10 -> Display converted data

1 /SAPDMC/LTXTH 1MVKE MATERIAL1 0001E

2 /SAPDMC/LTXTL 2/ SALES TEXT FOR Material MATERIAL1

Step 11 -> Start direct input program

Output result for the same

Legacy System Migration Workbench

Project: ZNRD_PRJ1 ORH

Subproject: ZNRD_SUBPRJ2 Upload long text

Object: ZNRD_LTEXT Long text tru direct input

File : ZNRD_PRJ1_ZNRD_SUBPRJ2_ZNRD_LTEXT.lsmw.conv

Long Texts in Total: 1

Successfully Transferred Long Texts: 1

Non-Transferred Long Texts: 0

Now when i check the material master sales view -> sales text it is empty.

Please help me with the same.

Regards,

Ranjith N

Hello Experts,

I was trying to upload sales text for a material master using LSMW direct input method.

I followed the following steps for the same

Tab dlimited Text file format

MATNR LONGTEXT LINE

MATERIAL1 LONGTEXT FOR MATERIAL MATERIAL1 1

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

Step1 -> Maintain object attributes

Object -> 0001

Method-> 0001

Program name -> /SAPDMC/SAP_LSMW_IMPORT_TEXTS

Program type -> D

Step2 -> Maintain Source Structure

Source structure -> LONG_TEXT Source structure for long text

Step 3-> Maintain souce file

Source Fields

ZLONG_TEXT Source structure for long text

MATNR C(018) MATNR

LTEXT C(132) LTEXT

Step 4-> Maintain structure relationship

Structure Relations

/SAPDMC/LTXTH Long Texts: Header <<<< ZLONG_TEXT Source structure for long text

Select Target Structure /SAPDMC/LTXTH .

/SAPDMC/LTXTL Long Texts: Row <<<< ZLONG_TEXT Source structure for long text

Select Target Structure /SAPDMC/LTXTL .

Step 5-> Maintain Field mapping and conversion rules

Here i have assigned constan rules to couple of them like

/SAPDMC/LTXTH Long Texts: Header

Fields

OBJECT Texts: Application Object

Rule : Constant

Code: /SAPDMC/LTXTH-OBJECT = 'MVKE'.

NAME Name

Source: ZLONG_TEXT-MATNR (MATNR)

Rule : Transfer (MOVE)

Code: /SAPDMC/LTXTH-NAME = ZLONG_TEXT-MATNR.

ID Text ID

Rule : Constant

Code: /SAPDMC/LTXTH-ID = '0001'.

SPRAS Language Key

Rule : Constant

Code: /SAPDMC/LTXTH-SPRAS = 'E'.

/SAPDMC/LTXTL Long Texts: Row

Fields

TEXTFORMAT Tag column

Rule : Constant

Code: /SAPDMC/LTXTL-TEXTFORMAT = '/'.

TEXTLINE Text Line

Source: ZLONG_TEXT-LTEXT (LTEXT)

Rule : Transfer (MOVE)

Code: /SAPDMC/LTXTL-TEXTLINE = ZLONG_TEXT-LTEXT.

Step6 -> Specify file

Legacy Data On the PC (Frontend)

Data D:\Sales_Longtext.txt

Step7 -> Assign File

ZLONG_TEXT Source structure for long text

Data D:\Sales_Longtext.txt

Step8 -> Read data

Output result

Source Structure Read Written Not Written

ZLONG_TEXT 1 1 0

Transactions Read: 1

Records Read: 1

Transactions Written: 1

Records Written: 1

Step 8 -> Display read data

Field Name Field Text Field Value

MATNR MATNR MATERIA1

LTEXT LTEXT SALES TEXT FOR Material MATERIAL1

Step 9 -> Convert data

File Read: ZNRD_PRJ1_ZNRD_SUBPRJ2_ZNRD_LTEXT.lsmw.read

File Written: ZNRD_PRJ1_ZNRD_SUBPRJ2_ZNRD_LTEXT.lsmw.conv

Transactions Read: 1

Records Read: 1

Transactions Written: 1

Records Written: 2

Step 10 -> Display converted data

1 /SAPDMC/LTXTH 1MVKE MATERIAL1 0001E

2 /SAPDMC/LTXTL 2/ SALES TEXT FOR Material MATERIAL1

Step 11 -> Start direct input program

Output result for the same

Legacy System Migration Workbench

Project: ZNRD_PRJ1 ORH

Subproject: ZNRD_SUBPRJ2 Upload long text

Object: ZNRD_LTEXT Long text tru direct input

File : ZNRD_PRJ1_ZNRD_SUBPRJ2_ZNRD_LTEXT.lsmw.conv

Long Texts in Total: 1

Successfully Transferred Long Texts: 1

Non-Transferred Long Texts: 0

Now when i check the material master sales view -> sales text it is empty.

Please help me with the same.

Regards,

Ranjith N

24 REPLIES 24
Read only

Former Member
0 Likes
6,296

Hello Experts, I was trying to upload sales text for a material master using LSMW direct input method.

I followed the following steps for the same

Tab dlimited Text file format

MATNR LONGTEXT LINE

MATERIAL1 LONGTEXT FOR MATERIAL MATERIAL1 1 *************************************************************************************************************


 Step1 -> Maintain object attributes
 Object -> 0001
 Method-> 0001 
Program name -> /SAPDMC/SAP_LSMW_IMPORT_TEXTS
 Program type -> D

 Step2 -> Maintain Source Structure
 Source structure -> LONG_TEXT Source structure for long text 

Step 3-> Maintain souce file Source Fields 
ZLONG_TEXT Source structure for long text
MATNR C(018) MATNR 
LTEXT C(132) LTEXT 

Step 4-> Maintain structure relationship 
Structure Relations  
/SAPDMC/LTXTH Long Texts:  Header <<<< ZLONG_TEXT Source structure for long text 
Select Target Structure 
/SAPDMC/LTXTH . /SAPDMC/LTXTL Long Texts: Row <<<< ZLONG_TEXT Source structure for long text 
Select Target Structure /SAPDMC/LTXTL .

 Step 5-> Maintain Field mapping and conversion rules
 Here i have assigned constan rules to couple of them like 
/SAPDMC/LTXTH Long Texts: Header
 Fields 
OBJECT            Texts: Application Object
                         Rule : Constant
                          Code: /SAPDMC/LTXTH-OBJECT = 'MVKE'. 
NAME               Name
                         Source: ZLONG_TEXT-MATNR (MATNR) 
                         Rule : Transfer (MOVE) 
                         Code: /SAPDMC/LTXTH-NAME = ZLONG_TEXT-MATNR.
 ID                     Text ID
                         Rule : Constant 
                         Code: /SAPDMC/LTXTH-ID = '0001'. 
SPRAS             Language Key 
                         Rule : Constant 
                        Code: /SAPDMC/LTXTH-SPRAS = 'E'. 

/SAPDMC/LTXTL Long Texts: Row 
Fields 
TEXTFORMAT  Tag column  
                         Rule : Constant 
                         Code: /SAPDMC/LTXTL-TEXTFORMAT = '/'. 
TEXTLINE          Text Line 
                         Source: ZLONG_TEXT-LTEXT (LTEXT) 
                         Rule : Transfer (MOVE) 
                         Code: /SAPDMC/LTXTL-TEXTLINE = ZLONG_TEXT-LTEXT. 

Step6 -> Specify file Legacy 
Data On the PC (Frontend) 
             Data D:\Sales_Longtext.txt 


Step7 -> Assign File ZLONG_TEXT 
Source structure for long text 
          Data D:\Sales_Longtext.txt 

Step8 -> Read data 
Output result 
Source Structure            Read                Written                Not Written
ZLONG_TEXT                  1                       1                            0
Transactions Read          1 
Records Read:                1
Transactions Written:      1
Records Written:             1 

Step 8 -> Display read data
 Field Name             Field Text                      Field Value 
MATNR                    MATNR                         MATERIA1 
LTEXT                     LTEXT                            SALES TEXT FOR Material MATERIAL1 

Step 9 -> Convert data 
File Read: ZNRD_PRJ1_ZNRD_SUBPRJ2_ZNRD_LTEXT.lsmw.read 
File Written: ZNRD_PRJ1_ZNRD_SUBPRJ2_ZNRD_LTEXT.lsmw.conv

Transactions Read:    1 
Records Read:           1 
Transactions Written: 1 
Records Written:         2 

tep 10 -> Display converted data
1 /SAPDMC/LTXTH     1    MVKE        MATERIAL1 0001   E 
2 /SAPDMC/LTXTL     2/   SALES TEXT FOR Material       MATERIAL1 

Step 11 -> Start direct input program 
Output result for the same 
Legacy System Migration Workbench Project: 
ZNRD_PRJ1  ORH 
Subproject:   ZNRD_SUBPRJ2     Upload long text
Object:          ZNRD_LTEXT          Long text tru direct input 
File :              ZNRD_PRJ1_ZNRD_SUBPRJ2_ZNRD_LTEXT.lsmw.conv 
Long Texts in Total:                                1 
Successfully Transferred Long Texts:  1 
Non-Transferred Long Texts:                0 

Now when i check the material master sales view -> sales text it is empty. Please help me with the same.

Regards,

Ranjith N

Read only

0 Likes
6,296

Hi,

Just try this.

go to se71->Settings -


>Form Painter. just ensure that check box against "Graphical PC Editor' is blank.

I hope this helps

Regards

Raju Chitale

Read only

Former Member
0 Likes
6,296

Dear Raju,

I tried what you said but nothing changed in material master.

Can you just explain me what effect this has on sales text upload on material master.

Thanks and Regards,

Ranjith N

Read only

0 Likes
6,296

Hi,

Have you run it in the foreground mode. If yes then could you see the header text getting posted ?

Regrads

Raju

Read only

Former Member
0 Likes
6,296

check with language key, if you login language is EN the text will be updated only in English, you cant find the text in DE language.

try enter manually for 1 material and save it, then check it table STXH, here you can find the fields

TDOBJECT

TDNAME

TDID

TDSPRAS

based on this fileds the text will be updated.

Read only

0 Likes
6,296

Check out in the final screen before you run the Batch Input session has any field Test Run.

If it is so uncheck it. For Material master upload there is field but not sure for the Material Text fields. do not have SAP at my desk as of now.

Read only

Former Member
0 Likes
6,296

Hi,

Thanking everyone foryour valuable feedback.

I was able to upload sales text for a material using

Object -> 0001

Method -> 0001

Program name -> /SAPDMC/SAP_LSMW_IMPORT_TEXTS

Program type -> D

Thread closed.

Regards,

Ranjith N

Read only

0 Likes
6,296

I got the same problem as yours...

pls kindly let us know your solutions...

Thanks

Read only

0 Likes
6,296

Can you say how you solve this problem?

Object -> 0001

Method -> 0001

Program name -> /SAPDMC/SAP_LSMW_IMPORT_TEXTS

Program type -> D

I found theese settings work only for text for purchase order...

Thanks a lot <removed by moderator>

Edited by: Thomas Zloch on May 27, 2011 11:53 AM

Read only

0 Likes
6,296

Hi,

This standard upload program with work via LSMW for all long texts, regardless of ID or object.

To get the settings you need to pass to the /SAPDMC/LTXTH header structure, first go to the long text you want to update (eg. go to the material in MM03 or the customer in XD03, and follow the menus to the long text), double click into the long text and then use the menu Go to > Header.

Here you will see the text object, text name format and text ID you need to pass to the structure. Plus of course the language. The main challenge is in getting the text name in the right format.

Ben

[Harlex Consulting|http://www.harlexconsulting.com/]

Read only

0 Likes
6,296

Thanks for your prompt response.

I tried to find the object, and ID, but in transaction MM42> Additional Data> Sales Text--> double click in Long Text box and in Menu , Go To has only "Back" nor Header....and I don't know how I can find the Object, and ID.

For Object I found in LSMW, Display Field Mapping...Add Source Field > Constant> match code I can choose the object "Material" for Sales text,

but for ID I didn't find something .

Thanks a lot.

Read only

0 Likes
6,296

Hi,

To use the header menu option you need to first click the Editor button once you are in the long text area.

For the LSMW, are you using the right load program: /SAPDMC/SAP_LSMW_IMPORT_TEXTS.

Ben

[Harlex Consulting|http://www.harlexconsulting.com/]

Read only

Former Member
0 Likes
6,296

Hi Nambia,

May I know how did you solve the issue? I am facing the same issues as yours. Status of LSMW shown successful, yet no sales text been loaded. COuld you kindly share your experience? Great thx!

Michelle

Read only

JL23
Active Contributor
0 Likes
6,296

Search a bit imore n the forum, this toppic was discussed many many times.

I am certain that you loaded text to your system, into tables STXH and STXL.

However, your loaded text has not the right keyfields, hence you will not see it in your material master.

very often this happens because it was missed to think about the leading zeros for a material number.

Read only

Former Member
0 Likes
6,296

Hi

I have the same problem. I applied what mentioned here but it does not work.

however, I read in SAP document that we should use also Sales organization and channel distribution. no one of them is use is this issue here.

any suggestion please

Read only

JL23
Active Contributor
0 Likes
6,296

the SAP docu in help.sap.com is quite good, especially that it uses sales text as example:

http://help.sap.com/saphelp_nw70/helpdata/en/fb/787036172511d2b428006094b944c8/frameset.htm

Read only

0 Likes
6,296

All

I had followed the above steps to create material memo. The table is getting updated where as in material master MRP4 view its showing blank.

I assume the issue is Text Name conversion. Material and plant code. How I can split the material and plant code in text file. I had given space but it is not working.

Read only

JL23
Active Contributor
0 Likes
6,296

not sure what you want split, the name is a concatenation of material number with 18 characters (remind you about leading zeros if your system is not set to lexicographical), a space, and a plant with 4 characters

Read only

0 Likes
6,296

Hi Jurgen L

I used the same format.

Material  Plant

XXXXX   XXXX

It is updating in the table where as I can not able to find in material master MRP4 view.

Read only

JL23
Active Contributor
0 Likes
6,296

there is actually more e.g. the language, the text id,

It would be much better if you would give a real example or a screen shot with all data for one record.

your example is just poort, 5 X for a material number does not tell anything

Read only

0 Likes
6,296

HI Jurgen

Here is the screen shot

Text file as follow.

"Material plant "   "Long Text"

M210229 9001   Plan Monthly

M10592   9001   Plan Weekly if demand is 100k

Read only

JL23
Active Contributor
0 Likes
6,296

As you have alpha characters in the material number, the material number gets left aligned in the field.

hence you have to have a lot spaces right of the last digit

M210229 9001 is not the right form then, it has to be

M210229____________9001

(instead of the underscores you need to have spaces there)

so best you create internal fields for material number with a length of 18 e.g. data: HMATNR(18).

for a Space  and for the plant, and then you concatenate HMATNR with SPACE and PLANT

Read only

0 Likes
6,296

HI,

I am trying to update sales text in customer master data (company code tab).

Sales text that I wat to upload is having character length of 263. But the field length of Ltext is 132. So, I just to know how can I upload anything above 132 character in single go.

Thanks

Read only

0 Likes
6,296

HI,

I am trying to update sales text in customer master data (company code tab).

Sales text that I wat to upload is having character length of 263. But the field length of Ltext is 132. So, I just to know how can I upload anything above 132 character in single go.

Thanks