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

internal table

madan_ullasa
Contributor
0 Likes
890

Hi frnds,

My requirement is like this..

i have a selection screen with select options.. a user enters some values. after validation those values which are not to be considered are to be displayed.. the user then as to go back to the selection screen and remove or not consider those values... how do i do it ??

im having all those values which are not to be considered in an internal table... i just want to display them.. after displaying the selection screen shud be availabe again...

points assured to all...

madan..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
862

HI madan

You can display the values which are not being considered so that the user can select other values.

for that you use F4 help which will display the values being considered.

if this is not your req. plz clarify me

regards

kishore

10 REPLIES 10
Read only

hymavathi_oruganti
Active Contributor
0 Likes
862

y u want to display all the values not to be displayed in a separate screen, u can display the values whcih are not to be considered in the selection screen it self.

like below.

give a number to ur selection-screen,

case sscrfield-ucomm.

when 'ONLI'.

call selection-screen <num>.

display ur o/p specifying coordinates.

ANY WAY, WHAT IS UR REQUIREMENT? U CAN ALWAYS DISPLAY THE VALUES TO BE CONSIDERED AS F4 HELP TO THE FIELDS RIGHT!!

Read only

Former Member
0 Likes
862

Hi Madan,

suppose ur select-option element is s_range , then...

loop at it " containing invalid values in field "col"

delete s_range where low = it-col.

endloop.

Thanks & Reagrds,

Ankur

Read only

Former Member
0 Likes
863

HI madan

You can display the values which are not being considered so that the user can select other values.

for that you use F4 help which will display the values being considered.

if this is not your req. plz clarify me

regards

kishore

Read only

0 Likes
862

frnds the requirement is like this...

the user enters a set of "shipping points"..

its only after all the entries has been made that i check the authorization... after that, i have to display the list of " ship. points" to which he has no authorization...he will have to then delete all these from the select options...

hope this is clear..

regards,

madan

Read only

0 Likes
862

Hi Madan,

Have a look at demo program DEMO_AUTHORITY_CHECK.

In the similar lines you need to write your program.

Thanks

Lakshman

Read only

0 Likes
862

Hi,

You can check those things after start-of-selection and make the program to go back to selection screen,if the values entered are incorrect.

Start-of-selection.

loop at s_option.

if s_option-low eq not_allowed.

w_tab-entry = s_option-low.

append w_tab to i_tab.

endif.

endloop.

If not i_tab is initial.

Display an message giving all the invalid values

leave list-processing."Control will go to sel. screen

endif.

But this will work only if he enters set of single values.Intervals and options are not considered here.

Kindly reward points if it helps.

Read only

0 Likes
862

Hi Madan,

Write a Select on the Check table for shipping points

with shipping points in the where condition.

Select shipping_points into table i_SP from ...

where shipping_points in S_SP.

if sy-subrc = 0.

loop at I_SP.

  • here check for the authorizations.

  • Auth check.

if sy-subrc <> 0.

*show these in the LIST .

i_error_table = i_SP-shipping_points.

append i_error_table.

endif.

ENDLOOP.

endif.

Regards,

GSR.

Read only

Former Member
0 Likes
862

Hi Madan,

In this code.. i've modified simmilar to your requirement..

check if it is working well..

this code takes the selection value.. displays the int tab contents in a seperate screen.. again prompts for a selection..

tables : vbak.

data : it like table of vbak with header line.

SELECTION-SCREEN BEGIN OF SCREEN 500 TITLE title

AS WINDOW.

PARAMETERS name TYPE sy-uname.

SELECTION-SCREEN END OF SCREEN 500.

SELECTION-SCREEN BEGIN OF SCREEN 200 AS WINDOW.

SELECTION-SCREEN COMMENT /2(30) TEXT-100.

SELECTION-SCREEN END OF SCREEN 200.

select * into table it from vbak where vbeln = '0000004970'.

SELECTION-SCREEN BEGIN OF SCREEN 300 AS WINDOW.

selection-screen comment /2(15) com.

SELECTION-SCREEN END OF SCREEN 300.

*COM = 'Unauthorised User'.

loop at it.

write it-vbeln to com.

endloop.

title = 'Input name'.

CALL SELECTION-SCREEN '0500' STARTING AT 5 5.

CALL SELECTION-SCREEN '0300' STARTING AT 5 5.

write : / 'hi'.

CALL SELECTION-SCREEN '0500' STARTING AT 5 5.

reward points if helpful

Read only

Former Member
0 Likes
862

Try using this code...

data: begin of e_tab occurs 0.

data matnr like mara-matnr.

data: end of e_tab.

data: v_line type n.

tables:mara.

select-options: s_matnr for mara-matnr.

at selection-screen.

clear e_tab.

refresh e_tab.

loop at s_matnr.

select single * from mara where matnr = s_matnr-low.

if sy-subrc <> 0.

e_tab-matnr = s_matnr-low.

append e_tab.

endif.

endloop.

CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'

EXPORTING

  • I_TITLE =

  • I_SELECTION = 'X'

  • I_ZEBRA = ' '

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • I_CHECKBOX_FIELDNAME =

  • I_LINEMARK_FIELDNAME =

  • I_SCROLL_TO_SEL_LINE = 'X'

i_tabname = e_tab

I_STRUCTURE_NAME = 'mara'

  • IT_FIELDCAT =

  • IT_EXCLUDING =

  • I_CALLBACK_PROGRAM =

  • I_CALLBACK_USER_COMMAND =

  • IS_PRIVATE =

  • IMPORTING

  • ES_SELFIELD =

  • E_EXIT =

tables

t_outtab = e_tab

  • EXCEPTIONS

  • PROGRAM_ERROR = 1

  • OTHERS = 2

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

describe table e_tab lines v_line.

if v_line <> 0.

message i000(zhb).

stop.

endif.

start-of-selection.

write e_tab.

U can modify this to suit ur req.

Read only

Former Member
0 Likes
862

Hi Madan,

1. Take this example of company code.

2. The user does not have rights for

comp code 1300,1400 (in the program)

3. If the user has entered any of this codes,

the program will DISPLAY

message that no authorisations

(along with the list)

4. If everything is allright,

then it will move forward.

5. (just copy paste in new program)

REPORT abc NO STANDARD PAGE HEADING.

TYPE-POOLS : slis.

DATA : alvfc TYPE slis_t_fieldcat_alv.

TABLES : t001.

DATA : BEGIN OF itab OCCURS 0,

bukrs LIKE t001-bukrs,

END OF itab.

*----


Screen

SELECT-OPTIONS: bukrs FOR t001-bukrs.

*----


initialization.

REFRESH itab.

itab-bukrs = '1300'.

APPEND itab.

itab-bukrs = '1400'.

APPEND itab.

*----


Start of selection.

START-OF-SELECTION.

*----


check

IF bukrs[] IS NOT INITIAL.

LOOP AT itab.

IF itab-bukrs IN bukrs.

PERFORM display.

EXIT.

ENDIF.

ENDLOOP.

ENDIF.

*----- Process

WRITE 😕 'Report Data Line 1'.

WRITE 😕 'Report Data Line 2'.

WRITE 😕 'Report Data Line 3'.

*----


FORM

FORM display.

WRITE 😕 'No authorisations for '.

LOOP AT itab.

WRITE 😕 itab-bukrs.

ENDLOOP.

ENDFORM. "display

regards,

amit m.