‎2007 Apr 04 5:12 AM
‎2007 Apr 04 5:22 AM
Hi..,,
just execute this sample code ...
<i>This program displays an empty selection screen with two Push buttons on Application tool bar 'Material' , 'Purchase Document'..
When u click on the Material .. u will get a select option to enter values for the Material.. and when u click on the purchase Document ,, u will get a select option to enter PO numbers...</i>
<b>tables : mara, ekko, sscrfields.
data : w_flag1 type i,
w_flag2 type i.
SELECT-OPTIONS : S_MATNR FOR MARA-MATNR MODIF ID sc1.
SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN MODIF ID sc2.
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2.
INITIALIZATION.
sscrfields-functxt_01 = 'Material'.
sscrfields-functxt_02 = 'Purchase document'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'SC1' OR SCREEN-GROUP1 = 'SC2'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
CONTINUE.
ENDIF.
ENDLOOP.
At selection-screen output.
IF w_flag1 = 1.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'SC2'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
CLEAR W_FLAG1.
ELSEIF W_FLAG2 EQ 1.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'SC1'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
CLEAR W_FLAG2.
ENDIF.
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN 'FC01'.
w_flag1 = 1.
WHEN 'FC02'.
w_flag2 = 1.
ENDCASE.</b>
Hope this helps u...
regards,
sai ramesh
‎2007 Apr 04 5:19 AM
Sunil,
http://sap.ittoolbox.com/code/archives.asp?i=10&d=2919&a=s
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba65c35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/60/183d78163011d2953c0000e8353423/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm
Selection Views
***************
http://help.sap.com/saphelp_nw2004s/helpdata/en/f7/3ecfa4149c11d2953c0000e8353423/content.htm
http://searchsap.techtarget.com/tip/1,289483,sid21_gci779665,00.html
http://sap.ittoolbox.com/topics/t.asp?t=303&p=448&h2=322&h1=303&h3=448
Don't forget to reward if useful.......
‎2007 Apr 04 5:22 AM
Hi..,,
just execute this sample code ...
<i>This program displays an empty selection screen with two Push buttons on Application tool bar 'Material' , 'Purchase Document'..
When u click on the Material .. u will get a select option to enter values for the Material.. and when u click on the purchase Document ,, u will get a select option to enter PO numbers...</i>
<b>tables : mara, ekko, sscrfields.
data : w_flag1 type i,
w_flag2 type i.
SELECT-OPTIONS : S_MATNR FOR MARA-MATNR MODIF ID sc1.
SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN MODIF ID sc2.
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2.
INITIALIZATION.
sscrfields-functxt_01 = 'Material'.
sscrfields-functxt_02 = 'Purchase document'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'SC1' OR SCREEN-GROUP1 = 'SC2'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
CONTINUE.
ENDIF.
ENDLOOP.
At selection-screen output.
IF w_flag1 = 1.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'SC2'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
CLEAR W_FLAG1.
ELSEIF W_FLAG2 EQ 1.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'SC1'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
CLEAR W_FLAG2.
ENDIF.
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN 'FC01'.
w_flag1 = 1.
WHEN 'FC02'.
w_flag2 = 1.
ENDCASE.</b>
Hope this helps u...
regards,
sai ramesh
‎2007 Apr 04 5:24 AM
Hi,
for this u have use the function module "rss_template_instantiate".
check the doccumentation of that FM.
regards,
bharat.
‎2007 Apr 04 2:53 PM
Hi,
You can use the following statement.
SELECTION-SCREEN DYNAMIC SELECTIONS FOR NODE|TABLE <node>.
declares a node <node> of a logical database for dynamic selections in the selection include.
To use the dynamic selections in the SELECT statements of the subroutine PUT_<node>, you must use the data object DYN_SEL. The data object DYN_SEL is automatically generated in the logical database program as follows:
TYPE-POOLS RSDS.
DATA DYN_SEL TYPE RSDS_TYPE.
You do not have to program these lines yourself. The data object DYN_SEL is available in the database program but not in a connected executable program.
The type RSDS_TYPE of the data object is defined in the type group RSDS as follows:
TYPE-POOL RSDS.
WHERE-clauses ------------------------------
TYPES: RSDS_WHERE_TAB LIKE RSDSWHERE OCCURS 5.
TYPES: BEGIN OF RSDS_WHERE,
TABLENAME LIKE RSDSTABS-PRIM_TAB,
WHERE_TAB TYPE RSDS_WHERE_TAB,
END OF RSDS_WHERE.
TYPES: RSDS_TWHERE TYPE RSDS_WHERE OCCURS 5.
Expressions Polish notation ---------------
TYPES: RSDS_EXPR_TAB LIKE RSDSEXPR OCCURS 10.
TYPES: BEGIN OF RSDS_EXPR,
TABLENAME LIKE RSDSTABS-PRIM_TAB,
EXPR_TAB TYPE RSDS_EXPR_TAB,
END OF RSDS_EXPR.
TYPES: RSDS_TEXPR TYPE RSDS_EXPR OCCURS 10.
Selections as RANGES-tables -----------------
TYPES: RSDS_SELOPT_T LIKE RSDSSELOPT OCCURS 10.
TYPES: BEGIN OF RSDS_FRANGE,
FIELDNAME LIKE RSDSTABS-PRIM_FNAME,
SELOPT_T TYPE RSDS_SELOPT_T,
END OF RSDS_FRANGE.
TYPES: RSDS_FRANGE_T TYPE RSDS_FRANGE OCCURS 10.
TYPES: BEGIN OF RSDS_RANGE,
TABLENAME LIKE RSDSTABS-PRIM_TAB,
FRANGE_T TYPE RSDS_FRANGE_T,
END OF RSDS_RANGE.
TYPES: RSDS_TRANGE TYPE RSDS_RANGE OCCURS 10.
Definition of RSDS_TYPE
TYPES: BEGIN OF RSDS_TYPE,
CLAUSES TYPE RSDS_TWHERE,
TEXPR TYPE RSDS_TEXPR,
TRANGE TYPE RSDS_TRANGE,
END OF RSDS_TYPE.
For more information, please check this link.
http://help.sap.com/saphelp_nw04/helpdata/en/67/93b80914a911d2953c0000e8353423/content.htm
Regards,
Ferry Lianto