Adding Table Events
I have assigned a Tcode to a maintainance view.. In this one field is a foreign key from another table.. So when i insert a new record which is not in the check table, then the error message is displayed as ' value 'SER' not there in ZVTRT_TEST (Check Entry ) '. But I want to modify this message and want to diaplay another message. IS this possible? if so how? Is it possible using Events in table maintance generator? CAn u please give me the detailed steps?
Thanx. that solved one major part of the problem.. The second part in the same issue involves checking if a mandatory field is left blank while saving or if all fields are blank while saving. In these cases it should not save. So what do i do? another validation requires to check if the start date is lesser than the end date.. CAn u please give me the steps.?
Similar Messages
-
Report using internal table events
Hi,
i have an internal table with the fields 1. profitcenter 2. company code 3. gl account 4. amount
for each profit center i need to seggregate accounts based on company code.
the report should look like the one below.
please suggest some code using internal table events at new , at end etc. as im not using alv. your help will be rewarded
regards,
ravi.
-Profitcenter-companycodeglaccount-amount---
-pfcenter1----
glaccount1-1000---
glaccount2-2000---
4444-total--3000---
glaccount1-4000---
glaccount2-1000---
3333-total--5000---
-profitcentre1*total8000---
profitcentre2.........Hi.
TYPES: BEGIN OF G_I_DATA,
PROFIT(4) TYPE C,
COMPANY(4) TYPE C,
ACCOUNT(10) TYPE C,
AMOUNT TYPE P,
END OF G_I_DATA.
DATA: G_IT_DATA TYPE TABLE OF G_I_DATA,
G_WA_DATA TYPE G_I_DATA.
DATA: G_SUM_COMPANY TYPE P,
G_SUM_PROFIT TYPE P,
G_AMOUNT TYPE P.
G_WA_DATA-PROFIT = '0001'.
G_WA_DATA-COMPANY = '1111'.
G_WA_DATA-ACCOUNT = 'ACCOUNT1'.
G_WA_DATA-AMOUNT = 2000.
APPEND G_WA_DATA TO G_IT_DATA.
G_WA_DATA-PROFIT = '0001'.
G_WA_DATA-COMPANY = '1111'.
G_WA_DATA-ACCOUNT = 'ACCOUNT2'.
G_WA_DATA-AMOUNT = 3000.
APPEND G_WA_DATA TO G_IT_DATA.
G_WA_DATA-PROFIT = '0001'.
G_WA_DATA-COMPANY = '2222'.
G_WA_DATA-ACCOUNT = 'ACCOUNT1'.
G_WA_DATA-AMOUNT = 4000.
APPEND G_WA_DATA TO G_IT_DATA.
G_WA_DATA-PROFIT = '0001'.
G_WA_DATA-COMPANY = '2222'.
G_WA_DATA-ACCOUNT = 'ACCOUNT2'.
G_WA_DATA-AMOUNT = 5000.
APPEND G_WA_DATA TO G_IT_DATA.
G_WA_DATA-PROFIT = '0002'.
G_WA_DATA-COMPANY = '1111'.
G_WA_DATA-ACCOUNT = 'ACCOUNT1'.
G_WA_DATA-AMOUNT = 2000.
APPEND G_WA_DATA TO G_IT_DATA.
G_WA_DATA-PROFIT = '0002'.
G_WA_DATA-COMPANY = '1111'.
G_WA_DATA-ACCOUNT = 'ACCOUNT2'.
G_WA_DATA-AMOUNT = 3000.
APPEND G_WA_DATA TO G_IT_DATA.
G_WA_DATA-PROFIT = '0002'.
G_WA_DATA-COMPANY = '2222'.
G_WA_DATA-ACCOUNT = 'ACCOUNT1'.
G_WA_DATA-AMOUNT = 4000.
APPEND G_WA_DATA TO G_IT_DATA.
G_WA_DATA-PROFIT = '0002'.
G_WA_DATA-COMPANY = '2222'.
G_WA_DATA-ACCOUNT = 'ACCOUNT2'.
G_WA_DATA-AMOUNT = 5000.
APPEND G_WA_DATA TO G_IT_DATA.
SORT G_IT_DATA BY PROFIT COMPANY ACCOUNT.
WRITE: /6 'ProfitCenter', 20 'CompanyCode',
34 'Glaccount', 48 'Amount'.
WRITE: /6 SY-ULINE(50).
LOOP AT G_IT_DATA INTO G_WA_DATA.
AT NEW PROFIT.
WRITE: /6 G_WA_DATA-PROFIT.
ENDAT.
G_AMOUNT = G_WA_DATA-AMOUNT.
AT NEW ACCOUNT.
WRITE: /34 G_WA_DATA-ACCOUNT,
48 G_AMOUNT.
ENDAT.
G_SUM_PROFIT = G_SUM_PROFIT + G_WA_DATA-AMOUNT.
G_SUM_COMPANY = G_SUM_COMPANY + G_WA_DATA-AMOUNT.
AT END OF COMPANY.
WRITE: /20 G_WA_DATA-COMPANY,
34 'Totle',
48 G_SUM_COMPANY.
CLEAR G_SUM_COMPANY.
WRITE: /6 '*******'.
ENDAT.
AT END OF PROFIT.
WRITE: /6 G_WA_DATA-PROFIT,
20 'Totle',
48 G_SUM_PROFIT.
CLEAR G_SUM_PROFIT.
WRITE: /6 '*************************************'.
ENDAT.
ENDLOOP. -
Table Event Update Form?
Hi,
If anyone knows about the form "Table event Update",kindly reply or give URL regarding the documentation
Thanks in advance
Manoj MThis form is used for payroll Event model
basically it identifies when event should be recorded .
PEM records the events such as Correction or Update on the table u specify.
e.g. column assignment status change on PER_ALL_ASSIGNMENTS_F table
The retro pay process uses these events to process those assignments while calculating retro pay
U specify the table name e.g. PER_ALL_ASSIGNMENTS_F
In Event section Specify
1) Event type as datetrack correction/ datetrack update
2) Column name : specify the column name
e.g. assignment_status
3) Change Type : reports
Also Refer meta link note : 373148.1
Thanks
Makarand -
Hi,
I have used a table event to update the changed date and changed by in a custom table in SAP 4.7. It is working fine.
Now in ECC6.0, there is a similar requirement, but the similar code does not work. Can you please help?
The code I used in SAP 4.7 is given below.
FORM sub_update_user_date.
DATA: l_tabix TYPE sytabix.
DATA: BEGIN OF l_total.
INCLUDE STRUCTURE ZORF_XREF_3PL.
INCLUDE STRUCTURE vimtbflags.
DATA: END OF l_total,
l_record TYPE ZORF_XREF_3PL.
LOOP AT total INTO l_total.
IF l_total-vim_action = aendern
OR l_total-vim_action = neuer_eintrag.
MOVE-CORRESPONDING l_total TO l_record.
l_record-last_chng_by = sy-uname.
l_record-last_chng_dt = sy-datum.
READ TABLE extract WITH KEY l_total.
IF sy-subrc EQ 0.
l_tabix = sy-tabix.
ELSE.
CLEAR l_tabix.
ENDIF.
MOVE-CORRESPONDING l_record TO l_total.
MODIFY total FROM l_total.
CHECK l_tabix GT 0.
MODIFY extract INDEX l_tabix FROM l_total.
ENDIF.
ENDLOOP.
ENDFORM. "sub_update_user_date
JCHi,
Your code looks good...
But a small change, hope this should work.
READ TABLE extract WITH KEY l_total.
*IF sy-subrc EQ 0.*
*l_tabix = sy-tabix.*
*ELSE.*
*CLEAR l_tabix.*
*ENDIF.*
*l_total-last_chng_by = sy-uname.*
*l_total-last_chng_dt = sy-datum.*
*MODIFY total FROM l_total.*
MODIFY extract INDEX l_tabix FROM l_total.
Regards
Shiva -
What are the internal table events
hi experts
can u help me for thisHi ramesh,
There are basically internal table events are as below...
at first / endat
at last / endat
at new / endat
at end of / endat
sum
on change of / endon
Use the at first and at last statements to perform processing during the first or last loop pass of an internal table.
Use the at new and at end of statements to detect a change in a column from one loop pass to the next. These statements enable you to execute code at the beginning and end of a group of records.
Use the sum statement to calculate totals for the rows of a control level.
Another statement you can use to perform control break processing is on change of. It behaves in a manner similar to at new.
on change of differs from at new in the following respects:
It can be used in any loop construct, not just loop at. For example, it can be used within select and endselect, do and enddo, or while and endwhile, as well as inside get events.
A single on change of can be triggered by a change within one or more fields named after of and separated by or. These fields can be elementary fields or field strings. If you are within a loop, these fields do not have to belong to the loop.
When used within a loop, a change in a field to the left of the control level does not trigger a control break.
When used within a loop, fields to the right still contain their original values; they are not changed to contain zeros or asterisks.
You can use else between on change of and endon.
You can use it with loop at it where . . ..
You can use sum with on change of. It sums all numeric fields except the one(s) named after of.
Any values changed within on change of remain changed after endon. The contents of the header line are not restored as they are for at and endat.
<b>Reward Points if it useful....</b>
Thanks and Regards
Sreenivasa sharma k. -
Making field input editable after giving error msg from table event 01
Hi All,
I have a requirement of giving error msg and making that row or the particular field input editable by writing code in table event 01 i.e before saving any record in a z-table i have to chk some condition for a column value and if that condition fails then i have to give error msg and make that column input editable.
I have created a routine for event 01 and written the code to give error msg. But my problem is that column is not becoming input editable. Could you pls tell me how can i make that field editable?
Thanks in advance.Hi Piyali,
Use SET PARAMETER & GET PARAMETER ID .
You will get it.
Best Regards,
Pravin -
Generating Indiex for dynamically added table rows in HRFORMS
Hi ,
We are developing Payslip in HRFORMS by copying standard form.
We have got one business scenario which requires a table rows needs to generated dynamically to populate the retro values in the form.
We could able to generate the table rows dynamically by below command in HRFORMs scripts.
Table1.Row.InstanceManager.addInstance(1) but it is not generating with correct index.
Please help in adding table rows dynamically at specified index.
Regards,
akulaYou can do that with 2 differents ways :
by creating a colomn key which is the concatenation of the key for each lin
by using field groups
I think you have to use the second one.
[sample by help|http://help.sap.com/saphelp_nw70/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm]
In this case you can put dynamiquely what are you wanted in your keys.
Regards,
Christophe. -
hai ,
how i can use internal table events in ALV's please send me example code
also .Hi Sathish,
According you your query, You want to display the data in Hierarchical format. I am attaching the code of hierarchical format. You just create a Z report and test this report. So that can solve your problem easily with the help of this code.
REPORT BALVHD01 NO STANDARD PAGE HEADING.
ALV
TYPE-POOLS: SLIS.
DB-Table
TABLES: SCARR, SPFLI.
Includes
INCLUDE .
CONSTANTS:
GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE'.
DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
GS_LAYOUT TYPE SLIS_LAYOUT_ALV,
GS_KEYINFO TYPE SLIS_KEYINFO_ALV,
GT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV,
GT_EVENTS TYPE SLIS_T_EVENT.
Data to be displayed
DATA: BEGIN OF GT_SPFLI OCCURS 0.
INCLUDE STRUCTURE SPFLI.
DATA:
BOX,
WERT(4) TYPE P,
LIGHTS.
DATA: END OF GT_SPFLI.
DATA: BEGIN OF GT_SCARR OCCURS 0.
INCLUDE STRUCTURE SCARR.
DATA: BOX,
LIGHTS.
DATA: END OF GT_SCARR.
DATA: G_REPID LIKE SY-REPID.
DATA: GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
Report Selections
SELECT-OPTIONS CARRID FOR SCARR-CARRID.
SELECTION-SCREEN SKIP 1.
Parameters
PARAMETERS: P_MAXROW TYPE I DEFAULT 50.
SELECTION-SCREEN SKIP 1.
Variante
SELECTION-SCREEN BEGIN OF BLOCK 0 WITH FRAME TITLE TEXT-064.
PARAMETERS: P_VARI LIKE DISVARIANT-VARIANT.
SELECTION-SCREEN END OF BLOCK 0.
Layout
SELECTION-SCREEN BEGIN OF BLOCK A WITH FRAME TITLE TEXT-060.
PARAMETERS:
P_ZEBRA AS CHECKBOX DEFAULT ' ',
P_NOCOLH AS CHECKBOX DEFAULT ' ',
P_COLOPT AS CHECKBOX DEFAULT ' ',
P_KEYHOT AS CHECKBOX DEFAULT ' ',
P_NOINPT AS CHECKBOX DEFAULT ' '.
SELECTION-SCREEN END OF BLOCK A.
SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME TITLE TEXT-061.
PARAMETERS:
P_LIGHTN RADIOBUTTON GROUP LIG ,
P_LIGHTH RADIOBUTTON GROUP LIG ,
P_LIGHTI RADIOBUTTON GROUP LIG ,
P_LIGHTC AS CHECKBOX DEFAULT ' '.
SELECTION-SCREEN END OF BLOCK B.
SELECTION-SCREEN BEGIN OF BLOCK C WITH FRAME TITLE TEXT-062.
PARAMETERS:
P_TOTONL AS CHECKBOX DEFAULT ' ',
P_TOTEXT(60),
P_STTEXT(60).
SELECTION-SCREEN END OF BLOCK C.
SELECTION-SCREEN BEGIN OF BLOCK D WITH FRAME TITLE TEXT-063.
PARAMETERS:
CHCKBOXN RADIOBUTTON GROUP BOX ,
CHCKBOXH RADIOBUTTON GROUP BOX ,
CHCKBOXI RADIOBUTTON GROUP BOX ,
P_GROUPB AS CHECKBOX DEFAULT ' ',
P_DETPOP AS CHECKBOX DEFAULT 'X',
P_GROUPS AS CHECKBOX DEFAULT ' '.
SELECTION-SCREEN END OF BLOCK D.
DATA: G_BOXNAM TYPE SLIS_FIELDNAME VALUE 'BOX',
P_F2CODE LIKE SY-UCOMM VALUE '&ETA',
P_LIGNAM TYPE SLIS_FIELDNAME VALUE 'LIGHTS',
G_SAVE(1) TYPE C,
G_TABNAME_HEADER TYPE SLIS_TABNAME,
G_TABNAME_ITEM TYPE SLIS_TABNAME,
G_DEFAULT(1) TYPE C,
G_EXIT(1) TYPE C,
GX_VARIANT LIKE DISVARIANT,
G_VARIANT LIKE DISVARIANT.
INITIALIZATION.
G_REPID = SY-REPID.
G_TABNAME_HEADER = 'GT_SCARR'.
G_TABNAME_ITEM = 'GT_SPFLI'.
define keyinfo
CLEAR GS_KEYINFO.
GS_KEYINFO-HEADER01 = 'CARRID'.
GS_KEYINFO-ITEM01 = 'CARRID'.
GS_KEYINFO-HEADER02 = SPACE.
GS_KEYINFO-ITEM02 = 'CONNID'.
PERFORM E01_FIELDCAT_INIT USING GT_FIELDCAT[].
PERFORM E03_EVENTTAB_BUILD USING GT_EVENTS[].
PERFORM E04_COMMENT_BUILD USING GT_LIST_TOP_OF_PAGE[].
PERFORM E07_SP_GROUP_BUILD USING GT_SP_GROUP[].
Schalter Varianten benutzerspezifisch/allgemein speicherbar setzen
Set Options: save variants userspecific or general
G_SAVE = 'A'.
PERFORM VARIANT_INIT.
Get default variant
GX_VARIANT = G_VARIANT.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
I_SAVE = G_SAVE
CHANGING
CS_VARIANT = GX_VARIANT
EXCEPTIONS
NOT_FOUND = 2.
IF SY-SUBRC = 0.
P_VARI = GX_VARIANT-VARIANT.
ENDIF.
Process on value request
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VARI.
PERFORM F4_FOR_VARIANT.
PAI
AT SELECTION-SCREEN.
PERFORM PAI_OF_SELECTION_SCREEN.
START-OF-SELECTION.
PERFORM SELECTION.
END-OF-SELECTION.
PERFORM E05_LAYOUT_BUILD USING GS_LAYOUT. "wg. Parameters
Call ABAP/4 List Viewer
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = GT_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS = GT_SP_GROUP[]
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 = g_default
I_SAVE = G_SAVE
IS_VARIANT = G_VARIANT
IT_EVENTS = GT_EVENTS[]
IT_EVENT_EXIT =
I_TABNAME_HEADER = G_TABNAME_HEADER
I_TABNAME_ITEM = G_TABNAME_ITEM
IS_KEYINFO = GS_KEYINFO
IS_PRINT =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
TABLES
T_OUTTAB_HEADER = GT_SCARR
T_OUTTAB_ITEM = GT_SPFLI.
FORM E01_FIELDCAT_INIT *
--> E01_LT_FIELDCAT *
FORM E01_FIELDCAT_INIT USING E01_LT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'DISTANCE'.
LS_FIELDCAT-TABNAME = G_TABNAME_ITEM.
LS_FIELDCAT-NO_OUT = 'X'.
LS_FIELDCAT-NO_SUM = 'X'.
LS_FIELDCAT-SP_GROUP = 'A'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'DISTID'.
LS_FIELDCAT-TABNAME = G_TABNAME_ITEM.
LS_FIELDCAT-NO_OUT = 'X'.
LS_FIELDCAT-NO_SUM = 'X'.
LS_FIELDCAT-SP_GROUP = 'A'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'CARRID'.
LS_FIELDCAT-TABNAME = G_TABNAME_ITEM.
LS_FIELDCAT-TECH = 'X'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'FLTYPE'.
LS_FIELDCAT-TABNAME = G_TABNAME_ITEM.
LS_FIELDCAT-NO_OUT = 'X'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME =
I_INTERNAL_TABNAME = G_TABNAME_HEADER
I_STRUCTURE_NAME = 'SCARR'
I_CLIENT_NEVER_DISPLAY = 'X'
CHANGING
CT_FIELDCAT = E01_LT_FIELDCAT[].
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME =
I_INTERNAL_TABNAME = G_TABNAME_ITEM
I_STRUCTURE_NAME = 'SPFLI'
I_CLIENT_NEVER_DISPLAY = 'X'
CHANGING
CT_FIELDCAT = E01_LT_FIELDCAT[].
Nachbessern!!!
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'CARRID'.
LS_FIELDCAT-TABNAME = G_TABNAME_HEADER.
LS_FIELDCAT-REF_FIELDNAME = 'CARRID'.
LS_FIELDCAT-REF_TABNAME = 'SCARR'.
LS_FIELDCAT-KEY = 'X'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
geht am Anfang nicht !!!!
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COL_POS = 99.
LS_FIELDCAT-FIELDNAME = 'WERT'.
LS_FIELDCAT-TABNAME = G_TABNAME_ITEM.
LS_FIELDCAT-REPTEXT_DDIC = 'Wert'(070).
LS_FIELDCAT-OUTPUTLEN = 4.
LS_FIELDCAT-DATATYPE = 'CURR'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
ENDFORM.
FORM E02_DATA_ADD *
FORM E02_DATA_ADD TABLES E02_LT_SPFLI STRUCTURE GT_SPFLI
E02_LT_SCARR STRUCTURE GT_SCARR.
LOOP AT E02_LT_SPFLI.
IF SY-TABIX > 10.
E02_LT_SPFLI-BOX = 'X'.
E02_LT_SPFLI-LIGHTS = '3'.
ELSE.
IF SY-TABIX = 1.
E02_LT_SPFLI-LIGHTS = '2'.
ELSE.
E02_LT_SPFLI-LIGHTS = '1'.
ENDIF.
ENDIF.
E02_LT_SPFLI-WERT = SY-TABIX MOD 5.
MODIFY E02_LT_SPFLI.
ENDLOOP.
LOOP AT E02_LT_SCARR.
IF SY-TABIX > 10.
E02_LT_SCARR-BOX = 'X'.
E02_LT_SCARR-LIGHTS = '3'.
ELSE.
IF SY-TABIX = 1.
E02_LT_SCARR-LIGHTS = '2'.
ELSE.
E02_LT_SCARR-LIGHTS = '1'.
ENDIF.
ENDIF.
MODIFY E02_LT_SCARR.
ENDLOOP.
ENDFORM.
FORM E03_EVENTTAB_BUILD *
--> E03_LT_EVENTS *
FORM E03_EVENTTAB_BUILD USING E03_LT_EVENTS TYPE SLIS_T_EVENT.
DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = E03_LT_EVENTS.
READ TABLE E03_LT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM.
APPEND LS_EVENT TO E03_LT_EVENTS.
ENDIF.
ENDFORM.
FORM E04_COMMENT_BUILD *
--> E04_LT_TOP_OF_PAGE *
FORM E04_COMMENT_BUILD USING E04_LT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
DATA: LS_LINE TYPE SLIS_LISTHEADER.
Listenüberschrift: Typ H
CLEAR LS_LINE.
LS_LINE-TYP = 'H'.
LS_LINE-KEY: not used for this type
LS_LINE-INFO = TEXT-001.
APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
Kopfinfo: Typ S
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = TEXT-050.
LS_LINE-INFO = TEXT-010.
APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
LS_LINE-KEY = TEXT-051.
APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
Aktionsinfo: Typ A
CLEAR LS_LINE.
LS_LINE-TYP = 'A'.
LS_LINE-KEY: not used for this type
LS_LINE-INFO = TEXT-002.
APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
ENDFORM.
FORM E05_LAYOUT_BUILD *
<-> E05_LS_LAYOUT *
FORM E05_LAYOUT_BUILD USING E05_LS_LAYOUT TYPE SLIS_LAYOUT_ALV.
IF P_LIGHTI = 'X'.
E05_LS_LAYOUT-LIGHTS_FIELDNAME = P_LIGNAM.
E05_LS_LAYOUT-LIGHTS_TABNAME = G_TABNAME_ITEM.
E05_LS_LAYOUT-LIGHTS_CONDENSE = P_LIGHTC.
ENDIF.
IF P_LIGHTH = 'X'.
E05_LS_LAYOUT-LIGHTS_FIELDNAME = P_LIGNAM.
E05_LS_LAYOUT-LIGHTS_TABNAME = G_TABNAME_HEADER.
E05_LS_LAYOUT-LIGHTS_CONDENSE = P_LIGHTC.
ENDIF.
IF P_LIGHTN = 'X'.
CLEAR E05_LS_LAYOUT-LIGHTS_FIELDNAME.
CLEAR E05_LS_LAYOUT-LIGHTS_TABNAME.
CLEAR E05_LS_LAYOUT-LIGHTS_CONDENSE.
ENDIF.
IF CHCKBOXN = 'X'.
E05_LS_LAYOUT-BOX_FIELDNAME = SPACE.
E05_LS_LAYOUT-BOX_TABNAME = SPACE.
ENDIF.
IF CHCKBOXH = 'X'.
E05_LS_LAYOUT-BOX_FIELDNAME = G_BOXNAM.
E05_LS_LAYOUT-BOX_TABNAME = G_TABNAME_HEADER.
ENDIF.
IF CHCKBOXI = 'X'.
E05_LS_LAYOUT-BOX_FIELDNAME = G_BOXNAM.
E05_LS_LAYOUT-BOX_TABNAME = G_TABNAME_ITEM.
ENDIF.
E05_LS_LAYOUT-HEADER_TEXT = TEXT-071.
E05_LS_LAYOUT-ITEM_TEXT = TEXT-072.
E05_LS_LAYOUT-DEFAULT_ITEM = 'X'.
E05_LS_LAYOUT-F2CODE = P_F2CODE.
E05_LS_LAYOUT-ZEBRA = P_ZEBRA.
E05_LS_LAYOUT-COLWIDTH_OPTIMIZE = P_COLOPT.
E05_LS_LAYOUT-NO_INPUT = P_NOINPT.
E05_LS_LAYOUT-NO_COLHEAD = P_NOCOLH.
E05_LS_LAYOUT-TOTALS_TEXT = P_TOTEXT.
E05_LS_LAYOUT-SUBTOTALS_TEXT = P_STTEXT.
E05_LS_LAYOUT-TOTALS_ONLY = P_TOTONL.
E05_LS_LAYOUT-KEY_HOTSPOT = P_KEYHOT.
E05_LS_LAYOUT-DETAIL_POPUP = P_DETPOP.
E05_LS_LAYOUT-GROUP_CHANGE_EDIT = P_GROUPS.
E05_LS_LAYOUT-GROUP_BUTTONS = P_GROUPB.
E05_LS_LAYOUT-GROUP_BUTTONS = SPACE.
ENDFORM.
FORM E07_SP_GROUP_BUILD *
--> E07_LT_SP_GROUP *
FORM E07_SP_GROUP_BUILD USING E07_LT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV.
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.
ENDFORM.
FORM SELECTION *
FORM SELECTION.
SELECT * FROM SCARR INTO CORRESPONDING FIELDS OF TABLE GT_SCARR
WHERE CARRID IN CARRID.
SELECT * FROM SPFLI INTO CORRESPONDING FIELDS OF TABLE GT_SPFLI
UP TO P_MAXROW ROWS
WHERE CARRID IN CARRID.
LOOP AT GT_SCARR.
READ TABLE GT_SPFLI WITH KEY CARRID = GT_SCARR-CARRID.
IF SY-SUBRC NE 0.
DELETE GT_SCARR.
ENDIF.
ENDLOOP.
PERFORM E02_DATA_ADD TABLES GT_SPFLI GT_SCARR.
ENDFORM.
FORM TOP_OF_PAGE *
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
ENDFORM.
FORM F4_FOR_VARIANT *
FORM F4_FOR_VARIANT.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
IS_VARIANT = G_VARIANT
I_SAVE = G_SAVE
I_TABNAME_HEADER = G_TABNAME_HEADER
I_TABNAME_ITEM = G_TABNAME_ITEM
it_default_fieldcat =
IMPORTING
E_EXIT = G_EXIT
ES_VARIANT = GX_VARIANT
EXCEPTIONS
NOT_FOUND = 2.
IF SY-SUBRC = 2.
MESSAGE ID SY-MSGID TYPE 'S' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
IF G_EXIT = SPACE.
P_VARI = GX_VARIANT-VARIANT.
ENDIF.
ENDIF.
ENDFORM.
*& Form PAI_OF_SELECTION_SCREEN
text
FORM PAI_OF_SELECTION_SCREEN.
IF NOT P_VARI IS INITIAL.
MOVE G_VARIANT TO GX_VARIANT.
MOVE P_VARI TO GX_VARIANT-VARIANT.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
I_SAVE = G_SAVE
CHANGING
CS_VARIANT = GX_VARIANT.
G_VARIANT = GX_VARIANT.
ELSE.
PERFORM VARIANT_INIT.
ENDIF.
ENDFORM. " PAI_OF_SELECTION_SCREEN
*& Form VARIANT_INIT
text
--> p1 text
<-- p2 text
FORM VARIANT_INIT.
CLEAR G_VARIANT.
G_VARIANT-REPORT = G_REPID.
ENDFORM. " VARIANT_INIT
Thanks and Best Regards,
Vijay -
Just added an event to iPod Touch's calendar!
I was one of the assumed many who have not yet bought an iPod Touch due to the lack of ability to add/edit calendar events and contacts.
I walked into an Apple store yesterday just to check it out, like I normally do, and I was playing with the iPod Touch for a bit and noticed a little plus icon at the top of the calendar. I thought that was odd since you couldn't add events, but I pushed it and sure enough, an add event screen popped up and I successfully added an event to the calendar. I was amazed that I hadn't heard anything about this yet. I also checked out the address book and sure enough, I could add a contact as well.
Looks like I'll be getting an iPod Touch this Christmas!Yes, it was added in the 1.1.2 update.
Scott -
I added an event to my calendar and the screen froze and will not go back to calendar home
I added an event to my calendar and the screen froze and will not go back to calendar home
Try a hard reset. To do this, press and hold both the Sleep/Wake and Home buttons together long enough for the Apple logo to appear.
B-rock -
Everytime I open ICal a box comes up with "Adding New Events" - Program freezes
Everytime I open ICal a box comes up with "Adding New Events" and I can't get rid of it without force quitting out of the program. Any suggestions???
I am having the same problem with no luck trying to find any help. Please help us find a solution for this.
-
Replication ceases working after adding table at publisher
Hi,
I have a transactional replication between two SQL 2008 R2 which has been running fine for hours. I just added a new table in the publisher, added a PK and inserted 10,000 rows. I re-initialized the publication and the subscriber and now
no replication is taking place. There are no errors from the SQL agent jobs at either side and nothing in the replication monitor.
I've deleted the table in the publisher but still I seem to have broken the sync between the two.
The publication is creating files just fine in the Windows share.
I suppose I could just drop the subscription, as this seems to be the issue, and re-create it. Can't see why adding table/index/rows in a subscriber causes this though.
Any advice on where else to look?
Thanks>> I just added a new table in the publisher, added a PK and inserted 1000 rows
You can't add an article without a Primary Key. I'm not sure what process you have followed to add an article.
The article I added contained a single column (int) which was also the PK. I only added it as a test to see the locking on the subscriber table when it was being rolled forward. Once I saw this had "broken" the replication I removed
(unchecked) the article however no further replication occurred.
Thanks for the links, I'm pretty sure I followed the correct steps however I will re-check. -
Screen error while adding table control to existing tab in BP screen
Hi experts,
Requirement: Add new section with table control in existing tab in BP screen. Purpose of creating table control is to add or delete multiple entries etc.
To fill this requirement, we have created custom transaction with table control facility. When we run this transaction from SAP easy screen, we are able to add, delete and create multiple records to database.
We have configured this custom program and screen in BDT (views) and saved.
When we call BP transaction we are getting following error message.
"Screen ZMOD_TEST1 0100 must be an Include screen (screen error)".
We are not sure, the approach we have chosen is correct. Incase, any one of you come across this type of problem, please guide us to rectify.
Thanks in advance.
VenkyVenky,
If you are on CRM 4.0 or even 5.0, my approach to adding a table to business partner attributes would have been the following:
- Use EEWB to generate the table extension
- Modify the generated code/screens if what was generated did not meet you complete requirements
However going back to your original question, if you add new screens for the BDT, then they must be "subscreens". The screens you create for the BDT tool are always subscreens placed in a container by the BDT program.
So your options are one:
1. Convert your screen to a subscreen and if you have coded all the BDT event function modules correctly it should work
2. Use EEWB to generate a new extension and make adjustments as necessary.
Good luck,
Stephen -
Detecting added rows (Event, Polling, ...)
Hi!
I'm working with the newest hibernate release and oracle 9/10g...
... and I'm having the following problem:
My application will get an interface to a legacy system through a database-table. If the legacy system writes a record into the table then my application has to do something (transform it and write it into one of my own tables for instance). The question is, what is the best way for my application to detect that a new record has been added to the database table?
I think there are two possibilites (changing the legacy application / the interface is no option :-( ):
1.) Polling the database table all n seconds
2.) The database sends me an event, if a new row has been added
Does hibernate/jdbc/oracle supports option 2? Exists there another good sollution for my problem?
Regards
HoeftThanks for the link. The informations about queing on the linked page were very useful!
Regards
Hoeft -
Adding multiple events to a single ics Calendar file
I'm facing a weird problem here. Whenever I generate an ics file with a single event and open it, the event automatically integrates nto my outlook calendar. That's very fine. However, when i add more than 1 event to a single ics file, and when i open it,
it creates a new calendar in Outlook, doesn't integrate into my default outlook calendar. Please help me with this issue.....protected
void
btnDownloadAll_Click(GridViewRow
row)
try
int
i = row.RowIndex;
string
organizer = "[email protected]"
string
location = ddlCity.SelectedValue;
DataSet
ds = new
DataSet
if
(ddlSelect.SelectedIndex == 0)
ds = Dataobj.Get_Annual_Schedule(ddlCity.SelectedValue, ddlMonth.SelectedIndex, ddlYear.SelectedValue);
if
(ds.Tables[0].Rows.Count > 0)
int
uniqKey = 0;
string[]
startTime = new
string
[20];
string[]
endTime = new
string
[20];
string[]
startDate = new
string
[20];
string[]
endDate = new
string
[20];
DateTime
sd, ed;
int
j = i + 1;
if
(i < ds.Tables[0].Rows.Count)
content.Add(
"\nBEGIN:VEVENT"
content.Add(
"\nORGANIZER:MAILTO:"
+ organizer);
sd = (
DateTime)ds.Tables[0].Rows[i]["StartDate"
ed = (
DateTime)ds.Tables[0].Rows[i]["EndDate"
string[]
stime = startTime[i].Split(':'
string[]
etime = endTime[i].Split(':'
TimeSpan
starttime = new
TimeSpan(Convert.ToInt32(stime[0]),
Convert
.ToInt32(stime[1]), 0);
sd = sd.Date + starttime;
TimeSpan
endtime = new
TimeSpan(Convert.ToInt32(etime[0]),
Convert
.ToInt32(etime[1]), 0);
ed = ed.Date + endtime;
string
test1 = sd.ToUniversalTime().ToString(DateFormat);
string
test2 = ed.ToUniversalTime().ToString(DateFormat);
content.Add(
"\nX-MICROSOFT-CDO-BUSYSTATUS:FREE"
content.Add(
"\nDTSTART:"
+ sd.ToUniversalTime().ToString(DateFormat));
content.Add(
"\nDTEND:"
+ ed.ToUniversalTime().ToString(DateFormat));
content.Add(
"\nLOCATION:"
+ ds.Tables[0].Rows[i]["City"
].ToString());
content.Add(
"\nUID:"
+ DateTime.Now.ToUniversalTime().ToString(DateFormat)
+ "@cognizant.com"
+ uniqKey);
content.Add(
"\nDTSTAMP:"
+ DateTime
.Now.ToUniversalTime().ToString(DateFormat));
content.Add(
"\nSUMMARY:"
+ "Annual Maintenance - "
+ ddlCity.SelectedValue + "-"
content.Add(
"\nDESCRIPTION: Annual Maintenance Downtime"
content.Add(
"\nPRIORITY:1"
content.Add(
"\nCLASS:PUBLIC"
content.Add(
"\nBEGIN:VALARM"
content.Add(
"\nACTION:DISPLAY"
content.Add(
"\nTRIGGER:-P7DT0H0M0S"
content.Add(
"\nSUMMARY:Alarm notification"
content.Add(
"\nEND:VALARM"
content.Add(
"\nEND:VEVENT"
uniqKey++;
content.Add(
"BEGIN:VCALENDAR"
content.Add(
"\nVERSION:2.0"
content.Add(
"\nMETHOD:PUBLISH"
foreach
(GridViewRow
row in
gvAnnualMaintanence.Rows)
CheckBox
checkbox = (CheckBox)row.FindControl("chkGrdAnnual"
if
(checkbox.Checked)
btnDownloadAll_Click(row);
content.Add(
"\nEND:VCALENDAR"
Maybe you are looking for
-
How do I delete e-mail from iphone but not server?
Hi, I don't want to delete e-mails from my server when I delete them from my phone - I can't see how to change the settings ....can anyone help?
-
Enhancing standard (single select)search help for Multiple value selection
Hi, Standard search help for Business Partner (in cProjects) allows only single value selection for input fields. I want to make this multiple selection. Is there a way to do it. I used an OVS and built a similar search but its difficult to get the s
-
Adobe Premiere crashes after only a few minutes of use.
I have a Dell i7 Laptop with 8GB of RAM running Win 8.1 this is the error message I keep getting. Log Name: Application Source: Windows Error Reporting Date: 2/12/2014 10:19:46 PM Event ID: 1001 Task Category: None Level:
-
HT1692 how can i put a google calendar on my iphone
Can you put a google calendar in an iphone
-
Hi, May I ask here that how to prevent from split-brain happen to a healthy two nodes RAC? I understand Oracle decided restart one node based on network messaging healthy, and on the other hand, i think from 10g to 11g, there are bugs about evict nod