‎2006 Mar 23 6:21 PM
hello everyone,
I am trying to create customers through Direct Input Method in LSMW Object: 0050, Method: 0000, Program Name: RFBIDE00, Program Type: B (Batch Input).
I am getting input data with lengths that correspond to the screen fields in transaction XD01. HERE IS THE PROBLEM: I defined the Source Fields according to the transaction field lengths, but while doing the batch input in LSMW, it uses table BKNA1, which has field lengths less than what is in the actual transaction. The transaction is using structure: ADDR1_DATA which corresponds to the Central Address Management.
For example: NAME is 40 characters in ADDR1_DATA and 35 characters in BKNA1. Similarly SORTL is 20 characters in ADDR1_DATA and 10 in BKNA1. Similar case with almost other fields.
Due to this difference, I am not able to maintain field mapping in LSMW and eventually data after conversion is not corresponding to the fields.
I found 2 SAP NOTES: 384462 & 306275. They tell about transferring address data using t-code: SXDA. But I'm not sure how to go about doing it because the steps are not clear. PLUS, is it the right way to go OR is there any other solution?
I would really appreciate helpful answers and I will award points. I URGENTLY need to solve this problem!
Thanks in advance.
Regards,
Fred.
‎2006 Mar 23 6:28 PM
Hi Fred,
SAP always uses structures to update data into the standard tables. But when we program it is always better to use the standard tables data elemnt to define the fields of internal table.so declare the fields of internal table like <b>sort like bkna1-sort</b> and try to upload data from the file into the internal table.
Sorry man in the recording you shold have specified the filed length there give the field length as in bkna1.
This should solve your problem.
Regards,
Varun.
Message was edited by: varun sonu
‎2006 Mar 23 7:02 PM
Hi Varun,
Thanx for the quick reply, but I think I was not clear.
I am not doing batch input recording; i am doing 'standard batch/direct input' method in lsmw. i have an input file, who's length is based on the address data structure. these lengths are more than that of bkna1. From release 4.5, address data has been maintained in BAS(Business Address Services) with longer field lengths than the master table like kna1, lfa1, etc...
I am just putting field names and lengths based on the input file and declaring it in 'Maintain Source Fields'. But while doing the 'Maintain Field Mapping and Conversion Rules' i am getting warning that source field lengths are more than target field lengths. And this is because bkna1 has smaller field lengths. Therefore, when converting the data, the data is flying everywhere into other fields. My SORTL is 16 char whereas it is only taking 10.
Even if I do batch input recording, I think I will face the same problem, since i will have to declare accordingly to bkna1, whereas, my data has more characters for all fields.
Regards,
Fred.
‎2006 Mar 23 7:05 PM
While using Conversion rules are u using offsets?
Source-field+0(10) = Target field....something like this?
‎2006 Mar 23 7:11 PM
No Ashish. Where do I do in lsmw when i'm using standard batch/direct input method?
‎2006 Mar 23 7:52 PM
Address data maintenance has moved to the central address management area, so SAP suggests that you create the initial masters and then add the address in a second run. Please go through the documentation of this program in SE38 and it tells you exactly how to achieve that.
‎2006 Mar 23 8:01 PM
Hi Srinivas,
I have read the documentation already, it says:
<b>Additional address fields:</b>
There are additional address fields available due to linking the customer and vendor master and the respective contact person to central address management. This additional address information is stored in central address management's own tables not in the actual master tables (KNA1 for the customer master, LFA1 for the vendor master, KNVK for the contact person).
A separate transfer run via the ALE interface is needed to transfer this additional address information. This run should be before the transfer run for master data.
See Transfer of address data
<b>Transfer address data</b>
You can use the DX Workbench (transaction SXDA) to transfer address data.
Create a transfer project using the following object types:
BUS4001 for company and organization addresses (for example, customer address, vendor address, other office address of contact person)
BUS4002 for private addresses (of contact person)
BUS4003 for office addresses (composite work address of contact person).
The address data is entered by the SAVEREPLICA-BAPIs of these three object types.
For more information about these BAPIs and their interfaces, in particular the meaning of the key fields, see "Distributing addresses via ALE" by choosing Basis --> Basis Services/Communication Interface --> Business Address Services in the SAP Library.
You can create example files for the DX Workbench from existing address records in the system (for example, in a customer master record ) with the programs RSDXBUS4001, RSDXBUS4002 and RSDXBUS4003. These example files show the meaning of all fields in the Business Address Services BAPI interfaces.
The programs have the same input parameters as the SAVEREPLICA-BAPIs
I have done the part until where they say about creating Business Objects. Then they say to look at documentation for more information. Thats the part where I don't know what to do.
Regards,
Fred.
‎2006 Mar 23 8:23 PM
Basically what it means is that, you go to the business object that is relevant for you(BUS4001 for example) and look at the method 'SaveReplica' of that business object. This will lead you to the BAPI function module 'BAPI_ADDRESSORG_SAVEREPLICA'. See the documentation of this BAPI and use it.