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

coading1

Former Member
0 Likes
517

hi,

we have selection screen for 5 fields, in selection screen if we provide 1 and 5 ,we have to get remaining three records. how?

thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
488

TABLES ztable.

SELECT-OPTIONS s_fld LIKE ztable-fld.

"In the select-option if you provide the input 1 and 5

SELECT *
 FROM ztable
 WHERE fld<b> NOT IN </b>s_fld.

Regards

Wenceslaus

4 REPLIES 4
Read only

Former Member
0 Likes
488

use select statments to extract the data based on the 2 fields u supply

Read only

Former Member
0 Likes
489

TABLES ztable.

SELECT-OPTIONS s_fld LIKE ztable-fld.

"In the select-option if you provide the input 1 and 5

SELECT *
 FROM ztable
 WHERE fld<b> NOT IN </b>s_fld.

Regards

Wenceslaus

Read only

Former Member
0 Likes
488

Hi Surendra,

make use of the Function module: 'DYNP_VALUES_UPDATE'

Sample code attached-

&----


*& Form Company_Code_Currency

&----


  • Get Currency based on the entry made into the Company Code

----


FORM company_code_currency . "S4M1MR

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'BUKRS'

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 'P_BUKRS'

value_org = 'S'

TABLES

value_tab = gi_ccode

return_tab = return_tab

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

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

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

ENDIF.

READ TABLE return_tab INTO gw_return_tab INDEX sy-tabix.

READ TABLE gi_ccode INTO gw_ccode WITH

KEY bukrs = gw_return_tab-fieldval.

tab_update-fieldname = 'P_BUKRS'.

tab_update-fieldvalue = gw_ccode-bukrs.

APPEND tab_update.

tab_update-fieldname = 'P_WAERS'.

tab_update-fieldvalue = gw_ccode-waers.

APPEND tab_update.

CALL FUNCTION 'DYNP_VALUES_UPDATE'

EXPORTING

dyname = sy-cprog

dynumb = sy-dynnr

TABLES

dynpfields = tab_update

EXCEPTIONS

OTHERS = 8.

CLEAR tab_update[].

ENDFORM. " Company_Code_Currency "S4M1MR

-Mohan

*Reward if helpful*

Read only

Former Member
0 Likes
488

HI

select-option:s_rec for ztable-rec.

if u provide 1and 5 u have to get ramainng three recodrs between them.

select * from ztable

where rec between s_rec-low and se_rec-high.

Rgds,

Sunil.K