cancel
Showing results for 
Search instead for 
Did you mean: 

LSMW link with multiple files

Former Member
0 Kudos

Hi Gurus,

I'm not sure whether I should post this issue here anyway I can't find a more suitable place.

I'm trying to expand customer master data using LSMW. Here is what I've done:

1 Maintain Object Attributes

Object 0050 Customer master

Method 0000

Program Name RFBIDE00

Program Type B Batch Input

2 Maintain Source Structures

Source Structures

ZBGR00 Batch Input Structure for Session Data

-ZBKN00 Customer Master Record Transaction Data for Batch Input

--ZBKNA1 General Customer Master Record Part 1 (Batch Input)

--ZBKNB1 Customer Master Record Company Code Data (Batch Input)

--ZBKNBK Customer Master Record Bank Data (Batch Input Structure)

--ZBKNVA Customer master unloading points (batch input structure)

--ZBKNVK Customer Master Contact Person (Batch Input Structure)

--ZBKNB5 Customer Dunning Data (Batch Input Structure)

--ZBKNZA Customer Master Record Altern.Payer (Batch Input Structure)

--ZBKNVV Customer master sales data (batch input structure)

--ZBKNVP Customer Master Partner Functions (Batch Input Structure)

3 Maintain Source Fields

Source Fields

ZBGR00 Batch Input Structure for Session Data

-ZBKN00 Customer Master Record Transaction Data for Batch Input

--TCODE C(020) T-code

--KUNNR C(010) customer

Identifing Field Content: C

--BUKRS C(004) company code

--VKORG C(004) sales orgnization

--VTWEG C(002) distribution channel

--SPART C(002) division

--KTOKD C(004) account group

-ZBKNA1 General Customer Master Record Part 1 (Batch Input)

--KUNNR C(010) customer number

Identifing Field Content: C

--NAME1 C(035) name

--SORTL C(010) sort field

--ORT01 C(035) city

--LAND1 C(003) country

--LZONE C(010) transportation zone

-ZBKNB1 Customer Master Record Company Code Data (Batch Input)

--KUNNR C(010) customer

Identifing Field Content: C

--AKONT C(010) reconciliation account

--ZUAWA C(003) sort key

4 Maintain Structure Relations

Structure Relations

BGR00 Batch Input Structure for Session Data <<<< ZBGR00 Batch Input Structure for Session Data

Select Target Structure BGR00 .

BKN00 Customer Master Record Transaction Data for Batch Input <<<< ZBKN00 Customer Master Record Transaction Data for Batch Input

Select Target Structure BKN00 .

BKNA1 General Customer Master Record Part 1 (Batch Input) <<<< ZBKNA1 General Customer Master Record Part 1 (Batch Input)

Select Target Structure BKNA1 .

BKNB1 Customer Master Record Company Code Data (Batch Input) <<<< ZBKNB1 Customer Master Record Company Code Data (Batch Input)

No other assignment.

5 Maintain Field Mapping and Conversion Rules

Automatic mapping without any change of the standard. "only if initial" is marked.

6 Maintain Fixed Values, Translations, User-Defined Routines

No settings.

7 Specify Files

ZBKN00.txt C:\ZBKN00.txt

- Data for One Source Structure (Table)

- Separator Tabulator

- Field Names at Start of File

- Field Order Matches Source Structure Definition

- With Record End Indicator (Text File)

- Code Page ASCII

ZBKNA1.txt C:\ZBKNA1.txt

- Data for One Source Structure (Table)

- Separator Tabulator

- Field Names at Start of File

- Field Order Matches Source Structure Definition

- With Record End Indicator (Text File)

- Code Page ASCII

ZBKNB1.txt C:\ZBKNB1.txt

- Data for One Source Structure (Table)

- Separator Tabulator

- Field Names at Start of File

- Field Order Matches Source Structure Definition

- With Record End Indicator (Text File)

- Code Page ASCII

8 Assign Files

Source Structures and Files

- ZBGR00 Batch Input Structure for Session Data

- ZBKN00 Customer Master Record Transaction Data for Batch Input

-- ZBKN00.txt C:\ZBKN00.txt

- ZBKNA1 General Customer Master Record Part 1 (Batch Input)

-- ZBKNA1.txt C:\ZBKNA1.txt

- ZBKNB1 Customer Master Record Company Code Data (Batch Input)

-- ZBKNB1.txt C:\ZBKNB1.txt

11 Read Data

Error message:Generation canceled: No field with this name

