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

F4 Help

Former Member
0 Likes
853

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
753

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

6 REPLIES 6
Read only

Former Member
0 Likes
753

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.

Read only

Former Member
0 Likes
754

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

Read only

Former Member
0 Likes
753

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

Read only

anversha_s
Active Contributor
0 Likes
753

hi,

chk the

return

table

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 table

if return[] is initial.

"show ur message.

endif.

Rgds

Anver

Read only

Former Member
0 Likes
753

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

Read only

Former Member
0 Likes
753

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