Internal Table in Smartform
Here is a sample program in which used two internal tables:
REPORT YPRINTPRG_SMARTFORM1 .
DATA : ITKNA1 LIKE KNA1,
ITVBAK LIKE VBAK OCCURS 0 WITH HEADER LINE.
PARAMETERS : PKUNNR LIKE KNA1-KUNNR.
SELECT * FROM KNA1 INTO ITKNA1
WHERE KUNNR = PKUNNR.
ENDSELECT.
SELECT * FROM VBAK
INTO TABLE ITVBAK
WHERE KUNNR = PKUNNR.
CALL FUNCTION '/1BCDWB/SF00000011' “THIS FUNCTION MODULE
CALLS THE
SMART FORM WE WILL GET THIS AT MENU ENVIRONEMENT ”
EXPORTING
ITKNA1
= ITKNA1
TABLES
ITVBAK
= ITVBAK.
IN SMART FORM
FORM INERFACE---------IMPORT (TAB)
Parameter name Type
assignment Reference type
Default value
ITKNA1
LIKE
KNA1
FORM INERFACE---------TABLES (TAB)
ITVBAK
LIKE
VBAK
PAGES & WINDOWS----- MAIN WINDOW-----LOOP 1----DATA(TAB)
ITVBAK
INTO
ITVBAK
PAGES & WINDOWS-------MAIN WINDOW------LOOP 1-----TEXT
3(EDITOR)
&ITVBAK-VBELN& &ITVBAK-ERDAT&
&ITVBAK-ERNAM& &ITVBAK-NETWR&
PAGES & WINDOWS-------HEADER WINDOW-----TEXT 2(EDITOR)
Customer No. &itkna1-kunnr&
CustomerName :&itkna1-name1&
Tips by : Vijay
Fast Links:
Get help for your ABAP problems
Do
you have a ABAP Question?
SAP Books
SAP Certification,
Interview Questions, Functional, Basis Administration and ABAP Programming
Reference Books
Smartforms Tips
SAP Smartforms
Tips and Tricks
ABAP Programming Tips
ABAP Forum for Discussion
and Samples Program Codes for Abapers
Best regards,
SAP Basis, ABAP Programming and Other IMG Stuff
http://www.erpgreat.com
All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
All product names are trademarks of their respective
companies. The site www.erpgreat.com is in no way affiliated with
SAP AG.
Every effort is made to ensure the content integrity.
Information used on this site is at your own risk.
The content on this site may not be reproduced
or redistributed without the express written permission of
www.erpgreat.com or the content authors.
|