Always and most times we forget the transaction code for a particular program. How do we find the transaction code quickly. Just remember one transaction SEARCH_SAP_MENU and the table TSTC.
SEARCH_SAP_MENU: This will allow you to search for any transaction if you provide any description to search for. try it out it’s very easy.
Table TSTC : Just go to SE16, give some description and hurray… you have found the transaction you are looking for.
Program name of SEARCH_SAP_MENU please refer the program SSM_SEME.
---------------------------------------------------------------------------
1. SELECT SINGLE INTO VARIABLE :
---------------------------------------------------------------------------
SELECT SINGLE variaA
INTO tp_variaA FROM payslip
WHERE month EQ tp_month.
---------------------------------------------------------------------------
2. SELECT SINGLE INTO TABLE :
---------------------------------------------------------------------------
SELECT SINGLE * FROM t512t
WHERE sprsl = sy-langu
AND molga = cn_molga
AND lgart = p_lgart.
CLEAR mara.
SELECT SINGLE * from mara
WHERE matnr EQ vbdpl-matnr.
---------------------------------------------------------------------------
3. SELECT * INTO INTERNAL TABLE :
---------------------------------------------------------------------------
select * into corresponding fields of table ibkpf
from bkpf
where bukrs = p_bukrs "Company Code
and gjahr = p_gjahr "Fiscal Year
and monat = p_monat "Fiscal Month(Include YTD month)
and budat = p_budat
and ( blart ne 'KZ'
and blart ne 'KW'
and blart ne 'DZ' ).
------------------------------------------------------------------------
4. SELECT SINGLE INTO MORE VARIABLE :
------------------------------------------------------------------------
select single bldat xblnr xref3
into (g_bldat, g_xblnr, g_xref3)
from bsak
where bukrs = in_bsak-bukrs "Company Code
and gjahr = in_bsak-gjahr "Fiscal Year
and augdt = in_bsak-budat
and augbl = in_bsak-belnr
and blart ne 'KP'.
How to hide and unhide Selection screen based on radio button you choose?
This is selection based on radio button, based on this selection you want to hide whatever selection screen are not related... so you have to do one perform to unhide this screen...
SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-002.
* Header
PARAMETERS: rb1 RADIOBUTTON GROUP rb1 USER-COMMAND sel DEFAULT 'X'.
PARAMETERS: rb2 RADIOBUTTON GROUP rb1.
SELECTION-SCREEN END OF BLOCK block2.
*detail - here you have to group it e.g likes rb1 & rb2
SELECTION-SCREEN: BEGIN OF BLOCK rb1c WITH FRAME TITLE text-t01.
SELECT-OPTIONS: s_innum FOR vbrk-vbeln MODIF ID rb1,
s_innam FOR vbrk-ernam MODIF ID rb1,
s_indat FOR vbrk-erdat MODIF ID rb1.
SELECTION-SCREEN: END OF BLOCK rb1c.
SELECTION-SCREEN BEGIN OF BLOCK block4 WITH FRAME TITLE text-013.
SELECT-OPTIONS s_aufnr4 FOR vbak-aufnr MODIF ID rb2. "MATCHCODE OBJECT vmva.
SELECT-OPTIONS s_erdat4 FOR vbak-erdat MODIF ID rb2.
SELECT-OPTIONS s_ernam4 FOR vbak-ernam MODIF ID rb2.
SELECTION-SCREEN END OF BLOCK block4.
*----------------------------------------------------------------------------*
* AT SELECTION-SCREEN OUTPUT *
*----------------------------------------------------------------------------*
AT SELECTION-SCREEN OUTPUT.
IF rb1 = 'X'.
PERFORM hide_rb1.
ELSEIF rb2 = 'X'.
PERFORM hide_rb2.
ENDIF.
FORM hide_rb .
LOOP AT SCREEN.
CASE screen-group1.
WHEN 'RB1'.
screen-active = 1.
MODIFY SCREEN.
WHEN 'RB2'.
screen-active = 0.
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
ENDFORM.
FORM hide_rb2 .
LOOP AT SCREEN.
CASE screen-group1.
WHEN 'RB1'.
screen-active = 0.
MODIFY SCREEN.
WHEN 'RB2'.
screen-active = 1.
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
ENDFORM. " HIDE_RB2
You have to modify screen based on selection screen and your declaration on your group...