Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SMARTFORMS: how to change Form interface structure/table

atif_bhatti
Participant
0 Kudos

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.

1 ACCEPTED SOLUTION

former_member215424
Active Participant
0 Kudos

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.

17 REPLIES 17

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

rosenberg_eitan
Active Contributor
0 Kudos

Hi,

Try using the pass value option.

Regards.

Eitan.

0 Kudos

Does it still applicable to the data/contents not meta data?

Former Member
0 Kudos

Hi,

yes you are able to change the structures, if you are in possession of an access key. (standard structures/ copie of standard form)

0 Kudos


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.

0 Kudos

Yes, you are right its the content not the structure.

thanks

karun_prabhu
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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.

former_member182040
Active Contributor
0 Kudos

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)

0 Kudos

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

former_member289261
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

atif_bhatti
Participant
0 Kudos

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

0 Kudos

Can you post your code that you wrote under the Initialization tab?

former_member215424
Active Participant
0 Kudos

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.

atif_bhatti
Participant
0 Kudos

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