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

at selection-screen on value-request for parmeter

Former Member
0 Likes
1,490

hi all,

I have got a requrement like i should create a f4 help for a parameter in this i shd see 4fields when i press f4.how can i do this? i know that i shd use F4IF_INT_TABLE_VALUE_REQUEST function but am not able to use it properly can anyone guide me in this

Thanks,

SriRatna

hi all,

I have got a requrement like i should create a f4 help for a parameter in this i shd see 4fields when i press f4.how can i do this? i know that i shd use F4IF_INT_TABLE_VALUE_REQUEST function but am not able to use it properly can anyone guide me in this

Thanks,

SriRatna

11 REPLIES 11
Read only

Former Member
0 Likes
1,451

Hi

U can create your search help in dictionary and then call it in the program:

PARAMETERS: P_PARAM MATCH CODE ID <SEARCH HELP>.

Max

Read only

Former Member
0 Likes
1,451

Hi Sri ratna,

Can u paste the FM so that we can correct it and send it back.

Murthy

Read only

Former Member
0 Likes
1,451

Hi

You can create collective search help for the 4 fields in dictionary and call it in the program.

Regards

Haritha

Read only

Former Member
0 Likes
1,451

Hi all,

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_SBCTC.

PERFORM f_screen_validation_sbctc.

FORM f_screen_validation_sbctc .

REFRESH : GT_SUBCTRTY[],

GT_FIELDTAB[],

GT_RETURNTAB[].

GT_FIELDTAB-FIELDNAME = 'ZZSUBCONTRACT_TY'.

GT_FIELDTAB-TABNAME = 'EKKO'.

APPEND GT_FIELDTAB.

SELECT ZZSUBCONTRACT_TY FROM EKKO INTO TABLE GT_SUBCTRTY

WHERE ZZSUBCONTRACT_TY IS NOT NULL.

SORT GT_SUBCTRTY.

DELETE ADJACENT DUPLICATES FROM GT_SUBCTRTY.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

RETFIELD = GT_FIELDTAB-FIELDNAME

  • PVALKEY = ' '

  • DYNPPROG = ' '

  • DYNPNR = ' '

  • DYNPROFIELD = ' '

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'C'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

TABLES

VALUE_TAB = GT_SUBCTRTY

FIELD_TAB = GT_FIELDTAB

RETURN_TAB = GT_RETURNTAB

  • DYNPFLD_MAPPING =

  • EXCEPTIONS

  • PARAMETER_ERROR = 1

  • NO_VALUES_FOUND = 2

  • OTHERS = 3

.

IF SY-SUBRC = 0.

P_SBCTC = GT_RETURNTAB-FIELDVAL.

ENDIF.

ENDFORM. " f_at_screen_validation_sbctc

now the code is working fine but when am trying pick data from database

it not pulling up the correct values for the parameter .

for example if i don't give any value then it's taking null value.

can anyone help on this.

Thanks,

Sriratna

Read only

0 Likes
1,451

Hi,

When you r using Parameters it always consider the Null as Null whereas Select-options considers Null as all, this is one of the main difference between these 2(parameters and select-options), Try using Obligatory in Parameters, so that you can avoid the Null values in the selection-screen itself.

Cheers...

Santosh.

P.S. Mark usefull Answers.

Read only

Former Member
0 Likes
1,451

Please read below info.

F4IF_INT_TABLE_VALUE_REQUEST

This function module displays a value list that you created in an ABAP program. The value list is passed to the function module as the table parameter VALUE_TAB. If you specify the import parameters DYNPPROG, DYNPNR, and DYNPROFIELD, the user’s selection is returned to the corresponding field on the screen. If you specify the table parameter RETURN_TAB, the selection is returned into the table instead.

FM DYNP_VALUES_READ can read the values of screen fields

Have a look at below sample code:

REPORT DEMO_DYNPRO_F4_HELP_MODULE.

TYPES: BEGIN OF VALUES,

CARRID TYPE SPFLI-CARRID,

CONNID TYPE SPFLI-CONNID,

END OF VALUES.

DATA: CARRIER(3) TYPE C,

CONNECTION(4) TYPE C.

DATA: PROGNAME LIKE SY-REPID,

DYNNUM LIKE SY-DYNNR,

DYNPRO_VALUES TYPE TABLE OF DYNPREAD,

