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

Transform a field INPUT ON/OFF

Former Member
0 Likes
530

Hello,

I have some problem with a transformation of a field in a dynpro.

I make a button to make INPUT or NON INPUT the field.

The data element of that field is DATUV.

My code is :

LOOP AT SCREEN.

CASE screen-name.

WHEN 'RC271-STTAG'.

screen-input = 1.

  • gv_flag = 'X'.

MODIFY SCREEN.

WHEN OTHERS.

ENDCASE.

ENDLOOP.

That code is in a PAI, and before that, i have tested the SY-UCOMM .

That code works, BUT, when the field is in state INPUT = 1, the old value which was filled, appear on the field.....

Example :

Open transaction

FIELD -- INPUT 0

Push button

FIELD -- INPUT 1

Field value is empty

Fill value '00001' on the field

Out to transaction

Open transaction

FIELD -- INPUT 0

Push button

FIELD -- INPUT 1

Field value not emply, the value is '00001'.

Out to transaction

Thx for your help....

Hello,

I have some problem with a transformation of a field in a dynpro.

I make a button to make INPUT or NON INPUT the field.

The data element of that field is DATUV.

My code is :

LOOP AT SCREEN.

CASE screen-name.

WHEN 'RC271-STTAG'.

screen-input = 1.

  • gv_flag = 'X'.

MODIFY SCREEN.

WHEN OTHERS.

ENDCASE.

ENDLOOP.

That code is in a PAI, and before that, i have tested the SY-UCOMM .

That code works, BUT, when the field is in state INPUT = 1, the old value which was filled, appear on the field.....

Example :

Open transaction

FIELD -- INPUT 0

Push button

FIELD -- INPUT 1

Field value is empty

Fill value '00001' on the field

Out to transaction

Open transaction

FIELD -- INPUT 0

Push button

FIELD -- INPUT 1

Field value not emply, the value is '00001'.

Out to transaction

Thx for your help....

2 REPLIES 2
Read only

faisalatsap
Active Contributor
0 Likes
483

>

> That code is in a PAI, and before that, i have tested the SY-UCOMM .

Hi, Guilaume

Always USE MODIFY SCREEN in PBO so Please Move you Code to PBO.

USE CLEAR for your Screen Parameter or Select Option just before screen-input = 1. this line

Please Reply if any Issue,

Regards,

Faisal

Read only

0 Likes
483

Thx for your help.

I Have an other question...

I want clear a variable when a user launch a transaction,

that is the sequence i would make :

Launch transaction ->: Screen 1000 - Variable clear -> Fill variable with '0000' and Push button ->: Screen 1200 - Back

-> Screen 1000 variable '0000'. Exit transaction

And when the user will launch again the transaction, the variable should be clear, but the last data still appear....

I make a clear on it, but the variable still appear... it is a variable in the system...? why i cant clear that...?

I wanna the variable clear for the begining of the transaction, always.

Thx for your answer.