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: 

Reading data for multiple employees using LDB

Former Member
0 Kudos

Hi Friends,

I am working on payslip, i am not getting data for more than employees

Its working for one employee perfectly.

Please find below piece of code.

START-OF-SELECTION.
GET PERNR.
CLEAR: GS_PERNR.
GS_PERNR = PERNR.
PERFORM GET_FORPERIOD.  "  Getting for period
CLEAR: T500P, T501T,
        T528T, T001, LS_PDET.
REFRESH LT_PDET.
PERFORM GET_PDATA.   " getting personel and company data
CLEAR: LS_BANKDET,
        LV_BNKA.
PERFORM GET_BANKDATA. " Getting bank data
CLEAR: LV_ABSN_BALAN.
PERFORM GET_ABSENCEDATA. " Getting absence data(Leave data)
CLEAR: MOLGA,
        LV_SEQNR,
        LV_BETRG, RT.
REFRESH: LT_DEDU,
          LT_EARN,
          LT_WGTXT,
          LT_WGTXT_DEDN,
          LT_WGTFINAL, LT_WGTFINAL_DEDU.

PERFORM GET_PAYROLLDATA USING PERNR-PERNR " Getting data from rt.
                               PN-BEGDA
                               PN-ENDDA.


END-OF-SELECTION.
PERFORM CALL_FORM.  " Calling smartform

5 REPLIES 5

former_member201275
Active Contributor
0 Kudos

You are calling your Smartform in the Event "END-OF-SELECTION"! This means the smartform will only be called once, i.e. for the last person.

0 Kudos

Hi Glen,

You are right. But i have to generate a smartform for other employee also.

which is not happening.

Regards,

Priyaranjan

0 Kudos

So call the smatform at GET pernr LATE event, once per employee number (like AT END OF)

NB: If you want only one spool, read Printing Several Forms in One Print Request.

Regards,

Raymond

0 Kudos

Hi Raymond,

If i am calling my form under get pernr late event,

i have to click on back button then only its showing

for other pernr.

which is not recommendable.

Regards.

Priyaranjan

0 Kudos

oh my hat