Generation canceled: No field with this name

Message no. /SAPDMC/LSMW_OBJ_070032

Diagnosis

You are working with at least one subordinate source structure. However, the source fields of the dependent structures you have entered are not compatible with the other definitions within your LSMW object.

Procedure

Correct your source field definitions in the step 'Maintain Source Fields'. In the case of dependent structures, the key is given the same name across all fields, meaning that in the subordinate structure, at least one source field must have the name of a field of the superordinate structure. During the import, this field is then used as a key for the relationship between the two dependent structures. This method ensures that the hierarchical source structure you defined can be read correctly by the LSMW.

If you do not require a relational key relationship such as this, delete the dependencies of the structures in the step 'Maintain Source Structures'. In the case of flat structures, no fields of the same name are required.

I've read lots of posts about this message but I didn't work it out. I guess it's because I'm not sure about how to "link" the data of each files. Someone said that in each file there should be field(s) to identify the records, so I added KUNNR into each source structure I use even there is no such fields in standard structure. I also tried to use "Identifing Field Content: C". Anyway I tried what I could.

Please help to guide me out. what on earth is wrong in the prodedure? thanks a lot for your help.

Accepted Solutions (0)

Answers (2)

Answers (2)

JL23
Active Contributor

SAP joins the source files

to do this it needs the common fields of each source in the beginning of the structure.

for customer master it would be the KUNNR field.

What I see from your question is, that you have once TCODE in the beginning and KUNNR as second field, just change it.

Former Member
0 Kudos

Hi Jurgen,

I think you are correct to point out this.

I changed the sequence of the source structure and the file of ZBKN00. I put the field KUNNR in front of the fiels TCODE.

But the same message occurs. there must be somewhere else wrong. Could you please provide more opinion? thanks.

Regards,

Morris

JL23
Active Contributor
0 Kudos

I see  that you have not defined any source field for

3)Source Fields

ZBGR00 Batch Input Structure for Session Data

can be okay, it is not mandatory

7) there is no file for ZBGR00

this can still be okay

😎

Source Structures and Files

- ZBGR00 Batch Input Structure for Session Data

Here the file assignment to this structure is missing.

Even in case that you have no external values for the fields in that target structure, you have to assign a file.

I would suggest you assign the

ZBKN00.txt C:\ZBKN00.txt

as well to this top structure

Former Member
0 Kudos

Hi Jurgen,

I tried to assign ZBKN00 file to both ZBGR00 and ZBKN00, but the system prompts "File 'C:\ZBKN00.txt' can only be assigned to one source structure.".

I tried to change the settings in "specify files". I change the file contents from sequential file to "data for one source structures" and the file can be assigned to several source structures but multiple files are not permited.

I don't know the "standard" procedure of doing this so I might make some stupid mistakes. If so please accept my apology.

Regards,

Morris

JL23
Active Contributor
0 Kudos

One thing for sure: ZBGR00 needs to have an assignd source .

I cant try it in the moment, but you may give it try.

Create a copy of your C:\ZBKN00.txt

Add a new source in step 7, and then assign this new file in step 8 to ZBGR00

Former Member
0 Kudos

Still not working. I'll upload the picture here.

Below are the files:

I think this will be better for your check.

Former Member
0 Kudos

Dear ,

        Please do recording again and please specify the same sequence in structure . 

JL23
Active Contributor
0 Kudos

sandeep turkar, this is a standard batch input, it is not a recording, hence re-recording is not available

George Han, I think I see the error in the source assignment, LSMW step 4

Here the same source structure ZBKN00  is assigned to both BGR00 and BKN00

Former Member
0 Kudos

I changed it to ZBGR00 and the error still exists.

Do you have any materials or user manual for this? I can only find such with simple steps. None of the manual illustrates how to use multiple files as source.

JL23
Active Contributor
0 Kudos

why do you actually have an identifying field content C  for the customer number field?

od_manikandan
Active Contributor
0 Kudos

Hai,

Check -

5 . Mapping

8.  Specify  files

Check

Imported Data        File for Imported Data (Application Server)

Converted Data       File for Converted Data (Application Server)

If every thing works fine, copy the TXT file in desktop and try to upload.

Regards,

OD

Former Member
0 Kudos

Hi OD,

The mapping is fine and the files are correctly specified. And there is no error in the "imported data" and "converted data".

there is a possibility that there is indeed an error but I didn't find it out. could you please guide me what to "check" in more detail?

Regards,

Morris