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 put display-only condition in a custom include program

Former Member
0 Likes
777

hello everyone,

I have to make a custom include program that will be used instead of the already available 'bdcrecx1'.

I have a couple of questions and would appreciate your help.

I need to create a parameter with a checkbox. When this checkbox is 'X' the following 2 fields need to be greyed out, otherwise user should be able to enter values in them. How can I grey out the fields?

Using my include I should have just the following:

1)parameter with checkbox

(if 'X', session and user greyed out)

2)Session Name

3)User Name

Also, is there a way I can avoid putting the following onto the screen:

1)Keep session (this will always be defaulted to 'X'

2)No Data

<b>Note:</b> I made a copy of 'bdcrecx1'and i'm doing changes according to my requirement.

Thanks in advance.

Regards,

Fred.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
722

parameteR : TEST TYPE CHECKBOX DEFAULT 'X'.

PARAMETER : USER(20),

SESSION(20).

AT SELECTION-SCREEN OUTPUT.

IF TEST = 'X'.

LOOP AT SCREEN.

CASE SCREEN-NAME.

WHEN 'SESSION'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

WHEN 'USER' .

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

ENDIF.

start-of-selection.

end-of-selection.

hello everyone,

I have to make a custom include program that will be used instead of the already available 'bdcrecx1'.

I have a couple of questions and would appreciate your help.

I need to create a parameter with a checkbox. When this checkbox is 'X' the following 2 fields need to be greyed out, otherwise user should be able to enter values in them. How can I grey out the fields?

Using my include I should have just the following:

1)parameter with checkbox

(if 'X', session and user greyed out)

2)Session Name

3)User Name

Also, is there a way I can avoid putting the following onto the screen:

1)Keep session (this will always be defaulted to 'X'

2)No Data

<b>Note:</b> I made a copy of 'bdcrecx1'and i'm doing changes according to my requirement.

Thanks in advance.

Regards,

Fred.

4 REPLIES 4
Read only

Former Member
0 Likes
722

Hi,

For your first question.

use

assign user command for checkbox say 'CLICK'..

at selection-screen output.

loop at screen.

if screen-group3 = 'VALUE' and checkbox condition.

screen-active = 0.

else

screen-active = 1.

endloop.

To make sure that the user enters the data in fields if checkbox is not grayed,

do it in event

start-of selection.

if field is initial.

exit.

go back to previous screen.

endif.

for removing 'keep session' , check out for exits..

Regards,

Tanveer.

Please mark helpful answers

Sorry about the previous error in reply.

Message was edited by: Tanveer Shaikh

Read only

Former Member
0 Likes
723

parameteR : TEST TYPE CHECKBOX DEFAULT 'X'.

PARAMETER : USER(20),

SESSION(20).

AT SELECTION-SCREEN OUTPUT.

IF TEST = 'X'.

LOOP AT SCREEN.

CASE SCREEN-NAME.

WHEN 'SESSION'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

WHEN 'USER' .

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

ENDIF.

start-of-selection.

end-of-selection.

Read only

0 Likes
722

Hi Vick,

If i put the test parameter 'type', it works. But when i put parameter: test as checkbox, the 'session' and 'user' are not greyed out.

And is there a way i can hide: Keep session and No Data.

Thanks.

Regards,

Fred.

Read only

0 Likes
722

i made a couple changes and it works now.

Thanks again.

Regards,

Fred.