Application Development 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: 

pushbutton

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

4 REPLIES 4

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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