FIELD_VALUE LIKE LINE OF DYNPRO_VALUES,

VALUES_TAB TYPE TABLE OF VALUES.

CALL SCREEN 100.

MODULE INIT OUTPUT.

PROGNAME = SY-REPID.

DYNNUM = SY-DYNNR.

CLEAR: FIELD_VALUE, DYNPRO_VALUES.

FIELD_VALUE-FIELDNAME = 'CARRIER'.

APPEND FIELD_VALUE TO DYNPRO_VALUES.

ENDMODULE.

MODULE CANCEL INPUT.

LEAVE PROGRAM.

ENDMODULE.

MODULE VALUE_CONNECTION INPUT.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

DYNAME = PROGNAME

DYNUMB = DYNNUM

TRANSLATE_TO_UPPER = 'X'

TABLES

DYNPFIELDS = DYNPRO_VALUES.

READ TABLE DYNPRO_VALUES INDEX 1 INTO FIELD_VALUE.

SELECT CARRID CONNID

FROM SPFLI

INTO CORRESPONDING FIELDS OF TABLE VALUES_TAB

WHERE CARRID = FIELD_VALUE-FIELDVALUE.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'CONNID'

DYNPPROG = PROGNAME

DYNPNR = DYNNUM

DYNPROFIELD = 'CONNECTION'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = VALUES_TAB.

ENDMODULE.

The screen flow logic is as follows:

PROCESS BEFORE OUTPUT.

MODULE INIT.

PROCESS AFTER INPUT.

MODULE CANCEL AT EXIT-COMMAND.

PROCESS ON VALUE-REQUEST.

FIELD CONNECTION MODULE VALUE_CONNECTION.

For the Flight number field, the POV module VALUE_CONNECTION is called. The

function module DYNP_VALUE_READ transports the value of the screen field CARRIER into the program. The program then reads the corresponding values from the database table SPFLI into the internal table VALUES_TAB using a SELECT statement, and passes the internal table to F4IF_INT_TABLE_VALUE_REQUEST. This displays the internal table as input help, and places the user’s selection into the screen field CONNECTION.

I hope it helps.

Best Regards,

Vibha

*Please mark all the helpful answers

Read only

former_member69765
Contributor
0 Likes
1,451

Very Simple...

Create a collective search help in thee dictionary and then add the help in the parameter like this :

PARAMETERS: P_NMAE MATCH CODE ID <SEARCH HELP NAME>.

Thats all...

Plz Mark all the helpful answers.

Read only

Former Member
0 Likes
1,451

santhosh,

u got my point so how can i overcome this?

and moreover i can't declare it as obligatory for that parameters

so i shd declare range for that parameter and how can i do this?

Thanks,

SriRatna

Read only

0 Likes
1,451

Hi

For declaring a parameter/select-options as mandatory we need to use the addition <b>OBLIGATORY</b>.

parameters: p_werks like t001w-wekrs <b>obligatory</b>.

Kind Regards

Eswar

Read only

0 Likes
1,451

Hi

For declaring a parameter/select-options as mandatory we need to use the addition <b>OBLIGATORY</b>.

parameters: p_werks like t001w-wekrs <b>obligatory</b>.

Kind Regards

Eswar

Read only

0 Likes
1,451

Seems your requirement is to provive 4 fixed values for input of a paramter.

Below code somewhat helps you on the same.

TYPE-POOLS vrm.

parameters: p_text TYPE vrm_id AS LISTBOX VISIBLE LENGTH 20 MODIF ID pro
.

data: tab type  vrm_values,
      wa like line of tab.
initialization.
  move: '1' to wa-key,
        'First' to wa-text.
  append wa to tab.
  move: '2' to wa-key,
        'Second' to wa-text.
  append wa to tab.
  move: '3' to wa-key,
        'Thrid' to wa-text.
  append wa to tab.
  move: '4' to wa-key,
        'Fourth' to wa-text.
  append wa to tab.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      id                    = 'P_TEXT'
      values                = tab
* EXCEPTIONS
*   ID_ILLEGAL_NAME       = 1
*   OTHERS                = 2
            .

Just incase you need to know how a selection-parameter is made mandatory.

Eg: parameters: p_text(10) type c <b>obligatory</b>.

Kind Regards

Eswar