09-19-2008 7:12 AM
how to create select-options for each of the fields thats in internal table?
09-19-2008 7:14 AM
we use SELECT-OPTIONS system implicitly creates the select options internal table which contains the fields of SIGN,OPTION,LOW & HIGH.
eg.
SELECT-OPTIONS : VENDOR FOR LFA1-LIFNR.
09-19-2008 7:16 AM
hi,
you can create in this way :
select-options: <name> for itab-<field name>.
example code:
TABLES: vbak. " standard table
TYPE-POOLS: slis.
*-- Structure to hold data from table
TYPES: BEGIN OF tp_itab1,
vbeln LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
werks LIKE vbap-werks,
lgort LIKE vbap-lgort,
END OF tp_itab1.
*-- Data Declaration
DATA: t_itab1 TYPE TABLE OF tp_itab1.
DATA : i_fieldcat TYPE slis_t_fieldcat_alv.
*----------------------------------------------------------------------*
* Selection Screen *
*----------------------------------------------------------------------*
*--Sales document-block
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
SELECT-OPTIONS: s_vbeln FOR vbak-vbeln,
s_posnr FOR vbap-posnr,
s_werks FOR vbap-werks,
s_lgort FOR vbap-lgort.*
SELECTION-SCREEN END OF BLOCK b1.
hope it will help you
regards
Rahul sharma
Edited by: RAHUL SHARMA on Sep 19, 2008 8:21 AM
Edited by: RAHUL SHARMA on Sep 19, 2008 8:22 AM
Edited by: RAHUL SHARMA on Sep 19, 2008 8:23 AM
09-19-2008 7:18 AM
simplly you write
select-options: <name> for itab-<field name>.
use like that.
it will surely help you.
thanks & regards
abhishek
09-19-2008 7:19 AM
Hi Devendra,
Do the following:
loop at itab.
s_sopt-low = itab-value.
s_sopt-option = 'EQ'.
s_sopt-sign = 'I'.
append s_opt.
clear s_opt.
endloop
Hope this will help.
Regards,
Nitin.
09-19-2008 7:22 AM
Hi Devendra,
Welcome to SCN!!!!.
Before posting the thread just search forum and then post the thread you will find lots of information regarding selection-options and read the rules of engagement.
Regards,
Sravanthi