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: 

Prepopulating a new wage type on IT0008 when hit on 'enter button'

Former Member
0 Kudos

Hi All,

When we try to create or copy an IT0008 record, a new wage type and its amount have to be prepopulated on the It0008. for this i have written a code in the PBO of the user exit. For the PBO im am to prepopulate the new wage type and its amount on IT0008.

I need to put the same logic in PAI of the user exit of It0008 as well. I have put the same logic but i cannot the new wage type and its amount on IT0008 when a enter button is hit.

Even though while debugging i can see it in W0008 but not in INNNN as the format of INNN and w0008 is different.

How can i achieve this ? of populating the wage type and the amount when an enter is hit.

The code written in PAI is -

PERFORM update_bet02(ZPPRFPP0008) USING

IPSYST-IOPER

STRU_0008-PERNR

w0008-BEGDA

STRU_0008-lga01

STRU_0008-bet01

STRU_0008-lga02

STRU_0008-bet02

STRU_0008-lga03

STRU_0008-bet03

CHANGING

w0008-lga01

W0008-bet01

W0008-lga02

W0008-bet02

W0008-lga03

W0008-bet03.

form UPDATE_BET02 using p_ioper

p_pernr

p_begda

p_oldlga01

p_oldbet01

p_oldlga02

p_oldbet02

p_oldlga03

p_oldbet03

changing

p_lga01

p_bet01

p_lga02

p_bet02

p_lga03

p_bet03.

TABLES: q0008.

DATA : w_tiamt TYPE znmgt_trgtin-ztiamt,

c_lgart LIKE pa0008-lga01 VALUE '0030'.

IF p_ioper EQ 'INS' OR

p_ioper EQ 'COP'.

p_lga01 = p_oldlga01. "p_oldlga01.

p_bet01 = p_oldbet01.

CALL FUNCTION 'Z_NMGTTI_CHECK'

EXPORTING

i_pernr = p_pernr

i_effective_date = p_begda

IMPORTING

E_TIAMT = w_tiamt

.

IF sy-subrc = 0.

IF w_tiamt NE '0.00'.

IF p_oldlga02 IS INITIAL AND p_oldbet02 IS INITIAL.

MOVE: c_lgart TO p_lga02,

w_tiamt TO p_bet02.

ELSEIF p_oldlga02 EQ c_lgart.

MOVE w_tiamt TO p_bet02.

ELSEIF p_oldlga02 NE c_lgart AND

p_oldlga03 IS INITIAL AND

p_oldbet03 IS INITIAL.

MOVE: c_lgart TO p_lga03,

w_tiamt TO p_bet03.

ELSEIF p_oldlga03 EQ c_lgart.

MOVE:w_tiamt TO p_bet03.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

endform.

1 REPLY 1

Former Member
0 Kudos

abandoned!