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

FM table without associated type

Former Member
0 Likes
1,230

Hello All,

I am trying to insert some code into standard function module J_1I7_USEREXIT_CHEQUENO_CERT.

I am looping at I_PRINTTAB and doing some selections based on values in I_PRINTTAB.

Something like this.

select single bukrs
             belnr
             gjahr
  from       J_1IEWTCHLN
  into (LV_BUKRS, lv_belnr, LV_GJAHR)
  where bukrs = I_PRINTTAB-bukrs and
        GJAHR = I_PRINTTAB-GJAHR and
        j_1iextchln = I_PRINTTAB-j_1iextchln and
        j_1iextchdt = I_PRINTTAB-j_1iextchdt.

When i trying to execute i am gettin an error as:

The data object I_PRINTTAB has no structure and therfore no component called 'BUKRS'.

How to correct this.

Regards

4 REPLIES 4
Read only

Former Member
0 Likes
918

well I_PRINTTABis an internal table without headerline.

it hold all your records and not just one. if you need one record you need to move it to a work area.

Data: wa_printtab like line of I_PRINTTAB.

read table I_PRINTTAB

into wa_printtab

index 1.

now you got the first record in your work area.

Read only

Former Member
0 Likes
918

Hi Rahul,

I_PRINTTAB may be the table without header line. Just check the defination of it.

Regards,

Atish

Read only

dev_parbutteea
Active Contributor
0 Likes
918

HI,

in the fm's attribute:

short text:User Exit for adding Cheque No to the internal table

you have to specify the table type you want, in tables tab.

Regards.

Read only

Former Member
0 Likes
918

DATA : BEGIN OF withtab OCCURS 0.

INCLUDE STRUCTURE with_item.

DATA: budat LIKE bkpf-budat,

bupla LIKE bseg-bupla,

secco LIKE bseg-secco, " Note 604606

j_1iextchln LIKE j_1iewtchln-j_1iextchln,

j_1iextchdt LIKE j_1iewtchln-j_1iextchdt,

bankl LIKE j_1iewtchln-bankl,

flag TYPE c,

no_print TYPE c,

method type c, "I- Invoice, P- Downpayment

print_order LIKE sy-tabix,

lifnr LIKE bseg-lifnr, "Note 981763

END OF withtab.

data: begin of invtab occurs 0.

include structure withtab.

data: base_mod type c.

data: seq like t059p-wt_tpnr. "NOTE 981763

data: end of invtab.

data : BEGIN OF printtab OCCURS 0 .

INCLUDE STRUCTURE invtab.

DATA : sno LIKE sy-tabix, "Note 891923

tds_amount LIKE bseg-wrbtr,

surc_amount LIKE bseg-wrbtr,

ecess_amount LIKE bseg-wrbtr,

cheque_no like inrdp-fromnumber,

banka LIKE bnka-banka,

ort01 LIKE bnka-ort01,

brnch LIKE bnka-brnch,

j_1itdbank like J_1ICERTIF-j_1itdbank,

word LIKE spell-word,

paise LIKE spell-decword,

END OF printtab.

data : augbl like bseg-augbl.

field-symbols: <wa_printtab> like printtab.

loop at i_printtab.

assign i_printtab to <wa_printtab>.

select single augbl into augbl

from bseg

where bukrs = <wa_printtab>-bukrs and

belnr = <wa_printtab>-belnr and

gjahr = <wa_printtab>-gjahr and

augbl like '9%'.

select single XBLNR into <wa_printtab>-brnch

from bkpf

where bukrs = <wa_printtab>-bukrs and

belnr = augbl and " <wa_printtab>-belnr and

gjahr = <wa_printtab>-gjahr.

modify i_printtab from <wa_printtab>.

select single chect into <wa_printtab>-cheque_no

from payr

where zbukr = <wa_printtab>-bukrs and

vblnr = augbl and " <wa_printtab>-BELNR and

gjahr = <wa_printtab>-gjahr.

modify i_printtab from <wa_printtab>.

endloop.