on 03-19-2008 5:58 PM
Hellow experts,
Here i have one Function Module like ZSAMPLE1.
I want to display its output in SmartForm.
What should I do for this. Pls help me.
with regards
babu
hi this is a simple report to display the data from sd...
create variables in import im the global definitions or declare tabels for this ....
REPORT zpr_17
NO STANDARD PAGE HEADING LINE-SIZE 255.
TABLES: vbak.
DATA: BEGIN OF it_vbak OCCURS 0,
vbeln LIKE vbak-vbeln,
vkorg LIKE vbak-vkorg,
spart LIKE vbak-spart,
END OF it_vbak,
BEGIN OF it_vbap OCCURS 0,
vbeln LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
matnr LIKE vbap-matnr,
END OF it_vbap,
BEGIN OF it_final OCCURS 0,
vbeln LIKE vbap-vbeln,
vkorg LIKE vbak-vkorg,
spart LIKE vbak-spart,
posnr LIKE vbap-posnr,
matnr LIKE vbap-matnr,
END OF it_final.
SELECT-OPTIONS: s_vbeln FOR vbak-vbeln.
START-OF-SELECTION.
PERFORM get_data.
PERFORM print_data.
&----
*& Form get_data
&----
text
----
FORM get_data .
SELECT vbeln vkorg spart INTO TABLE it_vbak
FROM vbak WHERE vbeln IN s_vbeln.
IF NOT it_vbak[] IS INITIAL.
SELECT vbeln posnr matnr INTO TABLE it_vbap
FROM vbap
FOR ALL ENTRIES IN it_vbak
WHERE vbeln = it_vbak-vbeln.
ENDIF.
LOOP AT it_vbap.
READ TABLE it_vbak WITH KEY vbeln = it_vbap-vbeln.
IF sy-subrc = 0.
it_final-vbeln = it_vbak-vbeln.
it_final-vkorg = it_vbak-vkorg.
it_final-spart = it_vbak-spart.
ENDIF.
it_final-posnr = it_vbap-posnr.
it_final-matnr = it_vbap-matnr.
APPEND it_final.
CLEAR: it_final,
it_vbak,
it_vbap.
ENDLOOP.
ENDFORM. " get_data
&----
*& Form print_data
&----
text
----
FORM print_data .
CALL FUNCTION '/1BCDWB/SF00000858'
TABLES
it_final = it_final .
ENDFORM. " print_data
regards,
venkat.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi babu ,
you should create a smartform then it will automatically creates a function module for that then you can call this function module in your report by using call function statemetn or use ctrl+f6 ..
then u will able to display the smart form..
if ur a learner check these links..
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sapgenie.com/abap/smartforms.htm
http://www.sapbrain.com/TUTORIALS/TECHNICAL/SMARTFORMS_tutorial.html
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf
SmartForms : some links
http://www.sapgenie.com/abap/smartforms.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://help.sap.com/saphelp_46c/helpdata/en/a5/de6838abce021ae10000009b38f842/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/Data/htm/english.htm
http://www.sap-img.com/smartforms/smart-001.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sap-img.com/smartforms/smart-002.htm
http://www.sapgenie.com/abap/smartforms.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.erpgenie.com/abap/smartforms.htm
regards,
venkat.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.