‎2006 Jun 09 4:49 PM
hi guys,
I just had to design an interactive report which displays check box on the main list that is on output list ( for example: matnr ) and upon selection of check box on the main list subsequent fields shud be displayed on the sub list ( for example: makt etc.)
waiting for ur reply.
Thanks
pavan
‎2006 Jun 09 5:03 PM
Hi Pavan,
Take an additional variable in your output list of as follows.
<b>data v_check as checkbox.</b>
Display v_check along with your output list.
In subsequent lists, to get this line use <b>READ LINE</b> statement.
<b>DATA SV_CHECK TYPE C.
LOOP AT outputlist.
READ LINE SY-TABIX FILED VALUE SV_CHECK.
IF SV_CHECK = 'X'.
"Use this result in subsequent lists.
ENDIF.
ENDLOOP.</b>
Note: Plz reward points to all helpful answers
Thanks,
Vinay
‎2006 Jun 09 4:52 PM
Hi,
use the statement READ LINE and if sy-lisel+0(1) = 'X' srore in itab and print on secondry list.
Sreedhar
‎2006 Jun 09 4:57 PM
In fact you can use ALV grids and can design this kind of report in a user friendly manner.
Have two grids on the screen, parent and child. Give a hotspot link to the key fields in the parent grid, upon clicking of which the details will be displayed in the child grid.
Regards,
Ravi
‎2006 Jun 09 5:01 PM
hi pavan,
Outputs the field f as a checkbox. The contents of the first character of f is interpreted as the "status":
' ' = not selected
'X' = selected
The user can change this as required.
Note
To prevent the user changing the contents of the checkbox, you can use the addition ... INPUT OFF. The checkbox is then nothing more than a status display and can only be changed by programming.
In technical terms, a checkbox behaves exactly like an input field with a length of 1 (FORMAT INPUT).
Examples
DATA: MARKFIELD(1) TYPE C VALUE 'X'.
...
WRITE MARKFIELD AS CHECKBOX. "checkbox selected
MARKFIELD = SPACE.
WRITE MARKFIELD AS CHECKBOX. "deselected
WRITE MARKFIELD AS CHECKBOX INPUT OFF. "deselected, protected
hope this helps,
do reward if it helps,
priya.
‎2006 Jun 12 6:16 PM
priya, thanks for ur reply. Your information was really helpful to me, appreciated.
regards
pavan.
‎2006 Jun 09 5:03 PM
Hi Pavan,
Take an additional variable in your output list of as follows.
<b>data v_check as checkbox.</b>
Display v_check along with your output list.
In subsequent lists, to get this line use <b>READ LINE</b> statement.
<b>DATA SV_CHECK TYPE C.
LOOP AT outputlist.
READ LINE SY-TABIX FILED VALUE SV_CHECK.
IF SV_CHECK = 'X'.
"Use this result in subsequent lists.
ENDIF.
ENDLOOP.</b>
Note: Plz reward points to all helpful answers
Thanks,
Vinay