Purpose of 'I/O' check box in 'Switching on/off Navigation Attr.' ?
Hi,
What is the purpose of 'I/O' check box in 'Switching on/off Navigation Attr.' screen in InfoCube definition? (Edit InfoCube: Characteristics)
There are three columns in the screen. Navigation Attribute, Long description and I/O (check box.) Navigation Attribute & Long description are automatically populated by the system based on which attribute I selected as Navigational in respective InfoObject definitions.
Do I need to check the 'I/O' check box inorder to use these navigational attributes in the Query (to use all the features of Nivigational attr. like drill down & display like a char. etc.) ?
Your help is appreciated.
Regards,
Lakshmi
null
Hi lakshmi,
You are right, that check box will enable you to use a nav attr in the query. If you do not select it here, then even though this char has a nav attr, you will not be able to see or use it in the query designer.
Hope this helps...
Similar Messages
-
RE: purpose of Personalization option (check box) while doing transports.
Hi all,
i am creating transport request and we recently upgraded from ECC6.0 to EPH4, after the upgrade we are getting warning messages if we select personalization option, can any one tell me the purpose of personalization option while creating a transport request and what happens if i dont select it.
Thanks,
SSNothing is going happen if yuo do not select personilazation.
Personalization is a way to save information that could be common to users, I meant to a user role... E.g. you can create SAP queries and manage authorizations by user groups. Now this information can be stored in the personalization tab of the role. (I supposed that it is a way for SAP to address his ambiguity of its concept of user group and roles: is "usergroup" a grouping of people sharing the same access or is it the role who is the grouping of people sharing the same access?)
Thanks,
Prasant -
When I open my iCloud browser it looks different than "normal." It shows the list with check boxes, not slider on-off buttons. It dos not show a "storage and backup" button so I cannot set up my backup. What is wrong?
If see something like the image below it's because you are looking at the iCloud settings on your Mac, not on an iOS device (which has sliders). Storage & Backup isn't in the Mac settings because you cannot back up your Mac to iCloud. Only iOS devices can back up to iCloud. On a Mac, you can get information about your iCloud account storage by looking at the green usage bar at the bottom and by clicking the "Manage..." button on the bottom right.
-
The "when I open a new link in a new tab, switch to it immediately" check box is not checked but it acts as if I have checked the check box.
== This happened ==
Every time Firefox opened
== after I install the Persona themesI was having the same problem and was looking for solutions when I came across this posting. Disabling GoodSearch solved the problem for me. Hopefully GoodSearch will update soon and resolve the issue permanently so I can use it again.
-
How to turn off "Adobe PDF settings for Autodes AutoCAD documents" dialog box between pages of a batch conversion? There is a check box for this purpose, but it is grayed out, and of course unusable?!
How to turn off "Adobe PDF settings for Autodes AutoCAD documents" dialog box between pages of a batch conversion? There is a check box for this purpose, but it is grayed out, and of course unusable?!
-
Purpose of Check Boxes on New ITunes
I just downloaded the newest iTunes. A check box appears on every song and is checked. When I uncheck it my song disappears. Anyone know what's going on???
Are you looking in a smart playlist where the rules are "Match only Checked Songs" and "Live Updating"?
If you want to check everything, go to the main music listing, press sommandkey while checking a song.
http://www.apple.com/itunes/how-to/shortcuts.html -
Hello Frnds,
i need check box in my hierarchial alv list display.
i am produing my code.pls specify the changes.
*& Report ZCASE9_ORDERSLISTREPORT
REPORT ZCASE9_ORDERSLISTREPORT.
TYPE-POOLS: VRM,SLIS.
TABLES:VBAK,
VBAP,
VBKD,
VBEP,
KNA1,
VBPA,
MAKT,
VBUP,
TVBST.
TYPES:BEGIN OF ST_VBAK,
VBELN TYPE VBAK-VBELN,
ERDAT TYPE VBAK-ERDAT,
ERZET TYPE VBAK-ERZET,
ERNAM TYPE VBAK-ERNAM,
AUDAT TYPE VBAK-AUDAT,
LIFSK TYPE VBAK-LIFSK,
VDATU TYPE VBAK-VDATU,
VSBED TYPE VBAK-VSBED,
BSTNK TYPE VBAK-BSTNK,
BNAME TYPE VBAK-BNAME,
AEDAT TYPE VBAK-AEDAT,
END OF ST_VBAK,
BEGIN OF ST_VBAP,
VBELN1 TYPE VBAP-VBELN,
MATNR TYPE VBAP-MATNR,
CHARG TYPE VBAP-CHARG,
PSTYV TYPE VBAP-PSTYV,
ABGRU TYPE VBAP-ABGRU,
MEINS TYPE VBAP-MEINS,
VKAUS TYPE VBAP-VKAUS,
KWMENG TYPE VBAP-KWMENG,
LPRIO TYPE VBAP-LPRIO,
WERKS TYPE VBAP-WERKS,
LGORT TYPE VBAP-LGORT,
VSTEL TYPE VBAP-VSTEL,
ROUTE TYPE VBAP-ROUTE,
MVGR5 TYPE VBAP-MVGR5,
END OF ST_VBAP,
BEGIN OF ST_VBPA,
VBELN TYPE VBPA-VBELN,
KUNNR TYPE VBPA-KUNNR,
END OF ST_VBPA,
BEGIN OF ST_KNA1,
KUNNR TYPE KNA1-KUNNR,
NAME1 TYPE KNA1-NAME1,
TELF1 TYPE KNA1-TELF1,
END OF ST_KNA1,
BEGIN OF ST_MAKT,
MATNR TYPE MAKT-MATNR,
MAKTX TYPE MAKT-MAKTX,
END OF ST_MAKT,
BEGIN OF ST_VBEP,
VBELN TYPE VBEP-VBELN,
ETENR TYPE VBEP-ETENR,
WADAT TYPE VBEP-WADAT,
END OF ST_VBEP,
BEGIN OF ST_VBUP,
VBELN TYPE VBUP-VBELN,
LFSTA TYPE VBUP-LFSTA,
GBSTA TYPE VBUP-GBSTA,
END OF ST_VBUP,
begin of st_finalHDR,
VBELN TYPE VBAK-VBELN,
ERDAT TYPE VBAK-ERDAT,
ERZET TYPE VBAK-ERZET,
ERNAM TYPE VBAK-ERNAM,
AUDAT TYPE VBAK-AUDAT,
LIFSK TYPE VBAK-LIFSK,
VDATU TYPE VBAK-VDATU,
VSBED TYPE VBAK-VSBED,
BSTNK TYPE VBAK-BSTNK,
BNAME TYPE VBAK-BNAME,
AEDAT TYPE VBAK-AEDAT,
KUNNR TYPE VBPA-KUNNR,
NAME1 TYPE KNA1-NAME1,
TELF1 TYPE KNA1-TELF1,
end of st_finalHDR,
BEGIN OF ST_FINALTEM,
VBELN1 TYPE VBAP-VBELN,
LPRIO TYPE VBAP-LPRIO,
WERKS TYPE VBAP-WERKS,
LGORT TYPE VBAP-LGORT,
VSTEL TYPE VBAP-VSTEL,
ROUTE TYPE VBAP-ROUTE,
MVGR5 TYPE VBAP-MVGR5,
MATNR TYPE VBAP-MATNR,
CHARG TYPE VBAP-CHARG,
PSTYV TYPE VBAP-PSTYV,
ABGRU TYPE VBAP-ABGRU,
MEINS TYPE VBAP-MEINS,
VKAUS TYPE VBAP-VKAUS,
KWMENG TYPE VBAP-KWMENG,
MAKTX TYPE MAKT-MAKTX,
ETENR TYPE VBEP-ETENR,
WADAT TYPE VBEP-WADAT,
LFSTA TYPE VBUP-LFSTA,
GBSTA TYPE VBUP-GBSTA,
END OF ST_FINALTEM.
DATA:IT_VBAK TYPE STANDARD TABLE OF ST_VBAK,
IT_VBAP TYPE STANDARD TABLE OF ST_VBAP,
IT_VBPA TYPE STANDARD TABLE OF ST_VBPA,
IT_KNA1 TYPE STANDARD TABLE OF ST_KNA1,
IT_MAKT TYPE STANDARD TABLE OF ST_MAKT,
IT_VBEP TYPE STANDARD TABLE OF ST_VBEP,
IT_VBUP TYPE STANDARD TABLE OF ST_VBUP,
IT_FINALHDR TYPE STANDARD TABLE OF ST_FINALHDR,
IT_FINALTEM TYPE STANDARD TABLE OF ST_FINALTEM,
WA_VBAK TYPE ST_VBAK,
WA_VBAP TYPE ST_VBAP,
WA_VBPA TYPE ST_VBPA,
WA_KNA1 TYPE ST_KNA1,
WA_MAKT TYPE ST_MAKT,
WA_VBEP TYPE ST_VBEP,
WA_VBUP TYPE ST_VBUP,
WA_FINALHDR TYPE ST_FINALHDR,
WA_FINALTEM TYPE ST_FINALTEM.
DATA: NAME TYPE VRM_ID,
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST,
REPID TYPE SY-REPID,
TY_KEYINFO TYPE SLIS_KEYINFO_ALV, " key information type.
IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV, " field catalog type
IT_HEADER TYPE SLIS_TABNAME, " table to store header data
IT_ITEM TYPE SLIS_TABNAME. " table to store item data
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS:OPEN_ORD RADIOBUTTON GROUP g1 DEFAULT 'X', " DOWNLOAD TO APPLICATION SERVER
ALL_ORD RADIOBUTTON GROUP g1,
MY_ORD AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
PARAMETERS:PF(25) AS LISTBOX VISIBLE LENGTH 20, P_KUNNR TYPE VBAK-KUNNR,
P_MATNR TYPE VBAP-MATNR,
P_BSTNK TYPE VBAK-BSTNK.
SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-003.
SELECT-OPTIONS:S_AUDAT FOR VBAK-AUDAT,
S_VBELN FOR VBAK-VBELN,
S_AUART FOR VBAK-AUART,
S_LPRIO FOR VBAP-LPRIO,
S_PRSDT FOR VBKD-PRSDT,
S_WADAT FOR VBEP-WADAT,
S_VSBED FOR VBAK-VSBED,
S_EDATU FOR VBEP-EDATU,
S_LIFSK FOR VBAK-LIFSK,
S_ERNAM FOR VBAK-ERNAM.
SELECTION-SCREEN END OF BLOCK B3.
SELECTION-SCREEN BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-004.
SELECT-OPTIONS:S_VKORG FOR VBAK-VKORG,
S_VTWEG FOR VBAK-VTWEG,
S_SPART FOR VBAP-SPART,
S_VKGRP FOR VBAK-VKGRP,
S_VKBUR FOR VBAK-VKBUR,
S_WERKS FOR VBAP-WERKS.
SELECTION-SCREEN END OF BLOCK B4.
INITIALIZATION.
NAME = 'PF'.
VALUE-KEY = '1'.
VALUE-TEXT = 'SHIP TO'.
APPEND VALUE TO LIST.
NAME = 'PF'.
VALUE-KEY = '2'.
VALUE-TEXT = 'SOLD TO'.
APPEND VALUE TO LIST.
NAME = 'PF'.
VALUE-KEY = '3'.
VALUE-TEXT = 'BILL TO'.
APPEND VALUE TO LIST.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = NAME
VALUES = LIST.
REPID = SY-REPID. " variable having the program name
IT_HEADER = 'IT_FINALHDR'.
IT_ITEM = 'IT_FINALTEM'.
CLEAR TY_KEYINFO.
TY_KEYINFO-HEADER01 = 'VBELN'." comparing the keys and relating the header and item internal tables
TY_KEYINFO-ITEM01 = 'VBELN1'.
START-OF-SELECTION.
IF OPEN_ORD ='X'.
PERFORM RETRIEVE_VBAK.
PERFORM RETRIEVE_VBAP.
PERFORM RETRIEVE_VBPA.
PERFORM RETRIEVE_KNA1.
PERFORM RETRIEVE_MAKT.
PERFORM RETRIEVE_VBEP.
PERFORM RETRIEVE_VBUP1.
ELSE.
PERFORM RETRIEVE_VBAK.
PERFORM RETRIEVE_VBAP.
PERFORM RETRIEVE_VBPA.
PERFORM RETRIEVE_KNA1.
PERFORM RETRIEVE_MAKT.
PERFORM RETRIEVE_VBEP.
PERFORM RETRIEVE_VBUP.
ENDIF.
IF IT_VBAK IS NOT INITIAL.
LOOP AT IT_VBAK INTO WA_VBAK.
READ TABLE IT_VBAP INTO WA_VBAP WITH KEY VBELN1 = WA_VBAK-VBELN.
CHECK SY-SUBRC EQ 0.
READ TABLE IT_VBPA INTO WA_VBPA WITH KEY VBELN = WA_VBAP-VBELN1.
CHECK SY-SUBRC EQ 0.
READ TABLE IT_KNA1 INTO WA_KNA1 WITH KEY KUNNR = WA_VBPA-KUNNR.
CHECK SY-SUBRC EQ 0.
READ TABLE IT_MAKT INTO WA_MAKT WITH KEY MATNR = WA_VBAP-MATNR.
CHECK SY-SUBRC EQ 0.
READ TABLE IT_VBEP INTO WA_VBEP WITH KEY VBELN = WA_VBAP-VBELN1.
CHECK SY-SUBRC EQ 0.
READ TABLE IT_VBUP INTO WA_VBUP WITH KEY VBELN = WA_VBAP-VBELN1.
CHECK SY-SUBRC EQ 0.
WA_FINALHDR-VBELN = WA_VBAK-VBELN.
WA_FINALHDR-ERNAM = WA_VBAK-ERNAM.
WA_FINALHDR-ERDAT = WA_VBAK-ERDAT.
WA_FINALHDR-ERZET = WA_VBAK-ERZET.
WA_FINALHDR-AEDAT = WA_VBAK-AEDAT.
WA_FINALHDR-AUDAT = WA_VBAK-AUDAT.
WA_FINALHDR-LIFSK = WA_VBAK-LIFSK.
WA_FINALHDR-VDATU = WA_VBAK-VDATU.
WA_FINALHDR-VSBED = WA_VBAK-VSBED.
WA_FINALHDR-BNAME = WA_VBAK-BNAME.
WA_FINALHDR-BSTNK = WA_VBAK-BSTNK.
WA_FINALHDR-TELF1 = WA_KNA1-TELF1.
WA_FINALHDR-NAME1 = WA_KNA1-NAME1.
WA_FINALHDR-KUNNR = WA_VBPA-KUNNR.
WA_FINALTEM-VBELN1 = WA_VBAP-VBELN1.
WA_FINALTEM-LPRIO = WA_VBAP-LPRIO.
WA_FINALTEM-MATNR = WA_VBAP-MATNR.
WA_FINALTEM-CHARG = WA_VBAP-CHARG.
WA_FINALTEM-MAKTX = WA_MAKT-MAKTX.
WA_FINALTEM-LGORT = WA_VBAP-LGORT.
WA_FINALTEM-MVGR5 = WA_VBAP-MVGR5.
WA_FINALTEM-ETENR = WA_VBEP-ETENR.
WA_FINALTEM-KWMENG = WA_VBAP-KWMENG.
WA_FINALTEM-GBSTA = WA_VBUP-GBSTA.
WA_FINALTEM-LFSTA = WA_VBUP-LFSTA.
WA_FINALTEM-VSTEL = WA_VBAP-VSTEL.
WA_FINALTEM-PSTYV = WA_VBAP-PSTYV.
WA_FINALTEM-ABGRU = WA_VBAP-ABGRU.
WA_FINALTEM-MEINS = WA_VBAP-MEINS.
WA_FINALTEM-VKAUS = WA_VBAP-VKAUS.
WA_FINALTEM-WERKS = WA_VBAP-WERKS.
WA_FINALTEM-ROUTE = WA_VBAP-ROUTE.
WA_FINALTEM-WADAT = WA_VBEP-WADAT.
APPEND WA_FINALHDR TO IT_FINALHDR.
APPEND WA_FINALTEM TO IT_FINALTEM.
ENDLOOP.
ENDIF.
SORT iT_FINALHDR.
DELETE ADJACENT DUPLICATES FROM iT_FINALHDR COMPARING ALL FIELDS.
SORT iT_FINALTEM.
DELETE ADJACENT DUPLICATES FROM iT_FINALTEM COMPARING ALL FIELDS.
*wa_fieldcat-d = 'X'.
WA_FIELDCAT-TABNAME = 'IT_FINALHDR'.
WA_FIELDCAT-FIELDNAME = 'VBELN'.
WA_FIELDCAT-SELTEXT_L = 'SALES DOC NO'.
WA_FIELDCAT-COL_POS = 1.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALHDR'.
WA_FIELDCAT-FIELDNAME = 'ERNAM'.
WA_FIELDCAT-SELTEXT_L = 'CREATED BY'.
WA_FIELDCAT-COL_POS = 2.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALHDR'.
WA_FIELDCAT-FIELDNAME = 'ERDAT'.
WA_FIELDCAT-SELTEXT_L = 'CREATED ON'.
WA_FIELDCAT-COL_POS = 3.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALHDR'.
WA_FIELDCAT-FIELDNAME = 'ERZET'.
WA_FIELDCAT-SELTEXT_L = 'CREATED TIME'.
WA_FIELDCAT-COL_POS = 4.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALHDR'.
WA_FIELDCAT-FIELDNAME = 'AEDAT'.
WA_FIELDCAT-SELTEXT_L = 'CHANGED ON'.
WA_FIELDCAT-COL_POS = 5.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALHDR'.
WA_FIELDCAT-FIELDNAME = 'AUDAT'.
WA_FIELDCAT-SELTEXT_L = 'DOCUMENT DATE'.
WA_FIELDCAT-COL_POS = 6.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALHDR'.
WA_FIELDCAT-FIELDNAME = 'LIFSK'.
WA_FIELDCAT-SELTEXT_L = 'DELIVERY BLOCK'.
WA_FIELDCAT-COL_POS = 7.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALHDR'.
WA_FIELDCAT-FIELDNAME = 'VDATU'.
WA_FIELDCAT-SELTEXT_L = 'REQ DEL. DATE'.
WA_FIELDCAT-COL_POS = 8.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALHDR'.
WA_FIELDCAT-FIELDNAME = 'VSBED'.
WA_FIELDCAT-SELTEXT_L = 'SHIPPING CONDITION'.
WA_FIELDCAT-COL_POS = 9.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALHDR'.
WA_FIELDCAT-FIELDNAME = 'BNAME'.
WA_FIELDCAT-SELTEXT_L = 'NAME OF THE ORDERER'.
WA_FIELDCAT-COL_POS = 10.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALHDR'.
WA_FIELDCAT-FIELDNAME = 'TELF1'.
WA_FIELDCAT-SELTEXT_L = 'SHIP 2 PARTY TELEPHONE'.
WA_FIELDCAT-COL_POS = 11.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALHDR'.
WA_FIELDCAT-FIELDNAME = 'BSTNK'.
WA_FIELDCAT-SELTEXT_L = 'PURCHASE ORDER NO'.
WA_FIELDCAT-COL_POS = 12.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALHDR'.
WA_FIELDCAT-FIELDNAME = 'KUNNR'.
WA_FIELDCAT-SELTEXT_L = 'SHIP 2 PARTY'.
WA_FIELDCAT-COL_POS = 13.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALHDR'.
WA_FIELDCAT-FIELDNAME = 'NAME1'.
WA_FIELDCAT-SELTEXT_L = 'SHIP 2 PARTY NAME'.
WA_FIELDCAT-COL_POS = 14.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALTEM'.
WA_FIELDCAT-FIELDNAME = 'VBELN1'.
WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALTEM'.
WA_FIELDCAT-FIELDNAME = 'LPRIO'.
WA_FIELDCAT-SELTEXT_L = 'DEL. PRIORITY'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALTEM'.
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-SELTEXT_L = 'MATERIAL'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALTEM'.
WA_FIELDCAT-FIELDNAME = 'CHARG'.
WA_FIELDCAT-SELTEXT_L = 'BATCH'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALTEM'.
WA_FIELDCAT-FIELDNAME = 'MAKTX'.
WA_FIELDCAT-SELTEXT_L = 'MAT DESC'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALTEM'.
WA_FIELDCAT-FIELDNAME = 'LGORT'.
WA_FIELDCAT-SELTEXT_L = 'STORAGE LOC'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALTEM'.
WA_FIELDCAT-FIELDNAME = 'MVGR5'.
WA_FIELDCAT-SELTEXT_L = 'MAT GROUP'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALTEM'.
WA_FIELDCAT-FIELDNAME = 'ETENR'.
WA_FIELDCAT-SELTEXT_L = 'SCHED LINE NO'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALTEM'.
WA_FIELDCAT-FIELDNAME = 'KWMENG'.
WA_FIELDCAT-SELTEXT_L = 'ORD QUANTITY'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALTEM'.
WA_FIELDCAT-FIELDNAME = 'GBSTA'.
WA_FIELDCAT-SELTEXT_L = 'OVERALL STATUS'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALTEM'.
WA_FIELDCAT-FIELDNAME = 'LFSTA'.
WA_FIELDCAT-SELTEXT_L = 'DEL. STATUS'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALTEM'.
WA_FIELDCAT-FIELDNAME = 'VSTEL'.
WA_FIELDCAT-SELTEXT_L = 'SHIPPING POINT'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALTEM'.
WA_FIELDCAT-FIELDNAME = 'PSTYV'.
WA_FIELDCAT-SELTEXT_L = 'ITEM CATEGORY'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALTEM'.
WA_FIELDCAT-FIELDNAME = 'ABGRU'.
WA_FIELDCAT-SELTEXT_L = 'REASON 4 REJECTION'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALTEM'.
WA_FIELDCAT-FIELDNAME = 'MEINS'.
WA_FIELDCAT-SELTEXT_L = 'BASE UOM'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALTEM'.
WA_FIELDCAT-FIELDNAME = 'VKAUS'.
WA_FIELDCAT-SELTEXT_L = 'USAGE'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALTEM'.
WA_FIELDCAT-FIELDNAME = 'WERKS'.
WA_FIELDCAT-SELTEXT_L = 'PLANT'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALTEM'.
WA_FIELDCAT-FIELDNAME = 'ROUTE'.
WA_FIELDCAT-SELTEXT_L = 'ROUTE'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_FINALTEM'.
WA_FIELDCAT-FIELDNAME = 'WADAT'.
WA_FIELDCAT-SELTEXT_L = 'GOODS ISSUE DATE'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
*CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = IT_FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = IT_FINALHDR
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
*IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_CALLBACK_PROGRAM = REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
IS_LAYOUT =
IT_FIELDCAT = IT_FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
i_tabname_header = IT_HEADER
i_tabname_item = IT_ITEM
I_STRUCTURE_NAME_HEADER =
I_STRUCTURE_NAME_ITEM =
is_keyinfo = TY_KEYINFO
IS_PRINT =
IS_REPREP_ID =
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
IR_SALV_HIERSEQ_ADAPTER =
IT_EXCEPT_QINFO =
I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab_header = IT_FINALHDR
t_outtab_item = IT_FINALTEM.
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*& Form RETRIEVE_VBAK
text
--> p1 text
<-- p2 text
form RETRIEVE_VBAK .
SELECT VBELN
ERDAT
ERZET
ERNAM
AUDAT
LIFSK
VDATU
VSBED
BSTNK
BNAME
AEDAT INTO TABLE IT_VBAK FROM VBAK WHERE VBELN IN S_VBELN AND
ERNAM IN S_ERNAM AND
AUDAT IN S_AUDAT AND
AUART IN S_AUART AND
LIFSK IN S_LIFSK AND
VKORG IN S_VKORG AND
VTWEG IN S_VTWEG AND
VSBED IN S_VSBED AND
VKGRP IN S_VKGRP AND
VKBUR IN S_VKBUR.
IF SY-SUBRC NE 0.
MESSAGE E099(ZMMCASE) WITH 'NO VBAK HDR DATA FOUND'.
ENDIF.
endform. " RETRIEVE_VBAK
*& Form RETRIEVE_VBAP
text
--> p1 text
<-- p2 text
form RETRIEVE_VBAP .
SELECT VBELN
MATNR
CHARG
PSTYV
ABGRU
MEINS
VKAUS
KWMENG
LPRIO
WERKS
LGORT
VSTEL
ROUTE
MVGR5 INTO TABLE IT_VBAP FROM VBAP
FOR ALL ENTRIES IN IT_VBAK
WHERE VBELN = IT_VBAK-VBELN AND
SPART IN S_SPART AND
LPRIO IN S_LPRIO.
IF SY-SUBRC NE 0.
MESSAGE E098(ZMMCASE) WITH 'NO DATA FOUND IN TABLE VBAP'.
ENDIF.
endform. " RETRIEVE_VBAP
*& Form RETRIEVE_VBPA
text
--> p1 text
<-- p2 text
form RETRIEVE_VBPA .
SELECT VBELN
KUNNR INTO TABLE IT_VBPA FROM VBPA
FOR ALL ENTRIES IN IT_VBAP
WHERE VBELN = IT_VBAP-VBELN1.
IF SY-SUBRC NE 0.
MESSAGE E097(ZMMCASE) WITH 'NO DATA FOUND IN TABLE VBPA'.
ENDIF.
endform. " RETRIEVE_VBPA
*& Form RETRIEVE_KNA1
text
--> p1 text
<-- p2 text
form RETRIEVE_KNA1 .
SELECT KUNNR
NAME1
TELF1 INTO TABLE IT_KNA1 FROM KNA1
FOR ALL ENTRIES IN IT_VBPA
WHERE KUNNR = IT_VBPA-KUNNR.
IF SY-SUBRC NE 0.
MESSAGE E096(ZMMCASE) WITH 'NO DATA FOUND IN TABLE KNA1'.
ENDIF.
endform. " RETRIEVE_KNA1
*& Form RETRIEVE_MAKT
text
--> p1 text
<-- p2 text
form RETRIEVE_MAKT .
SELECT MATNR
MAKTX INTO TABLE IT_MAKT FROM MAKT
FOR ALL ENTRIES IN IT_VBAP
WHERE MATNR = IT_VBAP-MATNR.
IF SY-SUBRC NE 0.
MESSAGE E095(ZMMCASE) WITH 'NO DATA FOUND IN TABLE MAKT'.
ENDIF.
endform. " RETRIEVE_MAKT
*& Form RETRIEVE_VBEP
text
--> p1 text
<-- p2 text
form RETRIEVE_VBEP .
SELECT VBELN
ETENR
WADAT INTO TABLE IT_VBEP FROM VBEP
FOR ALL ENTRIES IN IT_VBAP
WHERE VBELN = IT_VBAP-VBELN1 AND
EDATU IN S_EDATU AND
WADAT IN S_WADAT.
IF SY-SUBRC NE 0.
MESSAGE E094(ZMMCASE) WITH 'NO DATA FOUND IN TABLE VBEP'.
ENDIF.
endform. " RETRIEVE_VBEP
*& Form RETRIEVE_VBUP
text
--> p1 text
<-- p2 text
form RETRIEVE_VBUP .
SELECT VBELN
LFSTA
GBSTA INTO TABLE IT_VBUP FROM VBUP
FOR ALL ENTRIES IN IT_VBAP
WHERE VBELN = IT_VBAP-VBELN1.
IF SY-SUBRC NE 0.
MESSAGE E093(ZMMCASE) WITH 'NO DATA FOUND IN TABLE VBUP'.
ENDIF.
endform. " RETRIEVE_VBUP
*& Form RETRIEVE_VBUP1
text
--> p1 text
<-- p2 text
form RETRIEVE_VBUP1 .
SELECT A~VBELN
A~LFSTA
AGBSTA FROM VBUP AS A INNER JOIN VBAP AS B ON AVBELN = B~VBELN INTO TABLE IT_VBUP
FOR ALL ENTRIES IN IT_VBAP
WHERE A~VBELN = IT_VBAP-VBELN1 AND
GBSTA IN ('A','B').
IF SY-SUBRC NE 0.
MESSAGE E093(ZMMCASE) WITH 'NO DATA FOUND IN TABLE VBUP'.
ENDIF.
endform. " RETRIEVE_VBUP1Hi yes you can perform some action on that by useing that check boxes
by creating some pushbuttons in SE41 PF-STATUS
In order modify PF_STATUS of ALV grid report you need to perform the following steps:
1. Update 'REUSE_ALV_GRID_DISPLAY' FM call to include:
i_callback_pf_status_set = 'SET_PF_STATUS' statement.
2. Create 'SET_PF_STATUS' FORM
3. Create pf_status (i.e. 'ZNEWSTATUS').
- It is recommend that you copy standard status'STANDARD' from function group SALV and modify it accordingly. ALV standard function codes always start with '&'.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE'
i_callback_pf_status_set = 'SET_PF_STATUS' "see FORM
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
i_save = 'X'
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
FORM SET_PF_STATUS *
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZNEWSTATUS'.
"Copy of 'STANDARD' pf_status from fgroup SALV
ENDFORM.
exmple2
This example shows how to use checkboxes within an ALV Grid Control. You learn:
(1) how to define a column for editable checkboxes for an attribute of your list
(2) how to evaluate the checked checkboxes
(3) how to switch between editable and non-editable checkboxes
program bcalv_edit_05.
Purpose:
~~~~~~~~
This example shows how to use checkboxes within an ALV Grid Control.
You learn:
o how to define a column for editable checkboxes for an attribute
of your list (see also remark below)
o how to evaluate the checked checkboxes
o how to switch between editable and non-editable checkboxes
Important Remark
~~~~~~~~~~~~~~~~
The checkbox functionality has been replaced by selection buttons
in front of each row (field SEL_MODE of the layout structure
set to 'A' or 'D'; when using the editable ALV Grid Control,
these selection buttons are always visible).
Class methods like GET_SELECTED_ROWS work only for this new
functionality and not for checkboxes.
Thus checkboxes should not be used for line selection but for
a column as an additional or for an already existing attribute
(like field SMOKER in SBOOK).
To check program behavior
~~~~~~~~~~~~~~~~~~~~~~~~~
Try out the functions displayed in the application toolbar:
o The first sets all checked lines to initial values.
(see form reset_selected_entries)
o The seconds marks all checkboxes that are input enabled
o The third unmarks all checkboxes that are input enabled
o To try the forth, you have to select a line first using
the selection buttons on the left.
The function deactivates/activates a checkbox.
Checkboxes may be locked/unlocked using a double click on the
checkbox cell.
Essential steps (search for '§')
~~~~~~~~~~~~~~~
This example focusses on two aspects of checkboxes in an
editable ALV Grid Control:
A How to integrate, set, reset and evaluate checkboxes
B What you must do to lock particular checkboxes against input
A) Integrate, set, reset and evaluate checkboxes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A1.Extend your output table by a checkbox field.
A2.Add an entry for the checkbox in the fieldcatalog
A3.Optionally, check checkboxes initially after selecting data.
A4.Before you (a)set, (b)reset, (c)(de)activate or
(d)evaluate checkboxes, you must check the input cells.
B) Lock particular checkboxes against input
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
B1.Extend your output table by a field to dis- or enable
cells for input.
B2.After selecting data,
assign a style for each row of your checkbox column.
B3.Use the layout structure to aquaint additional field to ALV.
B4.Switch the style to dis- or enable a cell for input
class lcl_event_receiver definition deferred. "for event handling
data: ok_code like sy-ucomm,
save_ok like sy-ucomm,
g_container type scrfname value 'BCALV_GRID_DEMO_0100_CONT1',
g_grid type ref to cl_gui_alv_grid,
g_custom_container type ref to cl_gui_custom_container,
g_event_receiver type ref to lcl_event_receiver,
gt_fieldcat type lvc_t_fcat,
gs_layout type lvc_s_layo,
g_max type i value 100.
*§A1.Extend your output table by a checkbox field.
If you do not want to lock sole checkboxes against input
you do not need field 'celltab'.
types: begin of gs_outtab.
types: checkbox type c. "field for checkbox
§B1.Extend your output table by a field to dis- or enable
cells for input.
types: celltab type lvc_t_styl. "field to switch editability
include structure sflight.
types: end of gs_outtab.
data: gt_outtab type gs_outtab occurs 0 with header line.
LOCAL CLASSES
This local class only handles event DOUBLE_CLICK.
Wenn the user double clicks on a checkbox cell the status of
this cell is switched from editable to not editable and vice versa.
class lcl_event_receiver definition.
public section.
methods: catch_doubleclick
for event double_click of cl_gui_alv_grid
importing
e_column
es_row_no
sender.
endclass.
class lcl_event_receiver implementation.
method catch_doubleclick.
data: ls_outtab type gs_outtab,
ls_celltab type lvc_s_styl.
Function:
Switch between 'editable' and 'not editable' checkbox.
If the user clicked on another column there is
nothing to do.
if e_column-fieldname ne 'CHECKBOX'.
exit.
endif.
read table gt_outtab into ls_outtab index es_row_no-row_id.
The loop is only needed if there are other columns that
use checkboxes. At this point the loop could be
replaced by a READ of the first line of CELLTAB.
loop at ls_outtab-celltab into ls_celltab.
if ls_celltab-fieldname eq 'CHECKBOX'.
§B4.Switch the style to dis- or enable a cell for input
if ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
else.
ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
endif.
modify ls_outtab-celltab from ls_celltab.
endif.
endloop.
modify gt_outtab from ls_outtab index es_row_no-row_id.
call method sender->refresh_table_display.
endmethod.
endclass.
MAIN *
end-of-selection.
call screen 100.
MODULE PBO OUTPUT *
module pbo output.
set pf-status 'MAIN100'.
set titlebar 'MAIN100'.
if g_custom_container is initial.
perform create_and_init_alv.
endif.
endmodule.
MODULE PAI INPUT *
module pai input.
save_ok = ok_code.
clear ok_code.
case save_ok.
when 'EXIT'.
perform exit_program.
when 'SELECT'.
perform select_all_entries changing gt_outtab[].
when 'DESELECT'.
perform deselect_all_entries changing gt_outtab[].
when 'RESET'.
perform reset_selected_entries changing gt_outtab[].
when 'SWITCH'.
perform switch_activation changing gt_outtab[].
endcase.
endmodule.
FORM EXIT_PROGRAM *
form exit_program.
leave program.
endform.
*& Form BUILD_FIELDCAT
text
<--P_GT_FIELDCAT text
form build_fieldcat changing pt_fieldcat type lvc_t_fcat.
data ls_fcat type lvc_s_fcat.
call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_structure_name = 'SFLIGHT'
changing
ct_fieldcat = pt_fieldcat.
*§A2.Add an entry for the checkbox in the fieldcatalog
clear ls_fcat.
ls_fcat-fieldname = 'CHECKBOX'.
Essential: declare field as checkbox and
mark it as editable field:
ls_fcat-checkbox = 'X'.
ls_fcat-edit = 'X'.
do not forget to provide texts for this extra field
ls_fcat-coltext = text-f01.
ls_fcat-tooltip = text-f02.
ls_fcat-seltext = text-f03.
optional: set column width
ls_fcat-outputlen = 10.
append ls_fcat to pt_fieldcat.
endform.
*& Form CREATE_AND_INIT_ALV
text
<--P_GT_OUTTAB text
<--P_GT_FIELDCAT text
<--P_GS_LAYOUT text
form create_and_init_alv.
data: lt_exclude type ui_functions.
create object g_custom_container
exporting container_name = g_container.
create object g_grid
exporting i_parent = g_custom_container.
perform build_fieldcat changing gt_fieldcat.
Exclude all edit functions in this example since we do not need them:
perform exclude_tb_functions changing lt_exclude.
perform build_data.
*§ B3.Use the layout structure to aquaint additional field to ALV.
gs_layout-stylefname = 'CELLTAB'.
call method g_grid->set_table_for_first_display
exporting is_layout = gs_layout
it_toolbar_excluding = lt_exclude
changing it_fieldcatalog = gt_fieldcat
it_outtab = gt_outtab[].
create object g_event_receiver.
set handler g_event_receiver->catch_doubleclick for g_grid.
Set editable cells to ready for input initially
call method g_grid->set_ready_for_input
exporting
i_ready_for_input = 1.
endform. "CREATE_AND_INIT_ALV
*& Form EXCLUDE_TB_FUNCTIONS
text
<--P_LT_EXCLUDE text
form exclude_tb_functions changing pt_exclude type ui_functions.
data ls_exclude type ui_func.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_insert_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_move_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_cut.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_paste.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_paste_new_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_undo.
append ls_exclude to pt_exclude.
endform. " EXCLUDE_TB_FUNCTIONS
*& Form build_data
text
--> p1 text
<-- p2 text
form build_data.
data: lt_sflight type table of sflight,
ls_sflight type sflight,
ls_celltab type lvc_s_styl,
lt_celltab type lvc_t_styl,
l_index type i.
select * from sflight into table lt_sflight up to g_max rows.
if sy-subrc ne 0.
generate own entries if db-table is empty so that this example
still works
perform generate_entries changing lt_sflight.
endif.
*§A3.Optionally, check checkboxes initially after selecting data.
(Omitted in this example)
loop at lt_sflight into ls_sflight.
move-corresponding ls_sflight to gt_outtab.
if gt_outtab-connid eq '400'.
gt_outtab-checkbox = 'X'.
endif.
append gt_outtab.
endloop.
§B2.After selecting data,
assign a style for each row of your checkbox column.
Initially, set all checkbox cells editable.
ls_celltab-fieldname = 'CHECKBOX'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
loop at gt_outtab.
l_index = sy-tabix.
refresh lt_celltab.
ls_celltab-fieldname = 'CHECKBOX'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
insert ls_celltab into table lt_celltab.
insert lines of lt_celltab into table gt_outtab-celltab.
modify gt_outtab index l_index.
endloop.
endform. " build_data
*& Form generate_entries
text
<--P_LT_SLFIGHT text
form generate_entries changing pt_slfight type standard table.
This form is only needed for the case that there is no
data in database table SFLIGHT.
data: ls_sflight type sflight,
l_month(2) type c,
l_day(2) type c,
l_date(8) type c.
ls_sflight-carrid = 'LH'.
ls_sflight-connid = '0400'.
ls_sflight-currency = 'DEM'.
ls_sflight-planetype = '747-400'.
ls_sflight-seatsmax = 660.
do 110 times.
ls_sflight-price = sy-index * 100.
ls_sflight-seatsocc = 660 - sy-index * 6.
ls_sflight-paymentsum = ls_sflight-seatsocc * ls_sflight-price.
l_month = sy-index / 10 + 1.
do 2 times.
l_day = l_month + sy-index * 2.
l_date+0(4) = '2000'.
l_date4(2) = l_month0(2).
l_date6(2) = l_day0(2).
ls_sflight-fldate = l_date.
append ls_sflight to pt_slfight.
enddo.
enddo.
endform. " generate_entries
*& Form select_all_entries
text
<--P_GT_OUTTAB text
form select_all_entries changing pt_outtab type standard table.
data: ls_outtab type gs_outtab.
data: l_valid type c,
l_locked type c.
*§A4ad. Before you (a)set, reset or (d)evaluate checkboxes,
you must check the input cells.
If all entries are ok, ALV transferes new values to the output
table which you then can modify.
call method g_grid->check_changed_data
importing
e_valid = l_valid.
if l_valid eq 'X'.
loop at pt_outtab into ls_outtab.
perform check_lock using ls_outtab
changing l_locked.
if l_locked is initial
and not ls_outtab-checkbox eq '-'.
ls_outtab-checkbox = 'X'.
endif.
modify pt_outtab from ls_outtab.
endloop.
call method g_grid->refresh_table_display.
endif.
endform. " select_all_entries
*& Form deselect_all_entries
text
<--P_GT_OUTTAB[] text
form deselect_all_entries changing pt_outtab type standard table.
data: ls_outtab type gs_outtab.
data: l_valid type c,
l_locked type c.
*§A4ad. Before you (a)set, reset or (d)evaluate checkboxes,
you must check the input cells.
If all entries are ok, ALV transferes new values to the output
table which you then can modify.
call method g_grid->check_changed_data
importing
e_valid = l_valid.
if l_valid eq 'X'.
loop at pt_outtab into ls_outtab.
perform check_lock using ls_outtab
changing l_locked.
if l_locked is initial
and not ls_outtab-checkbox eq '-'.
ls_outtab-checkbox = ' '.
endif.
modify pt_outtab from ls_outtab.
endloop.
call method g_grid->refresh_table_display.
endif.
endform. " deselect_all_entries
*& Form reset_selected_entries
text
<--P_GT_OUTTAB[] text
form reset_selected_entries changing pt_outtab type standard table.
data: ls_outtab type gs_outtab.
data: l_valid type c.
*§A4b. Before you set, (b)reset or evaluate checkboxes,
you must check the input cells.
If all entries are ok, ALV transferes new values to the output
table which you then can modify.
call method g_grid->check_changed_data
importing
e_valid = l_valid.
if l_valid eq 'X'.
loop at pt_outtab into ls_outtab.
if not ls_outtab-checkbox is initial
and not ls_outtab-checkbox eq '-'.
clear ls_outtab.
modify pt_outtab from ls_outtab.
endif.
endloop.
call method g_grid->refresh_table_display.
endif.
endform. " reset_selected_entries
form switch_activation changing pt_outtab type standard table.
data: ls_outtab type gs_outtab.
data: l_valid type c,
lt_row_no type lvc_t_roid with header line.
*§A4c. Before you set, reset, (c)(de)activate
or evaluate checkboxes, you must check the input cells.
If all entries are ok, ALV transferes new values to the output
table which you then can modify.
call method g_grid->check_changed_data
importing
e_valid = l_valid.
if l_valid eq 'X'.
call method g_grid->get_selected_rows
importing
et_row_no = lt_row_no[].
loop at lt_row_no.
read table pt_outtab into ls_outtab index lt_row_no-row_id.
if ls_outtab-checkbox ne '-'.
ls_outtab-checkbox = '-'.
else.
ls_outtab-checkbox = ' '.
endif.
modify pt_outtab from ls_outtab index lt_row_no-row_id.
endloop.
call method g_grid->refresh_table_display.
endif.
endform. " switch_activation
*& Form check_lock
text
-->P_LS_OUTTAB text
<--P_L_LOCKED text
form check_lock using ps_outtab type gs_outtab
changing p_locked.
data ls_celltab type lvc_s_styl.
loop at ps_outtab-celltab into ls_celltab.
if ls_celltab-fieldname = 'CHECKBOX'.
if ls_celltab-style eq cl_gui_alv_grid=>mc_style_disabled.
p_locked = 'X'.
else.
p_locked = space.
endif.
endif.
endloop.
endform. " check_lock -
Can I get a sample program of ALV (oops) with check boxes in it. thank you.
Types: begin of lt_io.
include structure mara. " Your Structure
Types: style_table type lvc_t_style.
Types: end of lt_io.
data: lt_io type table of lt_io,
ls_layout type lvc_s_layo,
lt_fcat type lvc_t_fcat,
lo_grid type ref to cl_gui_alv_grid.
field-symbols: <io> type lt_io,
<fcat> type lvc_s_fcat.
... fill your output table ....
ls_layout-stylefname = 'STYLE_TABLE'.
loop at lt_io assigning <io>.
PERFORM set_style USING 'CHECKBOX' "Your Filename
CHANGING <io>.
endloop.
... Fill Your Field Catalog lt_fcat
read table lt_fcat assigning <fcat>
where fieldname = 'CHECKBOX'.
<fcat>-checkbox = 'X'.
create grid control lo_grid.
CALL METHOD lo_grid->set_table_for_first_display
EXPORTING
is_layout = ls_layout
CHANGING
it_fieldcatalog = lt_fcat
it_outtab = lt_io[].
FORM set_button_to_line
USING iv_fieldname TYPE lvc_fname
CHANGING cs_io TYPE io.
DATA: ls_style TYPE lvc_s_styl,
lt_style TYPE lvc_t_styl.
ls_style-fieldname = iv_fieldname.
if cs_io-checkbox = ' '.
ls_style-style = cl_gui_alv_grid=>mc_style_enabled.
else.
ls_style-style = cl_gui_alv_grid=>mc_style_disabled.
endif.
ls_style-maxlen = 2.
INSERT ls_style INTO TABLE io-style_table.
ENDFORM. "set_icon_to_status_line
[/code].
A classical report is a program that generates a single list, which must contain all of the required detail information.
1) This procedure may result in extensive lists from which the user has to pick the relevant data.
2) For background processing, this is the only possible method. After starting a background job, there is no way of influencing the program.
3) The desired selections must be made beforehand and the list must provide detailed information.
4) For dialog sessions, there are no such restrictions.
5) The user is present during the execution of the program and can control and manipulate the program flow directly.
6) To be able to use all advantages of the online environment, classical reporting was developed into interactive reporting.
ALV is Application List viewer. Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length. In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output. The report output can contain up to 90 columns in the display with the wide array of display options.
Advantages.
Collapse multiple reports into one, drastically cutting down your report development time
Save many hours using built-in ALV sorting, subtotaling and filtering capabilities
Add conditional structures into your ALV report: No programming required!
Combine ALV with display variants to meet a wide range of reporting requirements more easily
Dynamically reorder column layouts and add/subtract fields
Enable users and analysts to save their own personalized variants
All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.
1. SIMPLE REPORT.
The important function modules are
a. Reuse_alv_list_display
b. Reuse_alv_fieldcatalog_merge
c. Reuse_alv_events_get
d. Reuse_alv_commentary_write
e. Reuse_alv_grid_display
A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.
The important parameters are :
I. Export :
i. I_callback_program : report id
ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status
iii. I_callback_user_command : routine where the function codes are handled
iv. I_structure name : name of the dictionary table
v. Is_layout : structure to set the layout of the report
vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE
vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.
II. Tables :
i. t_outtab : internal table with the data to be output
B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
The Important Parameters are :
I. Export :
i. I_program_name : report id
ii. I_internal_tabname : the internal output table
iii. I_inclname : include or the report name where all the dynamic forms are handled.
II Changing
ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is
declared in the type pool SLIS.
C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type
Parameters :
I. Import :
Et_Events : The event table is returned with all possible CALLBACK events
for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV.
II. Export :
I_List_type :
0 = simple list REUSE_ALV_LIST_DISPLAY
1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY
2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND
3 = hierarchical-sequential block list
REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.
Parameters :
I. it_list_commentary : internal table with the headings of the type slis_t_listheader.
This internal table has three fields :
Typ : H header, S selection , A - action
Key : only when typ is S.
Info : the text to be printed
E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.
Parameters : same as reuse_alv_list_display
This is an example for simple list.
2. BLOCK REPORT
This is used to have multiple lists continuously.
The important functions used in this report are:
A. REUSE_ALV_BLOCK_LIST_INIT
B. REUSE_ALV_BLOCK_LIST_APPEND
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_BLOCK_LIST_DISPLAY
A. REUSE_ALV_BLOCK_LIST_INIT
Parameters:
I. I_CALLBACK_PROGRAM
II. I_CALLBACK_PF_STATUS_SET
III. I_CALLBACK_USER_COMMAND
This function module is used to set the default gui status etc.
B. REUSE_ALV_BLOCK_LIST_APPEND
Parameters :
Export :
I. is_layout : layout settings for block
II. it_fieldcat : field catalog
III. i_tabname : internal table name with output data
IV. it_events : internal table with all possible events
Tables :
i. t_outtab : internal table with output data.
This function module adds the data to the block.
Repeat this function for all the different blocks to be displayed one after the other.
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
This function module is used for hierarchical sequential blocks.
D. REUSE_ALV_BLOCK_LIST_DISPLAY
Parameters : All the parameters are optional.
This function module display the list with data appended by the above function.
Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.
3. Hierarchical reports :
Hierarchical sequential list output.
The function module is
A. REUSE_ALV_HIERSEQ_LIST_DISPLAY
Parameters:
I. Export:
i. I_CALLBACK_PROGRAM
ii. I_CALLBACK_PF_STATUS_SET
iii. I_CALLBACK_USER_COMMAND
iv. IS_LAYOUT
v. IT_FIELDCAT
vi. IT_EVENTS
vii. i_tabname_header : Name of the internal table in the program containing the
output data of the highest hierarchy level.
viii. i_tabname_item : Name of the internal table in the program containing the
output data of the lowest hierarchy level.
ix. is_keyinfo : This structure contains the header and item table field
names which link the two tables (shared key).
II. Tables
i. t_outtab_header : Header table with data to be output
ii. t_outtab_item : Name of the internal table in the program containing the
output data of the lowest hierarchy level.
slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using REUSE_ALV_FIELDCATALOG_MERGE.
Important Attributes :
A. col_pos : position of the column
B. fieldname : internal fieldname
C. tabname : internal table name
D. ref_fieldname : fieldname (dictionary)
E. ref_tabname : table (dictionary)
F. key(1) : column with key-color
G. icon(1) : icon
H. symbol(1) : symbol
I. checkbox(1) : checkbox
J. just(1) : (R)ight (L)eft (C)ent.
K. do_sum(1) : sum up
L. no_out(1) : (O)blig.(X)no out
M. outputlen : output length
N. seltext_l : long key word
O. seltext_m : middle key word
P. seltext_s : short key word
Q. reptext_ddic : heading (ddic)
R. ddictxt(1) : (S)hort (M)iddle (L)ong
S. datatype : datatype
T. hotspot(1) : hotspot
declarations for spl.group.
GT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV
GT_SORT TYPE SLIS_T_SORTINFO_ALV, "for sort
DATA: LS_SORT TYPE SLIS_SORTINFO_ALV.
CLEAR LS_SORT.
LS_SORT-FIELDNAME = 'FIELD1'.
LS_SORT-SPOS = 1.
LS_SORT-UP = 'X'.
ls_sort-subtot = 'X'. "subtotal
APPEND LS_SORT TO E06_LT_SORT.
APPEND LS_SORT TO E06_LT_SORT.
LS_SORT-FIELDNAME = 'FIELD2'.
LS_SORT-SPOS = 2.
LS_SORT-UP = 'X'.
ls_sort-subtot = 'X'. "subtotal
APPEND LS_SORT TO E06_LT_SORT.
for creating the group..
DATA: LS_SP_GROUP TYPE SLIS_SP_GROUP_ALV.
CLEAR LS_SP_GROUP.
LS_SP_GROUP-SP_GROUP = 'A'.
LS_SP_GROUP-TEXT = TEXT-005.
APPEND LS_SP_GROUP TO E07_LT_SP_GROUP.
and pass this info to FM...
layout-sUBTOTALS_TEXT = 'SUbt...'
and pass spl group info to fieldcatalog also...
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = GT_FIELDCAT[]
IT_SPECIAL_GROUPS = GT_SP_GROUP[]
IT_SORT = GT_SORT[]
TYPES :
BEGIN OF ty_vbak,
vkorg TYPE vbak-vkorg, " Sales organization
kunnr TYPE vbak-kunnr, " Sold-to party
vbeln TYPE vbak-vbeln, " Sales document
netwr TYPE vbak-netwr, " Net Value of the Sales Order
waerk TYPE vbak-waerk, " Document currency
END OF ty_vbak.
DATA:
vbak TYPE vbak,
gt_vbak TYPE TABLE OF ty_vbak.
SELECT-OPTIONS :
s_vkorg FOR vbak-vkorg, " Sales organization
s_kunnr FOR vbak-kunnr, " Sold-to party
s_vbeln FOR vbak-vbeln. " Sales document
SELECTION-SCREEN :
SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max.
PARAMETERS p_max(2) TYPE n DEFAULT '20' OBLIGATORY.
SELECTION-SCREEN END OF LINE.
INITIALIZATION.
v_1 = 'Maximum of records to read'.
START-OF-SELECTION.
PERFORM f_read_data.
PERFORM f_display_data.
Form f_read_data
FORM f_read_data.
SELECT vkorg kunnr vbeln netwr waerk
UP TO p_max ROWS
INTO TABLE gt_vbak
FROM vbak
WHERE kunnr IN s_kunnr
AND vbeln IN s_vbeln
AND vkorg IN s_vkorg.
ENDFORM. " F_READ_DATA
Form f_display_data
FORM f_display_data.
TYPE-POOLS: slis. " ALV Global types
DEFINE m_fieldcat.
add 1 to ls_fieldcat-col_pos.
ls_fieldcat-fieldname = &1.
ls_fieldcat-ref_tabname = 'VBAK'.
ls_fieldcat-do_sum = &2.
ls_fieldcat-cfieldname = &3.
append ls_fieldcat to lt_fieldcat.
END-OF-DEFINITION.
DEFINE m_sort.
add 1 to ls_sort-spos.
ls_sort-fieldname = &1.
ls_sort-up = 'X'.
ls_sort-subtot = &2.
append ls_sort to lt_sort.
END-OF-DEFINITION.
DATA:
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv,
lt_sort TYPE slis_t_sortinfo_alv,
ls_sort TYPE slis_sortinfo_alv,
ls_layout TYPE slis_layout_alv.
m_fieldcat 'VKORG' '' ''.
m_fieldcat 'KUNNR' '' ''.
m_fieldcat 'VBELN' '' ''.
m_fieldcat 'NETWR' 'X' 'WAERK'.
m_fieldcat 'WAERK' '' ''.
m_sort 'VKORG' 'X'. " Sort by vkorg and subtotal
m_sort 'KUNNR' 'X'. " Sort by kunnr and subtotal
m_sort 'VBELN' ''. " Sort by vbeln
ls_layout-cell_merge = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
is_layout = ls_layout
it_fieldcat = lt_fieldcat
it_sort = lt_sort
TABLES
t_outtab = gt_vbak.
ENDFORM.
Check out these sample programs
BCALV_GRID_01
This program illustrates how the events for print processing PRINT_TOP_OF_PAGE,
PRINT_END_OF_PAGE, PRINT_TOP_OF_LIST,PRINT_END_OF_LIST are handled. The
corresponding handler methods control the appearance of the list printed.
BCALV_GRID_02
Show a detail list in an amodal window. There is no second dynro needed in contrast to
BCALV_GRID_03.
BCALV_GRID_03
This program implements a function on event DOUBLE_CLICK. According to the selected line data
from table SBOOK is selected and displayed by a second ALV Control in a dialog dynpro.
BCALV_GRID_04
Illustrates the use of exceptions (lights or leds). According to the values of SFLIGHT-SEATSOCC, the
lights are set to 1 (red), 2 (yellow) or 3 (green).
BCALV_GRID_05
Demonstrate the creation of an own toolbar button.
BCALV_GRID_06
Demonstrate the creation of an own context menu.
BCALV_GRID_07
Append a menu button to the standard toolbar.
BCALV_GRID_08
Append a menu with default button to the standard toolbar. It is exactly the same as
BCALVC_TB_WITH_MENU except for methods HANDLE_MENU_BUTTON and HANDLE_TOOLBAR.
Editable ALV grids
BCALV_EDIT_01
This report illustrates the simplest case of using an editable/noneditable ALV Grid Control.
BCALV_EDIT_02
This report illustrates how to set chosen cells of an ALV Grid Control editable.
BCALV_EDIT_03
In this example the user may change values of fields SEATSOCC (occupied seats) and/or PLANETYPE.
The report checks the input value(s) semantically and provides protocol messages in case of error
BCALV_EDIT_04
This report illustrates how to add and remove lines to a table using the ALV Grid Control and how to
implement the saving of the new data.
BCALV_EDIT_05
This example shows how to use checkboxes within an ALV Grid Control. You learn:
(1) how to define a column for editable checkboxes for an attribute of your list
(2) how to evaluate the checked checkboxes
(3) how to switch between editable and non-editable checkboxes
BCALV_EDIT_06
This example shows how to define a dropdown listbox for all cells of one column in an editable ALV
Grid Control.
BCALV_EDIT_07
This example shows how to define dropdown listboxes for particular cells of your output table.
BCALV_EDIT_08
This report implements an ALV Grid Control with an application specific F4 help. The following aspects
are dealt with:
(1) how to replace the standard f4 help
(2) how to pass the selected value to the ALV Grid Control
(3) how to build an f4 help, whose value range depend on a value of another cell.
Check this link tooo
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/07/23/oopsALVin+ABAP&showComments=true
The ALV Grid Control is a tool with which you can output non-hierarchical lists in a
standardized format. The list data is displayed as a table on the screen.
The ALV Grid Control offers a range of interactive standard list functions that users need
frequently (find, sort, filter, calculate totals and subtotals, print, print preview, send list,
export list (in different formats), and so on. These functions are implemented in the
proxy object class. You as the programmer have the possibility to turn off functions not
needed. In most cases the implementations of the standard functions provided by the
control are sufficient. However, if required, you can adjust these implementations to
meet application-specific needs.
You can add self-defined functions to the toolbar, if necessary.
The ALV Grid Control allows users to adjust the layout of lists to meet their individual
requirements (for example, they can swap columns, hide columns, set filters for the
data to be displayed, calculate totals, and so on). The settings (list customizing) made
by a specific user are called a display variant. Display variants can be saved on a userspecific
or on a global basis. If such display variants exist for a list, they can be offered
to the user for selection. If a display variant is set as the default variant, the associated
list is always displayed based on the settings of this variant.
2. REUSE_ALV_LIST_DISPLAY
REUSE_ALV_GRID_DISPLAY
REUSE_ALV_FIELDCATALOG_MERGE
REUSE_ALV_COMMENTARY_WRITE
3. Use of Field Catalog is to determines the technical properties & add formating information of the column.
6. all the definition of internal table, structure, constants are declared in a type-pool called SLIS.
7.fieldcat-fieldname
fieldcat-ref_fieldname
fieldcat-tabname
fieldcat-seltext_m
5. Form user_command using r_ucomm like sy-ucomm rs_selfield type slis_selfield.
Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length.
In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output.
The report output can contain up to 90 columns in the display with the wide array of display options.
The commonly used ALV functions used for this purpose are;
1. REUSE_ALV_VARIANT_DEFAULT_GET
2. REUSE_ALV_VARIANT_F4
3. REUSE_ALV_VARIANT_EXISTENCE
4. REUSE_ALV_EVENTS_GET
5. REUSE_ALV_COMMENTARY_WRITE
6. REUSE_ALV_FIELDCATALOG_MERGE
7. REUSE_ALV_LIST_DISPLAY
8. REUSE_ALV_GRID_DISPLAY
9. REUSE_ALV_POPUP_TO_SELECT
Purpose of the above Functions are differ not all the functions are required in all the ALV Report.
But either no.7 or No.8 is there in the Program.
How you call this function in your report?
After completion of all the data fetching from the database and append this data into an Internal Table. say I_ITAB.
Then use follwing function module.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = 'Prog.name'
I_STRUCTURE_NAME = 'I_ITAB'
I_DEFAULT = 'X'
I_SAVE = 'A'
TABLES
T_OUTTAB = I_ITAB.
IF SY-SUBRC <> 0.
WRITE: 'SY-SUBRC: ', SY-SUBRC .
ENDIF.
ENDFORM. " GET_FINAL_DATA
The object F_IT_ALV has a field, the activity ACTVT, which can
contain four permitted values: 01, 02, 03 and 70. Each of the
activities 01, 02 and 70 controls the availability of particular
functions (in the menu and the toolbar) of the ALV line item list:
a) 01: "Settings -> Display variant -> Save..."
b) 02: "Settings -> Display variant -> Current..." and
"Settings -> Display variant -> Current header rows "
c) 70: "Settings -> Display variant -> Administration..."
Activity 03 corresponds to the minimum authorization, which is the
most restricted one: The user can only select layouts which have
been configured already. In particular, all of the other functions
named above are inactive with activity 03.
Now if you want to permit a user to change the column selection and
the headers as well as to save the layout thus created, for example,
but if you do not want to permit the user to administrate the
layouts, you grant him or her the authorization for activities 01
and 02.
Check this link it will be mosty usefull for u
http://www.sap-img.com/fu017.htm
check this link
http://abapprogramming.blogspot.com/
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5dc3e690-0201-0010-1ebf-b85b3bed962d
Changing width of a custom container dynamically
Display Page numbers in ALV
Insert picture in selection screen.
Logo in OO ALV Grid
check these links
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
Try these links
Simple ALV report
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
For More alv report examples check these Tcodes LIBS, BIBS Here u can find more number of examples on alv reports of different kinds
check this sample code for intercative alv report
TYPE-POOLS: SLIS.
*type declaration for values from ekko
TYPES: BEGIN OF I_EKKO,
EBELN LIKE EKKO-EBELN,
AEDAT LIKE EKKO-AEDAT,
BUKRS LIKE EKKO-BUKRS,
BSART LIKE EKKO-BSART,
LIFNR LIKE EKKO-LIFNR,
END OF I_EKKO.
DATA: IT_EKKO TYPE STANDARD TABLE OF I_EKKO INITIAL SIZE 0,
WA_EKKO TYPE I_EKKO.
*type declaration for values from ekpo
TYPES: BEGIN OF I_EKPO,
EBELN LIKE EKPO-EBELN,
EBELP LIKE EKPO-EBELP,
MATNR LIKE EKPO-MATNR,
MENGE LIKE EKPO-MENGE,
MEINS LIKE EKPO-MEINS,
NETPR LIKE EKPO-NETPR,
END OF I_EKPO.
DATA: IT_EKPO TYPE STANDARD TABLE OF I_EKPO INITIAL SIZE 0,
WA_EKPO TYPE I_EKPO .
*variable for Report ID
DATA: V_REPID LIKE SY-REPID .
*declaration for fieldcatalog
DATA: I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
DATA: IT_LISTHEADER TYPE SLIS_T_LISTHEADER.
declaration for events table where user comand or set PF status will
be defined
DATA: V_EVENTS TYPE SLIS_T_EVENT,
WA_EVENT TYPE SLIS_ALV_EVENT.
declartion for layout
DATA: ALV_LAYOUT TYPE SLIS_LAYOUT_ALV.
declaration for variant(type of display we want)
DATA: I_VARIANT TYPE DISVARIANT,
I_VARIANT1 TYPE DISVARIANT,
I_SAVE(1) TYPE C.
*PARAMETERS : p_var TYPE disvariant-variant.
*Title displayed when the alv list is displayed
DATA: I_TITLE_EKKO TYPE LVC_TITLE VALUE 'FIRST LIST DISPLAYED'.
DATA: I_TITLE_EKPO TYPE LVC_TITLE VALUE 'SECONDRY LIST DISPLAYED'.
INITIALIZATION.
V_REPID = SY-REPID.
PERFORM BUILD_FIELDCATLOG.
PERFORM EVENT_CALL.
PERFORM POPULATE_EVENT.
START-OF-SELECTION.
PERFORM DATA_RETRIEVAL.
PERFORM BUILD_LISTHEADER USING IT_LISTHEADER.
PERFORM DISPLAY_ALV_REPORT.
*& Form BUILD_FIELDCATLOG
Fieldcatalog has all the field details from ekko
FORM BUILD_FIELDCATLOG.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'EBELN'.
WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'AEDAT'.
WA_FIELDCAT-SELTEXT_M = 'DATE.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'BUKRS'.
WA_FIELDCAT-SELTEXT_M = 'COMPANY CODE'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'BUKRS'.
WA_FIELDCAT-SELTEXT_M = 'DOCMENT TYPE'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'LIFNR'.
WA_FIELDCAT-NO_OUT = 'X'.
WA_FIELDCAT-SELTEXT_M = 'VENDOR CODE'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
ENDFORM. "BUILD_FIELDCATLOG
*& Form EVENT_CALL
we get all events - TOP OF PAGE or USER COMMAND in table v_events
FORM EVENT_CALL.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = V_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "EVENT_CALL
*& Form POPULATE_EVENT
Events populated for TOP OF PAGE & USER COMAND
FORM POPULATE_EVENT.
READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'TOP_OF_PAGE'.
MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-FORM.
ENDIF.
READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'USER_COMMAND'.
MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-NAME.
ENDIF.
ENDFORM. "POPULATE_EVENT
*& Form data_retrieval
retreiving values from the database table ekko
FORM DATA_RETRIEVAL.
SELECT EBELN AEDAT BUKRS BSART LIFNR FROM EKKO INTO TABLE IT_EKKO.
ENDFORM. "data_retrieval
*& Form bUild_listheader
text
-->I_LISTHEADEtext
FORM BUILD_LISTHEADER USING I_LISTHEADER TYPE SLIS_T_LISTHEADER.
DATA HLINE TYPE SLIS_LISTHEADER.
HLINE-INFO = 'this is my first alv pgm'.
HLINE-TYP = 'H'.
ENDFORM. "build_listheader
*& Form display_alv_report
text
FORM DISPLAY_ALV_REPORT.
V_REPID = SY-REPID.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = V_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_GRID_TITLE = I_TITLE_EKKO
I_GRID_SETTINGS =
IS_LAYOUT = ALV_LAYOUT
IT_FIELDCAT = I_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
i_default = 'ZLAY1'
I_SAVE = 'A'
is_variant = i_variant
IT_EVENTS = V_EVENTS
TABLES
T_OUTTAB = IT_EKKO
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "display_alv_report
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_LISTHEADER
i_logo =
I_END_OF_LIST_GRID =
ENDFORM. "TOP_OF_PAGE
*& Form USER_COMMAND
text
-->R_UCOMM text
-->, text
-->RS_SLEFIELDtext
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN '&IC1'.
READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.
PERFORM BUILD_FIELDCATLOG_EKPO.
PERFORM EVENT_CALL_EKPO.
PERFORM POPULATE_EVENT_EKPO.
PERFORM DATA_RETRIEVAL_EKPO.
PERFORM BUILD_LISTHEADER_EKPO USING IT_LISTHEADER.
PERFORM DISPLAY_ALV_EKPO.
ENDCASE.
ENDFORM. "user_command
*& Form BUILD_FIELDCATLOG_EKPO
text
FORM BUILD_FIELDCATLOG_EKPO.
WA_FIELDCAT-TABNAME = 'IT_EKPO'.
WA_FIELDCAT-FIELDNAME = 'EBELN'.
WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKPO'.
WA_FIELDCAT-FIELDNAME = 'EBELP'.
WA_FIELDCAT-SELTEXT_M = 'LINE NO'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'I_EKPO'.
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-SELTEXT_M = 'MATERIAL NO.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'I_EKPO'.
WA_FIELDCAT-FIELDNAME = 'MENGE'.
WA_FIELDCAT-SELTEXT_M = 'QUANTITY'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'I_EKPO'.
WA_FIELDCAT-FIELDNAME = 'MEINS'.
WA_FIELDCAT-SELTEXT_M = 'UOM'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'I_EKPO'.
WA_FIELDCAT-FIELDNAME = 'NETPR'.
WA_FIELDCAT-SELTEXT_M = 'PRICE'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
ENDFORM. "BUILD_FIELDCATLOG_EKPO
*& Form event_call_ekpo
we get all events - TOP OF PAGE or USER COMMAND in table v_events
FORM EVENT_CALL_EKPO.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = V_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH -
Regard check box concept in alv grid display
HI Friends,
i am displaying the sales order details with check box. so my first field is checkbox. When user click on check box then he press the details icon.
my question i need a logic for calling the tcode based on the vbeln when it is cheked.
thanks in advance.
Regards,
Purna.hi,
go through this program
program bcalv_edit_05.
Purpose:
~~~~~~~~
This example shows how to use checkboxes within an ALV Grid Control.
You learn:
o how to define a column for editable checkboxes for an attribute
of your list (see also remark below)
o how to evaluate the checked checkboxes
o how to switch between editable and non-editable checkboxes
Important Remark
~~~~~~~~~~~~~~~~
The checkbox functionality has been replaced by selection buttons
in front of each row (field SEL_MODE of the layout structure
set to 'A' or 'D'; when using the editable ALV Grid Control,
these selection buttons are always visible).
Class methods like GET_SELECTED_ROWS work only for this new
functionality and not for checkboxes.
Thus checkboxes should not be used for line selection but for
a column as an additional or for an already existing attribute
(like field SMOKER in SBOOK).
To check program behavior
~~~~~~~~~~~~~~~~~~~~~~~~~
Try out the functions displayed in the application toolbar:
o The first sets all checked lines to initial values.
(see form reset_selected_entries)
o The seconds marks all checkboxes that are input enabled
o The third unmarks all checkboxes that are input enabled
o To try the forth, you have to select a line first using
the selection buttons on the left.
The function deactivates/activates a checkbox.
Checkboxes may be locked/unlocked using a double click on the
checkbox cell.
Essential steps (search for '§')
~~~~~~~~~~~~~~~
This example focusses on two aspects of checkboxes in an
editable ALV Grid Control:
A How to integrate, set, reset and evaluate checkboxes
B What you must do to lock particular checkboxes against input
A) Integrate, set, reset and evaluate checkboxes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A1.Extend your output table by a checkbox field.
A2.Add an entry for the checkbox in the fieldcatalog
A3.Optionally, check checkboxes initially after selecting data.
A4.Before you (a)set, (b)reset, (c)(de)activate or
(d)evaluate checkboxes, you must check the input cells.
B) Lock particular checkboxes against input
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
B1.Extend your output table by a field to dis- or enable
cells for input.
B2.After selecting data,
assign a style for each row of your checkbox column.
B3.Use the layout structure to aquaint additional field to ALV.
B4.Switch the style to dis- or enable a cell for input
class lcl_event_receiver definition deferred. "for event handling
data: ok_code like sy-ucomm,
save_ok like sy-ucomm,
g_container type scrfname value 'BCALV_GRID_DEMO_0100_CONT1',
g_grid type ref to cl_gui_alv_grid,
g_custom_container type ref to cl_gui_custom_container,
g_event_receiver type ref to lcl_event_receiver,
gt_fieldcat type lvc_t_fcat,
gs_layout type lvc_s_layo,
g_max type i value 100.
*§A1.Extend your output table by a checkbox field.
If you do not want to lock sole checkboxes against input
you do not need field 'celltab'.
types: begin of gs_outtab.
types: checkbox type c. "field for checkbox
§B1.Extend your output table by a field to dis- or enable
cells for input.
types: celltab type lvc_t_styl. "field to switch editability
include structure sflight.
types: end of gs_outtab.
data: gt_outtab type gs_outtab occurs 0 with header line.
LOCAL CLASSES
This local class only handles event DOUBLE_CLICK.
Wenn the user double clicks on a checkbox cell the status of
this cell is switched from editable to not editable and vice versa.
class lcl_event_receiver definition.
public section.
methods: catch_doubleclick
for event double_click of cl_gui_alv_grid
importing
e_column
es_row_no
sender.
endclass.
class lcl_event_receiver implementation.
method catch_doubleclick.
data: ls_outtab type gs_outtab,
ls_celltab type lvc_s_styl.
Function:
Switch between 'editable' and 'not editable' checkbox.
If the user clicked on another column there is
nothing to do.
if e_column-fieldname ne 'CHECKBOX'.
exit.
endif.
read table gt_outtab into ls_outtab index es_row_no-row_id.
The loop is only needed if there are other columns that
use checkboxes. At this point the loop could be
replaced by a READ of the first line of CELLTAB.
loop at ls_outtab-celltab into ls_celltab.
if ls_celltab-fieldname eq 'CHECKBOX'.
§B4.Switch the style to dis- or enable a cell for input
if ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
else.
ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
endif.
modify ls_outtab-celltab from ls_celltab.
endif.
endloop.
modify gt_outtab from ls_outtab index es_row_no-row_id.
call method sender->refresh_table_display.
endmethod.
endclass.
MAIN *
end-of-selection.
call screen 100.
MODULE PBO OUTPUT *
module pbo output.
set pf-status 'MAIN100'.
set titlebar 'MAIN100'.
if g_custom_container is initial.
perform create_and_init_alv.
endif.
endmodule.
MODULE PAI INPUT *
module pai input.
save_ok = ok_code.
clear ok_code.
case save_ok.
when 'EXIT'.
perform exit_program.
when 'SELECT'.
perform select_all_entries changing gt_outtab[].
when 'DESELECT'.
perform deselect_all_entries changing gt_outtab[].
when 'RESET'.
perform reset_selected_entries changing gt_outtab[].
when 'SWITCH'.
perform switch_activation changing gt_outtab[].
endcase.
endmodule.
FORM EXIT_PROGRAM *
form exit_program.
leave program.
endform.
*& Form BUILD_FIELDCAT
text
<--P_GT_FIELDCAT text
form build_fieldcat changing pt_fieldcat type lvc_t_fcat.
data ls_fcat type lvc_s_fcat.
call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_structure_name = 'SFLIGHT'
changing
ct_fieldcat = pt_fieldcat.
*§A2.Add an entry for the checkbox in the fieldcatalog
clear ls_fcat.
ls_fcat-fieldname = 'CHECKBOX'.
Essential: declare field as checkbox and
mark it as editable field:
ls_fcat-checkbox = 'X'.
ls_fcat-edit = 'X'.
do not forget to provide texts for this extra field
ls_fcat-coltext = text-f01.
ls_fcat-tooltip = text-f02.
ls_fcat-seltext = text-f03.
optional: set column width
ls_fcat-outputlen = 10.
append ls_fcat to pt_fieldcat.
endform.
*& Form CREATE_AND_INIT_ALV
text
<--P_GT_OUTTAB text
<--P_GT_FIELDCAT text
<--P_GS_LAYOUT text
form create_and_init_alv.
data: lt_exclude type ui_functions.
create object g_custom_container
exporting container_name = g_container.
create object g_grid
exporting i_parent = g_custom_container.
perform build_fieldcat changing gt_fieldcat.
Exclude all edit functions in this example since we do not need them:
perform exclude_tb_functions changing lt_exclude.
perform build_data.
*§ B3.Use the layout structure to aquaint additional field to ALV.
gs_layout-stylefname = 'CELLTAB'.
call method g_grid->set_table_for_first_display
exporting is_layout = gs_layout
it_toolbar_excluding = lt_exclude
changing it_fieldcatalog = gt_fieldcat
it_outtab = gt_outtab[].
create object g_event_receiver.
set handler g_event_receiver->catch_doubleclick for g_grid.
Set editable cells to ready for input initially
call method g_grid->set_ready_for_input
exporting
i_ready_for_input = 1.
endform. "CREATE_AND_INIT_ALV
*& Form EXCLUDE_TB_FUNCTIONS
text
<--P_LT_EXCLUDE text
form exclude_tb_functions changing pt_exclude type ui_functions.
data ls_exclude type ui_func.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_insert_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_move_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_cut.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_paste.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_paste_new_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_undo.
append ls_exclude to pt_exclude.
endform. " EXCLUDE_TB_FUNCTIONS
*& Form build_data
text
--> p1 text
<-- p2 text
form build_data.
data: lt_sflight type table of sflight,
ls_sflight type sflight,
ls_celltab type lvc_s_styl,
lt_celltab type lvc_t_styl,
l_index type i.
select * from sflight into table lt_sflight up to g_max rows.
if sy-subrc ne 0.
generate own entries if db-table is empty so that this example
still works
perform generate_entries changing lt_sflight.
endif.
*§A3.Optionally, check checkboxes initially after selecting data.
(Omitted in this example)
loop at lt_sflight into ls_sflight.
move-corresponding ls_sflight to gt_outtab.
if gt_outtab-connid eq '400'.
gt_outtab-checkbox = 'X'.
endif.
append gt_outtab.
endloop.
§B2.After selecting data,
assign a style for each row of your checkbox column.
Initially, set all checkbox cells editable.
ls_celltab-fieldname = 'CHECKBOX'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
loop at gt_outtab.
l_index = sy-tabix.
refresh lt_celltab.
ls_celltab-fieldname = 'CHECKBOX'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
insert ls_celltab into table lt_celltab.
insert lines of lt_celltab into table gt_outtab-celltab.
modify gt_outtab index l_index.
endloop.
endform. " build_data
*& Form generate_entries
text
<--P_LT_SLFIGHT text
form generate_entries changing pt_slfight type standard table.
This form is only needed for the case that there is no
data in database table SFLIGHT.
data: ls_sflight type sflight,
l_month(2) type c,
l_day(2) type c,
l_date(8) type c.
ls_sflight-carrid = 'LH'.
ls_sflight-connid = '0400'.
ls_sflight-currency = 'DEM'.
ls_sflight-planetype = '747-400'.
ls_sflight-seatsmax = 660.
do 110 times.
ls_sflight-price = sy-index * 100.
ls_sflight-seatsocc = 660 - sy-index * 6.
ls_sflight-paymentsum = ls_sflight-seatsocc * ls_sflight-price.
l_month = sy-index / 10 + 1.
do 2 times.
l_day = l_month + sy-index * 2.
l_date+0(4) = '2000'.
l_date4(2) = l_month0(2).
l_date6(2) = l_day0(2).
ls_sflight-fldate = l_date.
append ls_sflight to pt_slfight.
enddo.
enddo.
endform. " generate_entries
*& Form select_all_entries
text
<--P_GT_OUTTAB text
form select_all_entries changing pt_outtab type standard table.
data: ls_outtab type gs_outtab.
data: l_valid type c,
l_locked type c.
*§A4ad. Before you (a)set, reset or (d)evaluate checkboxes,
you must check the input cells.
If all entries are ok, ALV transferes new values to the output
table which you then can modify.
call method g_grid->check_changed_data
importing
e_valid = l_valid.
if l_valid eq 'X'.
loop at pt_outtab into ls_outtab.
perform check_lock using ls_outtab
changing l_locked.
if l_locked is initial
and not ls_outtab-checkbox eq '-'.
ls_outtab-checkbox = 'X'.
endif.
modify pt_outtab from ls_outtab.
endloop.
call method g_grid->refresh_table_display.
endif.
endform. " select_all_entries
*& Form deselect_all_entries
text
<--P_GT_OUTTAB[] text
form deselect_all_entries changing pt_outtab type standard table.
data: ls_outtab type gs_outtab.
data: l_valid type c,
l_locked type c.
*§A4ad. Before you (a)set, reset or (d)evaluate checkboxes,
you must check the input cells.
If all entries are ok, ALV transferes new values to the output
table which you then can modify.
call method g_grid->check_changed_data
importing
e_valid = l_valid.
if l_valid eq 'X'.
loop at pt_outtab into ls_outtab.
perform check_lock using ls_outtab
changing l_locked.
if l_locked is initial
and not ls_outtab-checkbox eq '-'.
ls_outtab-checkbox = ' '.
endif.
modify pt_outtab from ls_outtab.
endloop.
call method g_grid->refresh_table_display.
endif.
endform. " deselect_all_entries
*& Form reset_selected_entries
text
<--P_GT_OUTTAB[] text
form reset_selected_entries changing pt_outtab type standard table.
data: ls_outtab type gs_outtab.
data: l_valid type c.
*§A4b. Before you set, (b)reset or evaluate checkboxes,
you must check the input cells.
If all entries are ok, ALV transferes new values to the output
table which you then can modify.
call method g_grid->check_changed_data
importing
e_valid = l_valid.
if l_valid eq 'X'.
loop at pt_outtab into ls_outtab.
if not ls_outtab-checkbox is initial
and not ls_outtab-checkbox eq '-'.
clear ls_outtab.
modify pt_outtab from ls_outtab.
endif.
endloop.
call method g_grid->refresh_table_display.
endif.
endform. " reset_selected_entries
form switch_activation changing pt_outtab type standard table.
data: ls_outtab type gs_outtab.
data: l_valid type c,
lt_row_no type lvc_t_roid with header line.
*§A4c. Before you set, reset, (c)(de)activate
or evaluate checkboxes, you must check the input cells.
If all entries are ok, ALV transferes new values to the output
table which you then can modify.
call method g_grid->check_changed_data
importing
e_valid = l_valid.
if l_valid eq 'X'.
call method g_grid->get_selected_rows
importing
et_row_no = lt_row_no[].
loop at lt_row_no.
read table pt_outtab into ls_outtab index lt_row_no-row_id.
if ls_outtab-checkbox ne '-'.
ls_outtab-checkbox = '-'.
else.
ls_outtab-checkbox = ' '.
endif.
modify pt_outtab from ls_outtab index lt_row_no-row_id.
endloop.
call method g_grid->refresh_table_display.
endif.
endform. " switch_activation
*& Form check_lock
text
-->P_LS_OUTTAB text
<--P_L_LOCKED text
form check_lock using ps_outtab type gs_outtab
changing p_locked.
data ls_celltab type lvc_s_styl.
loop at ps_outtab-celltab into ls_celltab.
if ls_celltab-fieldname = 'CHECKBOX'.
if ls_celltab-style eq cl_gui_alv_grid=>mc_style_disabled.
p_locked = 'X'.
else.
p_locked = space.
endif.
endif.
endloop.
endform. " check_lock
Regards,
Sindhu -
How do I add an outline to a check box in InDesign CS6?
We have a series of existing documents (that were not produced by us) where the check boxes show up as purple boxes in the exported interactive pdfs. Our client wants us to amend the check boxes so that they show up in the pdf as purple boxes with a .25pt black outline, (which would also show up if the pdf was printed).
In the InDesign document the check boxes already have a 1pt black outline (which doesn't show in the pdf). I can change the 1pt outline to ,25pt, but it still doesn't show in the pdf.
We have other documents with check boxes where the outline does show up in the exported pdf, but we can't see any difference at all in the properties of the check boxes, so we can't see why some outlines work and others don't.
Any help would be gratefully received!insigniagraphics,
Here are the step-by-step instructions.
I assume you already have checkboxes on your ID document. If you don't, skip to the end of this post.
Select one and then switch to the Direct Selection (white arrow) tool.
Double click the edge of the check. You will see a blue frame around the check.
Select that blue frame with the Direct Selection tool. You have just selected the frame.
Go to the Stroke controls and make it Black.
You now have an outline around the check. This is what it will look like when it is chosen.
But your boss probably wants the outline also to be around the area of the check when it is not chosen.
Keep the form selected and switch to the Normal (off) state.
Use the Selection tool to select the frame edge again and apply the stroke.
You now have outlines around each check and in the empty spaces.
BTW the purple is deceptive and depends on Acrobat's settings.
End of the post:
Just start with a frame that has a stroke and you will have one when you convert it to a form. -
What is the check box column for in iTunes?
I just upgraded to the latest version of iTunes (11 something). Now the checked songs on the Music/Song page do not sync with my iphone. I have to go to a separate page to select what I want to sync with my phone and if it's not my whole library I have to recheck everything manually. Why isn't this just what I have already checked on my Music/Song page, like in older versions? Now I have to start from scratch and the sync page isn't even by song, it's by album. I don't want to sync every song in each album as this takes up too much space on my iphone. So I don't understand what the point is of the check box column now since it's purpose seems to have been made redundant. If I uncheck the box, the song now disappears completely. It used to still be on my list but just was unchecked. Where does the song go now? And how can I get it back? If there is any sort of support documentation on these features/functions, please point me to the link as I could not find anything on the apple site.
Check marks can be used to mark out tracks that you rarely want to listen to but still want to keep in your library, e.g. a bonus interview track at the end of an album. Unchecked tracks are usually excluded from syncing to devices, skipped during track to track playback and ingored when shuffling. To easily check or uncheck all tracks hold the ctrl key down while clicking a checkbox.
tt2 -
Hi,
While creating PO, when i am entering plant, then only free check box is gettiing checked automatically.
How?
UtsHello Uts,
If I understand well your question is "why free field is set automatically" !!!
The 'Free Items' indicator in the overview is only used to facilitate the switching off of the Inv.Receipt flag and the GR-based IV flag. ( Note that the 'Free Items' indicator is not stored on the PO item table EKPO).
The Inv.Receipt flag (and the GR-based IV flag) are the fields thatreally controls if an item is 'free' or not, so, you have to check if these fields are cehcked or not.
Hope this can help
Regards,
Mauro -
Goods Movement Not allowed(XWAOK) check box - for SRM Reservations.
Dear Experts,
We are working on Extended Clasissc sceanrio however certain materails we are creating reservation switching from ECS to Classic Scenario. System is Creating Reservation successfully in backend but Goods movement reservation allowed (FIELD XWAOK) check box not checked only for SRM Reservations
Please note that ECC reservations checking this checkbox automatically based on Configuration. Is there any setting we have to do in SRM to pass the check box value to ECC? or How Can i check what data is passing from SRM to ECC......
Thanks
RaviDear Ravi,
Could you please check if you have added the value '201' against the attribute movement type (forgot the attribute name) for the purchasing group or user group who created the shopping cart in SAP SRM. Once you have added the attribute, the problem should be resolved.
Thanks and regards,
Ranjan -
Single or multiple check box values displayed in a textbox
Hi Experts!
I'm using the following script to display the values of check boxes in a text field. I would like the word "and" to separate the values if two check boxes are selected. If more than two boxes are selected I want the values to be separated by a comma and then the last value be separated by "and". Example of two check boxes selected: A and B. Example of two or more: A, B, C, and D. Can this be done?
form1.page1.page1SF.programs::calculate - (JavaScript, client)
//displays the values of check boxes named programCB
var aChkBx = [];
var vChecks = programCB.all;
for (var a=0; a<vChecks.length;a++){
if(!vChecks.item(a).isNull) {
aChkBx.push(vChecks.item(a).rawValue);
this.rawValue = aChkBx.join(", ");So, the way I see it, you actually have four scenarios. Nothing is checked, one item is checked, two items are checked, and three or more items are checked.
Here's how I did it.
I have four checkboxes all with the same name, cb. (You could have many more, and it wouldn't matter as long as they're all named the same thing.) I'm presuming that you will use the captions from the checkboxes as the text you want to enter. I called my text area where I enter the information tfSentence. (It's not a text field, it's just called "Text" in the Object Library.)
//we need to count how many boxes are checked
var checked = 0;
for (i=0; i<=cb.length; i++){
if (xfa.resolveNode("cb["+i+"]").rawValue == 1) checked ++;
//create a string variable to store our sentence
var str = "";
//look at the checked variable and choose our case from that
switch(checked){
case 0:
//you may want to do more than just type out a sentence here, like a message box
tfSentence.rawValue = "Nothing was selected";
break;
case 1:
//you can set text that will appear before your list of items here
//str = "preliminary text";
for (i=0; i<=cb.length; i++){
if (xfa.resolveNode("cb["+i+"]").rawValue == 1) str += xfa.resolveNode("cb["+i+"].caption.value.#text").value;
//you can set text to appear after your list of items here
//str += "ending text";
tfSentence.rawValue = str;
break;
case 2:
//str = "preliminary text";
for (i=0; i<=cb.length; i++){
if (xfa.resolveNode("cb["+i+"]").rawValue == 1){
if (checked == 1) str += " and " + xfa.resolveNode("cb["+i+"].caption.value.#text").value;
else str += xfa.resolveNode("cb[+i+"].caption.value.#text").value;
checked--;
//str+= "ending text";
tfSentence.rawValue = str;
break;
default:
//str = "preliminary text";
for (i=0; i<=cb.length; i++){
if (xfa.resolveNode("cb["+i+"]").rawValue == 1){
if (checked == 1) str += "and " + xfa.resolveNode("cb["+i+"].caption.value.#text").value;
else str += xfa.resolveNode("cb["+i+"].caption.value.#text").value + ", ";
checked--;
//str += "ending text";
tfSentence.rawValue = str;
break -
Passing column values to another tab if check box selected in that row
Hi
I have the following requirement.
I have a table that gets populated by a web service. Have added one more field to it which is a check box. Th requirement is that I need to pass the values of column (say id) from each row which has it's check box selected, as input parameters to a web service in another tab.
example: table has fileds id, name, address,checkbox. If there are 5 rows and the user select 1 and 2 then I need the ids of 1 and 2 to be passed to another tab.
Is this possible ........
ThanksHi
I just don't want to make multiple selection but pass the values of a column from the selected rows to another tab to be used as input parameters to a web service.
I want to know how to pass the values(of one filed) of the selected rows across tabs/switches.
Thanks
Maybe you are looking for
-
Hi Folks I am trying to create Terms of payment through SPRO>Financial Accounting>Accounts receivable & Payable>Business transactions>Outgoing invoices /credit memos/maintain payment terms. However whenever I am saving the changes the system does not
-
I record in stereo with a 10KHz tone down the left channel to defeat AGC on my camera and mic feed into the right channel. When I edit, I want to mute/delete the left channel and pan the right into the centre, to leave me with mono audio across both
-
Can't get my hp laserjet p1505n to print with verizon mifi
I changed internet provider from broadband to Verizon MIFI and now my printer doesn't work. II have a HP Laserjet P1505n and it was networked to my desk pc and my laptop. What can I do to get it working again?? Thank you Connie Moore
-
Dear All, I am using Tomcat 4 and J2SE 1.4.2 and winXp. I am try to write a simple server/client program using servlet to connect them. I am using URLConnection in client side to connect server. However, when i try to get the input/output stream from
-
Mapping Error : structure min!=max without mapping
When trying to test my map, I am recieving the error: structure min!=max without mapping It seems to me that thsi would normally be caused by a particular field that has a minimum occurance of 1, and is not being populated. However, I have double ch