Send the list ouput of ALV or normal report to e-mail
how to send the list ouput of ALV or normal report to e-mail?
Already SAP is providing the option to send output to email
For ALV
Go to Print Preview> list> send to --> mail receipient
if it is normal list
list> Save/Send> office
a®
Similar Messages
-
Event for the List Box in ALV Grid Control
Hello,
I have the below urgent requirment.
I have an ALV Grid Control built using ABAP Objects. In the grid, I have few fields and one of these fields is a List Box. Depending on the values selected, I need to enable or disable some fields. So, is there any event for the List box in ALV Grid Control.
For ex: I have 2 Fields, Designation and Commission. The designation field is a List Box field having 'Software Engineer' and 'Manager' as values. When I select 'Software Engineer', the commission field should be disabled. When I select 'Manager', the comission field should be enabled.
Early reply is hightly appreciated.
PriyaREPORT ZTEST1234 MESSAGE-ID ZZ .
DATA: G_GRID TYPE REF TO CL_GUI_ALV_GRID.
DATA: L_VALID TYPE C,
V_FLAG,
V_DATA_CHANGE,
V_ROW TYPE LVC_S_ROW,
V_COLUMN TYPE LVC_S_COL,
V_ROW_NUM TYPE LVC_S_ROID.
DATA: OK_CODE LIKE SY-UCOMM,
SAVE_OK LIKE SY-UCOMM,
G_CONTAINER1 TYPE SCRFNAME VALUE 'TEST',
GS_LAYOUT TYPE LVC_S_LAYO.
DATA:BEGIN OF ITAB OCCURS 0,
VBELN LIKE LIKP-VBELN,
POSNR LIKE LIPS-POSNR,
COMISN(10),
CELLCOLOR TYPE LVC_T_SCOL, "required for color
DROP(20),
<b> HANDLE_STYLE TYPE LVC_T_STYL,</b>
END OF ITAB.
* CLASS lcl_event_handler DEFINITION
CLASS LCL_EVENT_HANDLER DEFINITION .
PUBLIC SECTION .
METHODS:
**Hot spot Handler
HANDLE_HOTSPOT_CLICK FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW_ID E_COLUMN_ID ES_ROW_NO,
<b>**Handler to Check the Data Change
HANDLE_DATA_CHANGED FOR EVENT DATA_CHANGED
OF CL_GUI_ALV_GRID
IMPORTING ER_DATA_CHANGED
E_ONF4
E_ONF4_BEFORE
E_ONF4_AFTER,</b>
**Double Click Handler
HANDLE_DOUBLE_CLICK FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW E_COLUMN ES_ROW_NO.
ENDCLASS. "lcl_event_handler DEFINITION
* CLASS lcl_event_handler IMPLEMENTATION
CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
*Handle Hotspot Click
METHOD HANDLE_HOTSPOT_CLICK .
CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
V_ROW = E_ROW_ID.
V_COLUMN = E_COLUMN_ID.
V_ROW_NUM = ES_ROW_NO.
MESSAGE I000 WITH V_ROW 'clicked'.
ENDMETHOD. "lcl_event_handler
*Handle Double Click
METHOD HANDLE_DOUBLE_CLICK.
ENDMETHOD. "handle_double_click
<b>**Handle Data Change
METHOD HANDLE_DATA_CHANGED.
DATA: X_CHANGE TYPE LVC_S_MODI,
X_FINAL TYPE ITAB,
L_FLAG,
LS_OUTTAB LIKE LINE OF ITAB.
DATA: LS_EDIT TYPE LVC_S_STYL,
LT_EDIT TYPE LVC_T_STYL.
LOOP AT ER_DATA_CHANGED->MT_GOOD_CELLS INTO X_CHANGE.
IF X_CHANGE-FIELDNAME = 'DROP' AND X_CHANGE-VALUE = 'S/W ENGINEER'.
LS_EDIT-FIELDNAME = 'COMISN'.
LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
LS_EDIT-STYLE2 = SPACE.
LS_EDIT-STYLE3 = SPACE.
LS_EDIT-STYLE4 = SPACE.
LS_EDIT-MAXLEN = 8.
INSERT LS_EDIT INTO TABLE LT_EDIT.
INSERT LINES OF LT_EDIT INTO TABLE LS_OUTTAB-HANDLE_STYLE.
MODIFY ITAB INDEX X_CHANGE-ROW_ID FROM LS_OUTTAB TRANSPORTING
HANDLE_STYLE .
else.
LS_EDIT-FIELDNAME = 'COMISN'.
LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_ENABLED.
LS_EDIT-STYLE2 = SPACE.
LS_EDIT-STYLE3 = SPACE.
LS_EDIT-STYLE4 = SPACE.
LS_EDIT-MAXLEN = 8.
INSERT LS_EDIT INTO TABLE LT_EDIT.
INSERT LINES OF LT_EDIT INTO TABLE LS_OUTTAB-HANDLE_STYLE.
MODIFY ITAB INDEX X_CHANGE-ROW_ID FROM LS_OUTTAB TRANSPORTING
HANDLE_STYLE .
ENDIF.
ENDLOOP.
CALL METHOD G_GRID->REFRESH_TABLE_DISPLAY
EXCEPTIONS
FINISHED = 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.
ENDMETHOD. "HANDLE_DATA_CHANGED</b>
ENDCLASS. "LCL_EVENT_HANDLER IMPLEMENTATION
*& Global Definitions
DATA: G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,"Container1
G_HANDLER TYPE REF TO LCL_EVENT_HANDLER. "handler
*- Fieldcatalog for First and second Report
DATA: IT_FIELDCAT TYPE LVC_T_FCAT,
X_FIELDCAT TYPE LVC_S_FCAT,
LS_VARI TYPE DISVARIANT.
* START-OF_SELECTION
START-OF-SELECTION.
SELECT VBELN
POSNR
FROM LIPS
UP TO 20 ROWS
INTO CORRESPONDING FIELDS OF TABLE ITAB.
END-OF-SELECTION.
IF NOT ITAB[] IS INITIAL.
CALL SCREEN 100.
ELSE.
MESSAGE I002 WITH 'NO DATA FOR THE SELECTION'(004).
ENDIF.
*& Form CREATE_AND_INIT_ALV
* text
FORM CREATE_AND_INIT_ALV .
DATA: LT_EXCLUDE TYPE UI_FUNCTIONS.
CREATE OBJECT G_CUSTOM_CONTAINER
EXPORTING CONTAINER_NAME = G_CONTAINER1.
CREATE OBJECT G_GRID
EXPORTING I_PARENT = G_CUSTOM_CONTAINER.
* Set a titlebar for the grid control
CLEAR GS_LAYOUT.
GS_LAYOUT-GRID_TITLE = TEXT-003.
<b>GS_LAYOUT-STYLEFNAME = 'HANDLE_STYLE'.</b>
GS_LAYOUT-ZEBRA = SPACE.
GS_LAYOUT-CWIDTH_OPT = 'X'.
GS_LAYOUT-NO_ROWMARK = 'X'.
GS_LAYOUT-CTAB_FNAME = 'CELLCOLOR'.
<b> CALL METHOD G_GRID->REGISTER_EDIT_EVENT
EXPORTING
I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.</b>
CREATE OBJECT G_HANDLER.
SET HANDLER G_HANDLER->HANDLE_DOUBLE_CLICK FOR G_GRID.
SET HANDLER G_HANDLER->HANDLE_HOTSPOT_CLICK FOR G_GRID.
<b> SET HANDLER G_HANDLER->HANDLE_DATA_CHANGED FOR G_GRID.</b>
DATA: LS_CELLCOLOR TYPE LVC_S_SCOL. "required for color
DATA: L_INDEX TYPE SY-TABIX.
"Here i am changing the color of line 1,5,10...
"so you can change the color of font conditionally
LOOP AT ITAB.
L_INDEX = SY-TABIX.
IF L_INDEX = 1 OR L_INDEX = 5 OR L_INDEX = 10.
LS_CELLCOLOR-FNAME = 'VBELN'.
LS_CELLCOLOR-COLOR-COL = '6'.
LS_CELLCOLOR-COLOR-INT = '0'.
LS_CELLCOLOR-COLOR-INV = '1'.
APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
LS_CELLCOLOR-FNAME = 'POSNR'.
LS_CELLCOLOR-COLOR-COL = '6'.
LS_CELLCOLOR-COLOR-INT = '0'.
LS_CELLCOLOR-COLOR-INV = '1'.
APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
ENDIF.
ENDLOOP.
* setting focus for created grid control
CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
EXPORTING
CONTROL = G_GRID.
* Build fieldcat and set editable for date and reason code
* edit enabled. Assign a handle for the dropdown listbox.
PERFORM BUILD_FIELDCAT.
PERFORM SET_DRDN_TABLE.
* Optionally restrict generic functions to 'change only'.
* (The user shall not be able to add new lines).
PERFORM EXCLUDE_TB_FUNCTIONS CHANGING LT_EXCLUDE.
**Vaiant to save the layout
LS_VARI-REPORT = SY-REPID.
LS_VARI-HANDLE = SPACE.
LS_VARI-LOG_GROUP = SPACE.
LS_VARI-USERNAME = SPACE.
LS_VARI-VARIANT = SPACE.
LS_VARI-TEXT = SPACE.
LS_VARI-DEPENDVARS = SPACE.
CALL METHOD G_GRID->REGISTER_EDIT_EVENT
EXPORTING
I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.
**Calling the Method for ALV output
CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
IS_VARIANT = LS_VARI
IS_LAYOUT = GS_LAYOUT
I_SAVE = 'A'
CHANGING
IT_FIELDCATALOG = IT_FIELDCAT
IT_OUTTAB = ITAB[].
* 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
* -->PT_EXCLUDE text
FORM EXCLUDE_TB_FUNCTIONS CHANGING PT_EXCLUDE TYPE UI_FUNCTIONS.
* Only allow to change data not to create new entries (exclude
* generic 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_fieldcat
* Fieldcatalog
FORM BUILD_FIELDCAT .
DATA: L_POS TYPE I.
L_POS = L_POS + 1.
X_FIELDCAT-SCRTEXT_M = 'Delivery'(024).
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-NO_ZERO = 'X'.
X_FIELDCAT-OUTPUTLEN = '10'.
X_FIELDCAT-HOTSPOT = 'X'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_POS = L_POS + 1.
X_FIELDCAT-SCRTEXT_M = 'Item'(025).
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-OUTPUTLEN = '5'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_POS = L_POS + 1.
X_FIELDCAT-SCRTEXT_M = 'Drop'(025).
X_FIELDCAT-FIELDNAME = 'DROP'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-OUTPUTLEN = '5'.
X_FIELDCAT-EDIT = 'X'.
X_FIELDCAT-DRDN_HNDL = '1'.
X_FIELDCAT-DRDN_ALIAS = 'X'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_POS = L_POS + 1.
X_FIELDCAT-SCRTEXT_M = 'Comissn'(025).
X_FIELDCAT-FIELDNAME = 'COMISN'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-OUTPUTLEN = '10'.
X_FIELDCAT-EDIT = 'X'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
ENDFORM. " build_fieldcat
*& Module STATUS_0100 OUTPUT
* text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'MAIN100'.
SET TITLEBAR 'MAIN100'.
IF G_CUSTOM_CONTAINER IS INITIAL.
**Initializing the grid and calling the fm to Display the O/P
PERFORM CREATE_AND_INIT_ALV.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form SET_DRDN_TABLE
* text
FORM SET_DRDN_TABLE.
DATA:LT_DRAL TYPE LVC_T_DRAL,
LS_DRAL TYPE LVC_S_DRAL.
LS_DRAL-HANDLE = '1'.
LS_DRAL-VALUE = 'S/W Engineer'.
LS_DRAL-INT_VALUE = 'S/W Engineer'.
APPEND LS_DRAL TO LT_DRAL.
LS_DRAL-HANDLE = '1'.
LS_DRAL-VALUE = 'Manager'.
LS_DRAL-INT_VALUE = 'Manager'.
APPEND LS_DRAL TO LT_DRAL.
**Setting the Drop down table for Reason Code
CALL METHOD G_GRID->SET_DROP_DOWN_TABLE
EXPORTING
IT_DROP_DOWN_ALIAS = LT_DRAL.
ENDFORM. " set_drdn_table
Regards
vijay -
I installed the updated Malwarebytes Anti Malware and ran a full scan. I got a few items I understand some in the registry keys but it also gave me a long list of possible problems all related to Firefox/Mozilla. I had hoped there was a way to send the list to Mozilla to see if these are real problems.
Here is the first part of the list, it was to long to post the entire list that was generated:
Malwarebytes Anti-Malware
www.malwarebytes.org
Scan Date: 3/31/2014
Scan Time: 9:32:49 PM
Logfile: anti malware.txt
Administrator: Yes
Version: 2.00.0.1000
Malware Database: v2014.03.31.09
Rootkit Database: v2014.03.27.01
License: Premium
Malware Protection: Enabled
Malicious Website Protection: Enabled
Chameleon: Disabled
OS: Windows 7 Service Pack 1
CPU: x64
File System: NTFS
User: JT
Scan Type: Threat Scan
Result: Completed
Registry Keys: 2
PUP.Optional.PCSpeedUp.A, HKLM\SOFTWARE\SPEEDCHECKER LIMITED\PC Speed Up, , [fed775942e4d5dd975f8dea62cd7b34d],
PUP.Optional.InstallBrain.A, HKU\S-1-5-18-{ED1FC765-E35E-4C3D-BF15-2C2B11260CE4}-0\SOFTWARE\WNLT, , [05d00306d5a6a294a67dc7bf18eb25db],
Registry Values: 4
PUP.Optional.HomePageProtector.A, HKLM\SOFTWARE\MOZILLA\FIREFOX\EXTENSIONS\{336D0C35-8A85-403a-B9D2-65C292C39087}, , [52834ebbd6a5a393e0315aae06fc08f8],
PUP.Optional.HomePageProtector.A, HKLM\SOFTWARE\MOZILLA\FIREFOX\EXTENSIONS|{336D0C35-8A85-403A-B9D2-65C292C39087}, C:\Program Files\IB Updater\Firefox, , [52834ebbd6a5a393e0315aae06fc08f8]
PUP.Optional.Incredibar, HKLM\SOFTWARE\MOZILLA\FIREFOX\EXTENSIONS|{FE1DEEEA-DB6D-44b8-83F0-34FC0F9D1052}, C:\Program Files\IB Updater\Firefox, , [fbda11f8daa1df5717880288ca3955ab]
PUP.Optional.InstallBrain.A, HKU\S-1-5-18-{ED1FC765-E35E-4C3D-BF15-2C2B11260CE4}-0\SOFTWARE\WNLT|URL, , [05d00306d5a6a294a67dc7bf18eb25db],
Registry Data: 0
(No malicious items detected)
Folders: 2
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\toolbarImages, , [7f56db2eaccf10260fb1c096ca386b95],
Files: 108
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847.1000082.currentList, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847.1000082.localStations, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847.1000082.nowPlaying, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847.1000082.publisherStations, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847.130068661007799818.search.selectedEngineId, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847.130068661007799818.search.settings, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847.appOptions, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847.cookiesRepo, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847.NotificationSettings, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847.NOTIFICATION_ID.notifications-repository, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847.NOTIFICATION_ID.notifications-servicemap, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847_10.14.350.31.serviceLayer_services_toolbarSettings, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847_10.14.350.31.serviceLayer_services_translation, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847_RAW.serviceLayer_services_appsMetadata, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847_RAW.serviceLayer_services_appTrackingFirstTime, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847_RAW.serviceLayer_services_gottenAppsContextMenu, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847_RAW.serviceLayer_services_location, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847_RAW.serviceLayer_services_login, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847_RAW.serviceLayer_services_otherAppsContextMenu, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847_RAW.serviceLayer_services_searchAPI, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847_RAW.serviceLayer_services_serviceMap, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847_RAW.serviceLayer_services_setupAPI, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847_RAW.serviceLayer_services_toolbarContextMenu, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847_RAW.serviceLayer_services_toolbarSettings, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\CT3289847_RAW.serviceLayer_services_translation, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\serviceLayer_userApps_added, , [7f56db2eaccf10260fb1c096ca386b95],
PUP.Optional.Conduit.A, C:\Users\JT\AppData\Roaming\Mozilla\Firefox\Profiles\nmenilbu.default-1351988925677\CT3289847\toolbar_initializing_logger.txt, , [7f56db2eaccf10260fb1c096ca386b95], -
How do i export my entire address book into excel. I want to send the list to lady who writes a newsletter for me and she would like it in excel. I know I did this last christmas, but cannot remember how i did it. Please help.
export and import to csv
or here are other options
http://www.google.dk/search?source=ig&hl=da&rlz=1G1TSEH_ENDK367&q=ohm+law&oq=ohm +law&aq=0&aqi=g3&aql=&gs_sm=e&gs_upl=848060l852340l0l853488l7l7l0l1l1l0l216l774l 1.2.2l5l0#sclient=psy-ab&hl=da&rlz=1G1TSEH_ENDK367&source=hp&q=export%20contacts %20to%20excel%20outlook%202010&pbx=1&oq=export%20contacts%20to%20exc&aq=1L&aqi=g -L4&aql=&gs_sm=sc&gs_upl=1097767l1103601l0l1106743l22l11l0l10l10l0l288l2210l1.4. 6l21l0&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=a68934164527e931&biw=1631&bih=731&pf=p&p dl=300 -
Can i use classes or grid control (alv) in normal report
Hai,
Can i use Grid control or classes in normal report.If yes what are the steps that i have to go for.
thanks
kiranSure... here is a sample of an ALV in a report. All you need to do is call a screen. I believe that there is also a way to do it without having to create a screen.
REPORT ZRICH_0001.
DATA: BEGIN OF I_ALV OCCURS 0,
MATNR TYPE MARA-MATNR,
MAKTX TYPE MAKT-MAKTX,
END OF I_ALV.
DATA: ALV_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
DATA: ALV_GRID TYPE REF TO CL_GUI_ALV_GRID.
DATA: LAYOUT TYPE LVC_S_LAYO.
DATA: FIELDCAT TYPE LVC_T_FCAT.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001 .
SELECT-OPTIONS: S_MATNR FOR i_ALV-MATNR.
SELECTION-SCREEN END OF BLOCK B1.
START-OF-SELECTION.
PERFORM GET_DATA.
CALL SCREEN 100.
* Module status_0100 OUTPUT
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS '0100'.
SET TITLEBAR '0100'.
DATA: VARIANT TYPE DISVARIANT.
VARIANT-REPORT = SY-REPID.
VARIANT-USERNAME = SY-UNAME.
* Create Controls
CREATE OBJECT ALV_CONTAINER
EXPORTING
CONTAINER_NAME = 'ALV_CONTAINER'.
CREATE OBJECT ALV_GRID
EXPORTING
I_PARENT = ALV_CONTAINER.
* ALV Specific. Data selection.
* Populate Field Catalog
PERFORM GET_FIELDCATALOG.
CALL METHOD ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IS_LAYOUT = LAYOUT
IS_VARIANT = VARIANT
I_SAVE = 'U'
I_STRUCTURE_NAME = 'I_ALV'
CHANGING
IT_OUTTAB = I_ALV[]
IT_FIELDCATALOG = FIELDCAT[].
ENDMODULE.
* Module USER_COMMAND_0100 INPUT
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK' OR 'CANC'.
IF NOT ALV_CONTAINER IS INITIAL.
CALL METHOD ALV_CONTAINER->FREE.
CLEAR: ALV_CONTAINER.
FREE : ALV_CONTAINER.
ENDIF.
IF SY-SUBRC = 0.
SET SCREEN 0.
LEAVE SCREEN.
ELSE.
LEAVE PROGRAM.
ENDIF.
WHEN 'EXIT'.
IF NOT ALV_CONTAINER IS INITIAL.
CALL METHOD ALV_CONTAINER->FREE.
CLEAR: ALV_CONTAINER.
FREE : ALV_CONTAINER.
ENDIF.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE.
* FORM GET_DATA
FORM GET_DATA.
SELECT * INTO CORRESPONDING FIELDS OF TABLE I_ALV
FROM MARA
INNER JOIN MAKT
ON MARA~MATNR = MAKT~MATNR
WHERE MARA~MATNR IN S_MATNR
AND MAKT~SPRAS = SY-LANGU.
SORT I_ALV ASCENDING BY MATNR.
ENDFORM.
* Form Get_Fieldcatalog - Set Up Columns/Headers
FORM GET_FIELDCATALOG.
DATA: LS_FCAT TYPE LVC_S_FCAT.
REFRESH: FIELDCAT.
CLEAR: LS_FCAT.
LS_FCAT-REPTEXT = 'Material Number'.
LS_FCAT-COLTEXT = 'Material Number'.
LS_FCAT-FIELDNAME = 'MATNR'.
LS_FCAT-REF_TABLE = 'I_ALV'.
LS_FCAT-OUTPUTLEN = '18'.
LS_FCAT-COL_POS = 1.
APPEND LS_FCAT TO FIELDCAT.
CLEAR: LS_FCAT.
LS_FCAT-REPTEXT = 'Material Description'.
LS_FCAT-COLTEXT = 'Material Description'.
LS_FCAT-FIELDNAME = 'MAKTX'.
LS_FCAT-REF_TABLE = 'I_ALV'.
LS_FCAT-OUTPUTLEN = '40'.
LS_FCAT-COL_POS = 2.
APPEND LS_FCAT TO FIELDCAT.
ENDFORM.
Regards,
Rich Heilman -
To send the error messages of an BAPI as an attachment in mail
Hi all,
I am running the BAPI_EXCHRATE_CREATEMULTIPLE to update the transaction OB08..I am able to do that.What i want now is that if there are error messages in the BAPIRET2 table then i collect these messages in a table and send these records as an attchment in the mail..
I am using the FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send the mail..
Plz suggest how i should proceed..
A sample code will be useful..
<b><REMOVED BY MODERATOR></b>
Thanks..
Arun
Message was edited by:
Alvaro Tejada GalindoYou should use the OO approach to sending email out of SAP. There are several bcs_example* programs in the system.
REPORT bcs_example_1.
* This example shows how to send
* - a simple text provided in an internal table of text lines
* - to some internet email address.
* All activities done via facade CL_BCS!
DATA: send_request TYPE REF TO cl_bcs.
DATA: text TYPE bcsy_text.
DATA: document TYPE REF TO cl_document_bcs.
DATA: sender TYPE REF TO cl_sapuser_bcs.
DATA: recipient TYPE REF TO if_recipient_bcs.
DATA: bcs_exception TYPE REF TO cx_bcs.
DATA: sent_to_all TYPE os_boolean.
START-OF-SELECTION.
PERFORM main.
* FORM main *
FORM main.
TRY.
* -------- create persistent send request ------------------------
send_request = cl_bcs=>create_persistent( ).
* -------- create and set document -------------------------------
* create document from internal table with text
APPEND 'Hello world!' TO text.
document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = text
i_length = '12'
i_subject = 'test created by BCS_EXAMPLE_1' ).
* add document to send request
CALL METHOD send_request->set_document( document ).
* --------- set sender -------------------------------------------
* note: this is necessary only if you want to set the sender
* different from actual user (SY-UNAME). Otherwise sender is
* set automatically with actual user.
sender = cl_sapuser_bcs=>create( sy-uname ).
CALL METHOD send_request->set_sender
EXPORTING
i_sender = sender.
* --------- add recipient (e-mail address) -----------------------
* create recipient - please replace e-mail address !!!
recipient = cl_cam_address_bcs=>create_internet_address(
'[email protected]' ).
* add recipient with its respective attributes to send request
CALL METHOD send_request->add_recipient
EXPORTING
i_recipient = recipient
i_express = 'X'.
* ---------- send document ---------------------------------------
CALL METHOD send_request->send(
EXPORTING
i_with_error_screen = 'X'
RECEIVING
result = sent_to_all ).
IF sent_to_all = 'X'.
WRITE text-003.
ENDIF.
COMMIT WORK.
* * exception handling
* * replace this very rudimentary exception handling
* * with your own one !!!
CATCH cx_bcs INTO bcs_exception.
WRITE: text-001.
WRITE: text-002, bcs_exception->error_type.
EXIT.
ENDTRY.
ENDFORM. "main -
To display the list of File Name in a report region from a Directory
Hello All,
Can any one guide me in displaying the list of file name from a file system directory in a report region with link?
On click of the link it should display the open/save dialog box.
I will appreciate the early solution. (It is bit urgent)
Thanks,
ShyamA quick, "dirty solution would be to have a cron job (I am assuming you are on a UNIX-based system) that populates a file periodically with the names of files in a directory/directories. Then have an external table that points to that file. You can then create an Apex report that lists the contents of the external table.
1) crontab job:
ls -1 /source_dir/* > /destination_dir/file.list
2) create external table:
CREATE DIRECTORY filedir AS ' destination_dir ';
GRANT READ ON DIRECTORY xfer_files TO public;
CREATE TABLE file_list_ext (file_names VARHCAR2(100))
ORGANIZATION EXTERNAL
TYPE oracle_loader
DEFAULT DIRECTORY files_dir
ACCESS PARAMETERS
records delimited by newline
fields terminated by ','
missing field values are null
(file_name)
LOCATION ('file.list')
REJECT LIMIT UNLIMITED;
3) create APEX report on table: file_list_ext
Hope this helps. -
Mailto is not listed among the Content Type. How do I add it to the list so I can set Yahoo Mail to the Action for this application
Unfortunately you would need to select all your previous posts and move them down at once.
-
I want someone else to be able to send group e-mails, using mail lists that I have created. What is the easiest way of e-mailing my mail lists to someone else? I do not see how individual mail lists can be made as an attachment to an e-mail.
Thanks. I suspected that was the answer.
-
How can we update after the list displays in ALV report.
HI all sap gurus,
I have one ALV report, after executing the report list will displays there i need to update the data. please give me answer without oops concept.
thanks,
reddyYOu need to make some fields editable in order to update the data.
for that you should set the EDIT = 'X' in the field catalog for that column.
Regards,
Ravi -
Sending the rows in an ALV grid chosen by the user to another report
Hello Experts!
I am facing a problem with respect to ALV grid using OOABAP.
I am displaying an ALV grid. The user selects a few rows from this grid and clicks on a button called "Update" which i have incorporated into the grid.
Once the user clicks on update, i should call another report passing only the rows selected by the user. I am using the method "get_selected_rows" do get the indices of the rows selected. But, i am unable to proceed from here. How do i incorporate this logic in my code? Can anyone give me some sample code?
Thanks and Regards,
SmithaHi Smitha
Get the rows of the ALV into an internal table . You are right in using the method GET_SELECTED_ROWS.
Suppose li_tab is the internal table in which you have the rows of ALV.
Write this statement in the report from which you are transporting.
EXPORT li_tab TO MEMORY ID sy-repid.
Write this statement in the report to which you are transporting.
IMPORT sel_tab = li_tab FROM MEMORY ID 'Z_Report_Name'.
hope it works.
Reward points if helpful. -
How to send the edited output fields of an ABAP report into internal table
Hi,
I had edited the output fields of an ALV GRID report now how can i again update the fields of the internal table with this edited new data .
Please suggest me if any method or FM exists for this.
Thanks in advance
With Regards
Ajayhi,
you have to use the following code in the user command
*& Form command
* TO HANDLE USER ACTIONS AGAINST PF-STATUS
* -->UCOMM text
* -->SELFIELD text
FORM COMMAND USING UCOMM LIKE SY-UCOMM SELFIELD TYPE SLIS_SELFIELD.
DATA : LV_OKCODE TYPE SY-UCOMM.
LV_OKCODE = UCOMM.
CASE LV_OKCODE.
WHEN 'PROCESS'. "button
selfield-refresh = 'X'.
ENDCASE.
ENDFORM. "command
hope this helps
Regards
Ritesh -
I need to send the output of report as a mial
hi all,
how can i send the output of an ALV GRID as a mail ...
the visibilty of this GRID is good.
and at the same time if i use the FM 'SO_DOCUMENT_SEND_API1'
its being sent as an attachment,which i need to send jus a mail...not as an attachment.
kindly reply me ASAPREPORT YMS_SENDMAILREPORT NO STANDARD PAGE HEADING.
TABLES: DRAD,
QINF,
DRAW,
SOUC,
SOFD,
DRAP.
DATA: P_RETURN_CODE LIKE SY-SUBRC.
data: d_username LIKE DRAP-PRNAM.
* mail declarations
DATA : BEGIN OF NEW_OBJECT_ID. " the newly created email object
INCLUDE STRUCTURE SOODK.
DATA : END OF NEW_OBJECT_ID.
DATA : BEGIN OF FOLDER_ID. " the folder id of the outbox
INCLUDE STRUCTURE SOODK.
DATA : END OF FOLDER_ID.
DATA : BEGIN OF REC_TAB OCCURS 5. " the table which will contain the
INCLUDE STRUCTURE SOOS1. " information on the destination
DATA : END OF REC_TAB.
DATA : BEGIN OF OBJECT_HD_CHANGE. " the table which contains the
INCLUDE STRUCTURE SOOD1. " info for the object we will be
DATA : END OF OBJECT_HD_CHANGE. " creating
DATA : OBJECT_TYPE LIKE SOOD-OBJTP. " the type of object
DATA : BEGIN OF OBJHEAD OCCURS 5. " the header of the object
INCLUDE STRUCTURE SOLI.
DATA : END OF OBJHEAD.
DATA : BEGIN OF OBJCONT OCCURS 0. " the contents of the object
INCLUDE STRUCTURE SOLI. " i.e. the text etc
DATA : END OF OBJCONT.
DATA : BEGIN OF OBJPARA OCCURS 5. " formatting options
INCLUDE STRUCTURE SELC.
DATA : END OF OBJPARA.
DATA : BEGIN OF OBJPARB OCCURS 5. " formatting options
INCLUDE STRUCTURE SOOP1.
DATA : END OF OBJPARB.
DATA : BEGIN OF T_MAIL_TEXT OCCURS 0, "Message table for messages to
STRING(255), "user via mailbox
END OF T_MAIL_TEXT.
Parameter: p_uname like sy-uname.
**START-OF-SELECTION
START-OF-SELECTION.
d_username = p_uname.
PERFORM POPULATE_EMAIL_TEXT.
PERFORM SETUP_TRX_AND_RTX_MAILBOXES USING P_RETURN_CODE.
PERFORM CREATE_AND_SEND_MAIL_OBJECT.
* FORM POPULATE_EMAIL_TEXT *
* Inserts text for email message *
FORM POPULATE_EMAIL_TEXT.
CLEAR T_MAIL_TEXT-STRING. "puts a blank line in
APPEND T_MAIL_TEXT.
APPEND T_MAIL_TEXT.
* adds failed list on to end of success list.
T_MAIL_TEXT-STRING = 'Test email message line 1'.
APPEND T_MAIL_TEXT.
T_MAIL_TEXT-STRING = 'Test email message line 1'.
APPEND T_MAIL_TEXT.
CLEAR T_MAIL_TEXT-STRING. "puts a blank line in
APPEND T_MAIL_TEXT.
T_MAIL_TEXT-STRING = 'Header1 Header2 Header3'.
APPEND T_MAIL_TEXT.
T_MAIL_TEXT-STRING = '------------ ------------ ------------'.
APPEND T_MAIL_TEXT.
ENDFORM.
*& Form SETUP_TRX_&_RTX_MAILBOXES
* Ensure that the mailboxes of the sender (INTMGR) are set up OK
FORM SETUP_TRX_AND_RTX_MAILBOXES USING P_RETURN_CODE.
* get the user no of the sender in order to add the mail to the
* user name's outbox for future reference
SELECT SINGLE * FROM SOUC
WHERE SAPNAM = SY-UNAME. "SAP name of a SAPoffice user
IF SY-SUBRC NE 0.
"Error finding the SAPoffice user info for the user
MESSAGE E064(ZR53) WITH SY-UNAME.
P_RETURN_CODE = 1.
EXIT.
ENDIF.
*Get the outbox No for the sender from the user No where the folder
" type is an outbox
SELECT * FROM SOFD WHERE OWNTP = SOUC-USRTP "Owner type from ID
AND OWNYR = SOUC-USRYR "Owner year from the ID
AND OWNNO = SOUC-USRNO "Owner number from the I
AND FOLRG = 'O'."Output box
ENDSELECT.
IF SY-SUBRC NE 0.
" Error getting folder information for the user
MESSAGE E065(ZR53) WITH SY-UNAME.
P_RETURN_CODE = 1.
EXIT.
ENDIF.
ENDFORM. " SETUP_TRX_&_RTX_MAILBOXES
*& Form CREATE_AND_SEND_MAIL_OBJECT
FORM CREATE_AND_SEND_MAIL_OBJECT.
FOLDER_ID-OBJTP = SOFD-FOLTP. " the folder type ( usually FOL )
FOLDER_ID-OBJYR = SOFD-FOLYR. " the folder year ( usually 22 )
FOLDER_ID-OBJNO = SOFD-FOLNO. " the folder no.
OBJECT_TYPE = 'RAW'. " the type of object being added
* build up the object information for creating the object
OBJECT_HD_CHANGE-OBJLA = SY-LANGU. " the language of the email
OBJECT_HD_CHANGE-OBJNAM = 'PS to DM Interface'. " the object name
* mail subject 'Mass Linking of QA, pass/fail'
MOVE TEXT-002 TO OBJECT_HD_CHANGE-OBJDES.
OBJECT_HD_CHANGE-DLDAT = SY-DATUM. " the date of the email
OBJECT_HD_CHANGE-DLTIM = SY-UZEIT. " the time of the email
OBJECT_HD_CHANGE-OBJPRI = '1'. " the priority ( highest )
OBJECT_HD_CHANGE-OBJSNS = 'F'. " the object sensitivity
* F is functional, C - company sensitive
* object_hd_change-skips = ' '. " Skip first screen
* object_hd_change-acnam = 'SM35'. " Batch imput transaction
* object_hd_change-vmtyp = 'T'. " Transaction type
* add the text lines into the contents of the email
CLEAR OBJCONT.
REFRESH OBJCONT.
* free objcont. " added this to delete the mail contents records
LOOP AT T_MAIL_TEXT.
OBJCONT-LINE = T_MAIL_TEXT-STRING.
APPEND OBJCONT.
ENDLOOP.
CLEAR OBJCONT.
* build up the table of receivers for the email
REC_TAB-RCDAT = SY-DATUM. " the date to send the email
REC_TAB-RCTIM = SY-UZEIT. " the time to send the email
* the SAP username of the person who will receive the email
REC_TAB-RECNAM = D_USERNAME.
* the user type of the person who will send the email ( USR )
REC_TAB-SNDTP = SOUC-USRTP.
* the user year of the person who will send the email ( 22 )
REC_TAB-SNDYR = SOUC-USRYR.
* the user number of the person who will send the email
REC_TAB-SNDNO = SOUC-USRNO.
* the sap username of the person who will send the email
REC_TAB-SNDNAM = SY-UNAME.
* get the user info for the receiver of the document
SELECT SINGLE * FROM SOUC WHERE SAPNAM = D_USERNAME.
IF SY-SUBRC NE 0.
WRITE : / TEXT-001, D_USERNAME. "usnam.
EXIT.
ENDIF.
* the user number of the person who will receive the email ( USR )
REC_TAB-RECNO = SOUC-USRNO.
* the user type of the person who will receive the email ( USR )
REC_TAB-RECTP = SOUC-USRTP.
* the user year of the person who will receive the email ( USR )
REC_TAB-RECYR = SOUC-USRYR.
* the priority of the email ( highest )
REC_TAB-SNDPRI = '1'.
* check for delivery on the email
REC_TAB-DELIVER = 'X'.
* send express so recipient knows there is a problem
REC_TAB-SNDEX = 'X'.
* check for a return receipt
REC_TAB-READ = 'X'.
* the sap username of the person receiving the email
REC_TAB-ADR_NAME = D_USERNAME. "usnam.
* add this receiver to the internal table
APPEND REC_TAB.
CLEAR REC_TAB.
* call the function to create the object in the outbox of the sender
CALL FUNCTION 'SO_OBJECT_INSERT'
EXPORTING
FOLDER_ID = FOLDER_ID
OBJECT_HD_CHANGE = OBJECT_HD_CHANGE
OBJECT_TYPE = OBJECT_TYPE
OWNER = SY-UNAME
IMPORTING
OBJECT_ID = NEW_OBJECT_ID
TABLES
OBJCONT = OBJCONT
OBJHEAD = OBJHEAD
OBJPARA = OBJPARA
OBJPARB = OBJPARB
EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1
COMMUNICATION_FAILURE = 2
COMPONENT_NOT_AVAILABLE = 3
DL_NAME_EXIST = 4
FOLDER_NOT_EXIST = 5
FOLDER_NO_AUTHORIZATION = 6
OBJECT_TYPE_NOT_EXIST = 7
OPERATION_NO_AUTHORIZATION = 8
OWNER_NOT_EXIST = 9
PARAMETER_ERROR = 10
SUBSTITUTE_NOT_ACTIVE = 11
SUBSTITUTE_NOT_DEFINED = 12
SYSTEM_FAILURE = 13
X_ERROR = 14
OTHERS = 15.
IF SY-SUBRC NE 0.
MESSAGE A063(ZR53) WITH SY-SUBRC.
EXIT.
ENDIF.
* call the function to send the already created email to the receivers
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
FOLDER_ID = FOLDER_ID
OBJECT_ID = NEW_OBJECT_ID
OUTBOX_FLAG = 'X'
OWNER = SY-UNAME
TABLES
RECEIVERS = REC_TAB
EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1
COMMUNICATION_FAILURE = 2
COMPONENT_NOT_AVAILABLE = 3
FOLDER_NOT_EXIST = 4
FOLDER_NO_AUTHORIZATION = 5
FORWARDER_NOT_EXIST = 6
NOTE_NOT_EXIST = 7
OBJECT_NOT_EXIST = 8
OBJECT_NOT_SENT = 9
OBJECT_NO_AUTHORIZATION = 10
OBJECT_TYPE_NOT_EXIST = 11
OPERATION_NO_AUTHORIZATION = 12
OWNER_NOT_EXIST = 13
PARAMETER_ERROR = 14
SUBSTITUTE_NOT_ACTIVE = 15
SUBSTITUTE_NOT_DEFINED = 16
SYSTEM_FAILURE = 17
TOO_MUCH_RECEIVERS = 18
USER_NOT_EXIST = 19
X_ERROR = 20
OTHERS = 21.
IF SY-SUBRC EQ 0.
MESSAGE I035(ZR53) WITH NEW_OBJECT_ID D_USERNAME. "usnam.
ELSE.
MESSAGE I036(ZR53) WITH D_USERNAME." sy-subrc.
ENDIF.
ENDFORM. " CREATE_AND_SEND_MAIL_OBJECT -
Problen when Sending the text file as attachment to the external mail
HI,
I am sending the text file as an attachment to a aexternal mai. mailing is going with text file attachment, but text file is empty. No information in the file is going, only empty text file is going. I am sending the code iam using. Please suggest, if I need to change any passing parameters orany other other solution.
tables: knb1,kna1,adr6,ITEMSET,bsid,TSP01.
INTERNAL TABLES
DATA: BEGIN OF it_kna1 occurs 0,
KUNNR LIKE KNA1-KUNNR,
ADRNR LIKE KNA1-ADRNR,
END OF it_kna1.
DATA: BEGIN OF it_email occurs 0,
ADDRNUMBER LIKE ADR6-ADDRNUMBER,
SMTP_ADDR LIKE ADR6-SMTP_ADDR,
END OF it_email.
DATA: BEGIN OF it_bsid occurs 0,
KUNNR LIKE BSID-KUNNR,
BUKRS LIKE BSID-BUKRS,
END OF it_bsid.
DATA: BEGIN OF it_final occurs 0,
KUNNR LIKE KNA1-KUNNR,
ADRNR LIKE ADR6-ADDRNUMBER,
EMAIL LIKE ADR6-SMTP_ADDR,
END OF it_final.
DATA: BEGIN OF BUFFER OCCURS 10000,
TEXT(255) TYPE C,
END OF BUFFER.
data:xtext type solix_tab." occurs 0 with header line."line.
data:xi_pdf type soli_tab.
DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE,
OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE,
OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE,
RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE,
DOC_CHNG LIKE SODOCCHGI1,
PARAMS LIKE PRI_PARAMS,
ARPARAMS LIKE ARC_PARAMS,
DAYS(1) TYPE N VALUE 8,
COUNT(3) TYPE N VALUE 1,
VALID TYPE C,
RECEIVER(30),
STR(256).
data: spoolid type tsp01-rqident,
pdf_table like tline occurs 0 with header line,
v_bytecount type i,
itab_pdf like tline occurs 10 with header line,
xi_pdf like tline occurs 0 with header line,
xi_pdf like buffer occurs 0 with header line,
xi_pdf_1 like xi_pdf,
v_length(2) type p,
html like solisti1 occurs 0 with header line,
xi_temp like bapiqcmime occurs 0 with header line,
xi_mime(255) type c occurs 0 with header line.
VARIABLES
data: g_email type adr6-smtp_addr,
TAB_LINES LIKE SY-TABIX,
G_FLAG(1) TYPE C.
g_norm(1) TYPE C,
g_shbv(1) TYPE C,
g_merk(1) TYPE C,
g_park(1) TYPE C,
g_apar(1) TYPE C.
data: l_lines type i,
line1 type i,
l_temp(500) type c,
l_offset type p,
l_lineslen(2) type p,
l_mimelen(2) type p,
v_spono like tsp01-rqident,
l_tabix like sy-tabix.
*****VIA SELECTION-SCREEN
ENDFORM. " SEND_TO_SPOOL
*& Form GET_SPOOL_ID
*& Form CONVERT_SPOOL_TO_PDF
*& Form SEND_MAIL
FORM SEND_MAIL .
data:l_lin like sy-tabix,
l_lint like sy-tabix,
it_list like abaplist occurs 0,
l_newline(2) type x value '0D0A'.
*--Data for the status output after sending
data: user_address like sousradri1 occurs 1 with header line,
sent_to_all like sonv-flag.
clear: reclist, reclist[],
objtxt , objtxt[],
objpack, objpack[],
objbin , objbin[],
doc_chng.
*--move list to office table objbin
*--Start of Changes to support PDF attachments - UB20030116
loop at html.
objbin-line = html-line.
append objbin.
clear objbin.
endloop.
loop at xi_pdf.
objbin-line = xi_pdf-text.
append objbin.
clear objbin.
endloop.
*--We may write additional text to the main document
*--For faxing this will be the cover page. Like sending from SAPoffice
*--the layout set Office-Telefax will be used.
objtxt-line = 'NOTE : Please Consider the below Headers'.
append objtxt.
clear objtxt.
objtxt-line = 'Assignment --> Purchase order number '.
append objtxt.
clear objtxt.
objtxt-line = 'Document --> Invoice No '.
append objtxt.
clear objtxt.
objtxt-line = 'Amount In DC --> Amount Due '.
append objtxt.
clear objtxt.
objtxt-line = ' '.
append objtxt.
clear objtxt.
objtxt-line = ' '.
append objtxt.
clear objtxt.
objtxt-line = 'Please find attached statement for this week'.
append objtxt.
clear objtxt.
objtxt-line = ' '.
append objtxt.
clear objtxt.
objtxt-line = 'This is an AUTO GENERATED MAIL'.
concatenate objtxt-line 'Please Do not reply to this mail' into
objtxt-line separated by ' '.
append objtxt.
clear objtxt.
describe table objtxt lines tab_lines.
read table objtxt index tab_lines.
*--Create the document which is to be sent
doc_chng-obj_name = 'List'.
doc_chng-obj_name = 'SAPRPT'.
doc_chng-obj_descr = 'Customer statement for the week'.
concatenate 'Customer statement for '
sy-datum into
doc_chng-obj_descr
separated by ' '.
doc_chng-doc_size = ( tab_lines - 1 ) * 255 + strlen( objtxt ).
*--Fill the fields of the packing_list for the main document:
*--It is a text document
clear objpack-transf_bin.
*--The document needs no header (head_num = 0)
objpack-head_start = 1.
objpack-head_num = 0.
*--but it has a body
objpack-body_start = 1.
objpack-body_num = tab_lines.
*--of type RAW
objpack-doc_type = 'RAW'.
append objpack.
*--Create the attachment (the list itself)
describe table objbin lines tab_lines.
*--Fill the fields of the packing_list for the attachment:
*--It is binary document
objpack-transf_bin = 'X'.
*--we need no header
objpack-head_start = 1.
objpack-head_num = 0.
*--but a body
objpack-body_start = 1.
objpack-body_num = tab_lines.
*--of type G_DOC_TYPE
objpack-doc_type = 'PDF'. "commented on 12/13/2007
objpack-doc_type = 'TXT'. "commented on 12/13/2007
objpack-obj_name = 'Attachment'.
objpack-obj_descr = 'Customer Statement'.
concatenate 'Customer Statement' sy-datum into objpack-obj_descr.
objpack-doc_size = tab_lines * 255.
append objpack.
reclist-receiver = g_email.
reclist-rec_type = 'U'.
reclist-com_type = 'FAX'.
append reclist.
data:xi type soli.
xi-line = 'haisdgsfsdf'.
append xi to xi_pdf.
xi-line = 'haisdfdsfd'.
append xi to xi_pdf.
xi-line = 'haisfgsdfsd'.
append xi to xi_pdf.
xi-line = 'haisdfsgfsdgg'.
append xi to xi_pdf.
*xi_pdf-text = 'hai'.
*append xi_pdf.
*xi_pdf-text = 'hai'.
*append xi_pdf.
*xi_pdf-text = 'hai'.
*append xi_pdf.
*xi_pdf-text = 'hai'.
*append xi_pdf.
CALL FUNCTION 'SO_SOLITAB_TO_SOLIXTAB'
EXPORTING
ip_solitab = xi_pdf[]
IMPORTING
EP_SOLIXTAB = xtext[].
**--Send the document by calling the SAPoffice API1 module for sending
**--documents with attachments
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_chng
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
IMPORTING
sent_to_all = sent_to_all
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
contents_hex = xtext
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
others = 99.HI,
There are lots of bugs.
Please refer this sample program to fix it.
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
Best regards,
Prashant -
Scope of list ALV for MM report
Hi,
somebody knows like creating a scope of list format that is ALV?exists some check to determine that the list format is ALV? I need to visualize report ME2L in ALV format.
Thanks,
RHi,
Go to path SPRO->Materials management ->Purchasing->Reporting->Scope of list->Define scope of list.
Select the scope of list for which you want to see the ALV, then click on the details button.
Check the box Use ALV grid control at the bottom.
This will provide ALV display.
P.S: If this answers your query, then please close the thread.
Regards
Maybe you are looking for
-
Had FireFox and, as has happened before, I started having crashes and other issues. As before, I removed it but this time when I went to install it, nothing happens. I click to DL it and after 5 minutes, nothing happens and i click the button that sa
-
How to intialize delta for another ODS with same infosource
Hi Experts, We have one ODS having update routines , daily DELTA loads are ruuning in production system.Now we got one requirement like need to develope another ODS with different update routines on the same infosource. is it possibl
-
Im having problems with my itunes recognising my ipod
I downloaded a new version of itunes onto a new laptop, and connected an old ipod that was showing a smiley face pic. The ipod was about 6 years and i dropped it on the floor . anyway after about two weeks or researching a solution (and ignoring al
-
How to handle the WebService answer.
Hi, I have a Web service, the result of this answer is: <ns:getListBooksMySQLResponse xmlns:ns="http://services" xmlns:ax21="http://entities/xsd"> <ns:return xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax21:Book"> <ax21
-
Direct streaming with samba and DLNA/UPNP capable players
Hello, I have mediatomb running on my server which streams media to my PS3. However, I would like to do the same with my arch machines, but I can't find any players or plugins with upnp functionality. Amarok, AFAIK, doesn't have such capability. Alth