09-05-2013 6:25 PM
Hi,
I am new to SMARTFORMS, I have a quick question regardign form interface section under global setting of SmartForms.
Can I change the contents of a structure from interface section?
I tried to change the content in Initialization tab under Global definition, but I am getting a run time error that I cannot change the content of the structure.
kindly see the attached snapit.
09-06-2013 9:39 AM
Hi Sand Buddies,
If you are trying to change an import parameter structure then SAP will throw a run time error. But if the import parameter has 'PASS VALUE' check box ticked, then you will be able to modify the structure.
Reason behind this: PASS VALUE check will copy the import parameter values in to the structure name and hence you will be able to change it where as if you are directly trying to modify the structure ,then you are trying to modify at the reference of structure which is not allowed.
09-05-2013 6:40 PM
Check if you're trying to change an Import parameter of the form interface.
I can't test it right now, but I'm guess you can only change the values of Export and Table interface parameters.
The Import parameters should be handled in the caller program.
09-05-2013 6:57 PM
Hi,
If you create local structure in a smart form, interface will not recognize that structure.
For more, I think this thread will help you:
http://scn.sap.com/thread/3408367
Hope this helps.
09-05-2013 7:19 PM
09-06-2013 9:06 AM
09-06-2013 1:02 AM
Hi,
yes you are able to change the structures, if you are in possession of an access key. (standard structures/ copie of standard form)
09-06-2013 7:53 AM
Hi,
I think that in this case Sand Buddies means the structure content .
Until I saw the dump picture.... (
http://scn.sap.com/servlet/JiveServlet/download/14334306-184983/smartforms.jpg )
I thought the same....
Regards.
Eitan.
09-06-2013 8:58 AM
09-06-2013 4:33 AM
Hello Sand Buddies.
I am able to change my internal table passed from driver program to smartform via interface.
Why can't you change the contents in the driver program itself?
Regards.
09-06-2013 4:34 AM
Hi,
The form interface tab of global settings in smartform, deals with the interface with the driver program.
Import and Tables tab in global settings receives values for variables, structures and tables from driver program. As this is the interface with driver program, you cannot change the structure of the same. Assign the interface parameter to some locally declared variables in the smartform and change the content of those locally declared variables.
Regards,
Shahanaz.
09-06-2013 7:37 AM
internal table which you pass from driven program you can declare as follow:
**FORM INTERFACE IMPORT TAB : in import tabe you can assign you internal table for example
(itab1 like vbrk (itab1 from driven table)
**FORM INTERFACE TABLE TAB : you can assing structure type for example
itab like ztable (ztable is structure)
09-06-2013 7:50 AM
Hi Sand,
You Can change the Attributes of the smartform if its a custom one ( Z Copy of standard or your Created one ) otherwise u will need a access key for it.
The catch is that u have to use global structure in interface
Like IS_BIL_INVOICE TYPE LBBIL_INVOICE , here LLBIL_INVOICE is a global structure.
Also u have to make changes in the calling program also to handle the addition u have made in smartform interface.
Hope this Helps
Thanks and Regards
Arpit Gupta
09-06-2013 8:20 AM
Hi,
If the parameters are using local types for parameter definition then the structure can be changed by enhancing the type in TYPES tab.
If the parameters are using global structures for their type then you have to enhance the global structure from transaction SE11.
i.e Enhance the corresponding structure using transaction SE11.
You can include additional fields which will reflect everywhere the structure is being used.
Regards,
Ashish Rawat
09-06-2013 8:57 AM
Hi Sand Buddies,
As @Heber Fabiano has pointerd out, please check to see if you are trying to change an IMPORTING PARAMETER. If you have mentioned the structure name in the interface, it means that it is an importing parameter to the smart form, and therefore cannot be changed.
Only EXPORTING parameters value can be changed (as in changed and returned back to the print program).
As @Eitan Rosenberg has suggested, Tick the "Pass By Value" option to perform the same.
Regrards,
George Abraham
09-06-2013 9:05 AM
Hi,
I think my question was little ambiguous.
I mean the content (data) stored in the structure.
Definitly if I need to change the structure I would have used SE11.
Prabhu: you mention that you are able to change it. when I tried though it was structure not internal table, but does not make difference I got run time error/short dump.
Heber fabiano & Shahanaz Hussain: You mentioned that its not possible to change the content.
I know that I can copy the content to local variable (with in smartforms) and change it and display it but I want to if its possible to change the original structure?
thanks
09-06-2013 9:49 AM
Can you post your code that you wrote under the Initialization tab?
09-06-2013 9:39 AM
Hi Sand Buddies,
If you are trying to change an import parameter structure then SAP will throw a run time error. But if the import parameter has 'PASS VALUE' check box ticked, then you will be able to modify the structure.
Reason behind this: PASS VALUE check will copy the import parameter values in to the structure name and hence you will be able to change it where as if you are directly trying to modify the structure ,then you are trying to modify at the reference of structure which is not allowed.
09-06-2013 12:36 PM
Hi,
The Pass value can solve the issue and allow to change the content even if its importing.
thanks to all for the wise contribution.
Regards