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: 

problem in passing the value to smartform

Former Member
0 Kudos

Hi,

I am new to the smartforms and i having hardly any knowledge about it.I am working on a smartform in which i am passing the value to the smartform but the problem is as i am passing the value to it by declaring it in to the global variables of the smartforms but still is not taking the value in it,

the previous value was stored in the table's main area in the cell having the different nodes and codes.

plzz provide me guidelines for solving this problem.

10 REPLIES 10

Former Member
0 Kudos

Hi

You need to declare parameters in FORM INTERFACE which you want to pass in smartform

Regards

Aditya

Former Member
0 Kudos

hai,

global definition

to declare the variable alone,

form interface.

to interact with database and se38.

shan.

0 Kudos

Hi,

If you are passing the value at runtime... then declare the variable in form interface.... else.. you can declare it in global definitions.

Use program lines node to change the value of the variable wherever required.

regards

padma

Former Member
0 Kudos

hi,

Actually i am trying to pass the values TOT1 n TOT2 to the smartform ,in the program it is working fine as i checked in the debug mode but when it comes to the smartform ,it is working.

here 's d cpde which i am using right now and the data type of TOT1 n TOT2 are string.

DATA : BEGIN OF vv OCCURS 0,

verwmerkm LIKE plmk-verwmerkm ,

toleranzob TYPE p DECIMALS 2,

toleranzun TYPE p DECIMALS 2,

tot1 type string, "tot1 for the toleranzob

tot2 type string, "tot2 for the toleranzun

kurztext LIKE qpmt-kurztext,

END OF vv.

LOOP AT vv.

SELECT SINGLE toleranzob FROM qpmk INTO vv-toleranzob WHERE mkmnr = vv-verwmerkm.

SELECT SINGLE toleranzun FROM qpmk INTO vv-toleranzun WHERE mkmnr = vv-verwmerkm .

vv-tot1 = vv-toleranzun.

vv-tot2 = vv-toleranzob.

if vv-toleranzun > 0 and vv-toleranzob > 0.

MODIFY vv FROM vv INDEX sy-tabix TRANSPORTING tot1 tot2.

elseif vv-toleranzun > 0 and vv-toleranzob = 0.

MODIFY vv FROM vv INDEX sy-tabix TRANSPORTING tot1.

elseif vv-toleranzun = 0 and vv-toleranzob > 0.

MODIFY vv FROM vv INDEX sy-tabix TRANSPORTING tot2.

endif.

endloop.

plzz provide me guidelines that where should i declare it in the smartform so that out put can be displayed.

0 Kudos

hi,

You can use the calculations tab in loop node

give the operation as total .. field name is the field which is to be summed up... corresponding target field and time is after the loop

You need not use the program lines here...

or else you need to explicitly write the code in program lines

tot1 = tot1 + <fieldname>

regards

padma

0 Kudos

hai,

declare the variable in global definition.

then write ur source code in initilization(global definition) in smart form itself.

shan.

0 Kudos

hi,

I had checked the previous smartform and in that there is no such defining of code in the form attributes or in the global definations...

i think there might be the problem of nodes but i have no knowledge about how to make nodes and link it up with the smartforms. plzz provide me guidlines for solving this problem.

0 Kudos

hai,

dont get confused. as i said before there r two ways to do smartforms

1. through smartform itself.

2. through smartform and se38.(like that of script)

u first say me which method ur following.

in 1 method u can write ur source code in smartform itself, that is in initilization.

in second method u can write ur source code in se38 ,like that of script.

for 2nd method

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'INVOICE_NEW'

IMPORTING

FM_NAME = FM_NAME.

CALL FUNCTION FM_NAME

EXPORTING

USER_SETTINGS = 'X'

VBELN = IT_VBELN-VBELN

RBICLEAR = C3

IMPORTING

JOB_OUTPUT_OPTIONS = JOB_OUT

EINV = EINV

.

u say what value is not passing... what is the real problem.

shan.

Former Member
0 Kudos

Hi ricx,

Pass the value in Global Definitions...

n u can rite the code in intialization passing the input parameters n output parameters...u can rite all code there...it will work now..

pl check...

Vamshi

Former Member
0 Kudos

Hi ricx ,

If u are trying to pass values ot tables from ur driver program then define the values in the FORM INTERFACE . Activate the smartform . Pass the form name in the driver program

In the driver program use the following code

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'---this retrieves the function module of form

EXPORTING

formname = gv_formname----


> ur form name

IMPORTING

fm_name = gv_fname

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

*To print the form

CALL FUNCTION gv_fname----> ur function module

EXPORTING

control_parameters = gw_control_param

output_options = gw_output_options

user_settings = 'X'

p_date = p_date----->passing data to function module

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

You can also write code in the program itself .

Right click on the node and you can find it in the options.

If u want to display text . Use the option right click>create>text.

Thank You