Changing web gallery presets (like background colour) and saving fields
Hello all—can this be done and, if so, how?
I want to change the "Stock" preset (with a black BG) so that it features a dark grey instead.
As well, I want Aperture to remember my studio name, etc.; for now, all that is remembered is copyright info. I can't see how to save a gallery with all fields set to what I will need into the future—can anyone assist? TIA, KL
As John points out, Web and Slideshow, prefs and presets are sticky for Collections. And you can reorder them which you can not so easily do on a selection for a Folder or All Photographs.
Don
Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.10 & Win XP, Pentax *ist D
http://donricklin.blogspot.com/
Similar Messages
-
My iTunes 11.0 (mac) has a black background colour and I can not see all of the information for each song. How do I change the background colour in iTunes 11.0 (mac) so I can see check boxes etc. My download window shows no information, it is entirely black.
Trent o
Someone else in the forum told me how to do this. If you have Onyx on your system then select Parameters, iTunes and turn off high contrast mode. If you don't have Onyx, I'd suggest getting it. It is freeware and used to help maintain your system. Good luck
Paul -
Bridge CS4 Web Galleries - Adding New Web Gallery Presets
Hi. How can i import new web gallery presets into Bridge CS4, for example from lightroomgalleries co? Im on a French Win XP and Photoshop CS4. I know i have to create a folder within Common Files/Adobe/Bridge CS4 Extensions/Adobe output Module/mediagallery/resources/templates/. If i see it right, i have to create another styles folder within that? I manage Bridge CS4 to offer the imported preset in the presets menu, but the results look generic, not like what the preset should do according to the description on the web site. So what can i do?
Are there other sources for other gallery presets?
I would also like to know how to set the name that the Presets menu uses. Ive seen this .dat file which seems to control the names for the menu, but wasnt able to change the name appearing in the menu.
For that, I had copied a complete style like 03filmstrip, changed the xml files and renamed the folder to 09filmstripVariant. Thus it appeared with the original name, but at position 9 in the menu. I didnt find out how to make it appear with a new name.
In these names for Bridge gallery presets, are there certain characters i must avoid like underscore, minus or blank?
Thanks for all clear info!Hi all<br />It is still possible to create webgalleries and contactsheets in CS4, but you have to copy some files and folders from a folder called Goodies which you can find on you install disk or download as extras from Adobe.com. <br />In the "...Goodies\Optional plug-ins" folder there is a OptionalPluginsReadMe.pdf where they among other things write:<br /><br />"1. From the Photoshop CS4 install disc, drop the //<language>/Goodies/Optional plug-<br />Ins/Automate/WebContactSheetII plug-in into the //Adobe Photoshop CS4/Plugins/<br />Automate folder<br /><br />2. From the Photoshop CS4 install disc, drop the //<language>/Goodies/Presets/Web Photo<br />Gallery folder into the //Adobe Photoshop CS4/Presets folder and then restart Photoshop."
-
Saving Web Gallery presets...
I created a Web Photo Gallery in Adobe Bridge. I want to save my presets, cause I changed the background color etc? It this possible? Cause I want to use the same presets in the future.
Thanks,
IefI can save a web gallery preset in CS4 Bridge (by clicking on the icon next to the trash can under "Create Gallery," but can't figure out how to load it into CS5 Bridge. Any ideas where this preset is saved?
Thanks,
Barrie -
Can I use CSS with PS Web Gallery Preset?
Using DW CS4. I wanted to create a web gallery with captions under the thumbnail images. I could not get captions to show up using the workspace output tool in Bridge, so I used the web gallery plug-in and preset in Photoshop. The doc title and description from the metadata shows up with each thumbnail and large photo, which is what I wanted. I added an Iframe to make the gallery show up in my web page layout with all the links I wanted, and I re-wrote part of the preset html to eliminate some of the extra preset gallery text at the top of the gallery pages. I am using a transitional doc type.
It all worked out just fine and the pages are working as planned.
However, when I used DW to validate the gallery pages, the report showed errors because the font attributes for the gallery pages are controlled by html and not by CSS. There are two problems cited in the report:
The tag "center" is not allowed within: <p>
In HTML 4.0, FONT is deprecated... consider using style sheets instead.
Questions: On the gallery pages generated by the PS plug-in and pre-set, is there a way to control font attributes with a style sheet instead of using the pre-existing html styling? Do I need to be concerned about the attributes being deprecated?
If you need to look at the web gallery, you can see it at http://www.LoonSongGardens.com/webgallery/galleryab.html
If you look, you can see why I am daylilybud!I used an iframe (as opposed to a frame) as suggested in an article by David Powers about embedding a gallery into a web page. He says the iframe is acceptable in html, and no problem with the iframe itself was indicated during validation, just the FONT attributes from the PS preset I used. You can read the article here: http://foundationphp.com/tutorials/gallery/embed1.php
In my current gallery, thumbnail captions appear from the metadata for each photograph. For each large image, both the title and the description come from the photo's metadata. This works well for my purpose, and I want to avoid re-entering each title and description. I guess my question could be better stated by asking if CSS can be added to the preset to apply to captions coming from the metadata of each photo.
Regarding the lightbox approach you suggest, I looked at the example and do not see captions under the thumbnails. Can captions be added to the thumbnail images? (It is essential that my thumbnails have captions.)
Customers need to see the name of each plant when they browse thumbnails in order to select items (daylily plants) of interest.
Because I am dealing with hundreds of photos and will need to update frequently, I am looking for a solution that is efficient and fairly easy to maintain. So far, the PS web gallery preset meets my needs better than anything else I have found, but I thought I'd try to find out if I should and can fix the FONT attribute validation problem. -
I am trying to change the color of a background layer and it will not accept the color I want
I am trying to change the color of a background layer and it will not accept the color I want
If you want to get help you may have to provide a lot more details about what you are doing (which tools or commands do you use, what exactly happens when it fails, …)?
-
How do you change the click box properties (line colour and width) in Captivate 7.0?
Yes certainly, we can do that, insert a smart shape and use it as a button, then go to the properties pane, change the Alpha to 0, that will make it transparent, and add the stroke color as red and increase the width.
In case of a button, you have to select button type as transparent and do the same.
Thanks. -
Changing data does'nt reflect in UPDAT and UPTIM fields
Hi...
I'm very new to abap, I'm trying to trace the date and time on which a record was altered in tables kna1,knb1,knvv
and similarly in lfa1,lfb1,lfm1...
so please help me...
I'm changing data in these tables but UPDAT and UPTIM fields are not updating itself..
I'm changing data using fk02, fd02 transactions...Hi,
Hi there is something called confirmation of change, Once you confirm the change, these fields will be updated.
Try it....
Award Points If Useful -
I am trying to create an iphoto book as I have done in the past. I am now using iphot 11 9.4.3 and it doesn't give me different themes and I can't change background colours in the book like I can with 9.4.2
It looks like you'll have to reinstall iPhoto go get the themes back. To reinstall iPhoto:
On all Macs running Snow Leopard or Earlier
1 - delete the current application and, , all files with "iPhoto" in the file name with either a .PKG or .BOM extension that reside in the:
(10.5 and earlier) - HD/Library/Receipts folder
or from the
(10.6) - /var/db/receipts/ folder
On all Macs with Lion or Later Pre-installed
Deleting receipts is not necessary if your Mac came with Lion or later preinstalled.
Finally re-install iPhoto from the source it came from originally:
1 - (10.6 or earlier) from the disks that came with the Mac or an iLife disk.
2 - (10.7 or later) from the App Store .
OT -
This should be easy! How can I change the background colour of my fields?
Apologies if this has already been posted but nothing has come up via Google nor the Forum search.
I'm sure this should be easy but it's really doing my head in!
I have a number of textboxes, dropdown lists, etc within my form - I have set Custom backgrounds on each which are visible within Design View. However, in Preview PDF all the fields have a default blue colour and only change to my Custom backgrounds when you enter the field.
Is there a way of removing the default colouring of fields so that it's the same as my Custom backgrounds? My Custom backgrounds are 'linear to bottom' so I don't want to just set border.fill.color to one colour.
Thanks for any help,Hi,
If you include this Javascript in the docReady event of the root node (default "form1").
app.runtimeHighlight = false;
This will turn off the field highlight. It doesn't prevent the user from turning back on the highlight, but it will mean that your form opens with the highlight off.
Hope that helps,
Niall
Assure Dynamics -
Web Gallery-Surprising Differences between Safari and Firefox
I discovered some surprising differences using Web Gallery in Safari vs. Firefox:
1. When you first view an album the gallery, the thumbnail photos take quite a bit longer to be visible in Safari than in Firefox.
2. When rolling the mouse over the Subscribe icon in Safari, a message states, "Add this album to iPhoto." In Firefox, the message states, "Subscribe to an RSS feed of this album."
3. When a movie is selected in Safari, you can download it immediately, though the movie is not playable from the Safari page until it fully loads. In Firefox, if you click the download icon before the movie has fully loaded, a message appears that states, "QuickTime is unable to play this movie. Please try again. Then, a window opens asking what to do with the file you are trying to download -- Save it, or Launch QuickTime. If you wait until the movie is fully loaded, it plays within the Firefox page. If, after it's loaded, you leave the page and then go back to that page, the movie won't load again and play within Firefox, but it can be downloaded.
I'm wondering whether these differences in functionality are typical or just occurring on my Mac, so please document your experience here.Thanks Denes for your reply.
I use HttpWatch tool to measure the loading times. Reports are mostly the same for IE and FF. I can see from the report, there is three times shown error 404 Not Found for the items below.
http://......./images/sRegion-Body.png
http://......./images/sRegion-Bottom.png
http://......./images/sReportBG-Standard.png
The last action which caused 404 error started 2 seconds after the page was asked to refresh. The next action http://......../i/libraries/jquery-ui/1.8.22/ui/i18n/oracle/jquery.ui.datepicker-cs.js started after 38 seconds (hanging in the same place for 36 seconds). Does it mean that the problem is caused by http://......./images/sReportBG-Standard.png action which returns 404 error?
How can I add the missing images?
-Jiri -
How do I change the gradient so my background colour goes from dark to light?
I am a relative newbie to PSE. If have tried adding a gradient to my background colour but I have noticeable lines. I need it to go from dark to light from left to right.
Can anyone help me?
MikeHi Mike
You use the gradient tool (foreground to background color)
e.g set colors to black/white at bottom of tool pallet
Select gradient tool and set mode to lighten
Click on top of your image and drag down to the bottom (holding the shift key whilst dragging ensures a vertical line)
Then release the mouse. -
Is it possible to have the background colour of a field change based on the entry?
I previously obtained help from a user here to create a script that autopopulates a field based on options selected in two sets of radio buttons:
var consequence = this.getField("Consequence").valueAsString;
var likelihood = this.getField("Likelihood").valueAsString;
if (consequence=="Insignificant" && likelihood=="Rare") event.value = "Low";
else if (consequence=="Insignificant" && likelihood=="Unlikely") event.value = "Low";
else if (consequence=="Insignificant" && likelihood=="Moderate") event.value = "Low";
else if (consequence=="Insignificant" && likelihood=="Likely") event.value = "Low";
else if (consequence=="Insignificant" && likelihood=="Almost Certain") event.value = "Moderate";
else if (consequence=="Minor" && likelihood=="Rare") event.value = "Low";
else if (consequence=="Minor" && likelihood=="Unlikely") event.value = "Low";
else if (consequence=="Minor" && likelihood=="Moderate") event.value = "Moderate";
else if (consequence=="Minor" && likelihood=="Likely") event.value = "Moderate";
else if (consequence=="Minor" && likelihood=="Almost Certain") event.value = "High";
else if (consequence=="Moderate" && likelihood=="Rare") event.value = "Low";
else if (consequence=="Moderate" && likelihood=="Unlikely") event.value = "Moderate";
else if (consequence=="Moderate" && likelihood=="Moderate") event.value = "High";
else if (consequence=="Moderate" && likelihood=="Likely") event.value = "High";
else if (consequence=="Moderate" && likelihood=="Almost Certain") event.value = "Critical";
else if (consequence=="Major" && likelihood=="Rare") event.value = "Low";
else if (consequence=="Major" && likelihood=="Unlikely") event.value = "Moderate";
else if (consequence=="Major" && likelihood=="Moderate") event.value = "High";
else if (consequence=="Major" && likelihood=="Likely") event.value = "Critical";
else if (consequence=="Major" && likelihood=="Almost Certain") event.value = "Extreme";
else if (consequence=="Catastrophic" && likelihood=="Rare") event.value = "Moderate";
else if (consequence=="Catastrophic" && likelihood=="Unlikely") event.value = "High";
else if (consequence=="Catastrophic" && likelihood=="Moderate") event.value = "Critical";
else if (consequence=="Catastrophic" && likelihood=="Likely") event.value = "Extreme";
else if (consequence=="Catastrophic" && likelihood=="Almost Certain") event.value = "Extreme";
// etc.
else event.value = "";
I'm wondering if its possible to have the colour of the field that uses the above script, change based on the entry. E.g. If the answer is Low; make the background colour Green; if its Moderate, make it orange etc.?
I know its a big ask but thought I would check.
Thanks in advance.One approach would be to have access to a Mac that can run the classic environment or has a pre OS X native installation. These should be able to read the files for dates of creation/modification. There is also SheepShaver that runs on OS X machines.
https://www.macupdate.com/app/mac/20615/sheepshaver
http://en.wikipedia.org/wiki/Classic_Environment
http://www.everymac.com/systems/by_capability/macs-that-support-macos-9-classic. html
https://discussions.apple.com/message/22597899#22597899 -
Browser background colour and page background colour
On one entry page of my blog, the browser background colour is over-riding the page background gradient colours. I've tried remaking the entry page by duplicating another entry page, but this still happens on just this one page.
Hoping someone will be able to work out why...?
Message was edited by: Gillylal Fordham-LearThank you. It's http://www.noteworthy-women.co.uk/
The page in question is the 29 September entry for the blog page ('rehearsal notes'). This was on the 'Choir Members Only' site, but I've moved it to the 'public pages' site for this discussion. I can leave it there only overnight (British time).
Thanks again. -
Changing layout at runtime, executing background job and sending mail inXLS
Hi
When i execute my program in foregroung by manually changing value of s_job = 'X' in debugging mode it is sending the correct XLS file via mail with all the data , whereas when i execute my program in backgroud mode it sends incomlete XLS file via mail, it has only first 2 records in any layout........can anybody please help in this regard....
program is as follows...
REPORT ZPMACR01_MD_MRP_100.
*& Report : ZPMACR01_MD_MRP_100
TABLES : MARA, MARC, MAKT, MBEW,MARD.
MAIL data declarations
TABLES : adr6 , sscrfields.
DATA: BEGIN OF mbody OCCURS 0,
message(100),
END OF mbody.
DATA: BEGIN OF addresses OCCURS 0,
addresses(100),
END Of addresses.
FIELD-SYMBOLS: <f> type ANY,
<tab> TYPE STANDARD TABLE,
<wa> type ANY.
DATA: count TYPE i value 0,
col_1 TYPE i.
DATA: new_table TYPE REF TO data, "pointer to dynamic table
new_line TYPE REF TO data. "pointer to work area of dynamic table
DATA: s_job TYPE c.
DATA: i_data_out_text TYPE string OCCURS 0 WITH HEADER LINE.
DATA: message TYPE string OCCURS 0 WITH HEADER LINE.
DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: BEGIN OF it_attach OCCURS 0,
line(2650) TYPE c,
END OF it_attach.
DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_hex LIKE solix OCCURS 0 WITH HEADER LINE,
t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
w_cnt TYPE i,
w_sent_all(1) TYPE c,
w_doc_data LIKE sodocchgi1,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
ALV data declarations
TYPE-POOLS: SLIS.
DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
IT_FIELDCAT2 TYPE LVC_T_FCAT,
IT_FIELDCAT_FIN TYPE LVC_T_FCAT,
IT_FIELDCAT3 TYPE SLIS_T_FIELDCAT_ALV,
itab1 TYPE SLIS_T_FIELDCAT_ALV,
W_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
W_REPID TYPE SY-REPID,
IT_LAYOUT TYPE SLIS_LAYOUT_ALV.
DATA: is_fieldcat LIKE LINE OF it_fieldcat.
DATA: is_fieldcat2 LIKE LINE OF it_fieldcat2,
Is_FIELDCAT3 LIKE LINE OF it_fieldcat3.
Data: variant type DISVARIANT,
v_size LIKE sy-tabix.
ALV Data
DATA:
i_sort TYPE slis_t_sortinfo_alv,
v_lvc_title TYPE lvc_title,
v_repid LIKE sy-repid,
c_user_command TYPE slis_formname VALUE 'ALV_USER_COMMAND',
gt_list_top_of_page TYPE slis_t_listheader,
gt_list_end_of_list TYPE slis_t_listheader,
gs_layout TYPE slis_layout_alv,
gt_events TYPE slis_t_event,
gs_events type slis_alv_event,
gt_print TYPE slis_print_alv,
g_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
Selection Parameters
SELECTION-SCREEN BEGIN OF BLOCK B1.
SELECT-OPTIONS : SO_MATNR FOR MARA-MATNR OBLIGATORY.
SELECT-OPTIONS : SO_WERKS FOR MARC-WERKS.
SELECT-OPTIONS : SO_SPRAS FOR MAKT-SPRAS.
SELECT-OPTIONS : SO_BWKEY FOR MBEW-BWKEY.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-001.
PARAMETERS: p_email TYPE somlreci1-receiver
default '[email protected]'.
SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-002.
PARAMETERS : SO_LAY TYPE DISVARIANT-VARIANT DEFAULT '/DEFAULT'.
SELECTION-SCREEN END OF BLOCK B3.
DATA Declarations.
Data : BEGIN OF ITab OCCURS 0,
manr type mara-matnr,
end of ITAB.
data : BEGIN OF IT_TABLE OCCURS 0,
MATNR TYPE MARA-MATNR,
MATKL TYPE MARA-MATKL,
MEINS TYPE MARA-MEINS,
MTART TYPE MARA-MTART,
AHDIS TYPE MARC-AHDIS,
AUSDT TYPE MARC-AUSDT,
AUTRU TYPE MARC-AUTRU,
BESKZ TYPE MARC-BESKZ,
BSTFE TYPE MARC-BSTFE,
BSTMA TYPE MARC-BSTMA,
BSTMI TYPE MARC-BSTMI,
BSTRF TYPE MARC-BSTRF,
BWSCL TYPE MARC-BWSCL,
DIBER TYPE MARC-DIBER,
DISGR TYPE MARC-DISGR,
DISLS TYPE MARC-DISLS,
DISMM TYPE MARC-DISMM,
DISPO TYPE MARC-DISPO,
DISPR TYPE MARC-DISPR,
DZEIT TYPE MARC-DZEIT,
EISBE TYPE MARC-EISBE,
EISLO TYPE MARC-EISLO,
EKGRP TYPE MARC-EKGRP,
FHORI TYPE MARC-FHORI,
FXHOR TYPE MARC-FXHOR,
KAUTB TYPE MARC-KAUTB,
KORDB TYPE MARC-KORDB,
KZAUS TYPE MARC-KZAUS,
LFGJA TYPE MARC-LFGJA,
LFMON TYPE MARC-LFMON,
LGRAD TYPE MARC-LGRAD,
LVORM TYPE MARC-LVORM,
MABST TYPE MARC-MABST,
MINBE TYPE MARC-MINBE,
MMSTA TYPE MARC-MMSTA,
MMSTD TYPE MARC-MMSTD,
MRPPP TYPE MARC-MRPPP,
MTVFP TYPE MARC-MTVFP,
NFMAT TYPE MARC-NFMAT,
PERKZ TYPE MARC-PERKZ,
PLIFZ TYPE MARC-PLIFZ,
PLVAR TYPE MARC-PLVAR,
PSTAT TYPE MARC-PSTAT,
QZGTP TYPE MARC-QZGTP,
RGEKZ TYPE MARC-RGEKZ,
RWPRO TYPE MARC-RWPRO,
SBDKZ TYPE MARC-SBDKZ,
SCHGT TYPE MARC-SCHGT,
SHFLG TYPE MARC-SHFLG,
SHPRO TYPE MARC-SHPRO,
SHZET TYPE MARC-SHZET,
SOBSL TYPE MARC-SOBSL,
STRGR TYPE MARC-STRGR,
TRAME TYPE MARC-TRAME,
UEETK TYPE MARC-UEETK,
UEETO TYPE MARC-UEETO,
UMLMC TYPE MARC-UMLMC,
UNETO TYPE MARC-UNETO,
USEQU TYPE MARC-USEQU,
VINT1 TYPE MARC-VINT1,
VINT2 TYPE MARC-VINT2,
VRBDT TYPE MARC-VRBDT,
VRBFK TYPE MARC-VRBFK,
VRBMT TYPE MARC-VRBMT,
VRBWK TYPE MARC-VRBWK,
VRMOD TYPE MARC-VRMOD,
WEBAZ TYPE MARC-WEBAZ,
WERKS TYPE MARC-WERKS,
WZEIT TYPE MARC-WZEIT,
DISKZ TYPE MARD-DISKZ,
LBSTF TYPE MARD-LBSTF,
LGORT TYPE MARD-LGORT,
LMINB TYPE MARD-LMINB,
LSOBS TYPE MARD-LSOBS,
MAKTX TYPE MAKT-MAKTX,
END OF IT_TABLE.
DATA: BEGIN OF IT_MARD OCCURS 0,
MATNR TYPE MARA-MATNR,
MATKL TYPE MARA-MATKL,
MEINS TYPE MARA-MEINS,
MTART TYPE MARA-MTART,
DISKZ TYPE MARD-DISKZ,
LBSTF TYPE MARD-LBSTF,
LGORT TYPE MARD-LGORT,
LMINB TYPE MARD-LMINB,
LSOBS TYPE MARD-LSOBS,
MAKTX TYPE MAKT-MAKTX,
END OF IT_MARD.
DATA: BEGIN OF IT_MBEW OCCURS 0,
MATNR TYPE MBEW-MATNR,
BKLAS TYPE MBEW-BKLAS,
SALK3 TYPE MBEW-SALK3,
PEINH TYPE MBEW-PEINH,
STPRS TYPE MBEW-STPRS,
VERPR TYPE MBEW-VERPR,
VPRSV TYPE MBEW-VPRSV,
END OF IT_MBEW.
data : BEGIN OF IT_FINAL0 occurs 0,
MATNR LIKE MARA-MATNR,
MATKL LIKE MARA-MATKL,
MEINS LIKE MARA-MEINS,
MTART LIKE MARA-MTART,
AHDIS LIKE MARC-AHDIS,
AUSDT LIKE MARC-AUSDT,
AUTRU LIKE MARC-AUTRU,
BESKZ LIKE MARC-BESKZ,
BSTFE LIKE MARC-BSTFE,
BSTMA LIKE MARC-BSTMA,
BSTMI LIKE MARC-BSTMI,
BSTRF LIKE MARC-BSTRF,
BWSCL LIKE MARC-BWSCL,
DIBER LIKE MARC-DIBER,
DISGR LIKE MARC-DISGR,
DISLS LIKE MARC-DISLS,
DISMM LIKE MARC-DISMM,
DISPO LIKE MARC-DISPO,
DISPR LIKE MARC-DISPR,
DZEIT LIKE MARC-DZEIT,
EISBE LIKE MARC-EISBE,
EISLO LIKE MARC-EISLO,
EKGRP LIKE MARC-EKGRP,
FHORI LIKE MARC-FHORI,
FXHOR LIKE MARC-FXHOR,
KAUTB LIKE MARC-KAUTB,
KORDB LIKE MARC-KORDB,
KZAUS LIKE MARC-KZAUS,
LFGJA LIKE MARC-LFGJA,
LFMON LIKE MARC-LFMON,
LGRAD LIKE MARC-LGRAD,
LVORM LIKE MARC-LVORM,
MABST LIKE MARC-MABST,
MINBE LIKE MARC-MINBE,
MMSTA LIKE MARC-MMSTA,
MMSTD LIKE MARC-MMSTD,
MRPPP LIKE MARC-MRPPP,
MTVFP LIKE MARC-MTVFP,
NFMAT LIKE MARC-NFMAT,
PERKZ LIKE MARC-PERKZ,
PLIFZ LIKE MARC-PLIFZ,
PLVAR LIKE MARC-PLVAR,
PSTAT LIKE MARC-PSTAT,
QZGTP LIKE MARC-QZGTP,
RGEKZ LIKE MARC-RGEKZ,
RWPRO LIKE MARC-RWPRO,
SBDKZ LIKE MARC-SBDKZ,
SCHGT LIKE MARC-SCHGT,
SHFLG LIKE MARC-SHFLG,
SHPRO LIKE MARC-SHPRO,
SHZET LIKE MARC-SHZET,
SOBSL LIKE MARC-SOBSL,
STRGR LIKE MARC-STRGR,
TRAME LIKE MARC-TRAME,
UEETK LIKE MARC-UEETK,
UEETO LIKE MARC-UEETO,
UMLMC LIKE MARC-UMLMC,
UNETO LIKE MARC-UNETO,
USEQU LIKE MARC-USEQU,
VINT1 LIKE MARC-VINT1,
VINT2 LIKE MARC-VINT2,
VRBDT LIKE MARC-VRBDT,
VRBFK LIKE MARC-VRBFK,
VRBMT LIKE MARC-VRBMT,
VRBWK LIKE MARC-VRBWK,
VRMOD LIKE MARC-VRMOD,
WEBAZ LIKE MARC-WEBAZ,
WERKS LIKE MARC-WERKS,
WZEIT LIKE MARC-WZEIT,
DISKZ LIKE MARD-DISKZ,
LBSTF LIKE MARD-LBSTF,
LGORT LIKE MARD-LGORT,
LMINB LIKE MARD-LMINB,
LSOBS LIKE MARD-LSOBS,
MAKTX LIKE MAKT-MAKTX,
END OF IT_FINAL0.
data : BEGIN OF IT_FINAL occurs 0,
MATNR LIKE MARA-MATNR,
MATKL LIKE MARA-MATKL,
MEINS LIKE MARA-MEINS,
MTART LIKE MARA-MTART,
AHDIS LIKE MARC-AHDIS,
AUSDT LIKE MARC-AUSDT,
AUTRU LIKE MARC-AUTRU,
BESKZ LIKE MARC-BESKZ,
BSTFE LIKE MARC-BSTFE,
BSTMA LIKE MARC-BSTMA,
BSTMI LIKE MARC-BSTMI,
BSTRF LIKE MARC-BSTRF,
BWSCL LIKE MARC-BWSCL,
DIBER LIKE MARC-DIBER,
DISGR LIKE MARC-DISGR,
DISLS LIKE MARC-DISLS,
DISMM LIKE MARC-DISMM,
DISPO LIKE MARC-DISPO,
DISPR LIKE MARC-DISPR,
DZEIT LIKE MARC-DZEIT,
EISBE LIKE MARC-EISBE,
EISLO LIKE MARC-EISLO,
EKGRP LIKE MARC-EKGRP,
FHORI LIKE MARC-FHORI,
FXHOR LIKE MARC-FXHOR,
KAUTB LIKE MARC-KAUTB,
KORDB LIKE MARC-KORDB,
KZAUS LIKE MARC-KZAUS,
LFGJA LIKE MARC-LFGJA,
LFMON LIKE MARC-LFMON,
LGRAD LIKE MARC-LGRAD,
LVORM LIKE MARC-LVORM,
MABST LIKE MARC-MABST,
MINBE LIKE MARC-MINBE,
MMSTA LIKE MARC-MMSTA,
MMSTD LIKE MARC-MMSTD,
MRPPP LIKE MARC-MRPPP,
MTVFP LIKE MARC-MTVFP,
NFMAT LIKE MARC-NFMAT,
PERKZ LIKE MARC-PERKZ,
PLIFZ LIKE MARC-PLIFZ,
PLVAR LIKE MARC-PLVAR,
PSTAT LIKE MARC-PSTAT,
QZGTP LIKE MARC-QZGTP,
RGEKZ LIKE MARC-RGEKZ,
RWPRO LIKE MARC-RWPRO,
SBDKZ LIKE MARC-SBDKZ,
SCHGT LIKE MARC-SCHGT,
SHFLG LIKE MARC-SHFLG,
SHPRO LIKE MARC-SHPRO,
SHZET LIKE MARC-SHZET,
SOBSL LIKE MARC-SOBSL,
STRGR LIKE MARC-STRGR,
TRAME LIKE MARC-TRAME,
UEETK LIKE MARC-UEETK,
UEETO LIKE MARC-UEETO,
UMLMC LIKE MARC-UMLMC,
UNETO LIKE MARC-UNETO,
USEQU LIKE MARC-USEQU,
VINT1 LIKE MARC-VINT1,
VINT2 LIKE MARC-VINT2,
VRBDT LIKE MARC-VRBDT,
VRBFK LIKE MARC-VRBFK,
VRBMT LIKE MARC-VRBMT,
VRBWK LIKE MARC-VRBWK,
VRMOD LIKE MARC-VRMOD,
WEBAZ LIKE MARC-WEBAZ,
WERKS LIKE MARC-WERKS,
WZEIT LIKE MARC-WZEIT,
DISKZ LIKE MARD-DISKZ,
LBSTF LIKE MARD-LBSTF,
LGORT LIKE MARD-LGORT,
LMINB LIKE MARD-LMINB,
LSOBS LIKE MARD-LSOBS,
MAKTX LIKE MAKT-MAKTX,
BKLAS LIKE MBEW-BKLAS,
SALK3 LIKE MBEW-SALK3,
PEINH LIKE MBEW-PEINH,
STPRS LIKE MBEW-STPRS,
VERPR LIKE MBEW-VERPR,
VPRSV LIKE MBEW-VPRSV,
ZXPRS LIKE MBEW-STPRS,
END OF IT_FINAL.
data : BEGIN OF IT_display occurs 0,
matnr LIKE MARA-MATNR,
maktx LIKE MAKT-MAKTX,
meins LIKE MARA-MEINS,
werks LIKE MARC-WERKS,
dispo LIKE MARC-DISPO,
dismm LIKE MARC-DISMM,
plifz LIKE MARC-PLIFZ,
webaz LIKE MARC-WEBAZ,
minbe LIKE MARC-MINBE,
shzet LIKE MARC-SHZET,
eisbe LIKE MARC-EISBE,
disls LIKE MARC-DISLS,
bstmi LIKE MARC-BSTMI,
bstma LIKE MARC-BSTMA,
bstfe LIKE MARC-BSTFE,
ZXPRS LIKE MBEW-STPRS,
peinh LIKE MBEW-PEINH,
salk3 LIKE MBEW-SALK3,
end of it_display.
ALV Layout Variant
AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_lay.
PERFORM get_alv_layout_values.
SELECTION SCREEN.
AT SELECTION-SCREEN.
IF ( sscrfields-ucomm = 'SJOB' OR
sy-batch = 'X' ).
s_job = 'X'.
ENDIF.
select single matnr into itab from mara where matnr in so_matnr.
if sy-subrc <> 0.
message e001(zpal).
endif.
START-OF-SELECTION.
IF SO_LAY <> ' '.
VARIANT-REPORT = 'ZPMACR01_MD_MRP_100'.
VARIANT-VARIANT = SO_LAY.
else.
VARIANT-VARIANT = '/DEFAULT'.
ENDIF.
INITIALIZATION.
W_REPID = SY-REPID.
START-OF-SELECTION.
IF SO_LAY <> ' '.
VARIANT-REPORT = w_repid.
VARIANT-VARIANT = SO_LAY.
else.
VARIANT-VARIANT = '/DEFAULT'.
ENDIF.
SELECT
MARA~MATNR
MARA~MATKL
MARA~MEINS
MARA~MTART
MARC~AHDIS
MARC~AUSDT
MARC~AUTRU
MARC~BESKZ
MARC~BSTFE
MARC~BSTMA
MARC~BSTMI
MARC~BSTRF
MARC~BWSCL
MARC~DIBER
MARC~DISGR
MARC~DISLS
MARC~DISMM
MARC~DISPO
MARC~DISPR
MARC~DZEIT
MARC~EISBE
MARC~EISLO
MARC~EKGRP
MARC~FHORI
MARC~FXHOR
MARC~KAUTB
MARC~KORDB
MARC~KZAUS
MARC~LFGJA
MARC~LFMON
MARC~LGRAD
MARC~LVORM
MARC~MABST
MARC~MINBE
MARC~MMSTA
MARC~MMSTD
MARC~MRPPP
MARC~MTVFP
MARC~NFMAT
MARC~PERKZ
MARC~PLIFZ
MARC~PLVAR
MARC~PSTAT
MARC~QZGTP
MARC~RGEKZ
MARC~RWPRO
MARC~SBDKZ
MARC~SCHGT
MARC~SHFLG
MARC~SHPRO
MARC~SHZET
MARC~SOBSL
MARC~STRGR
MARC~TRAME
MARC~UEETK
MARC~UEETO
MARC~UMLMC
MARC~UNETO
MARC~USEQU
MARC~VINT1
MARC~VINT2
MARC~VRBDT
MARC~VRBFK
MARC~VRBMT
MARC~VRBWK
MARC~VRMOD
MARC~WEBAZ
MARC~WERKS
MARC~WZEIT
MARD~DISKZ
MARD~LBSTF
MARD~LGORT
MARD~LMINB
MARD~LSOBS
MAKT~MAKTX
INTO TABLE IT_TABLE
FROM MARA INNER JOIN MARC ON MARAMATNR = MARCMATNR
INNER JOIN MAKT ON MARAMATNR = MAKTMATNR
WHERE MARA~MATNR IN SO_MATNR
AND MARC~WERKS IN SO_WERKS
AND MAKT~SPRAS IN SO_SPRAS.
SELECT
MARA~MATNR
MARA~MATKL
MARA~MEINS
MARA~MTART
MARD~DISKZ
MARD~LBSTF
MARD~LGORT
MARD~LMINB
MARD~LSOBS
INTO TABLE IT_mard
FROM MARA INNER JOIN MARD ON MARAMATNR = MARDMATNR
WHERE MARA~MATNR IN SO_MATNR
and mard~werks in SO_WERKS.
SELECT MATNR BKLAS SALK3 PEINH STPRS VERPR VPRSV
INTO TABLE IT_MBEW FROM MBEW FOR ALL ENTRIES IN IT_TABLE WHERE MATNR =
IT_TABLE-MATNR AND BWKEY IN SO_BWKEY.
LOOP AT IT_TABLE.
MOVE-CORRESPONDING IT_TABLE TO IT_FINAL0.
READ TABLE IT_MARD WITH KEY MATNR = IT_TABLE-MATNR.
IF SY-SUBRC = 0 .
MOVE-CORRESPONDING IT_MARD TO IT_FINAL0.
ENDIF.
APPEND IT_FINAL0.
CLEAR IT_FINAL0.
ENDLOOP.
LOOP AT IT_FINAL0.
READ TABLE IT_MBEW WITH KEY MATNR = IT_final0-MATNR.
IF SY-SUBRC = 0 .
MOVE-CORRESPONDING IT_MBEW TO IT_FINAL.
IF IT_MBEW-VPRSV = 'S'.
MOVE IT_MBEW-STPRS TO IT_FINAL-ZXPRS.
ELSE.
MOVE IT_MBEW-VERPR TO IT_FINAL-ZXPRS.
ENDIF.
ENDIF.
MOVE-CORRESPONDING IT_FINAL0 TO IT_FINAL.
APPEND IT_FINAL.
CLEAR IT_FINAL.
ENDLOOP.
Default Layout
LOOP AT IT_FINAL.
Read table it_final with key matnr = SO_matnr.
Move it_final-MATNR to it_display-MATNR.
Move it_final-MAKTX to it_display-MAKTX.
Move it_final-MEINS to it_display-MEINS.
Move it_final-WERKS to it_display-WERKS.
Move it_final-DISPO to it_display-DISPO.
Move it_final-DISMM to it_display-DISMM.
Move it_final-PLIFZ to it_display-PLIFZ.
Move it_final-WEBAZ to it_display-WEBAZ.
Move it_final-MINBE to it_display-MINBE.
Move it_final-SHZET to it_display-SHZET.
Move it_final-EISBE to it_display-EISBE.
Move it_final-DISLS to it_display-DISLS.
Move it_final-BSTMI to it_display-BSTMI.
Move it_final-BSTMA to it_display-BSTMA.
Move it_final-BSTFE to it_display-BSTFE.
MOVE it_final-ZXPRS to it_display-ZXPRS.
Move it_final-PEINH to it_display-PEINH.
Move it_final-SALK3 to it_display-SALK3.
Append it_display.
endloop.
data: v_data type c value ' '.
if it_display is initial.
v_data = ' '.
else.
v_data = 'X'.
endif.
END-OF-SELECTION.
END-OF-SELECTION.
if s_job = 'X'.
perform execute_back.
else.
perform execute_fore.
endif.
FORM execute_fore *
Form execute_fore.
*& Form REUSE_ALV_FIELDCATALOG_MERGE
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = W_REPID
I_INTERNAL_TABNAME = 'IT_FINAL'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = W_REPID
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
CT_FIELDCAT = IT_FIELDCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3
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 DISPLAY_ALV_REPORT
Display report using ALV grid
*IF SO_LAY <> ' '.
VARIANT-VARIANT = SO_LAY.
*endif.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = W_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_LAYOUT
IT_FIELDCAT = IT_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'X'
IS_VARIANT = 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
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_FINAL
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.
FORM execute_back *
FORM execute_back.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = W_REPID
I_INTERNAL_TABNAME = 'IT_FINAL'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = W_REPID
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
CT_FIELDCAT = IT_FIELDCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3
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_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = W_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = '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 = 'X'
IS_VARIANT = variant
IT_EVENTS = gt_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_final
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.
form top_of_page.
CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_GET'
IMPORTING
ES_LAYOUT =
ET_FIELDCAT = IT_FIELDCAT3[]
ET_SORT =
ET_FILTER =
ES_GRID_SCROLL =
ES_VARIANT = VARIANT
ET_MARKED_COLUMNS =
ET_FILTERED_ENTRIES =
ET_FIELDCAT_BACKEND =
ES_PRINT =
EXCEPTIONS
NO_INFOS = 1
PROGRAM_ERROR = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
clear count.
LOOP AT IT_FIELDCAT3 into is_fieldcat3 where no_out eq space.
*move-corresponding is_fieldcat3 to is_fieldcat2.
move: is_fieldcat3-fieldname to is_fieldcat2-fieldname,
is_fieldcat3-ref_fieldname to is_fieldcat2-ref_field,
is_fieldcat3-ref_tabname to is_fieldcat2-ref_table,
is_fieldcat3-seltext_l to is_fieldcat2-coltext,
is_fieldcat3-no_out to is_fieldcat2-no_out,
is_fieldcat3-col_pos to is_fieldcat2-col_pos.
*move:
is_fieldcat3-row_pos to is_fieldcat2-row_pos,
is_fieldcat3-col_pos to is_fieldcat2-col_pos,
is_fieldcat3-fieldname to is_fieldcat2-fieldname,
is_fieldcat3-tabname to is_fieldcat2-tabname,
is_fieldcat3-outputlen to is_fieldcat2-outputlen,
is_fieldcat3-no_out to is_fieldcat2-no_out,
is_fieldcat3-seltext_l to is_fieldcat2-coltext,
is_fieldcat3-ref_fieldname to is_fieldcat2-ref_field,
is_fieldcat3-ref_tabname to is_fieldcat2-ref_table,
is_fieldcat3-DDIC_OUTPUTLEN to is_fieldcat2-DD_OUTLEN,
is_fieldcat3-datatype to is_fieldcat2-datatype,
is_fieldcat3-inttype to is_fieldcat2-inttype,
is_fieldcat3-INTLEN to is_fieldcat2-INTLEN.
APPEND IS_FIELDCAT2 TO IT_FIELDCAT2.
*count = count + 1.
ENDLOOP.
loop at it_fieldcat2 into is_fieldcat2.
if is_fieldcat2-no_out = 'X'.
delete it_fieldcat2 index sy-tabix.
else.
count = count + 1.
endif.
endloop.
describe table it_fieldcat2 lines count.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fieldcat2[]
IMPORTING
ep_table = new_table.
ASSIGN new_table->* TO <tab>.
CREATE DATA new_line LIKE LINE OF <tab>.
ASSIGN new_line->* TO <wa>.
*-- Perform to build table for attachment data
PERFORM build_xls_data_table.
*-- Perform to populate e-mail message
PERFORM populate_email_message_body.
*-- Perform to send mail
PERFORM send_file_as_email_attachment.
*-- Perform to Instruct mail send program for SAPCONNECT to send email.
PERFORM initiate_mail_execute_program.
ENDFORM.
*& Form build_xls_data_table
form build_xls_data_table.
data: char_var(30) type C,
num_var(10) type n.
CONSTANTS: con_cret TYPE x VALUE '0D', "NEW LINE
tabchar TYPE x VALUE '09'. "tab
loop at it_fieldcat2 into is_fieldcat2.
concatenate it_attach is_fieldcat2-coltext
into it_attach separated by tabchar.
endloop.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
CLEAR it_attach.
field-symbols: <t> type ANY.
LOOP AT it_final.
col_1 = 1.
do count times.
Assign component col_1 of structure <wa> to <f>.
read table it_fieldcat2 into is_fieldcat2 with key col_pos = col_1.
loop at it_fieldcat into is_fieldcat.
if is_fieldcat-fieldname = is_fieldcat2-fieldname.
assign component is_fieldcat-col_pos of structure it_final to <t>.
exit.
endif.
endloop.
<f> = <t>.
clear <t>.
col_1 = col_1 + 1.
enddo.
append <wa> to <tab>.
endloop.
loop at <tab> into <wa>.
col_1 = 1.
do count times.
Assign component col_1 of structure <wa> to <f>.
move <f> to char_var.
concatenate it_attach char_var
into it_attach separated by tabchar.
col_1 = col_1 + 1.
enddo.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
CLEAR it_attach.
endloop.
ENDFORM.
FORM send_file_as_email_attachment.
DATA:
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ.
ld_email = p_email.
ld_mtitle = text-003.
ld_format = 'XLS'.
ld_attdescription = ' '.
ld_attfilename = 'DATA'.
ld_sender_address = ' '.
ld_sender_address_type = ' '.
Fill the document data.
w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
LOOP AT it_attach.
MOVE it_attach(255) TO t_hex.
APPEND t_hex.
MOVE it_attach+255(255) TO t_hex.
APPEND t_hex.
MOVE it_attach+510(255) TO t_hex.
APPEND t_hex.
MOVE it_attach+765(235) TO t_hex.
APPEND t_hex.
MOVE it_attach+765(255) TO t_hex.
APPEND t_hex.
MOVE it_attach+1020(255) TO t_hex.
APPEND t_hex.
MOVE it_attach+1275(255) TO t_hex.
APPEND t_hex.
MOVE it_attach+1530(255) TO t_hex.
APPEND t_hex.
MOVE it_attach+1785(255) TO t_hex.
APPEND t_hex.
MOVE it_attach+2040(255) TO t_hex.
APPEND t_hex.
MOVE it_attach+2295(255) TO t_hex.
APPEND t_hex.
MOVE it_attach+2550(100) TO t_hex.
APPEND t_hex.
ENDLOOP.
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_hex LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_txt = it_message
contents_hex = t_hex
receivers = t_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ld_error = sy-subrc.
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM. "SEND_FILE_AS_EMAIL_ATTACHMENT
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
Instructs mail send program for SAPCONNECT to send email.
FORM initiate_mail_execute_program.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
*& Form POPULATE_EMAIL_MESSAGE_BODY
Populate message body text
FORM populate_email_message_body.
REFRESH it_message.
it_message = text-004.
APPEND it_message.
CONCATENATE SY-DATUM 'to' SY-DATUM INTO it_message SEPARATED BY
space.
APPEND it_message.
ENDFORM. " POPULATE_EMAIL_MESSAGE_BODY
*& Form get_alv_layout_values
FORM get_alv_layout_values.
variant-report = w_repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = variant
i_save = 'A'
IMPORTING
es_variant = variant
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
CHECK sy-subrc = 0.
so_lay = variant-variant.
ENDFORM. " get_alv_layout_valuesHi Arpit,
Take a look at the documentation of FM 'SO_DOCUMENT_SEND_API1' for parameter PACKING_LIST. I think you should set t_packing_list-head_num to a different value than 0 for the second attachment.
Regards,
John.
Maybe you are looking for
-
Seek help on If - then - else structure.
I am not good at PL/SQL and need some advice on this stored procudure. This SP is usded to refresh materialized views. In the first block, check how many mvs in the user_mviews table and select it into v_2. IF v_2 = 25, go to 2nd block to run package
-
Adobe Creative Cloud Redemption Code Error
Hi, I signed up 500px.com Awesome+Adobe and Adobe Creative Cloud's redemption code is not working. The error shown Oops! This code has already been redeemed. But in my application, it shows trial version only. How can I solve it. Thanks. Rgds, Chit M
-
All Refurbished and Replacement iPhone 4 are yellow tinted
Has anyone seen one that isnt? Ive seen 8 now and all are yellow. at the SF apple store and Cupertino...
-
How to remove 'My Printer' from XP 'System Tray' ?
Installed MG3100 series Printer, and 'My Printer' appeared in the System Tray. Still want to use the printer, it works fine, but would like to remove icon link from the tray (scrnshot below). Possible ?
-
HP Photosmart D7260 need the introductory ink cartridges?
I was given this printer. It was new and never hooked up before but the introductory ink wasn't given to me with the printer. I had no problem downloading the drivers and setting it up until it got to checking the ink. It gave me an error messages (