07-30-2008 6:48 AM
Hi,
While performing hiring action for a pernr in pa40 screen, corresponding fields in fk01 has to updated(pernr, address...etc) ie. employee vendor has also to be created .
How to link the 2 screens ? plz provide with a solution.
Rgds,
Vani.
07-30-2008 7:48 AM
Vani,
i think you need not to link two screen.the simple solution is that you need to create one small update program like below:
data: BEGIN OF i_lfb1 OCCURS 0,
bukrs like lfb1-bukrs,
END OF i_lfb1,
BEGIN OF i_bsik OCCURS 0,
bukrs like bsik-bukrs,
END OF i_bsik.
IF ven = ''.
SELECT bukrs FROM lfb1 INTO table i_lfb1 WHERE lifnr = itab_lfa1-lifnr.
SELECT bukrs FROM bsik INTO TABLE i_bsik FOR ALL ENTRIES IN i_lfb1
WHERE bukrs = i_lfb1-bukrs AND
lifnr = itab_lfa1-lifnr.
IF sy-subrc NE 0.
SELECT SINGLE * FROM lfa1 INTO lfa1 WHERE lifnr = itab_lfa1-lifnr.
lfa1-sperr = 'X'.
lfa1-sperq = '99'.
UPDATE lfa1 FROM lfa1.
COMMIT WORK.
ENDIF.
ENDIF.
this i created for block vendor.so you also may do same just first fetch the value from pa40 than sccording this update the
value in field directly in LFA1 table.
Amit.
08-04-2008 6:05 AM
Hi Amit,
I have created a bdc recording for fk01 transacation. Whenever i hire an employee using pa40 this BDC should be triggered in background after pa40 hiring process is done for the employee. How to make the BDC trigger after pa40 action
Rgds,
Vani.