2007 Feb 22 3:56 PM
Hello All,
I want to use LSMW to upload HR Benefits data.
For wach employee, I want to check if a record in IT 0171 exists. If not, then create a 0171 record and then move on to create record for IT 0377.
If for an employee a record in IT 0171exists, then move on to creation of record in IT 0377.
Is that possible with LSMW?
Thanks,
Vaishali
2007 Mar 28 5:37 PM
You can do it in two steps.
1> check if a record in IT 0171 exists. If not, then create a 0171 record
2> check if a record in IT 0171 exists. If yes, then create record for IT 0377
However,these have to be two seperate "Objects".
Hello All,
I want to use LSMW to upload HR Benefits data.
For wach employee, I want to check if a record in IT 0171 exists. If not, then create a 0171 record and then move on to create record for IT 0377.
If for an employee a record in IT 0171exists, then move on to creation of record in IT 0377.
Is that possible with LSMW?
Thanks,
Vaishali
2007 Mar 28 5:37 PM
You can do it in two steps.
1> check if a record in IT 0171 exists. If not, then create a 0171 record
2> check if a record in IT 0171 exists. If yes, then create record for IT 0377
However,these have to be two seperate "Objects".
2007 Apr 19 7:04 PM
Are you going to use BDCs or BAPI's? I'm sure it can be done using a BDC, however it would be very complicated. I would recommend writing a BAPI and link the BAPI to the LSMW by generating an ALE interface (Tcode: BAPI).
2011 Feb 02 10:54 PM
This can be done very easily in 1 LSMW.
Create 2 recordings one for 171 one for 377. (Make 171 come before 377)
Attach your source structure to both.
When defining your field mappings use this code to determine if they need a 171.
*verify 171 exist for EE.
select single pernr from pa0171
into pa0171-pernr
where pernr = main-pernr.
if the record exist skip 171 creation and move to 377.
if sy-subrc = 0.
skip_record.
endif.
Attach the rest of your source fields in the appropriate places. If lables are done correctly (CTRLSHIFTF3) should automatically assign them.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |