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 for uploading equipment.

Former Member
0 Kudos

Hello All,

this is my first time using LSMW for uploading equipment with texts and Partners. I have decided to use standard batch input (use Object=400; Method=0001).

I need to create equipment master records with two Partner rows and 4 long text rows.

While mapping the fields between source and target structures system shows the following structures:

IBIPEQUI

IBIPPART

IBIPTEXT

In the RIIBIP00 documentation I have read that with structure IBIPPART I can link 1 Partner to the equipment, but my aim is link 2 partners in the equipment master record. So, in my opinion, I would have to create the following structures:

IE01 IBIPEQUI JFAROIL

IBIPPART WE410008459

IBIPPART WE410008480

IBIPTEXT / VIA DON PRIMO

IBIPTEXT / MOTTEGGIANA

IBIPTEXT / MN 46020

IBIPTEXT / ITALY

Anyway, at the end, when I maintain field mapping I can not assign more than one partner rows and long text rows.

Could anybody help me ?

Kind Regards.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI,

In field mapping step, at the end of the structure IBIPPART you have __END_OF_RECORD__ and code: as transfer_record..

You can double click in change mode to write the code in that. After transfer_record you can assign the second partner and again give transfer_record.

This will transfer two records with 2 partners.

Hope this solves your issue.

6 REPLIES 6

Former Member
0 Kudos

Hi,

In the maintain Source fields of the LSMW declare one field such as REF_KEY with Identifying field content like for header H, partner P and for long text L.

Read the file which has H in the beginning for header and P for partner and L for longtext. So you can provide in the same text file header partner and Longetxt details.

Input file format should be as :

H header detail fields

P partner detail fields

P partner detail fields

P partner detail fields

L longtext detail fields

L longtext detail fields

Former Member
0 Kudos

And dont forget to make change in the Specify files accordingly.

"Data for Multiple Source Structures (Sequential Files)"

Award if useful

Former Member
0 Kudos

HI,

In field mapping step, at the end of the structure IBIPPART you have __END_OF_RECORD__ and code: as transfer_record..

You can double click in change mode to write the code in that. After transfer_record you can assign the second partner and again give transfer_record.

This will transfer two records with 2 partners.

Hope this solves your issue.

Former Member
0 Kudos

Hi,

thank you very much for your help.

I have checked your suggestions but I need further information.

1. Mahaveer,

I have created the following source fields structure:

EQUIPMENT_J (Source structure) with the fields:

Z_EQTYP C(001)

Z_SHTXT C(040)

Z_IWERK C(004)

Z_BUKRS C(004)

Z_GSBER C(004)

Z_KOSTL C(010)

Z_TIDNR C(025)

Z_VKORG C(004)

Z_VTWEG C(002)

Z_SPART C(002)

Z_PARVW C(002)

Z_PARNR C(012)

Z_PARVW2 C(002)

Z_PARNR2 C(012)

Z_TESTO_1 C(072)

Z_TESTO_2 C(072)

In the "Maintain Structure Relations" step I have to link "EQUIPMENT_J" source fields structure to the IBIP structures:

IBIPEQUI IBIP: Equipment

IBIPNSTA IBIP: Status management - new status profile

IBIPSTAT IBIP: User status - function

IBIPDOCU IBIP: Document management system - allocation

IBIPPART IBIP: Partner details

IBIPTEXT IBIP: Long text line

IBIPCLAS IBIP: Classification: classif. record

IBIPBDCD IBIP: Direct BDCDATA

I apologize for my un-experience but I do not understand how I can create two relations for the partners. In my opinion I would have to create the relations:

IBIPPART -> Z_PARVW C(002); Z_PARNR C(012)

IBIPPART -> Z_PARVW2 C(002); Z_PARNR2 C(012)

IBIPTEXT -> Z_TESTO_1 C(072)

IBIPTEXT -> Z_TESTO_2 C(072)

2. AsifAli,

sorry but I have checked step "Maintain Field Mapping and Conversion Rules" and I can not find the end of the structure IBIPPART; this structure has the following fields: TCODE, PARVW, PARNR and NAME_LIST. Where would have to see "__END_OF_RECORD__" ?

Thanks a lot for your help.

Best regards.

0 Kudos

Hi,

