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

selection screen validation

Former Member
0 Likes
1,182

hi Gurus,

in my selection screen two fields are there.

Plant(Parameter)

Matrial number.(Select-options)

Requirement if i select a plant need to come related materials in material number field as a F4(Input) values.

Please send me the some logic to implement this.

regrds

RajKiran.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,135

Here's a working example...


      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                RETFIELD        = 'COD_EQUIPO'
                VALUE_ORG       = 'S'
           TABLES
                VALUE_TAB       = T_CUSTOM_COD_EQUIPO
                RETURN_TAB      = RETURN_TAB
           EXCEPTIONS
                PARAMETER_ERROR = 1
                NO_VALUES_FOUND = 2
                OTHERS          = 3.

        READ TABLE RETURN_TAB INDEX 1.

        MOVE RETURN_TAB-FIELDVAL TO GT_ALV_MACAREL-COD_EQUIPO.

Greetings,

Blag.

8 REPLIES 8
Read only

Former Member
0 Likes
1,135

You need to use FM F4IF_INT_TABLE_VALUE_REQUEST

and assign it to your field as a dynamic matchcode...

Greetings,

Blag.

Read only

0 Likes
1,135

I did the same but getting the No values found eventhough there is values

Read only

0 Likes
1,135

Can you please post your code?

Greetings,

Blag.

Read only

0 Likes
1,135

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

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'MATNR'

window_title = text-011

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'S_SBOM_LOW'

value_org = 'S'

TABLES

value_tab = git_ssbom

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

Read only

0 Likes
1,135

You have write S_SBOM_LOW and it should be S_SBOM-LOW

git_ssbom have the values right?

You have also missed the RETURN_TAB


AT SELECTION-SCREEN ON VALUE-REQUEST FOR sbom-low.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR'
window_title = text-011
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'S_SBOM-LOW'
value_org = 'S'
TABLES
value_tab = git_ssbom
return_tab = return_tab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.

Greetings,

Blag.

Read only

Former Member
0 Likes
1,135

Hi...

For this you can create a serchhelp. In that Give search help parameters as plant and material number.

give Spos for Plant.

Here , material number should be Import and Export.

Plant shuld be only import.

So wehen you press F4 iteill ask for the plant number.

Depending on palnt number, it will display material number.

Or esle, give parameter id of Plant(in the selctionscreen),

as Default in the Search help parametr (Plant).

So that, wat ever the value you enterd in the selection screen Plant parameetr, that will be automatically populated into Search help parameter.

so, you will get the values depens upon your plant number.

Regards

Sandeep.

Read only

Former Member
0 Likes
1,135

Hi Raj,

See you can work out like this

Use' no intervals' in select-options

example:

tables: ztxrk.

select-options ex for ztxrk-num default 'x' no intervals.

<REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Feb 18, 2008 11:03 AM

Read only

Former Member
0 Likes
1,136

Here's a working example...


      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                RETFIELD        = 'COD_EQUIPO'
                VALUE_ORG       = 'S'
           TABLES
                VALUE_TAB       = T_CUSTOM_COD_EQUIPO
                RETURN_TAB      = RETURN_TAB
           EXCEPTIONS
                PARAMETER_ERROR = 1
                NO_VALUES_FOUND = 2
                OTHERS          = 3.

        READ TABLE RETURN_TAB INDEX 1.

        MOVE RETURN_TAB-FIELDVAL TO GT_ALV_MACAREL-COD_EQUIPO.

Greetings,

Blag.