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

smartforms error in print program

former_member188827
Active Contributor
0 Likes
1,280

hi all,

I created a structure in se11 ztrec.

ztrec has fields:

kunnr,vbeln,kwmeng,arktx,netwr from tables vbap & vbak.

In smartform interface -


> table -


>itab like ztrec.

In the driver program:

CALL FUNCTION '/1BCDWB/SF00000008'

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

ITAB = itrec.

when i execute the program it gives a dump :

"when calling the function module '/1BCDWB/SF00000008' one of the parameters needed according to the interface description was not specified....

this parameter was itab."

Message was edited by:

abapuser

1 ACCEPTED SOLUTION
Read only

jayanthi_jayaraman
Active Contributor
0 Likes
1,239

Hi,

CALL FUNCTION '/1BCDWB/SF00000008'

<b>tables</b>

ITAB = itrec.

12 REPLIES 12
Read only

jayanthi_jayaraman
Active Contributor
0 Likes
1,240

Hi,

CALL FUNCTION '/1BCDWB/SF00000008'

<b>tables</b>

ITAB = itrec.

Read only

0 Likes
1,239

i have already done that, after the execution iam getting this dump

Read only

0 Likes
1,239

Hi,

CALL FUNCTION '/1BCDWB/SF00000008'

<b>tables</b>

ITAB = itrec.

If this is not working,paste code.

Read only

0 Likes
1,239

hi jayanthi,

tables: vbap,vbak,ztest.

data: zkunnr type vbak-kunnr.

data: zvbeln type vbak-vbeln value '0000000014'.

data: itrec type TABLE OF ztrec with HEADER LINE,

wa like LINE OF itrec.

select kunnr from vbak into wa-kunnr where vbeln = zvbeln.

select arktx netwr kwmeng from vbap INTO CORRESPONDING FIELDS of wa where vbeln = zvbeln .

move wa-kunnr to itrec-kunnr.

move wa-arktx to itrec-arktx.

move wa-netwr to itrec-netwr.

move wa-kwmeng to itrec-kwmeng.

append itrec.

endselect.

ENDSELECT.

CALL FUNCTION '/D1BCWB/SF00000008'

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

ITAB = itrec.

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

  • EXCEPTIONS

  • FORMATTING_ERROR = 1

  • INTERNAL_ERROR = 2

  • SEND_ERROR = 3

  • USER_CANCELED = 4

  • OTHERS = 5

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

WRITE / 'error'.

ENDIF.

this is the code & iam still getting the same dump

thanks for the help

Read only

0 Likes
1,239

Hi,

data: itrec type TABLE OF ztrec .

Don't use with header line.I don't think it will be supported.

Kindly reward points if it helps.

Read only

0 Likes
1,239

can u be more specific if i dont use headerline then how shuld i append the records to internal table itrec.

rgds.

Read only

0 Likes
1,239

declare two tables for the two select statements..

for first select simply use move corresponding to itab and for second select use move corressponding to itab1 for all entries in itab..

i feel the header declaration is fine..

amit

Read only

0 Likes
1,239

Hi,

Complete code:

tables: vbap,vbak,ztest.

types : begin of ty_kunnr,

kunnr type vbak-kunnr,

end of ty_kunnr.

data: zkunnr type vbak-kunnr.

data: zvbeln type vbak-vbeln value '0000000014'.

data: itrec type standard TABLE OF ztrec ,

i_kunnr type standard table of ty_kunnr.

select kunnr from vbak into table i_kunnr where vbeln = zvbeln.

select arktx netwr kwmeng from vbap INTO CORRESPONDING FIELDS of table itrec for all entries in i_kunnr where vbeln = i_kunnr-kunnr .

CALL FUNCTION '/D1BCWB/SF00000008'

tables

ITAB = itrec.

Read only

0 Likes
1,239

thanx alot jayanthi problem is solved.

Read only

Former Member
0 Likes
1,239

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'YHR_CONFIRM'

IMPORTING

fm_name = fname.

t_ssfctrlop-no_dialog = 'X'.

t_ssfctrlop-getotf = 'X'.

t_ssfctrlop-langu = 'E'.

CALL FUNCTION fname

EXPORTING

control_parameters = t_ssfctrlop

itab = it_rec.

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
1,239

Hi,

Copy the generated fm name in patterns in abap editor.It will give the parameters required for the smartforms in similar way to function module.

Read only

Former Member
0 Likes
1,239

tables statement is missing in cal of Fm

CALL FUNCTION '/1BCDWB/SF00000008'

  • TABLES

  • itab1 = ITAB

  • EXCEPTIONS

  • FORMATTING_ERROR = 1

  • INTERNAL_ERROR = 2

  • SEND_ERROR = 3

  • USER_CANCELED = 4

  • OTHERS = 5.

amit