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: 

LSMW -Recording Index issue

Former Member
0 Kudos

Hi,

I was trying to add partners to a customer through XD02.

I need to add multiple Partners to a customer.

I recorded transaction but I have index issue .

For example when I recorded it is 6th line where i need to enter but for next record it should add in 7th line.

but 6th line is getting repalced.. how do i resolve this issue?

Should I code something in FIELDMAPPING?

Regards

Prasad

8 REPLIES 8

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

I think that you could code something in the field mappings section to increase you counter at the appropriate time.

Regards,

Rich Heilman

0 Kudos

Heilman,

Could you help me in coding?

I have this kind of mapping.

KNVV-KTONR_06 = STRUCT-KTONR_06(my source)

We need to change system KNVV-KOTNR_06 to KNVV-KTONR_07 dynamically how do we do that?

Regards

Prasad

0 Kudos

hi Vara,

i am not clear with your doubt, if i am not wrong in understanding

u need to enter the 2nd record in the seventh field in stead of 6 th field right

does that filed existing(as 7th filed) in the transaction which u r using for the recording

if so while doing recording just take the cursor to that filed and do the recording

then while mapping the filed with the source structure in the 5th step just write the simple code

i think it should work out

if u have any questions let me know

Regards,

Naveen

0 Kudos

Hi Naveen,

You understood me right.

There are multiple partner rows to be appended but each time the Row is being replaced instead of appending.

The problem is while recording i am filling like this.

KNVP-PARVW_06 = STRUCT-PARVW

KNVP-KTONR_06 = STRUCT-PARVW

As you recommeended i took Cursor to NEXT tab and recorded but wondering what to code in field mapping.

Now I have like this in recording

BDC_CURSOR KNVP-PARVW(07)

BDC_OKCODE = UPDA

KNVP-PARVW(6) = STRUCT-PARVW

RF02D-KTONR(6) = STRUCT-KTONR.

Kindly help me out what to code in mappaing.

Regards

vara

0 Kudos

Vara,

i didn't get after recording the value is going into the other table i think for the fist filed it is filling in KNVP but for the second field it is going into RF02D.

in this case it is does not matter how it is in recording.

In the mapping step assing the same source filed to both of these target field

but for the second filed in the mapping step while assingning the souce filed just write the simple logic what ever u want to do

to write the logic in 5th step go into the change mode then double click on that filed control leads to another screen there u can define the logic

i think it would be helpful for u

if u have any further questions let me know

<b>k can u give me u r contact info so that i can explain u something either yahoo id r ph.no

if u need my yahoo id it is callnaveen_23</b>

Regards,

Naveen

0 Kudos

Naveen,

Structures are right..I misstyped it..

Now I know where to code but the thing is how do i dynamically say to jump in to next empty tab rather than

replacing existing 6th record (when filling second time).

I can acess source strure but how do i change system structures from KNVP-KTONR(6) to KNVP-KTONR(7)?

hope you underatnd me.

regards

Vara

Former Member
0 Kudos

Hi Vara,

Let me get this right , you are not able to move on to the next free line.

If that is the issue then just check out the number of lines which come in the screen if it is defaulted to six then i think that is where you are facing the problem and ths sixth line is getting replaced.

What you need to do is check out for any page down or next page button and record that.

then you can add the seventh record. do check out in the recording what is the number being assigned to that row , it could be 7 or it could also be 1(i.e the first line of the next page)

Hope that this solves it for you

Former Member
0 Kudos

Hai Vara

I am giving Material master Upload through LSMW Direct Input Method

Just Follow The Steps

Using Tcode MM01 -- Maintain the source fields are

1) mara-amtnr char(18)

2) mara-mbrsh char(1)

3) mara-mtart char(4)

4) makt-maktx char(40)

5) mara-meins char(3)

the flate file format is like this as follows

MAT991,C,COUP,Srinivas material01,Kg

MAT992,C,COUP,Srinivas material02,Kg

AMT993,C,COUP,Srinivas material03,Kg

MAT994,C,COUP,Srinivas material04,Kg

MAT995,C,COUP,Srinivas material05,Kg

goto Tcode LSMW

give Project Name

Subproject Name

object Name

Press Enter -


Press Execute Button

It gives 13 radio-Button Options

do the following 13 steps as follows

1) select radio-Button 1 and execute

Maintain Object Attributes

select Standard Batch/Direct Input

give Object -- 0020

Method -- 0000

save & Come Back

2) select radio-Button 2 and execute

Maintain Source Structures

select the source structure and got to click on create button

give source structure name & Description

save & Come Back

3) select radio-Button 3 and execute

Maintain Source Fields

select the source structure and click on create button

give

first field

field name matnr

Field Label material Number

Field Length 18

Field Type C

Second field

field name mbrsh

Field Label Industrial Sector

Field Length 1

Field Type C

Third field

field name mtart

Field Label material type

Field Length 4

Field Type C

fourth field

field name maktx

Field Label material description

Field Length 40

Field Type C

fifth field

field name meins

Field Label base unit of measurement

Field Length 3

Field Type C

save & come back

4) select radio-Button 4 and execute

Maintain Structure Relations

go to blue lines

select first blue line and click on create relationship button

select Second blue line and click on create relationship button

select Third blue line and click on create relationship button

save & come back

5) select radio-Button 5 and execute

Maintain Field Mapping and Conversion Rules

Select the Tcode and click on Rule button there you will select constant

and press continue button

give Transaction Code : MM01 and press Enter

after that

1) select MATNR field click on Source filed(this is the field mapping) select MATNR and press Enter

2) select MBRSH field click on Source filed(this is the field mapping) select MBRSH and press Enter

3) select MTART field click on Source filed(this is the field mapping) select MTART and press Enter

4) select MAKTX field click on Source filed(this is the field mapping) select MAKTX and press Enter

5) select MEINS field click on Source filed(this is the field mapping) select MEINS and press Enter

finally

save & come back

6) select radio-Button 6 and execute

Maintain Fixed Values, Translations, User-Defined Routines

Create FIXED VALUE Name & Description as MM01

Create Translations Name & Description as MM01

Create User-Defined Routines Name & Description as MM01

after that delete all the above three just created in the 6th step

FIXED VALUE --MM01

Translations --MM01

User-Defined Routines --MM01

come back

7) select radio-Button 7 and execute

Specify Files

select On the PC (Frontend) -- and click on Create button(f5)

give the path of the file like "c:\material_data.txt"

description : -


separators as select comma radiao- button

and press enter save & come back

😎 select radio-Button 8 and execute

Assign Files

Save & come back

9) select radio-Button 9 and execute

Read Files

Execute

come back

come back

10) select radio-Button 10 and execute

Display Imported Data

Execute and press enter

come back

Come back

11) select radio-Button 11 and execute

Convert Data

Execute

come back

Come back

12) select radio-Button 12 and execute

Display Converted Data

Execute & come back

13) select radio-Button 13 and execute

Start Direct Input Program

select the Program

select continue button

go with via physical file

give the lock mode as 'E'

and execute

Thanks & regards

sreeni