Create two more source structures one for Partner detail fields and one for Long text fields, and maintain REF_KEY in the begining of each source structure.Like

Header:

REF_KEY C(001)

Z_EQTYP C(001)

Z_SHTXT C(040)

Z_IWERK C(004)

Z_BUKRS C(004)

Z_GSBER C(004)

Z_KOSTL C(010)

Z_TIDNR C(025)

Z_VKORG C(004)

Z_VTWEG C(002)

Z_SPART C(002)

Partner:

REF_KEY C(001)

Z_PARVW C(002)

Z_PARNR C(012)

Text:

REF_KEY C(001)

Z_TESTO_1 C(072)

and for REF_KEY field maintain indentifying content as H for header, P for partner and T for text.

read the input file with the format mentioned earlier and change the setting in Specify files. It should work.

Former Member
0 Kudos

Hi,

sorry Mahaveer but I do not understand your suggestion. This is the first time that used transaction LSMW. I have understood that:

1. I have to create three Source Structures:

ZHEADER

ZLONGTEXT_1

ZLONGTEXT_2

ZLONGTEXT_3

ZLONGTEXT_4

ZPARTNER_1

ZPARTNER_2

ZPARTNER_3

Question: do I have to create a hierarchical structure of files or all the structures should be at the same level ?

2. I have created the following fields:

-- ZHEADER


REF_KEY C(001)


EQTYP C(001)


EQKTX C(040)


HERST C(030)


BUKRS C(004)


GSBER C(004)


KOSTL C(010)


AUFNR C(012)


TIDNR C(025)


SUBMT C(018)


HEQUI C(018)


IWERK C(004)


INGRP C(003)


VKORG C(004)


VTWEG C(002)


SPART C(002)


MATNR C(018)


SERNR C(018)

-- ZLONGTEXT_1


REF_KEY C(001)


TXPARGRAPH C(002)


TXLINE C(072)

-- ZLONGTEXT_2


REF_KEY C(001)


TXPARGRAPH C(002)


TXLINE C(072)

-- ZLONGTEXT_3


REF_KEY C(001)


TXPARGRAPH C(002)


TXLINE C(072)

-- ZLONGTEXT_4


REF_KEY C(001)


TXPARGRAPH C(002)


TXLINE C(072)

-- ZPARTNER_1


REF_KEY C(001)


PARVW C(002)


PARNR C(012)

-- ZPARTNER_2


REF_KEY C(001)


PARVW C(002)


PARNR C(012)

--- ZPARTNER_3

|

|-----REF_KEY C(001)

|-----PARVW C(002)

-


PARNR C(012)

3. In the Maintain Structure Relations step what I have to define ? In this step I have created the relationship between IBIP structures and "custom" structures:

IBIPEQUI IBIP<<<< ZHEADER

IBIPPART IBIP<<<< ZPARTNER_1 Partner 1

IBIPTEXT IBIP<<<< ZLONGTEXT_1 Testo esteso riga 1

my big problem is how to link ZPARTNER_1, ZPARTNER_2, ZPARTNER_3 and ZLONGTEXT_2, ZLONGTEXT_3, ZLONGTEXT_4 to the IBIPEQUI.

4. In Assign Files step I have assigned my csv file "Equipment K.csv" to the header structure:

ZHEADER>>>>>>>> Equipment K.csv C:\Documents and Settings\it04018\Desktop\Equipment K.csv

(file for data input)

ZPARTNER_1 Partner 1

ZPARTNER_2 Partner 2

ZPARTNER_3 Partner 3

ZLONGTEXT_1 Testo esteso riga 1

ZLONGTEXT_2 Testo esteso riga 2

ZLONGTEXT_3 Testo esteso riga 3

ZLONGTEXT_4 Testo esteso riga 4

Question: to assign data to partner and long text do I have to create more files ? One file for ZHEADER structure and one file for each ZPARTNER_1, ZPARTNER_2, ZPARTNER_3, ZLONGTEXT_1, ZLONGTEXT_2, ZLONGTEXT_3, ZLONGTEXT_4 structures ?

5. Could you explain me why I have to create the REF_KEY ? Unfortunately my test was KO.

I apogize for my inexperience

Thank you very much for your help.

Best regards.