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

checkbox

Former Member
0 Likes
939

hi experts,

i am developing alv grid report and an issue, is that in my screen both the check-boxes are getting selectd where my requirement is only 1 checkbox should get selected.

please help me..

thanku,

santhosh

6 REPLIES 6
Read only

Former Member
0 Likes
914

Debug or be elaborative or paste the code.

Read only

Former Member
0 Likes
914

Hi,

There should be DEFAULT '' X " in the check box fields in the parameters section. The required DEFAULT should be set for only one parameter field. Pls check and get back if u have any issues

Read only

Former Member
0 Likes
914

WA_FINAL-AVAILQTY = L_AVAILQTY.

IF L_AVAILQTY GT WA_EBAN-MENGE.

WA_FINAL-CHECKBOX = 'X'.

ELSE.

WA_FINAL-CHECKBOX1 = 'X'.

ENDIF.

LOOP AT LT_FINAL ASSIGNING <WA_FINAL>.

IF <WA_FINAL>-CHECKbox IS INITIAL AND <WA_FINAL>-CHECKbox1 IS INITIAL.

MESSAGE S000(ZPR) WITH 'Please select atleast one check box'.

ELSEIF <WA_FINAL>-CHECKbox IS NOT INITIAL AND <WA_FINAL>-CHECKbox1 IS NOT INITIAL.

MESSAGE S000(ZPR) WITH 'Please select only one check box'.

ENDIF.

COLLECT WA_FINAL INTO LT_FINAL.

CLEAR : WA_FINAL, WA_EBAN.

ENDLOOP.

REFRESH : LT_FIELDCAT.

*Preparing Fieldcat

PERFORM BUILD_FIELDCAT.

IF LT_EBAN IS NOT INITIAL.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SY-REPID

  • I_CALLBACK_PF_STATUS_SET = 'TEST'

I_CALLBACK_USER_COMMAND = 'F_USER_COMMAND'

IT_FIELDCAT = LT_FIELDCAT

I_SAVE = 'A'

TABLES

T_OUTTAB = LT_FINAL.

IF SY-UCOMM = 'BACK' OR SY-UCOMM = 'EXIT' OR SY-UCOMM = 'CANCEL'.

LEAVE TO SCREEN 0.

ENDIF.

ENDIF.

Read only

0 Likes
914
IF L_AVAILQTY GT WA_EBAN-MENGE.
WA_FINAL-CHECKBOX = 'X'.
ELSE.
WA_FINAL-CHECKBOX1 = 'X'.
ENDIF

.

This part of your code is fine. What about checkbox decleration in selection screen. Check for default = 'X'.

Read only

anup_deshmukh4
Active Contributor
0 Likes
914

santhosh.a ; ,

According to your Post

you Can very well use a Call Back routine and get the current line and Check it programmatically

Read only

ThomasZloch
Active Contributor
0 Likes
914

duplicate post, vague subject.

Thread locked.

Thomas