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 option

Former Member
0 Likes
532

Hello All,

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-s03.

PARAMETERS: p_ldest TYPE ssfcompop-tddest DEFAULT 'LIME'.

PARAMETERS: p_print TYPE rldru-druck DEFAULT ' '.

SELECTION-SCREEN END OF BLOCK b2.

SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-s04.

PARAMETERS: p_tddel TYPE ssfcompop-tddelete DEFAULT 'X'.

PARAMETERS: p_tdimm TYPE ssfcompop-tdimmed DEFAULT 'X'.

PARAMETERS: p_datas TYPE ssfcompop-tddataset DEFAULT 'IMLBEL'.

PARAMETERS: p_copis TYPE ssfcompop-tdcopies DEFAULT '1'.

PARAMETERS: p_autor TYPE ssfcompop-tdautority.

SELECTION-SCREEN END OF BLOCK b3.

data:p_lgpbe type c.

AT SELECTION-SCREEN.

IF s_lgpbe[] is initial.

select single lgpbe

from mard

into s_lgpbe

where werks in s_werks and

lgort in s_lgort and

matnr in s_matnr.

endif.

Above is my code in program.

My question when user will not enter any select option let say storage bin in selection screen.

Then i written above logic but is is not wrking.In this case i want select the data first for storage bin and then do the selection.

4 REPLIES 4
Read only

Former Member
0 Likes
506

hi check this..

use an internal table for the lgpbe donot use the into s_lgpbe

IF s_lgpbe[] is initial.

select single lgpbe

from mard

into s_lgpbe

where werks in s_werks and

lgort in s_lgort and

matnr in s_matnr.

endif.

Read only

Former Member
0 Likes
506

hi,

Put the Select query in the ELSE part of IF statemetn.

Thanks & Regards,

Chandralekha.

Read only

Former Member
0 Likes
506

Hi Anil,

In the event START-OF-SELECTION write the following code :

START-OF-SELECTION.

if s_matnr is initial.
  
     Select <fieldnames>
        from <DB Tab Name>
        into  < Int Tab Name>.

elseif s_werks is initial.
       Select <fieldnames>
        from <DB Tab Name>
        into  < Int Tab Name>.
else.
     Select <fieldnames>
        from <DB Tab Name>
        into  < Int Tab Name>.
endif.

Hope this solves the issue.

Regards,

Swapna.

Read only

Former Member
0 Likes
506

select a value into a variable and then populate select-option

AT SELECTION-SCREEN .

IF s_lgpbe[] is initial.

select single lgpbe

from mard

into v_lgpbe

where werks in s_werks and

lgort in s_lgort and

matnr in s_matnr.

s_lgpbe-sign = 'I'.

s_lgpbe-option = 'EQ'.

s_lgpbe-low = v_lgpbe.

append s_lgpbe.

endif.