‎2006 Oct 18 4:14 PM
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
‎2006 Oct 18 4:17 PM
Hi,
use the function module POPUP_WITH_TABLE_DISPLAY to display multiple lines..
Thanks,
Naren
‎2006 Oct 18 4:29 PM
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
‎2006 Oct 18 4:17 PM
i think in this case this function module will be suitable.
POPUP_WITH_TABLE_DISPLAY_OK.
‎2006 Oct 18 4:19 PM
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
‎2006 Oct 18 4:29 PM
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
‎2006 Oct 18 4:35 PM
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.