Application Development and Automation 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: 
Read only

how to pass variable in module screen

Former Member
0 Likes
5,183

dear sir\madam,

how can i pass variabal into the module pool screen field which is not a part of table used in screen??

15 REPLIES 15
Read only

Former Member
0 Likes
3,027

you want to pass the value to a separate field or to the table in the module pool?

Read only

0 Likes
3,027

in seperate field in screen which is not from data dictionary.

Read only

3,027

lets say you have a variable as gv_var in your program..

now define the field name in screen also as : GV_VAR.

it will automatically be mapped.

Read only

0 Likes
3,027

but where n how i have to define the field name in screen??

plz answer with syntax and where to write that code(syntax)

Read only

Former Member
3,027

Hello,

Declare a variable of the same name as that of your screen field name and pass the value to this variable in PBO. You will be able to see the value in the screen.

Vikranth

Read only

0 Likes
3,027

yes i am doing the same, but i am not able to see it on screen.

can u tell me the code.

my code is : OT_TOTAL = zgate-time1 + zgate-time2.

where OT_TOTAL is in screen as well as a variable in module code of time1 type.

is this right? whats ur code for this??

Read only

0 Likes
3,027

Of what type have you declared OT_TOTAL in the program as? Make sure you define the same type both in the screen variable and in the code variable . Also make sure you wrote this logic in PBO.

Vikranth

Read only

0 Likes
3,027

Prem,

Declare this OT_TOTAL  variable in Global area of your program. Possibly like in TOP Include

DATA : OT_TOTAL TYPE ZGATE-TIME1. " Same as zgate-time1 and also take same type for Screen Field

not in any module " Check once

if it is so.

Cheerz

Ram

Read only

0 Likes
3,027

where i have to define the varaible in screen? and how?

plz write with syntax.

Read only

0 Likes
3,027

Declare this OT_TOTAL variable in Global area of your program. Possibly like in TOP Include

DATA : OT_TOTAL TYPE ZGATE-TIME1. " Same as zgate-time1 and also take same type for Screen Field

not in any module " Check once

yes i have declared this variable in global area in same manner but how i will take it in screen field.

i mean how i will define this variable in screen n where n how?plz reply with syntax.

Read only

0 Likes
3,027

DATA: VBELN TYPE VBELN. u201C GLOBAL VARIABLE.

Declare this in the program.

Regards,

Abhijit

Read only

0 Likes
3,027

i alredy declared in program but how to declare in screen n where??

Read only

0 Likes
3,027

open you screen in screen painter and create an Input/output field with name OT_TOTAL

and save it.

then goto to the flow logic of the screen in the PBO write a module sayin

MODULE input_value.

and double click on it .

when it will open in the proram write your statement there.

OT_TOTAL = z_time1 + ztime 2.

Pre-requiste is that they must have values in them(z_time1, ztime 2).

Regards,

Abhijit

Read only

0 Likes
3,027

Hello,

In the screen painter, double click on the particular field and in the attributes popup, under dict tab, you will find a drop down of all the types. Make sure you select TIMS as the format for the field there.

Vikranth

Read only

Former Member
0 Likes
3,027

Hi,

Try this

DATA: VBELN TYPE VBELN. u201C GLOBAL VARIABLE.

Suppose you have a I/O field defined in the screen named u2018VBELNu2019

Then in the PBO to this

VBELN = l_vbeln. u201C l_vbeln is the local field populated

u201C Also decalare VBELN as a GOBAL VARIABLE.

Hope it helps you.

Regards,

Abhijit