Select-options as parameters to smartforms and displaying the data in the form of control break reports in smartforms: Procedure : 1. Create a dictionary structure representing select-option structure name : zselect fields : sign char1 option option low vbeln_va high vbeln_va Note: If required, create table type based on above line type (structure-zselect) table type -->ztselect 2. Create smartform (z9amsform4) Form interface : import : i_vbeln type ztselect (or) tables : t_vbeln like zselect Global definitions :-
12
Embed
Select Options as Parameters to Smartforms, Control Break Events Functionality in Smartforms
Select Options as Parameters to Smartforms, Control Break Events Functionality in Smartforms in SAP ABAP
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Select-options as parameters to smartforms and displaying the data in the form of control break reports in smartforms:
Procedure :
1. Create a dictionary structure representing select-option
structure name : zselect
fields :
sign char1
option option
low vbeln_va
high vbeln_va
Note: If required, create table type based on above line type (structure-zselect)
table type -->ztselect
2. Create smartform (z9amsform4)
Form interface :
import :
i_vbeln type ztselect (or)
tables :
t_vbeln like zselect
Global definitions :-
Types :
types : begin of ty_vbap,
vbeln type vbap-vbeln,
posnr type vbap-posnr,
matnr type vbap-matnr,
netwr type vbap-netwr,
end of ty_vbap.
types : gt_vbap type table of ty_vbap.
global data :
lt_vbap type gt_vbap
ls_vbap type ty_vbap
lv_total type i
gv_total type i
Initialization tab :
Loop object
Text object under event on sort begin:
Code object (program lines) under loop :
Text object under loop:
Text object under event on sort end:
Code object under event on sort end :
Text object after loop
Driver Program :
REPORT Z9AMSFORM4_CALL.
data lv_vbeln type vbak-vbeln.select-options so_vbeln for lv_vbeln default '4980' to '4985'.
start-of-selection.* get the smartform function module name
data lv_fname type rs38l_fnam.CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = 'Z9AMSFORM4' IMPORTING FM_NAME = lv_fname.
* invoke the smartform f.mcall function lv_fnameexporting i_vbeln = so_vbeln[].