SAP-Forum.ORG
   
This web site isn't affiliated with, sponsored by, or approved by SAP AG. Is only a SAP users community.

Go Back   SAP-Forum.ORG > SAP Forums > SAP ABAP

Similar Threads
Thread Thread Starter Forum Replies Last Post
E-Recruitment- Recruiter selected candidates resume to manager Zumba SAP HR 1 07-22-2011 09:06 PM
ALV-Table: Get the checkbox-value when push the checkbox Micro SAP ABAP 3 03-14-2011 11:51 PM
Reference of 103 mat.doc. in 105 doc. , when GR based IV is not selected ERP SAP MM - Material Management 1 12-12-2010 02:08 PM
Make ALV Layout selectable on selection screen Rampa SAP ABAP 1 08-30-2010 02:06 PM
Pre-Job Trainee SAP Basis sapen SAP Job Offered 0 07-30-2010 08:39 AM

Aprenda SAP!
Reply
 
Thread Tools Display Modes
  #1  
Old 01-19-2012, 08:52 PM
Rampa Rampa is offline
Senior Member
 
Join Date: May 2010
Location: Utah
Posts: 197
Default How to make checkbox to be pre-selected in ALV

Hi all,

I'm creating ALV report and I want to create checkbox in the first column of the row. So I have a field SEL(1) in my structure and I`ve made the fieldcat:

Code:
gs_fcat-col_pos = 5.
  gs_fcat-coltext = 'Check'.
  gs_fcat-fieldname = 'SEL'.
  gs_fcat-tabname = 'GT_TREE9001'.
  gs_fcat-outputlen = 10.
  gs_fcat-checkbox = 'X'.
  gs_fcat-edit = 'X'.
That works, checkbox is displayed.
But now I need to make all the checkboxes to be checked for the first start of my program.
I mean when user executes my report all the checkboxes must be checked by default.

I have tried to do following:

Code:
loop at gt_tree9001.
gs_tree9001-sel = 'X'.
modify gt_tree9001 from gs_tree9001.
endloop.
But it doesnt work, I now see checkbox and mark 'X' near but not the checked ckeckbox.

Any help will be appreciated.

Thanks in advance,
Rampa
Reply With Quote
Sponsors
  #2  
Old 01-19-2012, 08:54 PM
Golfi Golfi is offline
Senior Member
 
Join Date: May 2010
Location: Delaware
Posts: 824
Default Re: How to make checkbox to be pre-selected in ALV

Hello Rampa,

Quote:
loop at gt_tree9001.
gs_tree9001-sel = 'X'.
modify gt_tree9001 from gs_tree9001.
endloop.
Change code:

Code:
loop at gt_tree9001 INTO gs_tree9001.
gs_tree9001-sel = 'X'.
modify gt_tree9001 from gs_tree9001 TRANSPORTING sel.
endloop.
Regards,
Golfi
Reply With Quote
  #3  
Old 01-19-2012, 08:55 PM
Portal Portal is offline
Senior Member
 
Join Date: May 2010
Location: Miami
Posts: 791
Default Re: How to make checkbox to be pre-selected in ALV

Hi Rampa,

Use the below logic.

Declare a field symbol with respect to your local structure internal table.

field-symbols : <wa_ekko> like LINE OF it_ekko.

Before displaying ALV fm write this code.

Code:
loop at it_ekko ASSIGNING <wa_ekko> .
<wa_ekko>-check = 'X'.
MODIFY TABLE it_ekko FROM <wa_ekko> TRANSPORTING check.
ENDLOOP.
Regards,
Portal
Reply With Quote
Entre a los Links relacionados
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 09:13 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Forum Design By inferno