Application Development and Automation 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: 
Read only

select options.

Former Member
0 Likes
521

Hi all,

please look at the code and tell me where i am wrong

tables lfa1.

select-options: Client for lfa1-mandt,

Vendor for lfa1-lifnr.

at selection-screen output.

if not client is initial or not vendor is initial.

select * into corresponding fields of table temp from lfa1 where lifnr in vendor and mandt in client.

call screen 100. " Display result.

endif.

i am interested in multiple selection button in the selection screen against each field (my client actually).

the problem i am facing here is when i pressed the button for one field ( say Client) when i press the copy button on the multiple selection dialog. it is going to the result page(screen 100) . without returning to the selection screen.

what is going wrong here what i am missing here ?

i didn't write the if statement then it is not even going to the selection screen it is directly proceeding to screen 100 with the whole lfa1 copied into table temp.

i just started abap programming so plz pardon me if this is too elemental question.

i did googling but i did not get what i need

Thanks in Advance.

3 REPLIES 3
Read only

Former Member
0 Likes
437

Hi Mahabob,

Is it a report or not. if it is a report why you are calling the screen 100.

below sample code will work.

TABLES lfa1.

SELECT-OPTIONS: client FOR lfa1-mandt,

vendor FOR lfa1-lifnr.

DATA:temp TYPE TABLE OF lfa1.

AT SELECTION-SCREEN OUTPUT.

IF NOT client IS INITIAL OR NOT vendor IS INITIAL.

*SELECT * INTO CORRESPONDING FIELDS OF TABLE temp FROM lfa1 CLIENT SPECIFIED WHERE lifnr IN vendor AND mandt IN client.*

    • CALL SCREEN 100. " Display result.*

ENDIF.

LOOP AT itab.

write:

ENDIF.

regards,

Antony Thomas

Read only

agnihotro_sinha2
Active Contributor
0 Likes
437

Try the same code with AT SELECTION SCREEN. instead of AT SELECTION SCREEN OUTPUT.

Read only

0 Likes
437

Thanks for your reply,

what is the concept behind loop at itab. ???

i am using alv to display the temp table.

so im creating a screen in that im having a custom control...

is this wrong / unwanted procedure ?

can u plz clarify...

i already tried removing the output token.

but when i run the report

if i gave input to one fields

and when i pressed the multi selection button it is going to the result field.

as i wrote the if condition lik i stated...

Thanks for your reply,

but reply back for my doubts plz