Hi Experts
I have created a simple smart form which has to display sales orders with there net value.
In form Import i have given IT_KNA1 like KNA1in import & IT_VBAK like VBAK in tables.
To Display data i created a table by right click in page 1 which gave me 3 things header, main area & footer for table. Be selecting table node i added 2 lines 1 for header & othr for data with 4 columns each line.
In data tab of table i have given IT_VBAK INTO IT_VBAK.
In header node i created text cell by right click & written text for all 4 headings like sales order, created on, created by & net value in each cell respectively
In main area node i created the text cell by right click & added the fields by drag & drop in each cell respectively from the table list.
The problem is i am Still not getting any value while executing the form.
I have no idea about where to add loop or anythng else required. Could you please tell me where i m doing the mistake.
The driver program is as below:
REPORT ZTEST_FORM02.
TABLES: KNA1, VBaK.
DATA: it_kna1 like kna1,
it_vbak like vbak occurs 0 with header line.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: lf_formname TYPE tdsfname.
PARAMETER: p_kunnr like kna1-kunnr.
SELECT * FROM KNA1 into it_KNA1
WHERE kunnr = p_kunnr.
ENDSELECT.
SELECT * from VBAK into table it_vbak
where kunnr = p_kunnr.
SmartForm from customizing table TNAPR
lf_formname = 'ZTEST_FORM02'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = lf_formname
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 fm_name
EXPORTING
IT_KNA1 = it_kna1
TABLES
IT_VBAK = it_vbak
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Nik