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 for select option

Former Member
0 Likes
558

HI ALL,

please help me.

i need to get f4 help for zlsch field, if i give only one company code its working fine , if u give 2 company codes its not working,even though i kept s_bukrs-high code.

please help me

its urgent

s_bukrs FOR lfb1-bukrs no intervals OBLIGATORY,

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_zlsch-low.

data : l_dyname type standard table of DYNPREAD with header line.

l_dyname-FIELDNAME = 'S_BUKRS-LOW'.

append l_dyname.

l_dyname-FIELDNAME = 'S_BUKRS-HIGH'.

append l_dyname.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = sy-cprog

dynumb = sy-dynnr

tables

dynpfields = l_dyname

.

IF sy-subrc <> 0.

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

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

ENDIF.

refresh s_bukrs.

loop at l_dyname.

s_bukrs-low = l_dyname-FIELDVALUE.

s_bukrs-SIGN = 'I'.

s_bukrs-OPTION = 'EQ'.

append s_bukrs.

endloop.

SELECT zbukr

zlsch

FROM t042e

INTO TABLE gt_t042e

WHERE zbukr IN s_bukrs.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield ='ZLSCH'

dynpprog = sy-cprog

dynpnr = '1000' "sy-dynnr

dynprofield = 'S_ZLSCH'

  • VALUE = '*'

value_org = 'S'

TABLES

value_tab = gt_t042e

  • RETURN_TAB = return_tab

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3

HI ALL,

please help me.

i need to get f4 help for zlsch field, if i give only one company code its working fine , if u give 2 company codes its not working,even though i kept s_bukrs-high code.

please help me

its urgent

s_bukrs FOR lfb1-bukrs no intervals OBLIGATORY,

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_zlsch-low.

data : l_dyname type standard table of DYNPREAD with header line.

l_dyname-FIELDNAME = 'S_BUKRS-LOW'.

append l_dyname.

l_dyname-FIELDNAME = 'S_BUKRS-HIGH'.

append l_dyname.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = sy-cprog

dynumb = sy-dynnr

tables

dynpfields = l_dyname

.

IF sy-subrc <> 0.

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

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

ENDIF.

refresh s_bukrs.

loop at l_dyname.

s_bukrs-low = l_dyname-FIELDVALUE.

s_bukrs-SIGN = 'I'.

s_bukrs-OPTION = 'EQ'.

append s_bukrs.

endloop.

SELECT zbukr

zlsch

FROM t042e

INTO TABLE gt_t042e

WHERE zbukr IN s_bukrs.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield ='ZLSCH'

dynpprog = sy-cprog

dynpnr = '1000' "sy-dynnr

dynprofield = 'S_ZLSCH'

  • VALUE = '*'

value_org = 'S'

TABLES

value_tab = gt_t042e

  • RETURN_TAB = return_tab

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3

3 REPLIES 3
Read only

Former Member
0 Likes
533

Hello,

In the declaration of the Select Option, remove NO INTERVALS and try.

Reward, if helpful.

Rgds,

Raghu.

Read only

Former Member
0 Likes
533

If you give two company codes (not a range), then your select-options s_bukrs table will contain two lines, but you are only taking the first one.

Read only

Former Member
0 Likes
533

Hi,

The code will not get executed for s_zlsch-high.

Put the code in which you are using the function module for fetching the values in a PERFORM.

Call this perform twice.

Once for s_zlsch-low and once for s_zlsch-high.


AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_zlsch-low.

perform <perfname>.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_zlsch-high.

perform <perfname>.

Reward if helpful.

Regards.