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

!!!! Urgent !!!!!!!!Dialog Programming

Former Member
0 Likes
585

In Dialog Programming i have 3 fields, if one field is validated if it is true the next two fields should become gray,so no one can enter the values in those two fields how can i do it.

5 REPLIES 5
Read only

Former Member
0 Likes
544

In the PBO of the screen.

if condition is true.

loop at screen.

if screen-name = 'ABC' or screen-name = 'XYZ'.

screen-input = 0.

modify screen.

endif.

endloop.

endif.

Read only

shishupalreddy
Active Contributor
0 Likes
544

Hi,

In PAI

Validate the field check for success flag :

if it is ok then call one more MODULE with

LOOP AT SCREEN

MODIFY SCREEN

ENDLOOP.

EX:

process after input.

MODULE VALIDATE .

MODULE VALIDATE.

IF VALIDATION IS SUCCESS.

PERFORM MODIFY_SCREEN.

ENDIF.

ENDMODULE.

FORM MODUFY_SCREEN.

LOOP AT SCREEN.

CHECK FOR THE FIELDS modif group id IN THE LAYOUT.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDCHECK.

ENDLOOP.

REGARDS,

ENDFORM.

Read only

raguraman_c
Active Contributor
0 Likes
544
Read only

Former Member
0 Likes
544

HI,

Go thru this docu.

<b>Changing The Screen During Runtime</b>

The attributes are assigned to the screen field when the screen is designed in full screen editor. Such kind of assignment is static, which means that these attributes are fixed. But many times the need to change the attributes of the screen arises. And this has to be done during runtime.

Need To Change Screen

There can be a requirement in the transaction that, certain fields on the screen

Appear only in certain conditions.

Are in Change/display mode according to user inputs

Become mandatory subject to specific inputs.

Changes its format depending upon certain conditions.

Modifying the screen

At the runtime, attributes for each screen field is stored in system defined internal table, with header line, called as SCREEN TABLE. It contains name of field and its attributes. This tab le can be modified during the runtime i.e. through module pool program. Screen table has following fields:

Field Name Length Description

NAME 30 Name of screen field

GROUP1 3 Field belongs to field group1

GROUP2 3 Group 2

GROUP3 3 Group 3

GROUP4 3 Group 4

ACTIVE 1 Hide/Show

REQUIRED 1 Field input is mandatory

INPUT 1 Enable/Disable

OUTPUT 1 Field for display only

INTENSIFIED 1 Field is highlighted.

INVISIBLE 1 Field is suppressed.

LENGTH 1 Field output length is reduced

DISPLAY 3D 1 Field is displayed with 3-D Frame

VALUE_HELP 1 Field is displayed with Value help

E.g., SCREEN-ACTIVE = 0 has the same effect as the following statements.

SCREEN- INPUT = 0.

SCREEN-OUTPUT = 0.

SCREEN-INVISIBLE = 1.

The fields SCREEN-NAME and SCREEN-GROUP 1 through SCREEN-GROUP4 tell you which field and / or field group has the attributes.

You can assign up to 4 groups to a field.

You need to program screen modifications in module, which is processed during the event PROCESS BEFORE OUTPUT.

`SCREEN’ is an internal table and, in order to change the field values, LOOP statement has to be used so that the header-line can be populated with the new values, changing the earlier values, the SCREEN table consisted for the specific screen. Finally the changed record in the header-line is NOT APPENDED, but is MODIFIED to the SCREEN table. That is, we first use `LOOP AT SCREEN’ and then assign the values. And finally PRIOR TO ENDLOPP give `MODIFY SCREEN’.

PROCESS BEFORE OUTPUT.

MODULE MODIFY_SCREEN OUTPUT.

MODULE MODIFY_SCREEN.

LOOP AT SCREEN.

IF SCREEN-NAME = ‘SFLIGHT-CARRID’.

SCREEN-INPUT = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Thanks

Sunil

Read only

Former Member
0 Likes
544

Hi Gupta,

See First of all what u have to do is

Assign the specific fields (the one you want to mask to a screen group)

This u can do it in the field attributes of the screen .

To do this

Click on a field and see its attributes in here u fill find a allocation of SCREEN-GROUPS .

That means as u said assign common screen group name for both the fields F2, F3 as ZXXX and Activate it .

Now as per ur criteria

***In PBO Write the code as

if F1 is true. “ validation is over then perform the masking on F2, F3

loop at screen.

if screen-name = 'ZXXX' .

screen-input = 0.

modify screen.

endif.

endloop.

endif. “

The effect of this is only those Screen fields which u have assigned to screen group ZXXX will be masked grey.

so F2, F3 are masked ..

Hope this helps,

Regards,

Vijay.