cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic action fill additional field in same infotype

former_member310342
Participant
0 Kudos

Hey,

I need some quick advice. I am using a dynamic account where I call a function which is calculating values.

One of this value should be passed to the current infotype which started the dynamic action.

I tried to set the value in the function like:

TABLES: p0008,
        rp50d.
[values calculated]
  p0008-ansal = lv_jahresgehalt.

I also tried to use a MOD dynamic action but this results in a infinite loop because the dynamic action will be called over and over again.

Can you please tell me how I can fill the value of the current processed infotype?

Thanks and kind regards

Accepted Solutions (1)

Accepted Solutions (1)

former_member310342
Participant
0 Kudos

I could resolve the issue via User Exit: ZXPADU02

  CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
      EXPORTING
        prelp = innnn
      IMPORTING
        pnnnn = ls_p0008.

    lo_helper = NEW zcl_dyn_atgehalt_it14(
      iv_p0008_new  = ls_p0008
*      iv_p0008_old  = ls_p0008_old
    ).

    lo_helper->main(
      IMPORTING
        ev_jahresgehalt = lv_jahresgehalt        " Lohnartenbetrag für Bezüge
        ev_betrag       = lv_betrag
        ev_prozentsatz  = lv_prozentsatz
        ev_lgart1       = lv_lgart1
        ev_lgart2       = lv_lgart2
    ).

    ls_p0008-ansal = lv_jahresgehalt.

    CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
      EXPORTING
        pnnnn = ls_p0008
      IMPORTING
        prelp = innnn.

Answers (0)