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: 

selection screen :data retrieval

Former Member
0 Kudos

how to pass the contents of each individual input fieldfrom the selection screen to the ABAP program.My selection screen is

SELECTION-SCREEN BEGIN OF BLOCK ID WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS:

EBELN FOR EKKO-EBELN NO INTERVALS,

AEDAT FOR EKKO-AEDAT.

SELECTION-SCREEN END OF BLOCK ID.

i need value of ebeln(purchase order) which i select on selection screen as i have to use it in query in same program.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello,

U can use the values like this.


select * from ekko where ebeln in ebeln.

If u want to see all the values then use 

loop at ebeln.
write:/ ebeln-low.
endloop.

Regards,

Vasanth

6 REPLIES 6

Former Member
0 Kudos

Hi,

you can take the values of all PO in one table by passing value of select-option to ekko and take all the values of po in internal table and then pass that internal table or use for all entries in that table.

Hope this will help u.

reward points if useful

--Umesh

Former Member
0 Kudos

Hello,

U can use the values like this.


select * from ekko where ebeln in ebeln.

If u want to see all the values then use 

loop at ebeln.
write:/ ebeln-low.
endloop.

Regards,

Vasanth

Former Member
0 Kudos

Hi,

You can get the details in an internal table<b> i_ekko</b> as shown below.Use this table for further procesing in your program.

SELECTION-SCREEN BEGIN OF BLOCK ID WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS:

S_EBELN FOR EKKO-EBELN NO INTERVALS,

S_AEDAT FOR EKKO-AEDAT.

SELECTION-SCREEN END OF BLOCK ID.

DATA: i_ekko type standard table of ekko with header line.

SELECT * FROM EKKO INTO TABLE i_lfa1 WHERE ebeln IN s_ebeln AND aedat IN s_aedat.

.

.

.

.

.

*Always reward points for helpful answers.

Regards,

Amit

Message was edited by:

Amit Kumar

Former Member
0 Kudos

Hi Amardeep Khaira ,

Welcome to SDN.

Hope this site helps you a lot.

Coming to your problem,You can use the ebelns that are given from the selection screen in the select query as follows:

tables:

<b>ekpo</b>.

select-options:

<b>s_ebeln</b> for ekpo-ebeln.

data:

t_ekpo type ekpo occurs 0 with header line.

Select F1 F2 .... (what ever fields u want)

into table t_ekpo

from database table

where ebeln in <b>s_ebeln</b>.

if sy-subrc eq 0.

loop at t_ekpo.

write:

t_ekpo-ebeln,

t_ekpo- EBELP.

endloop.

endif.

Hope you got it.

Regards,

Rama chary.Pammi

Former Member
0 Kudos

hI Amar

try this

tables : ekko.

data : begin of itab_ekko occurs 0.

include structure ekko.

data : end of itab_ekko.

data : temp like ekko-ebeln..

SELECTION-SCREEN BEGIN OF BLOCK ID WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS:

EBELN FOR EKKO-EBELN NO INTERVALS,

AEDAT FOR EKKO-AEDAT.

SELECTION-SCREEN END OF BLOCK ID.

select ebeln aedat from ekko into table itab_ekko where ebeln in ebeln and aedat in aedat.

loop at itab_ekko.

write : ebeln.

temp = itab_ekko-ebeln.

endloop.

REWARD IF USEFUL..

Former Member
0 Kudos

Got it.