Attachment in PR madatory
Dear experts,
I need to make PR attachment mandatory in PR doc. How can it be done.
Please help..
Best regards,
Zusen
Hi,
Take the help of ABAP team to get solution for your requirement. before posting PR try to check document is attached or not with BADI ME_REQ_POSTED.
May be this will help you
Regards
Aamir
Similar Messages
-
Error while attaching a image in forms10g envion..
hi
i am getting this error while attaching a image in forms 10g enviornment.
ERROR>WUC-24 [URLDownload.pullFile()] Error reading URL http :// 10.80.50.222:7778/forms90/webutil/jacob.dll
regards
Geo.did you install jacob ? with the correct version number described in the installation-guides.
jacob is not an oracle tool, which normally is only useful for COM-commands against windows.
What did you do with the image? -
Filename in Attachement payload
Hy,
I have to detach an email attachement on my file System.
That's works but I'm not able to maintain the same filename.
Can anybody help me.
Thanks
MatHi Mattia,
If your file name is a part of your email atttachment ( the payload ), then you can dynamically create your file name.
To do this,in the filename of the receiver file adapter, give the filename a <b>%var%</b>.
Anything between % is treated as a varibale by XI. Now, under variable name substitution, you will have to give the value of var and this will act as the filename.
You can access the payload using <b>payload:</b> and the XPATH.
For info on how to do this, check the topic<b> VARIABLE SUBSTITUTION</b> in this link.
http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
hope this helps,
Regards,
Bhavesh -
Cannot delete file from disk after emailling that file like attachment
After i send some file from disk in Mail like attachment i cannot delete that file from disk unless i quit Mail. Like Mail is still using a file. Of course, that mail is in Sent mail, not in outbox.
This deeper than that. I created another account on the same iMac and it works in Harmony with my other devices and Documents in the cloud. I can only imagine the icloud account is somehow corrupted (I am on my macbook not iMac at the moment). There have been no updates to the Calendar, Contacts or Documents since early January on that account. I have spent 1hr on the phone with support and they were baffled as well. Only thing I can gove as insight to the problem is this, I was on the Mac Mini which was backed up on Time Machine. about 4 or 5 months ago I had to completley restore the Mac Mini becasue of the never ending circle on the load screen. The Backup failed to work it kept loading the issue and 4 or 5 times the circle of death kept coming up I would subsequently wipe the Mini and go further back in the back up until I go a copy that worked. I then loaded the Time Mache back up into my NEW iMac and wnet from there. It took about a month for this problem I am detailing above to start happening. It maybe a corrupt file loaded from the backup into the new iMac causing this problem. Best answer I can think of on my own???
-
I have files that have been on my computer for over a year and I have used them several times and all of a sudden they wont open. I received an error message saying they are improperly downloaded or came as an email attachement which is not the case. Please advise
They seem to be word files - they will open if I choose "open with" microsoft word, but if I double click they don't open they are appearing as PDF on my screen. I even opened one and then tried to "save as" making sure I chose .doc and they still appear as PDF
I just created a new document response.doc in word and when I saved to my desktop it appears as a PDF file and I absolutely did not create a PDF or save as PDF it was a simple word
doc.
The message says "Adobe reader could not open response.doc because it is either not a supported file type or because the file has been damaged (for example attached in an email and not properly decoded)
The reader version is I believe the most current, I always update when prompted. OS is Windows 8 -
THE SHORTER STORY
My goal is to successfully use my existing Time Capsule (TC) with a new and more powerful wireless router. I need a new and more powerful wireless router in order to reach a distant Denon a/v receiver that is physically located in a master bedroom some 50 feet away from my modem. I need to provide this Denon a/v receiver with an Internet connection so that it can obtain its firmware updates and I need to connect this Denon a/v receiver to my network in order to use its AirPlay feature. I believe l still need the TC's Network Attached Storage (NAS) features because I am not sure if the new wireless router will provide me with the NAS like features / capabilities I need to share files between my two Apple laptops with OS X 10.8.2. And I know that I absolutely need my TC's seamless integration with Apple's Time Machine (TM) application in order to continue to make effortless backups of my two Apple laptops. To my knowledge nothing works with TM like Apple's TC. I also need the hard disk storage space built into the TC.
I cannot use a long wired Ethernet cable connection in this apartment and I cannot use power-line adapters. I have read that wireless range extenders and repeaters are difficult to successfully set-up and that they will reduce data speeds, especially so when incorrectly set-up. I cannot relocate my modem and/or primary base station wireless router.
In short, I want to use my TC with my new and more powerful wireless router. I need to stop using the TC to connect to the modem. However, I still need the TC for seamless TM backups. I also need to use the TC's built in hard drive for storage. And I may still need the TC's NAS capabilities to share files wirelessly between laptops because I am assuming the new wireless router will not provide NAS capabilities for OS X 10.8.2 (products like this/non-Apple products rarely seem to work with OS X 10.8.2/Macs to provide NAS features and capabilities). Finally, I want to continue to use my Apple laptop and AirPlay to wirelessly access and play my iTunes music collection stored on the TC's hard drive. I also want to continue to use my Apple laptop, AirPlay and Apple TV to wirelessly watch movies and TV shows stored on the additional external hard drive connected to the TC via USB. Can someone please advise on how to set-up my new Asus wireless router with my existing TC in such a way to accomplish all of this?
What is the best configuration or set-up to accomplish my above goals?
Thank you in advance for your assistance!!!
THE FULL STORY
I live in an apartment building where my existing Time Capsule (TC) is located in my living room and serves many purposes. Specially, my TC is at least all of the following:
(1) Wi-Fi router connected to Comcast Internet service via Motorola SB6121 cable modem - currently the TC is the Wi-Fi base station that connects to the modem and has the gateway address to the Internet. The TC now provides the DHCP service for the Wi-Fi network.
(2) Wireless router providing Internet and Wi-Fi network access to several Wi-Fi clients - two Apple laptop computers, an iPod touch, an iPad and an iPhone all connect wirelessly to the Internet via the TC.
(3) Wired Ethernet router providing Internet and Wi-Fi network access to three different devices - a Panasonic TV, LG Blu-Ray player and an Apple TV each use one of the three LAN ports on the back of the TC to gain access to the Internet.
(4) Primary base station in my attempt to extend my wireless network to a distant (located far away) Denon a/v receiver requiring a wired Ethernet connection - In addition to the TC, which is my primary base station, I am also using a second extended Wi-Fi base station (a Netgear branded product) to wirelessly extend my WiFi network to a Denon receiver located in the master bedroom and requiring a wired Ethernet connection. I cannot use a wired Ethernet connection to continuously travel from the living room to the master bedroom. The distance is too great as I cannot effectively hide the Ethernet cable in this apartment.
(5) Time Machine (TM) backup facilitator - I use my TC to wirelessly back-up two Apple laptops using Apple's Time Machine (TM) application. However, I ran out of storage space on my TC and therefore added external storage to it. Specifically, I added an external hard drive to my TC via the USB port on the back of the TC. I now use this added external hard drive connected to the TC via USB as the destination storage drive for my TM back-ups. I have partitioned the added external hard drive, and each of the several partitions all have enough storage space (e.g., each of the two partitions used by TM are sized at three times the hard drive space of each laptop, etc.). Everything works flawlessly.
(6) Network Attached Storage (NAS) - In addition to using the TC's Network Attached Storage (NAS) capabilities to wirelessly back-up two Apple laptops via TM, I also store other additional files on both (A) the hard drive built into the TC and (B) the additional external hard drive connected to the TC via USB (there are additional separate partitions on this drive for these other additional and non-TM backup files).
I use the TC's NAS feature with my Apple laptop and AirPlay to wirelessly access and play my iTunes music collection stored on the TC's hard drive. I also use my Apple laptop, AirPlay and Apple TV to wirelessly watch movies and TV shows stored on the additional external hard drive connected to the TC via USB. Again, everything works wirelessly and flawlessly. (Note: the Apple TV is connected to the network via Ethernet and a LAN port on the back of the TC).
The issue I am having is when I try to listen to music via Apple's AirPlay in the master bedroom. This master bedroom is located at a distance of two rooms away from the TC's current location in the living room, which is a distance of about 50 feet. This apartment has a long rectangular floor plan where each room is connected to the next in a straight line. In order to use AirPlay in the master bedroom I am using a second extended Wi-Fi base station (a Netgear branded product) to wirelessly extend my WiFi network to a Denon receiver located in the master bedroom and requiring a wired Ethernet connection. This additional base station connects wirelessly to the WiFi network provided by my TC and then gives my Denon receiver the wired Ethernet connection it needs to use AirPlay. I have tried moving my iTunes music directly onto my laptop's hard drive, and then I used AirPlay on this same laptop to connect to the Denon receiver. I always get a successful connection and the song plays, but the problem is that the connection inevitably drops.
I live in an apartment building and all of the many wireless routers in this building create a great deal of WiFi interference on both the 2.4 GHz and 5GHz bands. I have tried connecting the Netgear product to each the 2.4 and 5 GHz bands, but neither band can successfully maintain a wireless connection between the TC and the Netgear product. I also attempted to maintain a wireless connection to an iPod touch using the 2.4 GHz band and AirPlay on this iPod touch to play music on the Denon receiver. Again, I was able to establish a connection and successfully play music, but after a few minutes the connection dropped and the music stopped playing. I therefore have concluded that I have a poor wireless connection in the master bedroom. I can establish a connection, but it is intermittent with frequent drops. I have verified this with both laptops by working in the master bedroom for an entire day on both laptops. The Internet connection in this master bedroom proved to drop out frequently - about once an hour with the laptops. The wireless connection and the frequency of its dropout are far worse with the iPod touch and an iPhone.
I cannot relocate the TC. Also, this is an apartment and I therefore cannot extend the range of my network with Ethernet cable (I cannot drill through walls/ceilings, etc.). It is an old building with antiquated wiring and power-line adapters are not likely to function properly, nor can I spare the direct power outlet required with a power-line adapter. I simply need every outlet I can get and cannot afford to block any direct outlet.
My solution is to use a more powerful wireless router. I found the ASUS RT-AC66U Dual-Band Wireless-AC1750 Gigabit Router which will likely provide a better connection to my wireless Internet in the master bedroom than the TC. The 802.11ac band of this Asus wireless router is totally useless to me, but based on what I have read I believe this router will provide a stronger connection at greater distances then my TC. And I will be ready for 802.11ac when it becomes more widely available.
However, I still need to maintain the TC's ability to work seamlessly with TM to backup my two laptops. Also, I doubt the new Asus router will provide OS X 10.8.2 with NAS like features and capabilities. Therefore, I still would like to use the TC's NAS capabilities to share files on my network wirelessly assuming the Asus wireless router fails to provide this feature. I need a new and more powerful wireless router, but I need to maintain the TC's NAS features and seamless integration with TM. Finally, I want to continue to use my Apple laptop and AirPlay to wirelessly access and play my iTunes music collection stored on the TC's hard drive. I also want to continue to use my Apple laptop, AirPlay and Apple TV to wirelessly watch movies and TV shows stored on the additional external hard drive connected to the TC via USB. Can someone advise on how to set-up my existing TC with this new Asus wireless router in such a way to accomplish all of this?
Modem
Motorola SB6121 SURFboard DOCSIS 3.0 Cable Modem
Existing Wireless Router and Primary Wi-Fi Base Station - Apple Time Capsule
Apple Time Capsule MC343LL/A 1TB Sim DualBand (purchased June 2010, likely the Winter 2009 Model)
Desired New Wireless Router and Primary Wi-Fi Base Station - Non-Apple Asus
ASUS RT-AC66U Dual-Band Wireless-AC1750 Gigabit Router
Extended Wi-Fi Base Station - Provides an Ethernet Connection to a Denon A/V Receiver Two Rooms Away from the Modem
Netgear Universal Dual Band Wireless Internet Adapter for TV & Blu-Ray (WNCE3001)
Addition External Hard Drive Attached to the Existing Apple Time Capsule via USB
WD My Book Studio 4TB Mac External Hard Drive Storage USB 3.0
Existing Laptops on the Wireless Network Requiring Time Machine Backups
MacBook Air (11-inch, Mid 2012) OS X 10.8.2
MacBook Pro (13-inch Mid 2010) OS X 10.8.2
Other Existing Apple Products (Clients) on the Wireless Network
iPod Touch (second generation) is model A1288.
iPad (1st generation)
Apple TV (3rd generation) - Quantity two (2)Thanks Bob Timmons.
In regards to a Plan B, I hear ya brother. I am already on what feels like Plan Z. Getting WiFi to a far off room in an apartment building crowded with WiFi routers is a major pain.
I am basing my thoughts on the potential of a new and more powerful router reaching the far off master bedroom based on positive reviews on cnet.com, pcmag.com and pcworld.com. All 3 of these web sites have reviewed the Asus RT-AC66U 802.11AC wireless router as well as its virtual twin cousin 802.11n router. What impressed me is that all 3 sites rated this router #1 overall in terms of both range and speed (in both the 802.11n and 802.11AC flavors). They tested the router in real world scenarios where the router needed to compete with a lot of other wireless routers. One of the sites even buried this Asus router in a media room with thick walls and inside a media cabinet. This Asus router should be able to serve my 2.4 GHz band wireless clients (iPod Touch and iPhone 4) with a 2.4GHz Wireless-N band offering some 50 feet of dependable range and a 60 Mbps throughput at that range. I am hoping that works, but it's borderline for my master bedroom. My 5 GHz wireless clients (laptops) will enjoy a 5GHz Wireless-N band offering 150 feet of range and a 200 Mbps throughput at that range. I have no idea what most of that stuff means, but I did also read that Asus could reach 300 feet and I got really excited. My mileage may vary of course and I'm sure I'm making some mistakes in my interpretation of their data. However, my Winter 2009 Time Capsule was rated by cnet.com to deliver real world performance of less than that, and 802.11AC may or may not be useful to me someday. But when this Asus arrives and provides anything other than an excellent and consistent wireless signal without drops in the master bedroom it's going right back!
Your solution sounds great, but I have some questions. I'm using OS X 10.8.2 and Airport Utility (version 6.1 610.31) and on its third tab labeled "Wireless" the top option enables you to set "Network Mode" to either:
Create a wireless network
Extend a wireless network
Off
Given your advice to "Turn off the wireless on the TC," should I set Network Mode to Off? Sorry, I'm clueless in regards to how to turn off the wireless on the TC any other way. Can you provide specific steps on how to turn off the wireless on the TC? If what I wrote is correct then what should the rest of this Wireless tab look like, or perhaps it is irrelevant when wireless is off?
Next, what do you mean by "Configure the TC in Bridge Mode?" Under Airports Utility's fourth tab labeled "Network" the top option "Router Mode" allows for either:
DHCP and Nat
DHCP Only
Off (Bridge Mode)
Is your advice to Configure the TC in Bridge Mode as simple as setting Router Mode to Off (Bridge Mode)? If yes, then what should the rest of this "Network" tab look like? Anything else involved in configuring the TC in Bridge Mode or is it really as simple as setting the Router Mode to "Off (Bridge Mode)"?
How about the other tabs in Airport Utility, can they all stay as is assuming I use the same network name and password for the new Asus wireless router? Or do I need to make any other changes to the TC via Airport Utility?
Finally, in regards to your Plan B suggestion. I agree. But do you have a Plan B for me? I would greatly appreciate any alternative you could provide. Specifically, if you needed a TC's Internet connection to reach a far off corner of your home how would you do it? In the master bedroom I need both a wired Ethernet connection for the Denon a/v receiver and wireless Internet connection for the iPhone and iPod Touch.
Power-Line Adapters - High Cost, Blocks at Least One Wall Outlet and Does Not Solve the Wireless Need
I actually like exactly one power-line adapter, which is the D-Link DHP-540 PowerLine AV 500 4-Port Gigabit Switch. This D-Link power-line adapter plugs into your wall outlet with a normal sized plug (regular standard power cord much like any other electronic device) instead of all of the other recommended power-line adapters that not only use at least one wall outlet but also often block the second outlet. You cannot use a power strip with a power-line adapter which is very impractical for me. And everything about my home is strange and upside down. The wiring here is a disaster and I don't have faith in its ability to carry Internet access from the living room to the master bedroom. And this D-Link power-line adapter costs $90 each and I need at least two to make the connection to the Denon A/V receiver. So, $180 on this solution and I still don't have a dependable drop free wireless connection in the master bedroom. The Denon might get its Ethernet Internet connection from the power-line adapter, but if I want to use an iPhone 4 or iPod Touch to stream AirPlay music to the Denon wirelessly (Pandora/iTunes, etc.) from the master bedroom the wireless connection will not be stable in there and I've already spent $190 on just the two power-line adapters needed.
Extenders / Repeaters / Wirelessly Extending the Wireless Network
I have also read great things about the Amped Wireless High Power Wireless-N 600mW Gigabit Dual Band Range Extender (Repeater) SR20000G and the My Net Wi-Fi Range Extender. The former is very powerful and the latter is easier to install. Both cost about $150 ish so similar to a new Asus router. However, everything I read about Range Extenders points to them not being very effective for a far off corner of your house wherein it's apparently hard to place the range extender in the sweet spot where it both gets a strong enough signal to actually effectively extend the wireless signal and otherwise does not reduce network throughput speeds to unacceptable speeds.
Creating a Roaming Network By Hard Wiring with Ethernet Cable - Wife Would Say, "**** No!"
Even Apple seems to warn against wirelessly extending your network (see: http://support.apple.com/kb/HT4145#) and otherwise strongly recommends a roaming network where Ethernet cable is used to connect two wireless base stations. However, I am in an apartment where stringing together two wireless base stations with Ethernet cable would have an extremely low wife acceptance factor (WAF). I cannot (both contractually and from a skill prospective) hide Ethernet wire in the walls or ceiling. And having visible Ethernet cable running from room-to-room would be unacceptable, especially to the wife.
So what is left? Do you have a Plan B for me? Thanks in advance for your help! -
My itunes account is attached to an email account that I no longer have and cannot retrieve. I have been having trouble with purchases made to my itunes account and want to view my purchases. The support center said that they would email me the purchase history. However, I don't have that email address. When I go to change my email address to my current one, I get a message in red saying that "the email address is already verified for another Apple I.D." I'm sure it is one of my devices as we have 4 ipods and 2 iphones. How can I get my account to use my current email address? If one of my devices was registered using my current email address as it apparently was, do I need to figure out which device that is and remove the email address from that account? I'm so confused. I just want ALL my devices to use my current email address. I need to replace the old email address with my current one. How do I do that?
thanks for any assistance.Your best bet would be to try resetting the password to the account that you would like to use via iForgot
Once you log in to that account change the email address to anything, it can even be fake its just a placeholder
After you do that you will be free to change your old email address on your appleID to the new one that is now free to be used as it is no longer attached to the other account. -
How to attached class or function module in FD03
Hi Guys
I want to attached CL_ATTACHMENT_LIST for retriving attachment list from fd03 please help to attached the function module in my program?
regards
Piroz
report zfir_aged_debtors no standard page heading
line-size 255.
Type group
type-pools:
slis. " ALV types
Tables
tables:
adrc, " Addresses
bsad, " Accounting: Customer secondary index (Cleared)
bsid, " Accounting: Customer secondary index (Open)
kna1, " Customer master: General data
knkk, " Customer master: Credit management
knvk. " Customer master: Contact persons
Types
types:
begin of ty_bsadbsid,
bukrs like bsad-bukrs, " Company code
kunnr like bsad-kunnr, " Customer
gjahr like bsad-gjahr, " Fiscal year
belnr like bsad-belnr, " Accounting document number
buzei like bsad-buzei, " Line item
budat like bsad-budat, " Posting date
bldat like bsad-bldat, " Document date
waers like bsad-waers, " Currency
xblnr like bsad-xblnr, " Reference
shkzg like bsad-shkzg, " Debit/credit indicator
dmbtr like bsad-dmbtr, " Amount
zfbdt like bsad-zfbdt, " Baseline date for due date
" calculation
zbd1t like bsad-zbd1t, " Cash discount days 1
zbd2t like bsad-zbd2t, " Cash discount days 2
zbd3t like bsad-zbd3t, " Net payment terms period
rebzg like bsad-rebzg, " Number of the invoice
rebzt like bsad-rebzt, " Follow on document type
end of ty_bsadbsid,
ty_it_bsadbsid type ty_bsadbsid occurs 0,
begin of ty_merged,
kunnr like kna1-kunnr, " Customer number
name1 like adrc-name1, " Name
city1 like adrc-city1, " City
post_code1 like adrc-post_code1, " Post code
street like adrc-street, " Street
house_num1 like adrc-house_num1, " House number
tel_number like adrc-tel_number, " Telephone number
fax_number like adrc-fax_number, " Fax number
namev like knvk-namev, " First name
namew like knvk-name1, " Last name
telf1 like knvk-telf1, " Telephone number
klimk like knkk-klimk, " Credit limit
skfor like knkk-skfor, " Total receivables
total like bsad-dmbtr, " Total amount
rast1 like bsad-dmbtr, " Amount period 1
rast2 like bsad-dmbtr, " Amount period 2
rast3 like bsad-dmbtr, " Amount period 3
rast4 like bsad-dmbtr, " Amount period 4
rast5 like bsad-dmbtr, " Amount period 5
rast6 like bsad-dmbtr, " Amount period 6
end of ty_merged,
ty_it_merged type ty_merged occurs 0.
Internal tables
data:
Internal table to store customer line items from BSAD and BSID
it_bsadbsid type ty_it_bsadbsid,
Internal table to store field catalog for ALV function call
it_fieldcat type slis_t_fieldcat_alv,
Internal table to store summarised data for report output
it_merged type ty_it_merged.
Structures
data:
Display variant structures
st_tvariant like disvariant,
st_variant like disvariant.
Constants
constants:
co_delim_dash type c
value '-',
co_false type c " False
value space,
co_koart_d like faede-koart " Customer account type
value 'D',
co_save_u type c " User display variant
value 'U', " saving allowed.
co_shkzg_h like bsid-shkzg " Debit/Credit indicator
value 'H', " for credit
co_shkzg_s like bsid-shkzg " Debit/Credit indicator
value 'S', " for debit
co_selected type c " Value of selected radio
value 'X', " button or checkbox
co_true type c " True
value co_selected.
Variables
data:
va_exit type c.
Selection screen definition
selection-screen: begin of block b1 with frame title text-001.
select-options:
s_kunnr for bsad-kunnr. " Customer number
parameters:
p_kkber like knkk-kkber, " Credit control area
p_pafkt like knvk-pafkt, " Contact function
p_datum like sy-datum. " Report date
selection-screen: begin of line,
comment 01(30) text-006,
position pos_low.
parameters:
rastbis1 like rfpdo1-allgrogr " Due date sorted 1
default '000',
rastbis2 like rfpdo1-allgrogr " Due date sorted 2
default '000',
rastbis3 like rfpdo1-allgrogr " Due date sorted 3
default '000',
rastbis4 like rfpdo1-allgrogr " Due date sorted 4
default '000',
rastbis5 like rfpdo1-allgrogr " Due date sorted 5
default '000'.
selection-screen: end of line.
selection-screen: end of block b1,
begin of block b2 with frame title text-002.
parameters:
p_varint like disvariant-variant. " Display variant.
selection-screen: end of block b2.
Initialisation
initialization.
Provide default periods for due date sorted list.
rastbis1 = 0.
rastbis2 = 30.
rastbis3 = 60.
rastbis4 = 90.
rastbis5 = 120.
Default report date to current.
p_datum = sy-datlo.
Default credit control area to BP01.
p_kkber = 'BP01'.
At selection screen on value request for
at selection-screen on value-request for p_varint.
Provide display variant list for this program.
call function 'REUSE_ALV_VARIANT_F4'
exporting
is_variant = st_variant
i_save = co_save_u
importing
e_exit = va_exit
es_variant = st_tvariant
exceptions
not_found = 2.
if sy-subrc eq 2.
message id sy-msgid type 'S'
number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
else.
if va_exit eq space.
st_variant = st_tvariant.
p_varint = st_tvariant-variant.
endif.
endif.
At selection screen
at selection-screen.
Load display variant.
if not p_varint is initial.
move st_variant to st_tvariant.
move p_varint to st_tvariant-variant.
call function 'REUSE_ALV_VARIANT_EXISTENCE'
exporting
i_save = co_save_u
changing
cs_variant = st_tvariant.
st_variant = st_tvariant.
else.
clear st_variant.
st_variant-report = sy-repid.
endif.
if p_kkber is initial.
Ensure credit control area is specified.
message e000(zgen) with 'Credit control area must be specified'.
endif.
if p_pafkt is initial.
Ensure contact person function is specified.
message e000(zgen) with 'Contact person function must be specified'.
endif.
Start of selection
start-of-selection.
Extract open customer items from BSID
select bukrs kunnr gjahr belnr buzei budat bldat waers xblnr shkzg
dmbtr zfbdt zbd1t zbd2t zbd3t rebzg rebzt
from bsid
into table it_bsadbsid
where kunnr in s_kunnr
and budat le p_datum.
Extracct cleared customer items from BSAD
select bukrs kunnr gjahr belnr buzei budat bldat waers xblnr shkzg
dmbtr zfbdt zbd1t zbd2t zbd3t rebzg rebzt
from bsad
appending table it_bsadbsid
where kunnr in s_kunnr
and budat le p_datum
and augdt ge p_datum.
Ensure that items were not selected twice while getting data from the
open and cleared items tables (Only if transaction occured during
report run).
sort it_bsadbsid by bukrs belnr gjahr buzei.
delete adjacent duplicates from it_bsadbsid
comparing bukrs belnr gjahr buzei.
if it_bsadbsid[] is initial.
No data found for selection
message s001(zgen).
exit.
endif.
Merge data for report output
perform merge_data tables it_bsadbsid
it_merged.
Build field catalog
perform build_field_catalog tables it_fieldcat.
Output report via ALV
perform output_report_via_alv tables it_fieldcat
it_merged.
*& Form merge_data
text
form merge_data tables pa_it_bsadbsid type ty_it_bsadbsid
pa_it_merged type ty_it_merged.
Local work areas
data:
lwa_bsadbsid type ty_bsadbsid,
lwa_merged type ty_merged.
Local structures
data:
lst_faede like faede.
Local variables
data:
lva_daysover type i,
lva_merged_tabix like sy-tabix.
loop at pa_it_bsadbsid into lwa_bsadbsid.
Lookup merged entry for customer
clear lwa_merged.
read table pa_it_merged into lwa_merged
with key kunnr = lwa_bsadbsid-kunnr
binary search.
lva_merged_tabix = sy-tabix.
if sy-subrc ne 0.
Create new merged record for customer
lwa_merged-kunnr = lwa_bsadbsid-kunnr.
Get customer details from KNA1
clear kna1.
select single *
from kna1
where kunnr eq lwa_bsadbsid-kunnr.
Get customer address details from ADRC
clear adrc.
select single *
from adrc
where addrnumber eq kna1-adrnr
and date_from le p_datum.
lwa_merged-name1 = adrc-name1.
lwa_merged-city1 = adrc-city1.
lwa_merged-post_code1 = adrc-post_code1.
lwa_merged-street = adrc-street.
lwa_merged-house_num1 = adrc-house_num1.
lwa_merged-tel_number = adrc-tel_number.
lwa_merged-fax_number = adrc-fax_number.
Get credit limit details from KNKK
clear knkk.
select single *
from knkk
where kunnr eq lwa_bsadbsid-kunnr
and kkber eq p_kkber.
lwa_merged-klimk = knkk-klimk.
lwa_merged-skfor = knkk-skfor.
Get customer contact person details from KNVK
clear knvk.
select single *
from knvk
where kunnr eq lwa_bsadbsid-kunnr
and pafkt eq p_pafkt.
lwa_merged-namev = knvk-namev.
lwa_merged-namew = knvk-name1.
lwa_merged-telf1 = knvk-telf1.
insert lwa_merged into pa_it_merged index lva_merged_tabix.
endif.
Interpret debit/credit indicator
case lwa_bsadbsid-shkzg.
when co_shkzg_h.
Credit
lwa_bsadbsid-dmbtr = 0 - lwa_bsadbsid-dmbtr.
when co_shkzg_s.
Debit
endcase.
Perform ageing
clear lst_faede.
move-corresponding lwa_bsadbsid to lst_faede.
lst_faede-koart = co_koart_d.
call function 'DETERMINE_DUE_DATE'
exporting
i_faede = lst_faede
importing
e_faede = lst_faede
exceptions
others = 1.
lva_daysover = p_datum - lst_faede-netdt.
Accumulate total.
add lwa_bsadbsid-dmbtr to lwa_merged-total.
if lva_daysover le rastbis1.
add lwa_bsadbsid-dmbtr to lwa_merged-rast1.
else.
if lva_daysover le rastbis2 or
rastbis3 is initial.
add lwa_bsadbsid-dmbtr to lwa_merged-rast2.
else.
if lva_daysover le rastbis3 or
rastbis4 is initial.
add lwa_bsadbsid-dmbtr to lwa_merged-rast3.
else.
if lva_daysover le rastbis4 or
rastbis5 is initial.
add lwa_bsadbsid-dmbtr to lwa_merged-rast4.
else.
if lva_daysover le rastbis5.
add lwa_bsadbsid-dmbtr to lwa_merged-rast5.
else.
add lwa_bsadbsid-dmbtr to lwa_merged-rast6.
endif.
endif.
endif.
endif.
endif.
Update the merged record
modify pa_it_merged from lwa_merged index lva_merged_tabix.
endloop.
endform. " merge_data
*& Form build_field_catalog
text
form build_field_catalog tables pa_it_fieldcat type slis_t_fieldcat_alv.
Local work areas
data:
lwa_fieldcat type slis_fieldcat_alv.
--WG1K903216: Start Insert-
data: v_datum type datum,
v_mdmth type datum,
v_datxt type string,
v_noday type i.
--WG1K903216: End Insert---
refresh pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'KUNNR'.
lwa_fieldcat-ref_tabname = 'KNA1'.
lwa_fieldcat-ref_fieldname = 'KUNNR'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '1'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'NAME1'.
lwa_fieldcat-ref_tabname = 'ADRC'.
lwa_fieldcat-ref_fieldname = 'NAME1'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '2'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'CITY1'.
lwa_fieldcat-ref_tabname = 'ADRC'.
lwa_fieldcat-ref_fieldname = 'CITY1'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '3'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'POST_CODE1'.
lwa_fieldcat-ref_tabname = 'ADRC'.
lwa_fieldcat-ref_fieldname = 'POST_CODE1'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '4'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'STREET'.
lwa_fieldcat-ref_tabname = 'ADRC'.
lwa_fieldcat-ref_fieldname = 'STREET'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '5'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'HOUSE_NUM1'.
lwa_fieldcat-ref_tabname = 'ADRC'.
lwa_fieldcat-ref_fieldname = 'HOUSE_NUM1'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '6'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'TEL_NUMBER'.
lwa_fieldcat-ref_tabname = 'ADRC'.
lwa_fieldcat-ref_fieldname = 'TEL_NUMBER'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '7'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'FAX_NUMBER'.
lwa_fieldcat-ref_tabname = 'ADRC'.
lwa_fieldcat-ref_fieldname = 'FAX_NUMBER'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '8'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'NAMEV'.
lwa_fieldcat-ref_tabname = 'KNVK'.
lwa_fieldcat-ref_fieldname = 'NAMEV'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '9'.
lwa_fieldcat-seltext_l = 'Contact first name'.
lwa_fieldcat-seltext_m = 'Contact Fname'.
lwa_fieldcat-seltext_s = 'Ctct Fname'.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'NAMEW'.
lwa_fieldcat-ref_tabname = 'KNVK'.
lwa_fieldcat-ref_fieldname = 'NAME1'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '10'.
lwa_fieldcat-seltext_l = 'Contact last name'.
lwa_fieldcat-seltext_m = 'Contact Lname'.
lwa_fieldcat-seltext_s = 'Ctxt Lname'.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'TELF1'.
lwa_fieldcat-ref_tabname = 'KNVK'.
lwa_fieldcat-ref_fieldname = 'TELF1'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '11'.
lwa_fieldcat-seltext_l = 'Contact phone no.'.
lwa_fieldcat-seltext_m = 'Contact phone'.
lwa_fieldcat-seltext_s = 'Ctct Phne'.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'KLIMK'.
lwa_fieldcat-ref_tabname = 'KNKK'.
lwa_fieldcat-ref_fieldname = 'KLIMK'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '12'.
lwa_fieldcat-seltext_l = 'Credit limit'.
lwa_fieldcat-seltext_m = 'Credit limit'.
lwa_fieldcat-seltext_s = 'Crdt limit'.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'SKFOR'.
lwa_fieldcat-ref_tabname = 'KNKK'.
lwa_fieldcat-ref_fieldname = 'SKFOR'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '13'.
lwa_fieldcat-seltext_l = 'Credit used'.
lwa_fieldcat-seltext_m = 'Credit used'.
lwa_fieldcat-seltext_s = 'Crdt used'.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'TOTAL'.
lwa_fieldcat-ref_tabname = 'BSAD'.
lwa_fieldcat-ref_fieldname = 'DMBTR'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '14'.
lwa_fieldcat-seltext_l = 'Total'.
lwa_fieldcat-seltext_m = 'Total'.
lwa_fieldcat-seltext_s = 'Total'.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'RAST1'.
lwa_fieldcat-ref_tabname = 'BSAD'.
lwa_fieldcat-ref_fieldname = 'DMBTR'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '15'.
--WG1K903216: Start Delete-
concatenate '<'
rastbis2
into lwa_fieldcat-seltext_l
separated by space.
--WG1K903216: End Delete---
--WG1K903216: Start Insert-
clear: v_datum,
v_datxt.
v_noday = rastbis2.
Always use the middle of the report month as a heading reference date.
concatenate p_datum+0(6) '15' into v_mdmth.
call function 'ZWAG_DATE_CALCULATOR'
exporting i_datum = v_mdmth
i_noday = v_noday
i_oprnd = '+'
importing e_datum = v_datum
exceptions invalid_operand = 1.
call function 'ZWAG_END_MONTH'
exporting i_datum = v_datum
importing e_datum = v_datum
e_datxt = v_datxt
exceptions invalid_date = 1.
concatenate 'Due' v_datxt into lwa_fieldcat-seltext_l
separated by space.
--WG1K903216: End Insert---
lwa_fieldcat-seltext_m = lwa_fieldcat-seltext_l.
lwa_fieldcat-seltext_s = lwa_fieldcat-seltext_l.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'RAST2'.
lwa_fieldcat-ref_tabname = 'BSAD'.
lwa_fieldcat-ref_fieldname = 'DMBTR'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '16'.
--WG1K903216: Start Delete-
concatenate rastbis1
rastbis2
into lwa_fieldcat-seltext_l
separated by co_delim_dash.
--WG1K903216: End Delete---
--WG1K903216: Start Insert-
clear: v_datum,
v_datxt.
v_noday = rastbis1.
call function 'ZWAG_DATE_CALCULATOR'
exporting i_datum = v_mdmth
i_noday = v_noday
i_oprnd = '+'
importing e_datum = v_datum
exceptions invalid_operand = 1.
call function 'ZWAG_END_MONTH'
exporting i_datum = v_datum
importing e_datum = v_datum
e_datxt = v_datxt
exceptions invalid_date = 1.
concatenate 'Due' v_datxt into lwa_fieldcat-seltext_l
separated by space.
--WG1K903216: End Insert---
lwa_fieldcat-seltext_m = lwa_fieldcat-seltext_l.
lwa_fieldcat-seltext_s = lwa_fieldcat-seltext_l.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'RAST3'.
lwa_fieldcat-ref_tabname = 'BSAD'.
lwa_fieldcat-ref_fieldname = 'DMBTR'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '17'.
--WG1K903216: Start Delete-
concatenate rastbis2
rastbis3
into lwa_fieldcat-seltext_l
separated by co_delim_dash.
--WG1K903216: End Delete---
--WG1K903216: Start Insert-
clear: v_datum,
v_datxt.
v_noday = rastbis2.
call function 'ZWAG_DATE_CALCULATOR'
exporting i_datum = v_mdmth
i_noday = v_noday
i_oprnd = '-'
importing e_datum = v_datum
exceptions invalid_operand = 1.
call function 'ZWAG_END_MONTH'
exporting i_datum = v_datum
importing e_datum = v_datum
e_datxt = v_datxt
exceptions invalid_date = 1.
concatenate 'Due' v_datxt into lwa_fieldcat-seltext_l
separated by space.
--WG1K903216: End Insert---
lwa_fieldcat-seltext_m = lwa_fieldcat-seltext_l.
lwa_fieldcat-seltext_s = lwa_fieldcat-seltext_l.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'RAST4'.
lwa_fieldcat-ref_tabname = 'BSAD'.
lwa_fieldcat-ref_fieldname = 'DMBTR'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '18'.
--WG1K903216: Start Delete-
concatenate rastbis3
rastbis4
into lwa_fieldcat-seltext_l
separated by co_delim_dash.
--WG1K903216: End Delete---
--WG1K903216: Start Insert-
clear: v_datum,
v_datxt.
v_noday = rastbis3.
call function 'ZWAG_DATE_CALCULATOR'
exporting i_datum = v_mdmth
i_noday = v_noday
i_oprnd = '-'
importing e_datum = v_datum
exceptions invalid_operand = 1.
call function 'ZWAG_END_MONTH'
exporting i_datum = v_datum
importing e_datum = v_datum
e_datxt = v_datxt
exceptions invalid_date = 1.
concatenate 'Due' v_datxt into lwa_fieldcat-seltext_l
separated by space.
--WG1K903216: End Insert---
lwa_fieldcat-seltext_m = lwa_fieldcat-seltext_l.
lwa_fieldcat-seltext_s = lwa_fieldcat-seltext_l.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'RAST5'.
lwa_fieldcat-ref_tabname = 'BSAD'.
lwa_fieldcat-ref_fieldname = 'DMBTR'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '19'.
--WG1K903216: Start Delete-
concatenate rastbis4
rastbis5
into lwa_fieldcat-seltext_l
separated by co_delim_dash.
--WG1K903216: End Delete---
--WG1K903216: Start Insert-
clear: v_datum,
v_datxt.
v_noday = rastbis4.
call function 'ZWAG_DATE_CALCULATOR'
exporting i_datum = v_mdmth
i_noday = v_noday
i_oprnd = '-'
importing e_datum = v_datum
exceptions invalid_operand = 1.
call function 'ZWAG_END_MONTH'
exporting i_datum = v_datum
importing e_datum = v_datum
e_datxt = v_datxt
exceptions invalid_date = 1.
concatenate 'Due' v_datxt into lwa_fieldcat-seltext_l
separated by space.
--WG1K903216: End Insert---
lwa_fieldcat-seltext_m = lwa_fieldcat-seltext_l.
lwa_fieldcat-seltext_s = lwa_fieldcat-seltext_l.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'RAST6'.
lwa_fieldcat-ref_tabname = 'BSAD'.
lwa_fieldcat-ref_fieldname = 'DMBTR'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '20'.
--WG1K903216: Start Delete-
concatenate '>'
rastbis5
into lwa_fieldcat-seltext_l
separated by space.
--WG1K903216: End Delete---
--WG1K903216: Start Insert-
clear: v_datum,
v_datxt.
v_noday = rastbis5.
call function 'ZWAG_DATE_CALCULATOR'
exporting i_datum = v_mdmth
i_noday = v_noday
i_oprnd = '-'
importing e_datum = v_datum
exceptions invalid_operand = 1.
call function 'ZWAG_END_MONTH'
exporting i_datum = v_datum
importing e_datum = v_datum
e_datxt = v_datxt
exceptions invalid_date = 1.
concatenate 'Due By' v_datxt into lwa_fieldcat-seltext_l
separated by space.
--WG1K903216: End Insert---
lwa_fieldcat-seltext_m = lwa_fieldcat-seltext_l.
lwa_fieldcat-seltext_s = lwa_fieldcat-seltext_l.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
endform. " build_field_catalog
*& Form output_report_via_alv
text
form output_report_via_alv
tables pa_it_fieldcat type slis_t_fieldcat_alv
pa_it_merged type ty_it_merged.
Local variables
data:
lva_repid like sy-repid,
lva_formname type slis_formname.
lva_repid = sy-repid.
lva_formname = 'USER_COMMAND'.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = lva_repid
i_callback_user_command = lva_formname
i_save = 'A'
is_variant = st_variant
it_fieldcat = pa_it_fieldcat[]
tables
t_outtab = pa_it_merged
exceptions
program_error = 1
others = 2.
endform. " output_report_via_alvHi shiva
Thanks for your help,
Can you check this coding and revert me back ASAP Please.
REPORT BDS_GOS_CONNECTION.
DATA : logical_system LIKE BAPIBDS01-log_system.
CLASSNAME LIKE BAPIBDS01-CLASSNAME
OBJKEY LIKE SWOTOBJID-objkey.
PARAMETERS: pa_lo_sys BAPIBDS01-log_system,
pa_class like BPIBDS01-CLASSNAME,
pa_objkey like swotobjidobjkey.
AT SELECTION-SCREEN.
CALL FUNCTION 'BDS_GOS_CONNECTIONS_GET'
EXPORTING
bor_id = bor_id
IMPORTING
logical_sytem = pa_lo_sys.
classname = pa_class.
objkey = pa_objkey.
EXCEPTIONS
no_objects_found = 1
internal_error = 2
internal_gos_error = 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 v_attno1.
i_object1-typeid = 'BUS2012'.
i_object1-catid = 'BO'.
i_object1-instid = i_yItem-docno.
call method cl_gos_attachment_query=>count_for_object
exporting
is_object = i_object1
ip_arl = space
receiving
rt_stat = i_stat1.
read table i_stat1 into wa_stat1 index 1.
if sy-subrc eq c_0.
move wa_stat1-counter to v_attno1.
endif.
CALL METHOD cl_gos_attachment_query=>count_for_object
EXPORTING
is_object = object
ip_arl = space
RECEIVING
rt_stat = lt_stat.
READ TABLE lt_stat INDEX 1 into ls_stat.
count = ls_stat-counter.
*The object has to be a concatenation of your document, like this:
CONCATENATE object-instid tab-gjahr INTO object-instid.
ELSE.
CONCATENATE tab-bukrs tab-belnr tab-gjahr INTO
object-instid.
ENDIF. -
Attaching text file using SO_NEW_DOCUMENT_ATT_SEND_API1
hello guys, i'm a newbie here.
I'm having trouble attaching an existing text file using function 'SO_NEW_DOCUMENT_ATT_SEND_API1'. It seems i can't find the right combination of parameters that are being passed to this function.
first, i'm using WS_UPLOAD to upload the text file to an internal table then i'm creating all the neccessary internal tables that will be use by this function..
By the way, i'm trying to send mail w/ attachments to external mail and SAPids. Below is my code.
REPORT ZHR_TESTEMAIL .
TABLES: USR02, PA0105, SOSU, SOUC, RLGRAP, IBIPPARMS, DYNPREAD, RSCSEL.
DATA: FOLD_YR(2) TYPE C,
FOLD_TYPE(3) TYPE C,
G_HEADER LIKE SOOD2,
G_FOLMAM LIKE SOFM2,
METHOD1 LIKE SY-UCOMM,
G_DOCUMENT LIKE SOOD4,
G_USER LIKE SOUDNAMEI1,
FOLD_NUMBER(12) TYPE C,
G_NEW_PARENT LIKE SOODK,
G_OWNER LIKE SOUD-USRNAM,
G_REF_DOCUMENT LIKE SOOD4,
G_USER_DATA LIKE SOUDATAI1,
G_AUTHORITY LIKE SOFA-USRACC,
G_OBJCNT LIKE SOLI OCCURS 0 WITH HEADER LINE,
G_OBJHEAD LIKE SOLI OCCURS 0 WITH HEADER LINE,
G_OBJPARA LIKE SELC OCCURS 0 WITH HEADER LINE,
G_OBJPARB LIKE SOOP1 OCCURS 0 WITH HEADER LINE,
G_RECIPIENTS LIKE SOOS1 OCCURS 0 WITH HEADER LINE,
G_REFERENCES LIKE SOXRL OCCURS 0 WITH HEADER LINE,
G_ATTACHMENTS LIKE SOOD5 OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF G_FILES OCCURS 10 ,
TEXT(4096) TYPE C,
END OF G_FILES.
DATA: BEGIN OF IT_WS_FILE OCCURS 0,
WS_FILE LIKE RLGRAP-FILENAME,
END OF IT_WS_FILE.
DATA: BEGIN OF IT_SAPID OCCURS 0,
SAPID LIKE USR02-BNAME,
END OF IT_SAPID.
DATA: BEGIN OF IT_EMAIL OCCURS 0,
EMAILADD LIKE PA0105-USRID_LONG,
END OF IT_EMAIL.
DATA: BEGIN OF IT_TSP01 OCCURS 0.
INCLUDE STRUCTURE TSP01.
DATA: END OF IT_TSP01.
DATA: BEGIN OF TAB2 OCCURS 50,
TEXT(200) TYPE C,
END OF TAB2.
DATA: V_DOCDATA TYPE SODOCCHGI1,
V_OBJPACK LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
V_OBJHEAD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
V_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
V_OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
V_OBJHEX LIKE SOLIX OCCURS 0 WITH HEADER LINE,
IT_RECVRS TYPE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
IT_CONTNT TYPE SOLISTI1 OCCURS 0 WITH HEADER LINE,
IT_BODY LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE,
V_TLIN TYPE I,
V_LINE TYPE I.
DATA: BEGIN OF IT_TEXTLINE OCCURS 500,
TEXTLINE(5000),
END OF IT_TEXTLINE.
DATA: FYL LIKE RLGRAP-FILENAME,
GV_SUBNO LIKE SOSU-SUBNO,
GV_EMAIL LIKE PA0105-USRID_LONG,
GV_NEXTDAY LIKE SY-DATUM,
YEAR(4) TYPE C,
RECFLAG TYPE C.
SELECTION-SCREEN BEGIN OF BLOCK PARAM WITH FRAME TITLE TEXT-001.
PARAMETERS: SUBJ(254) TYPE C OBLIGATORY, "Subject
DESC(254) TYPE C. "Message
SELECT-OPTIONS: SAPID FOR USR02-BNAME NO INTERVALS. "Recipient's SAP ID
SELECT-OPTIONS: EMAILADD FOR PA0105-USRID_LONG NO INTERVALS.
SELECTION-SCREEN END OF BLOCK PARAM.
SELECTION-SCREEN BEGIN OF BLOCK PARAM2 WITH FRAME TITLE TEXT-002.
SELECT-OPTIONS: WS_FILE FOR DYNPREAD-FIELDNAME NO INTERVALS.
SELECTION-SCREEN END OF BLOCK PARAM2.
SELECTION-SCREEN BEGIN OF BLOCK PARAM3 WITH FRAME TITLE TEXT-003.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: RBUT1 RADIOBUTTON GROUP A USER-COMMAND BUT. "Local PC
SELECTION-SCREEN COMMENT 5(20) FOR FIELD RBUT1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: RBUT2 RADIOBUTTON GROUP A. "Server
SELECTION-SCREEN COMMENT 5(20) FOR FIELD RBUT2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: RBUT3 RADIOBUTTON GROUP A. "Spool
SELECTION-SCREEN COMMENT 5(20) FOR FIELD RBUT3.
PARAMETERS: SPOOLNUM LIKE RSPOTYPE-RQNUMBER. "Spool Number
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK PARAM3.
SELECTION-SCREEN BEGIN OF BLOCK PROC WITH FRAME TITLE TEXT-004.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: BPROC AS CHECKBOX USER-COMMAND BCK. "Background Processing
SELECTION-SCREEN COMMENT 5(50) FOR FIELD BPROC.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK PROC.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR WS_FILE-LOW.
DATA: WS_FILE_TEMP TYPE IBIPPARMS-PATH.
CLEAR: WS_FILE_TEMP.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SY-REPID
DYNPRO_NUMBER = SY-DYNNR
FIELD_NAME = 'WS_FILE'
IMPORTING
FILE_NAME = WS_FILE_TEMP.
WS_FILE-LOW = WS_FILE_TEMP.
AT SELECTION-SCREEN.
SELECT SAPNAM FROM SOUC
INTO TABLE IT_SAPID
WHERE SAPNAM IN SAPID
AND DELETED = ''.
GV_NEXTDAY = SY-DATUM + 1.
LOOP AT EMAILADD.
IT_EMAIL-EMAILADD = EMAILADD-LOW.
APPEND IT_EMAIL.
CLEAR: IT_EMAIL.
ENDLOOP.
IF NOT BPROC IS INITIAL.
CLEAR: RBUT1, RBUT3.
RBUT2 = 'X'.
ELSE.
CLEAR: RBUT2.
ENDIF.
IF NOT RBUT3 IS INITIAL.
REFRESH: WS_FILE.
ENDIF.
IF SAPID IS INITIAL AND EMAILADD IS INITIAL.
MESSAGE E000(ZZ) WITH TEXT-201.
ELSEIF NOT SAPID IS INITIAL AND EMAILADD IS INITIAL.
CLEAR IT_SAPID.
READ TABLE IT_SAPID.
SELECT SINGLE SUBNO FROM SOSU
INTO GV_SUBNO
WHERE USRNO IN ( SELECT USRNO FROM SOUC
WHERE SAPNAM = IT_SAPID-SAPID ).
IF SY-SUBRC NE 0.
MESSAGE E000(ZZ) WITH TEXT-202.
ENDIF.
CLEAR: IT_SAPID.
ELSEIF NOT SAPID IS INITIAL AND NOT EMAILADD IS INITIAL.
CLEAR: IT_SAPID, IT_EMAIL.
READ TABLE IT_SAPID.
READ TABLE IT_EMAIL.
SELECT SINGLE SUBNO FROM SOSU
INTO GV_SUBNO
WHERE USRNO IN ( SELECT USRNO FROM SOUC
WHERE SAPNAM = IT_SAPID-SAPID ).
IF SY-SUBRC NE 0.
SUBMIT RSSOADM0 WITH USRNAM EQ IT_SAPID-SAPID
WITH NEW_SUBS EQ IT_EMAIL-EMAILADD
WITH SUB_ESC EQ 'U'
WITH EDAT EQ SY-DATUM
WITH BDAT EQ SY-DATUM
WITH BDAT EQ GV_NEXTDAY
WITH EDAT EQ '99991231'
WITH BTIM EQ SY-UZEIT
WITH ETIM EQ '240000'
WITH FORW_ALL EQ 'X'
WITH PSTHR2 EQ ''
AND RETURN.
ENDIF.
CLEAR: IT_SAPID.
ELSEIF NOT EMAILADD IS INITIAL AND SAPID IS INITIAL.
RECFLAG = 'X'.
ENDIF.
START-OF-SELECTION.
PERFORM B_SENDMAIL.
FORM B_SENDMAIL.
YEAR = SY-DATUM+0(4).
LOOP AT WS_FILE.
CLEAR: FYL.
FYL = WS_FILE-LOW.
REFRESH: TAB2.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = FYL
FILETYPE = 'BIN'
TABLES
DATA_TAB = TAB2.
IT_TEXTLINE[] = TAB2[].
DOCUMENT_DATA (SUBJECT OF MAIL)
V_DOCDATA-OBJ_NAME = DESC.
V_DOCDATA-OBJ_DESCR = SUBJ.
V_DOCDATA-OBJ_LANGU = SY-LANGU.
V_DOCDATA-SENSITIVTY = 'C'.
V_DOCDATA-OBJ_PRIO = '1'.
BODY OF MAIL
IT_BODY-LINE = 'Collection Report'.
APPEND IT_BODY.
CONTENTS_TXT (Attachments)
IT_CONTNT[] = IT_TEXTLINE[].
DESCRIBE TABLE IT_CONTNT LINES V_LINE.
READ TABLE IT_CONTNT INDEX V_LINE.
PACKING_LIST
V_OBJPACK-DOC_SIZE = ( V_LINE - 1 ) * 255 + STRLEN( IT_CONTNT ).
V_OBJPACK-TRANSF_BIN = 'X'.
V_OBJPACK-HEAD_START = 1.
V_OBJPACK-HEAD_NUM = 0.
V_OBJPACK-BODY_START = 1.
V_OBJPACK-BODY_NUM = V_LINE.
V_OBJPACK-DOC_TYPE = 'TXT'.
V_OBJPACK-OBJ_NAME = 'ATTACHMENT'.
V_OBJPACK-OBJ_DESCR = 'Attached Document'.
APPEND V_OBJPACK.
CLEAR V_OBJPACK.
RECEIVERS of mail
IF RECFLAG IS INITIAL.
LOOP AT IT_SAPID.
IT_RECVRS-RECEIVER = IT_SAPID-SAPID.
IT_RECVRS-REC_TYPE = 'B'.
IT_RECVRS-COM_TYPE = ''.
IT_RECVRS-EXPRESS = 'X'.
IT_RECVRS-NO_FORWARD = ''.
IT_RECVRS-NO_PRINT = ''.
APPEND IT_RECVRS.
CLEAR IT_RECVRS.
ENDLOOP.
ELSE.
LOOP AT EMAILADD.
IT_RECVRS-RECEIVER = EMAILADD-LOW.
IT_RECVRS-REC_TYPE = 'U'.
IT_RECVRS-COM_TYPE = 'INT'.
IT_RECVRS-EXPRESS = 'X'.
APPEND IT_RECVRS.
CLEAR IT_RECVRS.
ENDLOOP.
ENDIF.
OBJECT_HEADER (Filename)
CONCATENATE 'Collection Report' '_'
SY-DATUM+4(4) YEAR '.TXT'
INTO V_OBJHEAD-LINE.
V_OBJHEAD-LINE = FYL+16(25).
APPEND V_OBJHEAD.
CLEAR V_OBJHEAD.
Function Module For Sending Mail with Attachment
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = V_DOCDATA
TABLES
PACKING_LIST = V_OBJPACK
OBJECT_HEADER = V_OBJHEAD
CONTENTS_HEX = IT_CONTNT
CONTENTS_TXT = IT_BODY
RECEIVERS = IT_RECVRS
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 S000(ZZ) WITH TEXT-005.
ELSE.
MESSAGE S000(ZZ) WITH TEXT-006.
ENDIF.
ENDLOOP.
end of my code *
please help me guys... when i run this program, DOCUMENT_NOT_SENT is what i always get..
waiting for ur reply... thank you vey much and godbless.Hi,
Try this sample code.
FORM SEND_TO_EMAIL USING zFName.
DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: OBJBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
DATA: DOC_CHNG LIKE SODOCCHGI1.
DATA: TAB_LINES LIKE SY-TABIX.
DATA: ctmp(50) TYPE C.
Creation of the document to be sent
DOC_CHNG-OBJ_NAME = 'JOURNAL'.
CONCATENATE 'SAP Payroll Journal file Period' pybegda INTO ctmp
SEPARATED BY SPACE.
DOC_CHNG-OBJ_DESCR = cTmp.
OBJTXT = 'SAP Payroll Journal'.
APPEND OBJTXT.
CONCATENATE 'For Period' pybegda INTO ctmp
SEPARATED BY SPACE.
OBJTXT = ctmp.
APPEND OBJTXT.
CONCATENATE 'Attached File :' zFname INTO ctmp
SEPARATED BY SPACE.
OBJTXT = ctmp.
APPEND OBJTXT.
OBJTXT = 'Please find the attachment.'.
APPEND OBJTXT.
DESCRIBE TABLE OBJTXT LINES TAB_LINES.
READ TABLE OBJTXT INDEX TAB_LINES.
DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
Creation of the entry for the compressed document
CLEAR OBJPACK-TRANSF_BIN.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'RAW'.
APPEND OBJPACK.
Creation of the document attachment
<b>LOOP AT xMail.
CONDENSE xMail-aline.
OBJBIN = xMail-aline.
APPEND OBJBIN.
CLEAR OBJBIN.
ENDLOOP.</b>
DESCRIBE TABLE OBJBIN LINES TAB_LINES.
OBJHEAD = zFname. APPEND OBJHEAD.
Creation of the entry for the compressed attachment
OBJPACK-TRANSF_BIN = 'X'.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 1.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'RAW'.
OBJPACK-OBJ_NAME = 'DATA'.
OBJPACK-OBJ_DESCR = 'SAP Payroll File'.
OBJPACK-DOC_SIZE = TAB_LINES * 255.
APPEND OBJPACK.
Completing the recipient list
LOOP AT PENERIMA.
CONDENSE PENERIMA-PNRM.
RECLIST-RECEIVER = PENERIMA-PNRM.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
ENDLOOP.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = ' '
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
CASE SY-SUBRC.
WHEN 0.
WRITE: / 'Result of the send process:'.
LOOP AT RECLIST.
WRITE: / RECLIST-RECEIVER(48), ':'.
IF RECLIST-RETRN_CODE = 0.
WRITE / 'The document was sent'.
ELSE.
WRITE / 'The document could not be sent'.
ENDIF.
ENDLOOP.
WHEN 1.
WRITE: / 'Too many receiver'.
WHEN 2.
WRITE: / 'Document could not be sent to any recipient'.
WHEN 4.
WRITE: / 'No send authorization'.
WHEN OTHERS.
WRITE: / 'Error occurred while sending'.
ENDCASE.
ENDFORM. -
How can I move an e-mail forwarded as an attachment into my inbox?
I recently migrated from MS Outlook 2003 to Thunderbird 24.4.0 for my personal e-mail because I can't afford the latest MS Outlook and wouldn't really want version 2013 anyway. Prior to the migration, any time someone sent me a personal e-mail at work, I would forward it home as an attachment and move that attachment into my inbox at home. In Thunderbird, I find that when I drag the e-mail attachment from the attachment section to the Inbox folder (the actual folder in the navigation pane or the list of e-mails in the inbox), I get the unavailable symbol (circle with slash through it). I am guessing this is not going to be something I can do in Thunderbird, but wanted to check here and see if anyone had other ways to get the same end result.
The reason I have done this historically is to preserve the original e-mail and have the mail client show me who sent it to me. Viewing the forwarded message is fine, but if I want to look for it later, I have to look for a forwarding e-mail from myself instead of the original message that was sent to me.
Beyond getting people to use my personal address (really not sure why/how they have my work one), does anyone have any advice that could make this happen? For the record, I also tried resending the e-mail to my personal address as if it were from the original sender, but that won't fly at work due to the security configuration in the Exchange server.Save the attachment, and give it an eml extension if it doesn't have one (messages attached to TB messages are named 'Attached Message'), then drag the eml file from the Explorer folder where you saved it and drop it on a TB folder in the Folder Pane.
-
How do i open an e-mail attachment from WINDOWS
heres my question
Someone approached me in church today,they know i have a Macbook
They recieved an e-mail with an attachment from someone else
they went to open the attachment,Right away Microsoft Office opened and told them their TRIAL had expired.
I recommmended they look in Spotlight and also under system preferences in the blue apple
What he needs in something In the Macbook Already that will open the attachment so he can read it.
Will the trial version of I-Work do it?
he is looking or something quick that will work
thanksCoffeehouseSchmuck,
The attachment is evidently a Word file, and the person in question evidently just clicked on the attachment in the email message. When you do this, Mail will attempt to have the associated application open the attachment.
The first problem is that only a trial version of Word is present, and the second is that the person in question is simply clicking on the attachment. First, get the attachment to the Desktop by dragging it there (or using the "Save Attachment.." button in Mail).
Once the attachment is on the Desktop, select it, then press Apple-I to open a Getinfo window for it. Use the "Open With.." pull-down to change the default application to open this type of document, then click the "Change All" button.
Text Edit will open Word documents, but the formatting might be funky. However, this should be sufficient for simply reading attachments. An iWork trial version of Pages will be able to handle it with all formatting in place, but this will only work until the trial expires.
Ideally, the person in question should acquire either MS Office or the free NeoOffice.
Scott -
How can I choose multiple pictures, on the iPad, to attach in an email using Mail?
I can easily choose and attach one picture from Photos to an email in Mail. I cannot seem to figure out how to choose multiple pictures, then attach all of them at once. I even tried using a separate folder to attach but that did not work either. Thanks in advance.
From the Photos app tap Edit.
Tap to select up to 5 photos. More and the Mail option is not possible.
Tap Share.
Tap Mail. -
How can I properly attach an Email 'business card' signature?
Hi,
I was wondering if there were any better ways to attach a business card signature with mail.
Currently I have a small business card that I have optimized to around 60 kb, I use the signature feature in Mail to drag it in and add my standard business disclaimer stuff underneath.
Thing is if I send it to another MacMail account it displays fine but if I send it to Gmail or Yahoo it appears as a seperate attachment that needs to be downloaded etc.
Is there anyway round this? A way for it to just appear under the text of my email for any Email host or software without it appearing as an attachment. Outlook seems to allow the function and I'm allways receiving full page HTML graphical advertisments in my inbox, simular to the ones when you get a receipt etc, should I use the same principals?
I'd also like to know if I can make it link to my website using some code from Image Shack or similar online host.
Many thanks.Hi, have you gone to Mail>Edit>Attachments>Always send Windows friendly attachments?
-
I received an email that I now know to be malicious and inadvertently opened up the attachment on my IPad that I've been informed will download malware or a virus. Can my IPad be infected this way or does anyone know if there is a way of running a security scan to check if there is a problem? I do have the most up to date IOS software installed.
There is no anti-malware for iOS, at least none that actually does anything useful. The odds of getting any malware infection via an email attachment on an iOS device is quite low - practically non-existent. Unless you are seeing any issues, there isn't much to do, other than deleting the email and being more cautious in the future.
-
How can I print only the emailed attachment to my ePrint enabled printer?
I have ePrint working fine. I was able to email an attachment to the printer from many miles away. To prevent wasting paper, I'd like to be able to tell my printer or ePrint Center to just print the attachment, not the email it is attached to.
I have an HP OfficeJet 6500A.Hi Sparty80,
The way ePrint is designed, it will print the body of the email and any supported attachments. The only way to print the attachment and not the body of the email is to attach the document to a blank email, or delete the body in the email when you forward the message, which maybe easier.
If I have solved your issue, please feel free to provide kudos and make sure you mark this thread as solution provided!
Although I work for HP, my posts and replies are my own opinion and not those of HP.
Maybe you are looking for
-
Hello Folks, I am trying to implement the java client proxies for one of my requirements... i have used the guides provided for the java client proxies in SDN and trying to implemented the same (Mine is asynchronous..) so far I ha
-
Is it possible to open a Safari document in Pages08?
I have saved a safari html document to my desktop and want to open it in Pages08. Is this possible? When I right-click the Safari icon and then "open with" I am presented with several possibilities but Pages08 is not one of them. If I click "others"
-
Margins shrink when printing to PDF
Okay...I use Windows XP, Adobe Acrobat 6.0, and recently (begrudingly) uppgraded to Adobe Reader X. I have a printing problem ever since the upgrade to Reader X. When I print a hardcopy of a document, it looks fine. However, if I print to PDF, it
-
HT2493 Change your icons not working
hi everyone, I've been trying to change a folder icon to a .jpeg image, but having followed the instructions in HT2493 I am at a loss to get this procedure to work for me. At best, the blue folder icon is replaced by the mac .jpeg image icon and not
-
"Invalid address, password or username" in Nokia M...
I'm trying to set up a secondary email on Nokia Messaging on my N97 mini. The first email set up without any problems but it seems that no matter how many times I try I get the "Invalid address, password or username" message everytime! I've tried als