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

selection logic

Former Member
0 Likes
692

Hi all,,

On my selection screen i have

aufnr-aufk

vblen-vbap

now i want to select data from aufk and the corresponding values from vbap.

so i wrote the below select

select data from aufk where aufk in my selection screeen

select data from vbap for all entries in above table.

But if the user just gives vbeln on selection then , my 1st select wont work because there is no selection based on vbeln on auk

How do i handle the situation?

I c'nt write inner join also.

Any suggestions?

6 REPLIES 6
Read only

h_senden2
Active Contributor
0 Likes
670

use a inner join on the two tables. You can read them at once.

For more info on INNER JOIN, use the search functionality of forum and wiki.

regards,

hans

Read only

arjun_subhash
Active Participant
0 Likes
670

Hi,

make a database view of two tables and use it.

thanks

arjun

Read only

Mohamed_Mukhtar
Active Contributor
0 Likes
670

Hi Malik,

Do validations at selection screen for the field aufnr-aufk .

try like this, hope it hleps u.

select-options : s_aufk for aufnr-aufk .
at selection-screen on s_aufk. 
if aufnr-aufk  is inital.
message 'enter a value' type 'E'.
endif.

Thanks & Regards

Read only

Former Member
0 Likes
670

Hi

You can make aufnr an obligatory field in the selection screen.

Regards

Neha

Read only

0 Likes
670

thnkx all its done

Read only

Former Member
0 Likes
670

use inner join

shiva