‎2007 Feb 06 6:15 AM
Hi
I am generating F4 help on selection screen using FM
F4IF_INT_TABLE_VALUE_REQUEST.
I want to display a message if there is no data to display in F4 help.
I tried and it is throwing dump on Sy-subrc value.
any help will not go unapprecaited.
ta.
‎2007 Feb 06 6:18 AM
Hi,
Before calling the FM check the value_tab internal table..
Example
-
<b> IF t_t005[] IS INITIAL.
MESSAGE S208(00) WITH 'NO values found'.
LEAVE SCREEN.
ENDIF.</b>
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = 'T005'
PVALKEY = ' '
retfield = 'LAND1'
dynpprog = sy-repid
DYNPNR = sy-dynnr
dynprofield = 'P_LAND1'
callback_program = sy-repid
value_org = 'S'
TABLES
value_tab = t_t005
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
Thanks,
Naren
‎2007 Feb 06 6:18 AM
Hi,
here is the Solution .
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CONNID'
dynpprog = progname
dynpnr = dynnum
dynprofield = 'CONNECTION'
value_org = 'S'
TABLES
value_tab = values_tab.IF values_tab[] is initial.
Write the Message.
Endif.
‎2007 Feb 06 6:18 AM
Hi,
Before calling the FM check the value_tab internal table..
Example
-
<b> IF t_t005[] IS INITIAL.
MESSAGE S208(00) WITH 'NO values found'.
LEAVE SCREEN.
ENDIF.</b>
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = 'T005'
PVALKEY = ' '
retfield = 'LAND1'
dynpprog = sy-repid
DYNPNR = sy-dynnr
dynprofield = 'P_LAND1'
callback_program = sy-repid
value_org = 'S'
TABLES
value_tab = t_t005
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
Thanks,
Naren
‎2007 Feb 06 6:18 AM
hi,
The Question is not clear....
when f4 is created for a screen field means it will have that values in itab that is passed to that FM
Regards
Bijal
‎2007 Feb 06 6:20 AM
hi,
chk the
returntable
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR '
dynprofield = 'P_MATNR '
dynpprog = sy-REPID
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = ITAB
return_tab = return." chk this return tableif return[] is initial.
"show ur message.
endif.Rgds
Anver
‎2007 Feb 06 6:22 AM
Hi,
if it_ff4tab[] is initial.
message ixxx...........
else.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BNAME'
dynpprog = repid
dynpnr = '1000'
value_org = 'S'
value = fldval
TABLES
value_tab = it_ff4tab
field_tab = it_f4field
return_tab = it_f4ret
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
endif.
[OR]
did you try to check the sy-subrc after executing the FM.
Check to see if sy-subrc = 2, then message ixxx..........
Regards
Subramanian
‎2007 Feb 06 6:24 AM
Syed,
Before calling Fm F4IF_INT_TABLE_VALUE_REQUEST.
check the internal table whch is passing to FM.
ex : IF NOT ITBA[] IS INITIAL.
call F4IF_INT_TABLE_VALUE_REQUEST
endif.
Pls. Mark if useful