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 PopUP

Former Member
0 Kudos

Hello All,

We have a req. where in we have CompanyCode as Parameter and Documet# as selection-option on the selection screen.

As an Selection screen check the user would like to validate the Document#s (Multiple)entered across the Company Code entered and if the entered document No. does not pertain to that CompanyCode then a PouUp has to be displayed with all the Document# that failed the validation.

So, the popup should display:

Document 0000000001

0000000002

0000000010

does not pertain to CC &n.

Could anyone please let me know the FM that could be used.

Thankx,

-PSK

6 REPLIES 6

Former Member
0 Kudos

Hi,

use the function module POPUP_WITH_TABLE_DISPLAY to display multiple lines..

Thanks,

Naren

0 Kudos

You can also use the ALV Popup. Here is an example.



REPORT ZRICH_0001 .

type-pools: slis.

data: begin of ialv occurs 0,
*      check type c,
      value1(10) type c,
      value2(20) type c,
      end of ialv.

data: ifldc type slis_t_fieldcat_alv .
data: xfldc type slis_fieldcat_alv .


parameters: p_check.


at selection-screen.

ialv-value1 = 'ABC'.
ialv-value2 = 'Desc ABC'.
append ialv.

ialv-value1 = 'DEF'.
ialv-value2 = 'Desc DEF'.
append ialv.

*clear xfldc.
*xfldc-reptext_ddic    = ' '.
*xfldc-fieldname  = 'CHECK'.
*xfldc-tabname   = 'IALV'.
*xfldc-outputlen  = '1'.
*append xfldc to ifldc.

clear xfldc.
xfldc-reptext_ddic    = 'Value1'.
xfldc-fieldname  = 'VALUE1'.
xfldc-tabname   = 'IALV'.
xfldc-outputlen  = '10'.
append xfldc to ifldc.

clear xfldc.
xfldc-reptext_ddic    = 'Value2'.
xfldc-fieldname  = 'VALUE2'.
xfldc-tabname   = 'IALV'.
xfldc-outputlen  = '20'.
append xfldc to ifldc.


call function 'REUSE_ALV_POPUP_TO_SELECT'
     exporting
*          i_checkbox_fieldname = 'CHECK'
          i_tabname            = 'IALV'
          it_fieldcat          = ifldc
     tables
          t_outtab             = iALV
     exceptions
          program_error        = 1
          others               = 2.

check sy-subrc  = 0.

Run the program, and at the selection screen hit enter, the ALV will be fired.

Regards,

Rich Heilman

Former Member
0 Kudos

i think in this case this function module will be suitable.

POPUP_WITH_TABLE_DISPLAY_OK.

Former Member
0 Kudos

Hi,

at selection-screen.

EXPORTING

  • 'UPDATE TERMINATION'

TITEL = TEXT-021

TXT1 = WSC-MESSAGE2

TXT2 = WSC-LOCK_MESSAGE

  • 'All Changes have been Retained on the Screen.'

TXT3 = TEXT-022

  • 'Rectify the Problem ??? and Try to SAVE again'

TXT4 = TEXT-023

EXCEPTIONS

OTHERS = 1.

Regards,

Amole

Former Member
0 Kudos

Hi,

you can use

at selection screen.

loop at s_matnr.

select matnr from mara where matnr = S_matnr-low.

if sy-subrc <> 0.

itab1-matnr = s_matnr-low.

append itab.

endif.

endloop.

loop at itab1.

concatenate lv_message itab1-matnr into lv_message

separated by space.

endloop.

concatenate lv_message 'does not pertain to CC' into

lv_message separated by space.

message i000(zz) with lv_message .

Regards

amole

Former Member
0 Kudos

U can use the below FM.

AT SELECTion-screen.

*validate the document.

If error.

populate internal table LSLOC.

endif.

describe table lsloc lines lcnt.

if lcnt > 0.

call function 'POPUP_WITH_TABLE'

exporting

endpos_col = LEC

endpos_row = LER

startpos_col = LSC

startpos_row = LSR

titletext = TEXT-021 "title

importing

choice = lchoice

tables

valuetab = LSLOC "internal table

exceptions

break_off = 1.

endif.