Application Development 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: 

FM required

Former Member
0 Kudos
120

Can anyone provide me with FM that gives all of my selection criteria reocords?

1 ACCEPTED SOLUTION

Former Member
0 Kudos
53

check FMs ,

BUS_DYN_GET,

CIFIDYNP_VALUES_READ

DYNP_VALUES_READ,

RV_DYNPRO_READ

5 REPLIES 5

Former Member
0 Kudos
53

Hello,

Check this code:

DYNP_VALUES_READ

REPORT Z_TEST.
SELECT-OPTIONS: S_CARRID FOR SFLIGHT-CARRID,
S_CONNID FOR SFLIGHT-CONNID.

DATA: BEGIN OF HELP_ITEM OCCURS 0,
CONNID TYPE SFLIGHT-CONNID,
END OF HELP_ITEM.
DATA: DYNFIELDS TYPE TABLE OF DYNPREAD WITH HEADER LINE. 
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_CONNID.

DYNFIELDS-FIELDNAME = 'S_CARRID'.
APPEND DYNFIELDS.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-CPROG
DYNUMB = SY-DYNNR
TRANSLATE_TO_UPPER = 'X'
TABLES
DYNPFIELDS = DYNFIELDS
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
INVALID_PARAMETER = 7
UNDEFIND_ERROR = 8
DOUBLE_CONVERSION = 9
STEPL_NOT_FOUND = 10
OTHERS = 11.
READ TABLE DYNFIELDS WITH KEY FIELDNAME = 'S_CARRID'.
S_CARRID = DYNFIELDS-FIELDVALUE.
SELECT S_CONNID INTO TABLE HELP_ITEM FROM SFLIGHT WHERE CARRID IN S_CARRID .
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'CONNID'
DYNPROFIELD = 'S_CONNID'
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
TABLES
VALUE_TAB = HELP_ITEM.

Regards,

Vasanth

Former Member
0 Kudos
54

check FMs ,

BUS_DYN_GET,

CIFIDYNP_VALUES_READ

DYNP_VALUES_READ,

RV_DYNPRO_READ

Former Member
0 Kudos
53

<b>DYNP_VALUES_READ</b>

Report Zex36.

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 TYPE sy-repid,

dynnum TYPE 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_carrier INPUT.

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

tabname = 'DEMOF4HELP'

fieldname = 'CARRIER1'

dynpprog = progname

dynpnr = dynnum

dynprofield = 'CARRIER'.

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.

<b>Screen 100</b>

The input fields have been adopted from the program fields CARRIER and CONNECTION. The pushbutton has the function code CANCEL with function type E.

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 carrier MODULE value_carrier.

FIELD connection MODULE value_connection.

sreeramkumar_madisetty
Active Contributor
0 Kudos
53

hi

You can use the FM:

DYNP_VALUES_READ.

Regards,

kumar

Former Member
0 Kudos
53

TRY

RS_READ_SEL_OPTIONS

RS_REFRESH_FROM_SELECTOPTIONS

RS_REPORTSELECTIONS_INFO

RS_GET_SELOPTS_AND_PARAMS

RS_READ_SEL_OPTIONS

REGARDS

SHIBA DUTTA