‎2008 Jan 09 4:53 AM
Hi,
I need the code for the following specifications..Kindly help..
Table - Bsik
two push buttons
If i click first push button BSIK- Lifnr data should appear.
If i click second push button BSIK-BUKRS data should appear.
_________________________________________________
tables : bsik.
data itable like bsik occurs 0.
selection-screen: pushbutton /1(6) text-010 user-command cli1.
selection-screen: pushbutton /1(6) text-020 user-command cli2.
________________________________________________
pls give the code
thanks
mallika
‎2008 Jan 09 4:58 AM
Hi Malika,
Try the below code.May be it will helpful to u.
select lifnr
from bsik
into table itab
where lifnr in s_lifnr.
select bukrs
from bsik
into table itab1
where bukrs in s_bukrs.
If cli1 = 'X'.
loop at itab.
write: itab-lifnr.
endloop.
endif.
If cli2 = 'X'.
loop at itab1.
write: itab1-bukrs.
endloop.
endif.
Award points if helpul.
Kiran Kumar.
‎2008 Jan 09 4:58 AM
Hi Malika,
Try the below code.May be it will helpful to u.
select lifnr
from bsik
into table itab
where lifnr in s_lifnr.
select bukrs
from bsik
into table itab1
where bukrs in s_bukrs.
If cli1 = 'X'.
loop at itab.
write: itab-lifnr.
endloop.
endif.
If cli2 = 'X'.
loop at itab1.
write: itab1-bukrs.
endloop.
endif.
Award points if helpul.
Kiran Kumar.
‎2008 Jan 09 4:59 AM
in at selection screen output event
u can capture the push button fcode into sy-ucomm.
based on sy-ucomm u can display the list.
Madhavi
‎2008 Jan 09 5:05 AM
hi
try this
tables : bsik,sscrfields.
data itable like bsik occurs 0.
selection-screen: pushbutton /1(6) text-010 user-command cli1.
selection-screen: pushbutton /1(6) text-020 user-command cli2.
at selection-screen.
case sscrfields-ucomm.
when 'cli1'.
select lifnr from bsik.
when 'cli2'.
select burks from bsik.
endcase.
regards
‎2008 Jan 09 5:07 AM
Hi use as follows:
AT SELECTION-SCREEN.
IF sscrfields-ucomm = 'CLI1'.
Your Requirement for Button 1
ELSEIF sscrfields-ucomm = 'CLI2'.
Your Requirement for Button 2
ENDIF.
awrd points if useful
Bhupal