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: 

update fields in fk01 screen from pa40 screen

Former Member
0 Kudos

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.

2 REPLIES 2

former_member181995
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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.