Application Development 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: 

Mass upload Material sales text in item level in Delivery

Former Member
0 Kudos

Dear Gurus,

I have a list of deliveries and in each delivery there are maybe one or two or more line items ,I would like to know if we have any tools to mass upload Material sales text (Goto / Item / Texts / Material sales text) for these line items ?

If we don't have any t-code,program , please advise how to create a LSMW, I created 1 with batch input recording t-code VL02N .

But when I run in background ,system didn't work and it showed "runtime error raise exception" issue.When I run in foreground , system came to that field but didn't upload any data.

Please check and advise.Thank you!

1 ACCEPTED SOLUTION

Lakshmipathi
Active Contributor
0 Kudos

Moved from SAP ERP Sales and Distribution (SAP SD) to ABAP Development.

Create one customized program where you call Function Module SAVE_TEXT through which, you can store the required text at item level in delivery.

G. Lakshmipathi

19 REPLIES 19

Lakshmipathi
Active Contributor
0 Kudos

Moved from SAP ERP Sales and Distribution (SAP SD) to ABAP Development.

Create one customized program where you call Function Module SAVE_TEXT through which, you can store the required text at item level in delivery.

G. Lakshmipathi

0 Kudos

Dear Lakshmipathi,

Thank you but I don't know how to create a program and I am trying to create a LSMW instead.

Is it the final solution for this case ?

Thank you!

0 Kudos

Hi,

You can try this in LSMW. Should work.

R

0 Kudos

Dear Rudra Roy,

Could you more specific about your answer .I usually create LSMW with Batch input not with Direct input so I am not sure if I can do exactly what you said.

Thanks,

0 Kudos

Hi,

This is a standard direct input program to upload almost any text which utilizes INIT_TEXT/SAVE_TEXT/COMMIT_TEXT .

For me as a LSMW programmer who does not have too much of ABAP skil,. there should not be any difference between any type of program . That is what LSMW is meant for.

FYI : Direct input programs are performance wise better that Batch Input programs.

I would suggest you approach it the same way you would have approached a Recording and etc... The steps are almost same and you shouldn't need to worry whether it is DI or BI program. There are at max 6 fields(See below) that you have to map. It is that easy.

Hope you are comfortable in LSMW steps like creating source structures, maintain field mappings etc. If not read some documentation on LSMW over the internet.

I don't think uploading text via BDC by calling VL02N is a good idea.

R

0 Kudos

Dear Rudra Roy,

I will try and let you know.Thank you so much!

Best Regards,

0 Kudos

Dear Rudra Roy,

I tried but I cannot do it the same with your screen ,sorry because I am not an expert in LSMW.

Could you please show me more clearly maybe by pictures and step by step .Below is my screen shot in "Maintain Field Mapping and Conversion Rules" step.Thank you

0 Kudos

Hi,

Through a simple ABAP program u can do this using 'SAVE_TEXT' function module.

Go to STXH table and check the keys with which the texts are saving. Provide these keys as inputs to the FM along with ur long text.

Still have a doubt. Reply me.

0 Kudos

Dear Murthy NVS ,

I have no doubt but I am not an expert so these things are new to me. I will try if I can do and if I cannot ,hopefully you can show me.

Thank you so much!

0 Kudos

yeah sure..

0 Kudos

Hiya,

It will be very time taking to give you step by step details of LSMW. I would suggest to search the internet and I am sure you will learn it.

The best I can do is to help you map the fields.

/SAPDMC/LTXTH-OBJECT = 'VBBP' or you can map it from your text file by passing 'VBBP'

/SAPDMC/LTXTH-NAME = Concatenate Delivery Number and Item number and map it . You can write small ABAP code for this or can pass directly from the file . ( Should be 16 characters(10 for Deilvery number and 6 for Item number )

/SAPDMC/LTXTH-ID = '0001' for Material Sales text or the text id that you have configured. Again can be passed from Input file and will be better than hardcoding.

/SAPDMC/LTXTH-SPRAS = Can pass the Language of the text from file or use SY-LANGU or hardcode based on your need.

/SAPDMC/LTXTL-TEXTFORMAT = '*' ( For default paragraph ). Can be hardcoded or pass from file.

/SAPDMC/LTXTL-TEXTLINE = <Your actual text which you want to store>

Please note segment /SAPDMC/LTXTL can be representative for a  single text Name so pass it multiple times if you have multple lines of text.

Also don't ignore STYPE . You can use it for hierarchical text files. So you can use the first column in your input file and map the records of the file accordingly in the correct segment. So pass '1' for each /SAPDMC/LTXTH and '2' for /SAPDMC/LTXTL mapping.

R

0 Kudos

This message was moderated.

0 Kudos

Thank you.I got it.

Just one more question , how can we give this tool to users.This is LSMW so we cannot give it to them right ?

Best Regards,

Huong

0 Kudos

Hiya,

Good to see you could make it work.

Yes offcourse you can give it to them. I know lot of users uses LSMW. Only downside will be that you might need to teach them how to run it.

Or else. You can create a wrapper program and give them a selection screen with radio buttons and then it should take them to the different steps( mainly Read Data/Convert data/Start Direct Input Program- You can use "User Menu" button to know the program names ) one by one.

Unfortunately the specify files/ and assign files steps has to be done via LSMW only .

R

0 Kudos

Build a variant of report /SAPDMC/SAP_LSMW_INTERFACE, create a system variant CUS&xxx, in the variant protect and/or hide some parameters to prevent user to change them, then create a transaction with the report and variant, and add it in an user role (PFCG)

Regards,

Raymond

0 Kudos

Dear Roy,

How to do as your suggestion ? How to create wrapper programr and give selection ? Sorry because this is the first time I do it.

Or else. You can create a wrapper program and give them a selection screen with radio buttons and then it should take them to the different steps( mainly Read Data/Convert data/Start Direct Input Program- You can use "User Menu" button to know the program names ) one by one.


Best Regards,

Huong

0 Kudos

Dear Giuseppi,

In this report , where can we import the file ?

And which parameter that we have to use in this report ? Thank you

Best Regards,

Huong

0 Kudos

I saw there is a file path in General Parameters but I cannot input the file in here.I tried to copy the file path in Specific file in LSMW into this field but system still refuse.

Could you please advise me ? Thank you

Best Regards,

Huong

0 Kudos

Can you elaborate on


I cannot input the file in here

Also how did you specify/assign file in LSMW, basically use same parameter in the report than in LSMW.

Read also Legacy System Migration Workbench : Using LSMW / Migration of Data with LSMW  /Periodic Transfer of Data

Regards,

Raymond