Compare two Idoc's and send to te recievers as per the Condition.
Hi,
Scenario: Sender are a Idoc's and Receiver is Mail and File.
Sum the value of field1 of IDOC1 loop and compare with the field 2 of IDOC2. If the Condition satisfy send the data to file and mail reciever else send to only mail reciever.
I tried using a BPM. Steps used in BPM are as follow:
Step: 1
Fork -- with two branches.
Branch 1:loop1-- reciever1 -- container
Branch 2:reciever2
Step2:
Switch with two branches: Check the compare condition of the two Idoc
Branch 1:
Fork with two branches with send step with mail and file recievers
branch 2: Only mail reciever.
However if the condition is true or false the information is send mail to reciever.
I tried with the above steps, but failed.
Any changes required, please let me know.
Regards,
Manoj
sumit,
I recieve N number of IDOC1. I need Sum the value of field1 of IDOC1 loop and compare with the field 2 of IDOC2.
I tried using a BPM . Steps used in BPM are as follow:
Step: 1
Fork -- with two branches.
Branch 1:loop1-- reciever1 -- container
Branch 2:reciever2
Step2: Transfomation with Mapping program, source and Target message
Step3:
Switch with two branches: Check the compare condition of the two Idoc
Branch 1:
Fork with two branches with send step with mail and file recievers
branch 2: Only mail reciever.
When i checked with workflow i observe that that the message is not moving out of transformation step.But the message mapping is succesfully tested
Thanks,
Manoj
Similar Messages
-
Hi all,
How to compare two IDoc's. If the both the IDocs are are of same type, i want to distinguish the data in those two IDocs.
Thank you in Advance
Regards
HarshaHi Harsha,
Transaction WE05 will help you out.You should first know some details like the
iDoc type, partner, the date/time and maybe the iDoc #. There can be many iDocs
generated/processed per day and without having some info to start with,
one will never find anything useful. Filter what you can, and then
navigate in the left hand frame/double click on the results lines in the
right hand frame to drill down. Eventually you will see the single iDoc
with all the many 'segments' available. Expand the 'data records'
branch (and sub-branches) to see each 'segment' and find the data fields
& values (these will appear in the lower right hand frame).
Reward points if helpful..
Regards,
Goutham. -
Compare two .txt files and show result
HI
Could anybody show me how to compare two text files and show the result.
i.e.
textfile1.txt
harry.denmark
karry.sweden
textfile2.txt
harry.denmark
karry.sweden
marry.usa
Compare
result=
marry.usa
The text files I want to compare are how ever much larger than this example. (up to 2-3.000 words)
anybody ??
Sincerly
PederHI & thanks for reply
I know almost nothing about java so could you or anybody please show me the code to do this? Or is it perhaps too large or difficult a code?
I know how to compile a .java file and run it in prompt :-) and thats about it (almost)
I offcourse understand if its too much to ask for :-) -
To compare two internal tables and delete records
Hi friends,
I have to compare two internal tables and should delete the records which is not present in both the tables. Reply me as soon as possible.
Thanks.Hi Nagarajan,
1. I don't think there is any direct (one-shot statement)
way to achieve this.
one has to do by writing some logic.
2. Loop at ITAB1.
Read table ITAB2 with key Field1 = ITAB1-Field1.
If sy-subrc <> 0.
delete ITAB1.
endif.
Endloop.
Do the same again with ITAB2.
Loop at ITAB2.
Read table ITAB1 with key Field1 = ITAB2-Field1.
If sy-subrc <> 0.
delete ITAB2.
endif.
Endloop.
3. If any better way is found, i will let u know.
Hope it helps.
Regards,
Amit M. -
Im tying to unlock an Iphone 4.
the celular company make it by its system, and send me an E mail with the instructions to finsh the process by myself, throug itunes.
I did every step, and at the end appers a message telling that my Iphone is unlocked.
but it does not work with other celular company sim card.
It only works with the original sim Card company.
In the Iphone appears a message teeling that has no service with another company's sim CArd.
I don't know what to do.
I've been doing this, with different Sim cards.
sometimes appears a message informing that the SIM card is locked with a PIN. That i must instal the last itunes version and connect it again.
but every Sim card I have are with PIN.
If you can help me I;ll be very glad.
Thank you very Much.
nicanorfrommonChrisj4203, thank you for your kind answer.
I have done a lot of restores to the Iphone, and resets also.
I;ve done holding both buttons as you sugested, but there is no signal appearing.
I am in Uruguay, South America and the original company is Movistar ( Telefonica) and the new sim card is from ANTEL ( the officail and biggest company in my country).
I don;t knoe what todo.
I have been trying for more than one mont.
I have gone several times to both companies. Aldo two times to Apple uruguay, and nobody can help me. -
I often record songs at a particular tempo, iTunes Match will then match it and send it back to me at the original tempo, is there anyway I can stop some songs from being matched. At the moment I have turned match off. But I would like to sync playlists.
How old was this backup? It sounds like it was at least several weeks old.
You can look directly in the TM backup for the music.
1. Connect to the external HDD the backup is kept on.
2. Open a Finder window and select the backup drive in the left hand panel. Double click into the folders until you see a list of folders with dates.
These are the incremental backups. You can start at the top or the bottom of the list but I suggest you double Latest/<HDD Name>/Users/<Account Name>/Music/iTunes/iTunes Media/Music. From this location you can start looking for the "missing" music. When/if you find it you can simply drag-n-drop to ~/Music/iTunes/iTunes Media/Music on the internal HDD.
If the music is actually not in the backups (for whatever reason) then you've got a problem.
You can download the uploaded files from the cloud by deleting the affected tracks from the iTunes library (but not the cloud!), highlighting multiple tracks at once, right-clicking and choosing "download." -
I have just connected my new apple TV and in the main menu see only two icons: computers and settings. How do I access the rest of the icons (internet, movies etc...) We do not live in the US. The unit has full WiFi access with no problems, I can access ITunes on my laptop via home sharing no problem.
Glad that this solved your problem but if you searh past threads there are a LOT of people with identical problems.
Reading through the threads my take is
There seems to be something awry with wifi chipset. Typical symptoms are initially being able to connect to connect to a Wifi network then the connection is dropped. Then you see just the 'computers' and 'settings' icons on screen
Power off, reset and factory restore doesnt seem to solve it
Occasionally its nearby antenna cables etc causing interference
One report with convincing evidence it was the HDMI cable, swapping to anotehr cable fixed the problem
Plugging in ethernet works, this is purely a wifi issue
Sometimes plugging in ethernet temporararily wakes up the wifi
Many people seem to have exchanged their units only for the same thing to happen to the new unit a few weeks later. Just wondering if its a fomponent fail or heat issue. -
I bought mountain lion en app stores and start download, but stops and mentioned is incomplete. and when start installation mentioned error because download is incomplete and send me to download again but the button is in "downloaded" what can i do?
Welcome to the support forums.
Please ask this question in the Mac App Store forum where they can better assist you. -
My wife, daughter and I have iPhones with iMessage and Send Read Receipts activated. All the messages sent between the three of us are blue however, when my wife messages me, the message appears in green on her iPhone. Can anyone explain why.
Because some kind of error occured. This is only from her iPhone to your iPhone? Whenever she sends a message to any other iPhone, it is sent as blue? And when anyone else sends you a message from an iPhone, it sends as blue?
-
TS2755 is there a quick way to take a photo and send it from messages application on the computer
is there a quick way to take a photo and send it from messages application on the computer
Just the regular way. Take the photo and then open the Messages app and select that photo and send it. That does not seem hard.
-
I forgot the answers to my questions when I try and send an email to reset it the email never comes
I forgot the answers to my questions when I try and send an email to reset it the email never comes. Help please.
A rescue email address is different than an alternate email address.
Contact iTunes Support online at: http://apple.com/emea/support/itunes/contact.html (select Account Security as your help topic)
or
by phone: Apple Support Numbers -
Help! My ipod classic is frozen. Even when I attach it to a power source and try to reset it (as per the instructions above), the apple logo never appears. The only thing that happens is that the screen turns alternately light and dark. Thanks!
If a sad iPod icon or an exclamation point and folder icon appears on your iPod’s screen, or with sounds of clicking or HD whirring, it is usually the sign of a hard drive problem and you have the power to do something about it now. Your silver bullet of resolving your iPod issue – is to restore your iPod to factory settings.
http://docs.info.apple.com/article.html?artnum=60983
If you're having trouble, try these steps at different levels one at a time until the issue is resolved. These steps will often whip your iPod back into shape.
Make sure you do all the following “TRYs”
A. Try to wait 30 minutes while iPod is charging.
B. Try another FireWire or USB through Dock Connector cable.
C. Try another FireWire or USB port on your computer .
D. Try to disconnect all devices from your computer's FireWire and USB ports.
E. Try to download and install the latest version of iPod software and iTunes
http://www.apple.com/itunes/download/
For old and other versions of iPod updater for window you can get here
http://www.ipodwizard.net/showthread.php?t=7369
F. Try these five steps (known as the five Rs) and it would conquer most iPod issues.
http://www.apple.com/support/ipod/five_rs/
G. Try to put the iPod into Disk Mode if it fails to appear on the desktop
http://docs.info.apple.com/article.html?artnum=93651
If none of these steps address the issue, you may need to go to Intermediate level listed below in logical order. Check from the top of the lists to see if that is what keeping iPod from appearing on your computer in order for doing the Restore.
Intermediate Level
A. Try to connect your iPod with another computer with the iPod updater pre-installed.
B. Still can’t see your iPod, put it in Disk Mode and connect with a computer, instead of doing a Restore on iPod Updater. Go and format the iPod instead.
For Mac computer
1. Open the disk utility, hope your iPod appears there (left hand side), highlight it
2. Go to Tab “Partition”, click either “Delete” or “Partition”, if fails, skip this step and go to 3
3. Go to Tab “Erase” , choose Volume Format as “MAC OS Extended (Journaled), and click Erase, again if fails, skip it and go to 4
4. Same as step 3, but open the “Security Options....” and choose “Zero Out Data” before click Erase. It will take 1 to 2 hours to complete.
5. Eject your iPod and do a Reset
6. Open the iTunes 7 and click “Restore”
For Window computer
Go to folder “My Computer”
Hope you can see your iPod there and right click on the iPod
Choose “Format”. Ensure the settings are at “Default” and that “Quick Format” is not checked
Now select “Format”
Eject your iPod and do a Reset
Open the iTunes 7 and click “Restore”
In case you do not manage to do a “Format” on a window computer, try to use some 3rd party disk utility software, e.g.“HP USB Disk Storage Format Tool”.
http://discussions.apple.com/thread.jspa?threadID=501330&tstart=0
C. Windows users having trouble with their iPods should locate a Mac user. In many cases when an iPod won't show up on a PC that it will show up on the Mac. Then it can be restored. When the PC user returns to his computer the iPod will be recognized by the PC, reformatted for the PC, and usable again. By the way, it works in reverse too. A Mac user often can get his iPod back by connecting it to a PC and restoring it.
Tips
a. It does not matter whether the format is completed or not, the key is to erase (or partly) the corrupted firmware files on the Hard Drive of the iPod. After that, when the iPod re-connected with a computer, it will be recognized as an fresh external hard drive, it will show up on the iTunes 7.
b. It is not a difficult issue for a Mac user to find a window base computer, for a PC user, if they can’t find any Mac user, they can go to a nearest Apple Shop for a favor.
c. You may need to switch around the PC and Mac, try to do several attempts between “Format” and “Restore”
http://discussions.apple.com/thread.jspa?messageID=2364921�
Advance Level
A. Diagnostic mode solution
If you have tried trouble shooting your iPod to no avail after all the steps above, chances are your iPod has a hardware problem. The iPod's built-in Diagnostic Mode is a quick and easy way to determine if you have a "bad" iPod.
You need to restart your iPod before putting it into Diagnostic Mode. Check that your hold switch is off by sliding the switch away from the headphone jack. Toggle it on and off to be safe.
Press and hold the following combination of buttons simultaneously for approximately 10 seconds to reset the iPod.
iPod 1G to 3G: "Menu" and "Play/Pause"
iPod 4G+ (includes Photo, Nano, Video, and Mini): "Menu" and "Select"
The Apple logo will appear and you should feel the hard drive spinning up. Press and hold the following sequence of buttons:
iPod 1G to 3G: "REW", "FFW" and "Select"
iPod 4G+ (includes Photo, Nano, Video, and Mini): "Back" and "Select"
You will hear an audible chirp sound (3G models and higher) and the Apple logo should appear backwards. You are now in Diagnostic Mode. Navigate the list of tests using "REW" and "FFW". The scroll wheel will not function while in diagnostic mode. For further details on Diagnostic mode can be found at http://www.methodshop.com/mp3/ipodsupport/diagnosticmode/
Try to do the 5in1, HDD R/W and HDD scan tests. Some successful cases have been reported after the running the few tests under the Diagnostic mode. In case it does not work in your case, and the scan tests reports show some errors then it proves your iPod has a hardware problem and it needs a repairing service.
B. Format your iPod with a start disk
I have not tried this solution myself, I heard that there were few successful cases that the users managed to get their iPod (you must put your iPod in disk mode before connecting with a computer) mounted by the computer, which was booted by a system startup disk. For Mac, you can use the Disk Utility (on the Tiger OS system disk), for PC user, you can use the window OS system disk. Try to find a way to reformat your iPod, again it does not matter which format (FAT32, NTFS or HFS+) you choose, the key is to erase the corrupted system files on the iPod. Then eject your iPod and do a Reset to switch out from Disk Mode. Reboot your computer at the normal way, connect your iPod back with it, open the iPod updater, and hopefully your iPod will appear there for the Restore.
If none of these steps address the issue, your iPod may need to be repaired.
Consider setting up a mail-in repair for your iPod http://depot.info.apple.com/ipod/
Or visit your local Apple Retail Store http://www.apple.com/retail/
In case your iPod is no longer covered by the warranty and you want to find a second repairing company, you can try iPodResQ or ifixit at your own risk
http://www.ipodresq.com/index.php
http://www.ifixit.com/
Just in case that you are at the following situation
Your iPod warranty is expired
You don’t want to pay any service charges
You are prepared to buy a new one
You can’t accept the re-sell value of your broken iPod
Rather than leave your iPod as paper-weight or throw it away.
You can try the following, but again, only do it as your last resort and at your own risk.
Warning !!!! – It may or may not manage to solve your problem, and with a risk that you may further damage your iPod, which end up as an expensive paper weight or you need to pay more higher repairing cost. Therefore, please re-consider again whether you want to try the next level
Last Resort Level
1. . Disconnecting the Hard Drive and battery inside the iPod – Warning !! Your iPod warranty will be waived once you open the iPod.
In Hong Kong there are some electronic shops offering an iPod service for Sad iPod, the first thing they do is to open up the iPod’s case and disconnecting the battery and the Hard Drive from the main board of the iPod. Wait for 5-10 minutes and reconnecting them back. The reason behind which I can think of is to do a fully reset of a processor of the iPod. In case you want do it itself and you believe that you are good on fixing the electronics devices and have experience to deal with small bits of electronic parts, then you can read the following of how to open the iPod case for battery and HDD replacement (with Quicktimes)
http://eshop.macsales.com/tech_center/index.cfm?page=Video/directory.html
2.Press the reset button on the Hard Drive inside the iPod – Suggestion from Kill8joy
http://discussions.apple.com/thread.jspa?messageID=2438774#2438774
Have I tried these myself? No, I am afraid to do it myself as I am squeamish about tinkering inside electronic devices, I have few experiences that either I broke the parts (which are normally tiny or fragile) or failed to put the parts back to the main case. Therefore, I agree with suggestion to have it fixed by a Pro.
2. Do a search on Google and some topics on this discussion forum about “Sad iPod”
Exclamation point and folder and nothing else
Spank your iPod
http://www.youtube.com/watch?v=3ljPhrFUaOY
http://discussions.apple.com/thread.jspa?messageID=3597173#3597173
Exclamation point and folder and nothing else
http://discussions.apple.com/thread.jspa?messageID=2831962#2831962
What should I do with my iPod? Send it or keep it?
http://discussions.apple.com/thread.jspa?threadID=469080&tstart=0
Strange error on iPod (probably death)
http://discussions.apple.com/thread.jspa?threadID=435160&start=0&tstart=0
Sad Face on iPod for no apparent reason
http://discussions.apple.com/thread.jspa?threadID=336342&start=0&tstart=0
Meeting the Sad iPod icon
http://askpang.typepad.com/relevant_history/2004/11/meeting_the_sad.html#comment -10519524
Sad faced iPod, but my computer won’t recognize it?
http://discussions.apple.com/thread.jspa?messageID=2236095#2236095
iPod Photo: unhappy icon + warranty question
http://discussions.apple.com/thread.jspa?messageID=2233746#2233746
4th Gen iPod Users - are we all having the same problem?
http://discussions.apple.com/message.jspa?messageID=2235623#2235623
Low Battery, and clicking sounds
http://discussions.apple.com/thread.jspa?messageID=2237714#2237714
Sad faced iPod, but my computer won’t recognize it
http://discussions.apple.com/thread.jspa?messageID=2242018#2242018
Sad iPod solution
http://discussions.apple.com/thread.jspa?threadID=412033&tstart=0
Re: try to restore ipod and it says "can't mount ipod"
http://discussions.apple.com/thread.jspa?threadID=443659&tstart=30
iPod making clicking noise and is frozen
http://discussions.apple.com/thread.jspa?messageID=2420150#2420150
Cant put it into disk mode
http://discussions.apple.com/thread.jspa?messageID=3786084#3786084
I think my iPod just died its final death
http://discussions.apple.com/thread.jspa?messageID=3813051
Apple logo & monochrome battery stay
http://discussions.apple.com/thread.jspa?messageID=3827167#3827167
My iPod ism’t resetting and isn’t being read by my computer
http://discussions.apple.com/thread.jspa?messageID=4489387#4489387
I am not suggesting that you should follow as well, but just read them as your reference. You are the person to make the call.
Finally, I read a fair comments from dwb, regarding of slapping the back of the iPod multiple times
Quote “This has been discussed numerous times as a 'fix'. It does work, at least for a while. In fact I remember using the same basic trick to revive Seagate and Quantam drives back in the mid to late 1980's. Why these tiny hard drives go bad I don't know - could be the actuator gets stuck in place or misaligned. Could be the platter gets stuck or the motor gets stuck. 'Stiction' was a problem for drives back in the 80's. Unfortunately the fix can cause damage to the platter so we temporarily fix one problem by creating another. But I know of two instances where a little slap onto the table revived the iPods and they are still worked a year or more later.”UnQuote -
How to compare two excel reports and find the difference in BI Publisher
Hi All,
I have a requirement that needs to compare two excel reports in XML Publisher 5.6.2. or BI publisher 10.1.3.4
If anybody has an idea about this pls help us.
Thanks,Since our customer wants to have this comparison only with BI reports....here is the scenario how the comparison should be..
Now,we have a parameters called Customer name and version id. Version id list will be refreshed based on the customer selection.
User can generate the report based on the selected customer name and version id. These data are fetch from the oracle database and we are using Data Template in the BI Publisher.
Now the requirement is customer wants to compare two version id data. for example, v1.2 and v1.3
Now they wanna to see both the reports while generating in the same work sheet, like, v1.2report should display in the left side and the v1.3report has to display in the right hand side of the same work sheet.
Now...If there is any addition happened in v1.3 report,then that cell/data should display as a green color in that report.
If any deletion happened in v1.3report then that should be in the red color.
If any modification happened in v1.3 then that should be in the yellow color.
If there is no difference then that should display as it is.
the thing is that, the both the reports (v1.2 and v1.3)should display side by side in the same worksheet with the format and everything........only the difference should be highlighted.
Template is same for both the reports..
To display the data for both versions i think i can generate the template side by side of both in the same worksheet.
Now, My question is how to find the difference of data in the RTF Template for both the versions
Can anybody assist me?
Thanks,
Edited by: user753355 on Jun 9, 2009 12:03 AM
Edited by: user753355 on Jun 9, 2009 12:06 AM
Edited by: user753355 on Jun 9, 2009 12:16 AM
Edited by: user753355 on Jun 10, 2009 3:59 AM -
Communication Channel IDOC tipy and SENDER
Hi experts!
We have an XI SP14.
I have read that it is not needed a communication channel to send Idocs from R/3 to XI but, if we try to set this communication channel, we are not able to select the "Sender" option in the comm. channel. We have never used this kind of comm. channel to send Idocs from R/3 to XI so, I wonder why we are having this problem.
Do you know if this is a problem with the XI version or is it customizable?
If it is customizable, do you know where is this set up?
Thanks in advance!The configuration data for all the adapter can be found in IR under
SAP Basis 6.40 - >http://sap.com/xi/XI/System - > adapter objects -> adapter metadata.
Select idoc and you can see the configuration for inbound idoc adapter but there is no outbound configuration provided by SAP. you can check for reference the RFC adapter for both inbound/outbound configuration. If you want to configure a sender idoc adapter then you will have to create all the necessary configuration in line with what is needed for an sender idoc and then upload this metadata. Its not going to be as simple as enabling the sender button you will have to create all the remaining input fields for sender idoc channel.
Cheer's -
Comparing two internal tables and deleting the record not present in second
Hi All,
I have a internal table itaba with PERNR as primary key and various other columns (1000 records) and table B with PERNR as primary key and 800 records.
Now what is the best way to compare these two and delete the record from table A when its corresponding record is not present in table B?
Thanks and Regards,
MohanHI SIR
u trained us in accenture
Hi all
when ever m running this session in SM35 , M getting error as :
"LEAVE TO TRANSACTION" MARA-BISMT is not allow
in batch input
REPORT YASEC_BDC_NIK_SESSION
no standard page heading
message-id zmm
line-count 65
line-size 150.
tables : mara.
*Top includr program
INCLUDE YNEW_MAIN_TOP.
*include yasec_bdc_nik_session_top.
***********selection screen *******************
selection-screen begin of block b1 with frame title text-001.
selection-screen skip.
PARAMETERS: p_ifile(128) TYPE c .
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS: rad1 TYPE c RADIOBUTTON GROUP 1 USER-COMMAND gr1,
rad2 TYPE c RADIOBUTTON GROUP 1 .
SELECTION-SCREEN SKIP.
PARAMETERS: p_sess TYPE c.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK b1.
Subroutine call***************************
INCLUDE YNEW_MAIN_F01.
*include yasec_bdc_nik_session_f01.
*********At selection event triggered *************
at selection-screen on value-request for p_ifile.
To get F4 help for the input file path
PERFORM f_f4_input_file.
AT SELECTION-SCREEN ON p_ifile.
To validate and upload the input file
PERFORM f_load_file.
AT SELECTION-SCREEN ON p_sess.
To validate the Number of Sessions field
IF rad2 IS NOT INITIAL AND sy-ucomm EQ c_onli.
PERFORM f_check_sessions.
ENDIF.
***********Start of selection *******************
start-of-selection.
*To process BDC
PERFORM f_process_bdc.
TOP OF PAGE
TOP-OF-PAGE.
Writes the report heading and for displaying line number.
PERFORM f_report_header.
TYPES : BEGIN OF t_final,
matnr(50) TYPE c,
bismt(18) type c,
end of t_final.
TYPES: BEGIN OF t_fdata,
data(256) TYPE c,
END OF t_fdata.
TYPES: BEGIN OF t_error,
message(100) TYPE c,
END OF t_error.
*Internal table declarations
*Internal table to load the data from the file that is changed throgh BDC
DATA : i_final TYPE STANDARD TABLE OF t_final,
wa_final TYPE t_final.
*Internal table to store the error messages
DATA : i_error TYPE STANDARD TABLE OF t_error,
wa_error TYPE t_error.
*Internal table to load the raw data
DATA : i_fdata TYPE STANDARD TABLE OF t_fdata,
wa_fdata TYPE t_fdata.
*Internal table to store records of BDC
DATA : i_bdcdata TYPE STANDARD TABLE OF bdcdata INITIAL SIZE 0,
wa_bdcdata TYPE bdcdata.
Internal table to store BDC messages
DATA: i_bdcmsgcoll TYPE STANDARD TABLE OF bdcmsgcoll INITIAL SIZE 0,
wa_bdcmsgcoll TYPE bdcmsgcoll.
VARIABLE DECLARATIONS
DATA: v_ifile TYPE string,
v_input TYPE i,
c_delimiter TYPE c VALUE 'X',
v_mode TYPE c VALUE 'A',
v_sessions TYPE i.
CONSTANTS
CONSTANTS : c_flagx TYPE c VALUE 'X',
c_slash TYPE c VALUE '/',
c_onli(4) TYPE c VALUE 'ONLI',
c_vl02(4) TYPE c VALUE 'VL02',
c_s TYPE c VALUE 'A'.
FORM f_f4_input_file .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_ifile.
ENDFORM. " f_f4_input_file
*& Form f_load_file
FORM f_load_file .
v_ifile = p_ifile.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = v_ifile
filetype = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = i_fdata
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc <> 0.
*Text-103-Input file does not exist.
MESSAGE e000 WITH text-103 .
ELSEIF NOT i_fdata IS INITIAL.
DELETE i_fdata WHERE data = space.
DESCRIBE TABLE i_fdata LINES v_input.
ENDIF.
IF v_input EQ 0.
Text-104 - Input file is empty.
MESSAGE e000 WITH text-104 .
ENDIF.
ENDFORM. " f_load_file
*& Form f_check_sessions
FORM f_check_sessions .
IF p_sess IS INITIAL.
MESSAGE e000 WITH text-106.
ELSE.
v_sessions = v_input DIV p_sess.
ENDIF.
ENDFORM. " f_check_sessions
*& Form f_process_bdc
text
FORM f_process_bdc.
LOOP AT i_fdata INTO wa_fdata.
SPLIT wa_fdata AT cl_abap_char_utilities=>horizontal_tab
INTO wa_final-matnr
wa_final-bismt.
APPEND wa_final TO i_final.
CLEAR wa_fdata.
ENDLOOP.
IF rad1 = c_flagx.
PERFORM f_passbdc_vl02.
ELSEIF rad2 = c_flagx.
PERFORM f_sessions_vl02.
ENDIF.
ENDFORM. "f_process_bdc
To populate the Screen information
p_program Program Name
p_dynpro Screen Number
FORM bdc_dynpro USING p_program TYPE any
p_dynpro TYPE any.
CLEAR wa_bdcdata.
Populate the BDC structure with the Screen Information.
Move the Program name PROGRAM
wa_bdcdata-program = p_program.
Move the Screen Number DYNPRO
wa_bdcdata-dynpro = p_dynpro.
Indicate the beginning of a new screen
wa_bdcdata-dynbegin = c_flagx.
APPEND wa_bdcdata TO i_bdcdata.
ENDFORM. "f_bdc_dynpro
*& Form f_passbdc_vl02
text
FORM f_passbdc_vl02.
DATA: l_lines_im TYPE i.
SORT i_final BY matnr ASCENDING.
CLEAR wa_final.
LOOP AT i_final INTO wa_final.
CLEAR: i_bdcmsgcoll[],
wa_bdcmsgcoll,
wa_bdcdata.
CLEAR: i_bdcdata[].
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RMMG1-MATNR'
wa_final-matnr.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
'X'.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'MARA-BISMT'.
perform bdc_field using 'MARA-BISMT'
wa_final-bismt.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
perform bdc_transaction using 'MM02'.
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
perform bdc_transaction using 'MM03'.
CALL TRANSACTION 'MM02' USING i_bdcdata
MODE v_mode
UPDATE c_s
MESSAGES INTO i_bdcmsgcoll.
If error occurred in call transaction 'VA02' then stores all
information of failed records into internal table i_error_im.
IF sy-subrc NE 0.
DESCRIBE TABLE i_bdcmsgcoll LINES l_lines_im.
CLEAR wa_bdcmsgcoll.
READ TABLE i_bdcmsgcoll INTO wa_bdcmsgcoll INDEX l_lines_im.
To capture success and error messages in BDC.
CALL FUNCTION 'FORMAT_MESSAGE' "#EC *
EXPORTING
id = wa_bdcmsgcoll-msgid
lang = wa_bdcmsgcoll-msgspra
no = wa_bdcmsgcoll-msgnr
v1 = wa_bdcmsgcoll-msgv1
v2 = wa_bdcmsgcoll-msgv2
v3 = wa_bdcmsgcoll-msgv3
v4 = wa_bdcmsgcoll-msgv4
IMPORTING
msg = wa_error-message
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
ELSE.
WRITE: text-111 COLOR 7.
ENDIF.
CLEAR: wa_final.
REFRESH i_bdcdata.
ENDLOOP.
ENDFORM. "f_passbdc_va02
*& Form bdc_field
text
-->P_FNAM text
-->P_FVAL text
FORM bdc_field USING p_fnam TYPE any
p_fval TYPE any.
CLEAR wa_bdcdata.
Populate the Field Name
wa_bdcdata-fnam = p_fnam.
Populate the field value
wa_bdcdata-fval = p_fval.
APPEND wa_bdcdata TO i_bdcdata.
ENDFORM. "f_bdc_field
*& Form f_sessions_vl02
text
FORM f_sessions_vl02 .
DATA: l_sindex TYPE sy-tabix VALUE 1,
l_eindex TYPE sy-tabix,
l_flag TYPE c VALUE space.
l_eindex = v_input.
SORT i_final BY matnr ASCENDING.
DO p_sess TIMES.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = 'Y_VL02_NIK'
user = sy-uname
keep = c_flagx
EXCEPTIONS
client_invalid = 1
destination_invalid = 2
group_invalid = 3
group_is_locked = 4
holddate_invalid = 5
internal_error = 6
queue_error = 7
running = 8
system_lock_error = 9
user_invalid = 10
OTHERS = 11.
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 wa_final.
CLEAR: i_bdcdata[].
LOOP AT i_final INTO wa_final FROM l_sindex TO l_eindex .
IF l_flag = v_sessions.
CLEAR l_flag.
EXIT.
ENDIF.
l_flag = l_flag + 1.
CLEAR: i_bdcdata[].
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RMMG1-MATNR'
wa_final-matnr.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
'X'.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'MARA-BISMT'.
perform bdc_field using 'MARA-BISMT'
wa_final-bismt.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
perform bdc_transaction using 'MM02'.
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
perform bdc_transaction using 'MM03'.
l_sindex = l_sindex + 1.
ENDLOOP.
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
not_open = 1
queue_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.
ENDDO.
ENDFORM. " f_sessions_vl02
*& Form f_report_header
FORM f_report_header .
FORMAT COLOR COL_HEADING INTENSIFIED ON.
ULINE.
text-201 - Company: Carrier
text-102- Batch Data Communication.
text-202 - System: SAP
WRITE: /1 sy-vline,
3 text-201,
50 text-102,
100 text-202,
AT sy-linsz sy-vline.
text-203 - Program:
text-204 - Date/Time:
WRITE: /1 sy-vline,
3 text-203, sy-repid ,
100 text-204,sy-datum ,c_slash, sy-uzeit,
AT sy-linsz sy-vline.
text-205 - User ID:
text-206 - Page:
WRITE: /1 sy-vline,
3 text-205, sy-uname,
100 text-206, sy-pagno,
AT sy-linsz sy-vline.
FORMAT COLOR OFF.
ULINE.
ENDFORM. " f_report_header
FORM bdc_transaction USING tcode.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
tcode = tcode
TABLES
dynprotab = i_bdcdata
EXCEPTIONS
internal_error = 1
not_open = 2
queue_error = 3
tcode_invalid = 4
printing_invalid = 5
posting_invalid = 6
OTHERS = 7.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
WRITE: / text-109 ,wa_final-matnr,
text-110 .
ENDIF.
ENDFORM. "bdc_transaction
Maybe you are looking for
-
Using PreparedStatement.setString() on AS/400 VARGRAPHIC field not working
Hello, I have a database table on an AS/400 that contains a VARGRAPHIC field of length 254. According to all the docs that I've read, I should be able to use PreparedStatement.setString() to set a parameter for that field. However, I never get any ro
-
In Lion 10.7.4, where are the iPhone backups?
Before Lion 10.7.4, iPhone backups were usefully to be located in User/Library/Application Support/MobileSync/Backup. This was handy because it meant that by copying the files you could use more than one computer to access the iPhone(s). In 10.7.4, t
-
PAGES DOCUMENT TO WORD DOCUMENT.
I don't have Word in my Macbook Air, so how can I save a PAGES DOCUMENT like a WORD DOCUMENT? Please help me! I really need this thing..~ Thank you if you answer my question.
-
just ask!
-
Need a calendar recommendation
I've had my iphone for about a week and love it but I'm not a fan of the calendar that came on it. So I'm looking for app recommendations. I need the ability to set a custom repeat (ie every 3rd day, Tue/Thur, MWF). Syncing with a web-based calendar