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: 

How to load Address data of Equipment Master

0 Kudos

Hi Guys,

Can you please suggest me how to load Equipment Master Data along with adresses.

I tried using LSMW Direct Input Method

Object               0400   Equipment

Method               0001   Create BI

Program Name         IBIP

Program Type         B   Batch Input

But I could not find any structure with address fields in this method

In my project the only way to load data is using LSMW.

So please tell me how to load Equipment Master along with addresses using LSMW.

Regards,

Vineeth

3 REPLIES 3

JL23
Active Contributor
0 Kudos

I have never loaded Equipment with addresses, but the experience with other objects and address was always that the address had to be loaded separately using IDOC ADRMAS (or the corresponding BAPI)

So you would need to load  the address prior to the equipment and supply the address number in field ADRNR

0 Kudos

Hi Jurgen,

Thanks for the reply.I will load addresses first using ADRMAS IDOC.And after that I will load Equipments.But I am not able to understand how to supply address number to Equipments

Please help me

Regards,

Vineeth

JL23
Active Contributor
0 Kudos

I thought again about this and would like to correct my previous answer a bit.

Please keep in mind I have not loaded equipments with addresses.

I said you should load address prior to equipment, this should be after .

Let me explain briefly how I do it for vendors and customers

I  load with IDOCs , because here I can pre-assign an internal number like you would do it in case of external numbers. SAP posts the IDOCs with the given number even the number range is set to internal.

I use the function module NUMBER_GET_NEXT to pre-assign this internal number from the number range. This function module call is  done in LSMW field mapping  from the e.g. vendor number field. At the same field I actually write the old number and the new number into a Z-table which I use for mapping.

The address number field is left blank.

In a second LSMW object I load then the addresses with ADRMAS Idoc.

In field E1ADRMAS-OBJ_ID I do a select  to get the new vendor number from the mapping table based on the old vendor number from my source file.

This field in the IDOC is actually the connection between address and vendor master. While posting the IDOC, SAP updates the address number field in LFA1 vendor master table.

For your case it would actually mean that you fetch the next equipment umber via function module NUMBER_GET_NEXT. I am not sure if you have to switch the number range to external for the load with direct input.

Then you enter this new equipment in the address IDoc OBJ_ID field .

After posting you have to check whether the table EQUI_ADDR  has the address number as link to ADRC and hopefully as well a short form of this address.

If that does not work, then you have to load the address with a recording