on 02-24-2007 4:22 PM
hi folks ,
I need a help .
below is my code :
REPORT ZAJAY .
tables: vbap,vbak.
data flag(1).
data: form_name type tdsfname value 'ZAJAY'.
DATA : FM_NAME TYPE RS38L_FNAM.
PARAMETERS : VBELN LIKE VBAK-VBELN OBLIGATORY,
KUNNR like VBAK-KUNNR OBLIGATORY.
DATA : BEGIN OF ITAB OCCURS 0 .
INCLUDE STRUCTURE VBAP.
DATA : END OF ITAB .
data t_itab like itab occurs 0 with header line .
start-of-selection .
select single * from vbak where vbeln = vbeln and kunnr = kunnr .
select * from vbap into corresponding fields of table t_itab where
vbeln
= vbak-vbeln .
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = form_name
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION '/1BCDWB/SF00000016'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
VBELN = VBELN
KUNNR = KUNNR
FLAG = flag
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
ITAB = t_itab.
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.
ENDIF.
my problem is that the value of table t_itab is not being moved to itab .
now below is my declaration in the smartform for loop .
i created one loop .
looping from itab to w_itab .
itab is the interface parameters and w_itab is the gobal declaration .
i am printing values like as it appears on form :
-
item description material no. quantity net value
-
000 000 00 00
how to extract the values ?
plz provide your valuable inputs .
Thanks ,
Abhishek
Refer these docs for help
Refer this link for Smartforms
Subroutine in smartform
Style and mailing the Smartform output
Table,Template,Loop and Command in Smartform
Reward if this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abi,
You have to defined a IT table (same structure like t_itab in your print program ) in the table tab of the smartforms.
Activate the form and then call the FM once again and then see are you able to see the IT defined in smartforma as a table parameter.
<b>
Please remember</b> if there is a difference in the internal table defined in the Print program and the Sartor, you are not able to print the correct data.
Regards
Vikas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
folks ,
i have done as suggested by you , but its not working .
thanks ,
Abhishek .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
Change this line:
CALL FUNCTION '/1BCDWB/SF00000016'
to CALL FUNCTION fm_name ......
In the Form Interface node of the smartform, go to tables parameter, and enter ITAB LIKE VBAP.
Regards
Subramanian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In the smartform itab should be declared as internal table in tables tab which should be of type vbap.
Check how did you declare itab in the smartform.
Br,
Laxmi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.