2013 Aug 21 8:53 AM
when we are calling smartform with driver program and passing form interface parameters in function module genarated by smartform is it mandatory to declare internal table in bcz we already passing data data
1. Global settings :
Form interface
Variable name Type assignment Reference type
ITAB TYPE Table Structure
2. about looping is it mandatory at form level or we can do looping in driver program.
2013 Aug 21 10:42 AM
For the first question the answer is 'Yes'. It is so because the Function Module for the smartform is generated with the form interface parameters as the import parameter to the FM. You can check this by creating a smartform without any form interface parameters and calling it in the driver program.
The screenshot above shows the import parameters of my smartform's FM. The last entry is the one which I have declared in my interface parameters and that is added in to the import parameters.
For the 2nd question also the answer is 'Yes'.
2013 Aug 21 9:01 AM
Hi SAP ABAP ,
It is not mandatory to loop at form level , you can loop in driver program and you can pass the internal table into the form.
Thanks,
S.Rajendranath Raparthi.
2013 Aug 21 9:13 AM
2013 Aug 21 9:28 AM
Hi
when we are calling smartform with driver program and passing form interface parameters in function module genarated by smartform is it mandatory to declare internal table in bcz we already passing data data
1. Global settings :
Form interface
Variable name Type assignment Reference type
ITAB TYPE Table Structure
You should declar ITAB in Form interface ->Tables like this
2. about looping is it mandatory at form level or we can do looping in driver program.
Yes like this
Please see this link for more about smartforms
linke removed by moderator - banned site
Message was edited by: Matthew Billingham
2013 Aug 21 9:40 AM
1. Yes it is mandatory to pass the parameter if you are creating it in Form Interface. But you can pass Default Value their to make it optional.
2. You can loop inside Smartform itself. It's completely upto you.
2013 Aug 21 9:48 AM
Hi,
In smartforms driver program, it is always better to create a structure through SE11, on which the internal table is defined.
The SF interface table also should be assigned to the same structure.
This is to prevent 'Type' errors which often trouble very much.
In the following example, this structure is ZPM_MS101.
In the following example internal table ITAB1 is interfaced from the Driver program.
Now see the following screen-shots to understand the process:
-Jogeswara Rao K
2013 Aug 21 10:29 AM
hi ,
to get the data in the Smart Form
1) Declare internal table in smart form of the same type (Form Interface)
2) loop Internal table in the smartform
I think its mandatory to loop at the form level
2013 Aug 21 10:42 AM
For the first question the answer is 'Yes'. It is so because the Function Module for the smartform is generated with the form interface parameters as the import parameter to the FM. You can check this by creating a smartform without any form interface parameters and calling it in the driver program.
The screenshot above shows the import parameters of my smartform's FM. The last entry is the one which I have declared in my interface parameters and that is added in to the import parameters.
For the 2nd question also the answer is 'Yes'.
2013 Aug 21 11:38 AM
Hi ,
Yes it is mandatory to pass the internal table parameter though you are declaring in the driver program because the function module is generated by smart form attributes and you can loop in smartform or either in driver program.
Regards
Khaleel
2013 Aug 26 6:40 AM
2013 Aug 21 11:54 AM
Hi,
When you are trying to call the smartform through a driver program you need to pass the values defined in the FORM INTERFACE. And thus if you have maintained a table in the interface then you need to pass the appropriate values.
The looping depends on the coder, it is better to use the LOOP option within the TABLE node of the smartform.
2013 Aug 21 1:27 PM
Hii
Step to be followed are:
1> Create a structure in SE11 with ur require number of fields.
2> Declare a internal table under global setting form interface.
In the picture T_VBRP is a internal table of structure type ZVBRP created in SE11.
3>create a main window to display the item data in smart form.
Here in the picture in data tab looping the internal table T_VBRP into X_VBRP.
Here we can also specify the where condition.
Since a FM is generated by the smart form with import parametes.
So it is mandatory to declare internal table in form interface.
For looping the internal table, it's better in terms of output to loop in smart forms.
Then call ur generated FM into ur driver program.
Regards
Syed
2013 Aug 26 6:38 AM
2013 Aug 26 7:39 AM
Hi,
In Form Interface of Global settings in smartform you can declare the variables that you want to link with smartform. You can either declare Internal table in Tables tab. Or else you can declare a Structure in Import tab.
It is not mandatory that you need to loop at form level. If you are using an internal table, you can pass all the records at once to smartform and you can loop at smartform level.
Or else you can loop the internal table in the driver program and pass each row in a structure to smartform.
Always better to pass whole internal table with data to smartform and loop inside smartform.
If you don't loop the internal table, no data will be displayed in the output.
Regards,
Shahanaz Hussain.
2013 Aug 26 7:57 AM
2013 Aug 26 11:30 AM
First
you need to identify what data you require in your smartform!!
thats the most important
then you need to pass that thru the İnterface!!!
Its better to pass more data then less incase you need
in the smartform if there is alot of processing overhead you can decrease the table you are passing from the report.
The report you will call this smartform can be a standard sap transaction or a Z transaction
2013 Aug 26 12:50 PM
Hello,
Answer for your first question: Yes, it's mandatory to declare internal table in the interface of smartform. Until unless you define it in smartform interface, it won't be able to understand what inputs its getting. Only if you declare the internal table in interface of smartform, then only, when you call the function module in ABAP editor, you will get the internal table as exporting parameter or else you won't get it. So it's mandatory.
Answer for your second question: If you just want to pass an final internal table and just display that in smartform, then you need not to use loop within smartform. But, if you want to perform any calculation on the data in the internal table, then you need to loop at that table inside the smartforms only. In the second case, if you use loop in main program, it won't perform as expected.
Hope this helps.
Regards,
Anubhab