Application Development and Automation 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: 
Read only

HR_GET_QUOTA_DATA error

Former Member
0 Likes
1,721

hi guys,

im trying to use this FM, and i need the ABWKO table with the quota absences,

the problem is that the table ABWKO that im using is incompatible, but i get the data definition from pt_qta10.

here is the code:

  • data definition

TYPES: BEGIN OF F_ABWKO, " ptgqd_kansp, "Rückgabestruktur für An-/Ab-*Kontingente

ktart LIKE p2006-ktart,

kttext LIKE t556b-ktext,

begda LIKE p2006-begda,

endda LIKE p2006-endda,

desta LIKE p2006-desta,

deend LIKE p2006-deend,

quonr LIKE p2006-quonr,

quosy LIKE p2006-quosy,

entitle TYPE ptm_quonum,

transfer TYPE ptm_quonum,

deduct TYPE ptm_quonum,

ordered TYPE ptm_quonum,

account TYPE ptm_quonum,

reduced TYPE ptm_quonum,

reduced2 TYPE ptm_quonum,

rest TYPE ptm_quonum,

rest2 TYPE ptm_quonum,

quoun TYPE c,

autom TYPE c, "autom. Anspr/Abtragg durch RPTIME

quoun_isocode TYPE t006i-isocode,

msehi TYPE t006-msehi,

untext TYPE t538t-etext,

END OF F_ABWKO.

form a.

data F_ABWKO type F_ABWKO occurs 0 with header line.

data: RETCD type sy-subrc.

CALL FUNCTION 'HR_GET_QUOTA_DATA'

EXPORTING

PERNR = ti_ztable-pernr

QTYPE = '1'

MOD = 'D'

  • DEDU_DATUM = F_DE_DATUM

  • ENTI_DATUM = F_EN_DATUM

BEGDA = sy-datum

ENDDA = '99991231'

  • DEDUBEG = F_DEDU_BEG

  • DEDUEND = F_DEDU_END

  • LANGU = SY-LANGU

IMPORTING

RETCD = RETCD

  • AUTOMATIC =

TABLES

  • ABWKTART_SEL = F_SE_KTART

ABWKO = F_ABWKO

  • IQTTRANS = f_qttrans "AHRK038601

  • anwko =

  • I2006 =

  • I2007 =

  • I0001 =

  • I0003 =

  • I0007 =

  • CUM_VALUES = F_CUM_VALUES

EXCEPTIONS

INFTY_NOT_FOUND = 1

MISSING_AUTHORITY = 2

WRONG_PARAMETER = 4

OTHERS = 5.

endform.

any ideas?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
974

In the FM or the Report what ever you are using. Declare the following..

  TYPE-POOLS: ptgqd.

  DATA: lt_cum_values TYPE ptgqd_cu_val_add OCCURS 0.
        lt_abwko TYPE ptgqd_kansp OCCURS 0,
        lt_ktart_sel TYPE TABLE OF ptgqd_kt_sel.

    CALL FUNCTION 'HR_GET_QUOTA_DATA'
      EXPORTING
        pernr             = lv_pernr
        qtype             = '1'
        mod               = fi_de_sim
        dedu_datum        = fi_de_datum
        enti_datum        = fi_en_datum
        begda             = fi_pn_begda
        endda             = fi_pn_endda
        dedubeg           = fi_dedu_beg
        deduend           = fi_dedu_end
      IMPORTING
        retcd             = lv_retcd
      TABLES
        abwktart_sel      = lt_ktart_sel
        abwko             = lt_abwko    " here is the table used
        cum_values        = lt_cum_values
      EXCEPTIONS
        infty_not_found   = 1
        missing_authority = 2
        wrong_parameter   = 4
        OTHERS            = 5.

works fine.

cheers

Amandeep

Message was edited by:

Amandeep Bal

hi guys,

im trying to use this FM, and i need the ABWKO table with the quota absences,

the problem is that the table ABWKO that im using is incompatible, but i get the data definition from pt_qta10.

here is the code:

  • data definition

TYPES: BEGIN OF F_ABWKO, " ptgqd_kansp, "Rückgabestruktur für An-/Ab-*Kontingente

ktart LIKE p2006-ktart,

kttext LIKE t556b-ktext,

begda LIKE p2006-begda,

endda LIKE p2006-endda,

desta LIKE p2006-desta,

deend LIKE p2006-deend,

quonr LIKE p2006-quonr,

quosy LIKE p2006-quosy,

entitle TYPE ptm_quonum,

transfer TYPE ptm_quonum,

deduct TYPE ptm_quonum,

ordered TYPE ptm_quonum,

account TYPE ptm_quonum,

reduced TYPE ptm_quonum,

reduced2 TYPE ptm_quonum,

rest TYPE ptm_quonum,

rest2 TYPE ptm_quonum,

quoun TYPE c,

autom TYPE c, "autom. Anspr/Abtragg durch RPTIME

quoun_isocode TYPE t006i-isocode,

msehi TYPE t006-msehi,

untext TYPE t538t-etext,

END OF F_ABWKO.

form a.

data F_ABWKO type F_ABWKO occurs 0 with header line.

data: RETCD type sy-subrc.

CALL FUNCTION 'HR_GET_QUOTA_DATA'

EXPORTING

PERNR = ti_ztable-pernr

QTYPE = '1'

MOD = 'D'

  • DEDU_DATUM = F_DE_DATUM

  • ENTI_DATUM = F_EN_DATUM

BEGDA = sy-datum

ENDDA = '99991231'

  • DEDUBEG = F_DEDU_BEG

  • DEDUEND = F_DEDU_END

  • LANGU = SY-LANGU

IMPORTING

RETCD = RETCD

  • AUTOMATIC =

TABLES

  • ABWKTART_SEL = F_SE_KTART

ABWKO = F_ABWKO

  • IQTTRANS = f_qttrans "AHRK038601

  • anwko =

  • I2006 =

  • I2007 =

  • I0001 =

  • I0003 =

  • I0007 =

  • CUM_VALUES = F_CUM_VALUES

EXCEPTIONS

INFTY_NOT_FOUND = 1

MISSING_AUTHORITY = 2

WRONG_PARAMETER = 4

OTHERS = 5.

endform.

any ideas?

2 REPLIES 2
Read only

Former Member
0 Likes
975

In the FM or the Report what ever you are using. Declare the following..

  TYPE-POOLS: ptgqd.

  DATA: lt_cum_values TYPE ptgqd_cu_val_add OCCURS 0.
        lt_abwko TYPE ptgqd_kansp OCCURS 0,
        lt_ktart_sel TYPE TABLE OF ptgqd_kt_sel.

    CALL FUNCTION 'HR_GET_QUOTA_DATA'
      EXPORTING
        pernr             = lv_pernr
        qtype             = '1'
        mod               = fi_de_sim
        dedu_datum        = fi_de_datum
        enti_datum        = fi_en_datum
        begda             = fi_pn_begda
        endda             = fi_pn_endda
        dedubeg           = fi_dedu_beg
        deduend           = fi_dedu_end
      IMPORTING
        retcd             = lv_retcd
      TABLES
        abwktart_sel      = lt_ktart_sel
        abwko             = lt_abwko    " here is the table used
        cum_values        = lt_cum_values
      EXCEPTIONS
        infty_not_found   = 1
        missing_authority = 2
        wrong_parameter   = 4
        OTHERS            = 5.

works fine.

cheers

Amandeep

Message was edited by:

Amandeep Bal

Read only

0 Likes
974

Wow!

that was fast, is working!

tks a lot!