How to Copy and Edit an Idoc

I want to copy an idoc of basic type ORDERS05, then change the material number and bring it into SAP could someone guide me how I can do it. If possible please suggest more than one ways because I dont have authorization to some of the transactions in WEDI. Will certainly give points for right answer. Thanks for reading.

Hi,
Please find the following steps to edit IDOC segment after you find the error using WE02.
The example codes can be found in website
http://www.sapgenie.com/sapedi/idoc_abap.htm
STEP 1 - Open document to edit
CALL FUNCTION 'EDI_DOCUMENT_OPEN_FOR_EDIT'
  EXPORTING
    document_number = t_docnum
  IMPORTING
    idoc_control = itab_edidc
  TABLES
    idoc_data = itab_edidd
  EXCEPTIONS
    document_foreign_lock = 1
    document_not_exist = 2
    document_not_open = 3
    status_is_unable_for_changing = 4
    OTHERS = 5.
STEP 2 - Loop at itab_edidd and change data
LOOP AT itab_edidd WHERE segnam = 'E1EDKA1'.
  e1edka1 = itab_edidd-sdata.
  IF e1edka1-parvw = 'LF'.
    e1edka1-partn = t_eikto.
    itab_edidd-sdata = e1edka1.
    MODIFY itab_edidd.
    EXIT.
  ENDIF.
ENDLOOP.
STEP 3 - Change data segments
CALL FUNCTION 'EDI_CHANGE_DATA_SEGMENTS'
  TABLES
    idoc_changed_data_range = itab_edidd
  EXCEPTIONS
    idoc_not_open = 1
    data_record_not_exist = 2
    OTHERS = 3.
STEP 3a - Change control record
CALL FUNCTION 'EDI_CHANGE_CONTROL_RECORD'
  EXPORTING
    idoc_changed_control = itab_edidc
  EXCEPTIONS
    idoc_not_open = 1
    direction_change_not_allowed = 2
    OTHERS = 3.
STEP 4 - Close Idoc
Update IDoc status
CLEAR t_itab_edids40.
t_itab_edids40-docnum = t_docnum.
t_itab_edids40-status = '51'.
t_itab_edids40-repid = sy-repid.
t_itab_edids40-tabnam = 'EDI_DS'.
t_itab_edids40-mandt = sy-mandt.
t_itab_edids40-stamqu = 'SAP'.
t_itab_edids40-stamid = 'B1'.
t_itab_edids40-stamno = '999'.
t_itab_edids40-stapa1 = 'Sold to changed to '.
t_itab_edids40-stapa2 = t_new_kunnr.
t_itab_edids40-logdat = sy-datum.
t_itab_edids40-logtim = sy-uzeit.
APPEND t_itab_edids40.
CALL FUNCTION 'EDI_DOCUMENT_CLOSE_EDIT'
  EXPORTING
    document_number = t_docnum
    do_commit = 'X'
    do_update = 'X'
    write_all_status = 'X'
  TABLES
    status_records = t_itab_edids40
  EXCEPTIONS
    idoc_not_open = 1
    db_error = 2
    OTHERS = 3.
Hope this will help.
Regards,
Ferry Lianto

Similar Messages

  • How to copy and edit pages once they have been scanned to my desktop

    I have a many page report I want to copy and send as one or more PDF files. I scan the page, remove it to my desktop and either slide it onto a blank pages or I Photo, where I make the print darker, etc. and export to my desktop..as file, jpeg document....tried them all.
      Once on the desktop, it won't allow me to add or subtract any information...I can't even select all and copy it.  I can't remember how I use to do this so I would come up with a copy that I could edit and also add several other pages to the bottom of the first page, to send as a pdf, rather than have to send each page separately.'
    Is there a way to do this?

    If you are at the point where you have several .jpg images that you want to turn into a single PDF document,
    Open each .jpg image in Preview and Save As a PDF file.
    Do that for all of them.
    In Preview click on the sidebar and one image will be there.
    From Finder, where reside your recently converted .jpgs to single PDFs drag one to be underneath the existing one and so forth untill all single PDFs are showing in the sidebar.
    Get the focus back on Preview by clicking on it, and then Save As and that will produce one multi-page PDF document.
    Note, The last image you converted will be the first image in the new PDF, so you might like to close Preview and then reopen it with the first image, just to make sure you get them in the desired order.
    Mac OS 10.6.8
    Preview 5.0.3

  • How to copy and edit a webpage into powerpoint for Mac

    In microsoft I would do this in paint and than import into powerpoint. How do I do this on my mac book air?
    Thanks!!

    In microsoft I would do this in paint and than import into powerpoint. How do I do this on my mac book air?
    Thanks!!

  • How to copy and paste file in mavericks

    how to copy and paste file in mavericks?

    Spoombung wrote:
    I actually can't get copy and paste to work in Mavericks!!!
    Is it me, or is there something wrong with it? I can hardly believe this was overlooked....
    Obviously it was not overlooked.
    Select a file, go to the edit menu and choose Copy, open another folder and choose Paste from the edit menu.
    What happened (error messages etc)

  • How to open and edit a TopLink .mwp file?

    I can not open the toplink_mappings.mwp file using JDeveloper tool.
    How to open and edit a TopLink .mwp file?
    Thank you

    Hi,
    Use JDeveloper to import the mwp project .In Jdeveloper,File->Import->ToplinkWorkbench->Select the .mwp file and can work from JDeveloper in editing the tlmap.xml and session.xml.
    Regards,
    P.Vinay Kumar

  • Video Format Total Solution: How to Convert and Edit Video on Windows/Mac

    More and More video formats are coming out with different video encoders and it makes our spare time more and more colorful. However, it is not to say that there is no problems. Actually, different video formats make it difficult to share video with others, even your own camcorder and iPod. Is there an easy way to convert videos effectively. Yes, there is.
    In this article, I will show you guys how to convert videos on windows and mac.
    Part 1. How to Convert and Edit Videos on Windows
    For Windows users, you need a Video Converter(http://www.aiseesoft.com/total-video-converter.html) to do that for you.
    Here I use Aiseesoft Total Video Converter(http://www.aiseesoft.com/total-video-converter.html)
    Step 1: Download and install Aiseesoft Total Video Converter
    After you download it to your computer, double click it and it is really easy to install.
    You just need to click “next” and it will complete it in seconds. It will automatically run after installation.
    http://www.aiseesoft.com/images/guide/total-video-converter/screen.jpg
    Step 2: Load Video
    Click “Add File” to find the video that you want to convert and click “open”. It will be loaded automatically.
    Step 3: Select the target to decode
    In the “Profile” drop download list you can find your target according the usage of your output video, such as if you want to put the video on your iPod touch, you can select the “iPod” in the first list and “iPod touch 2 MPEG-4 640*480(*.mp4)” in the second list.
    Step 4: Set Advanced Parameters
    After you select the right output profile, you can click “setting” button to set your advanced parameters. You can adjust video and audio settings separately. In video section, you can change “video encoder”, “resolution”, “frame rate”, “video bitrate”In audio section, you can change “audio encoder”, “sample rate”, “channel”, “audio bitrate”If you want to save this profile and settings and use it next time you can click “save as” button to give a name to it. And the next time you want to use it you can find it in the profile list named “user defined”.
    Step 5: Choose a Destination
    To browse and find a output folder for your output files or just the default one.
    Finally, Click “Convert” button to begin your conversion, here in the converting
    interface you can choose “shut down the computer when conversion complete” or “open output folder when conversion complete” or you just do not choose neither one.
    Tips: How to Edit the Output Video
    This video converter is also a video editor, you can use it to edit your output video as follows:
    http://www.aiseesoft.com/images/guide/total-video-converter/effect.jpg
    1. Effect:
    You are allowed to adjust the “Brightness”, “Contrast”, “Saturation” and you can choose the “deinterlacing” to make the video more enjoyable.
    2. Trim:
    In “Trim” section you can pick up any part of the video to convert.
    There are two ways to select the part of the video you want. One is set the start and end time in the box. The other one is to drag the start and end button in the processing bar.
    3. Crop:
    This function allows you to choose a certain play area to convert. That means you can choose a part of the screen you like to convert. For example, you just like the tv in the middle of the screen, then you can drag the frame around the preview window to select the tv and the output preview will show you the output video.In this section you can also choose the “zoom mode”, such as “keep original”, “full screen”, “16:9”, “4:3”.
    4. Watermark
    In the section, you can add a watermark on the output video to show people something, such as your name, website, studio name or other things. The watermark could be words and picture. You can adjust the transparent of the watermark easily to make it more beautiful.
    Part 2. How to Convert Video on Mac
    This time you need a Video Converter for Mac(http://www.aiseesoft.com/video-converter-for-mac.html)
    Step 1: Add File
    Click “Add File” button to load the video you want to converter
    http://www.aiseesoft.com/images/guide/mac-video-converter/steps.jpg
    Step 2: Choose profile and adjust settings
    You can find your output video format from a drop-list called “Profile”You can also adjust the specific settings of the output video, such as “Resolution”, “Bitrate”, “Encoder” and so on.

    @ Tamwini
    Your only goal is to sell software.
    ‡Thank you for hitting the Blue/Green Star button‡
    N8-00 RM 596 V:111.030.0609; E71-1(05) RM 346 V: 500.21.009

  • How to import and edit a 3D video made with Sony HDR-TD10E camcorder, with .MVC file?

    How to import and edit a 3D video made with Sony HDR-TD10E camcorder, with .MVC file?
    I have PremierePro-CS5 installed.
    This stereo 3D camcorder (Sony HDR-TD10E), output an .MVC (MultiViewCoding) file, coded in H.264 format.
    This format is already compatible with Bluray3D stereoscopic format.
    1) But, how to edit the .MVC in Premiere?
    2) What plugin should I use (if exists) for PremiereProCS5?
    3) Cineform Neo3D, can manage the .MVC format? Can convert it to Cineform format file, for import it into Premiere?
    4) What software should I use to convert an .MVC video to an AVCHD H.264 file, and import it into PremierePro CS5 or CS5.5 for editing?
    Thanks!
    Horsepower0171.

    Sorry, I am Italian, it is very difficult for me to understand what he says!
    I can just read the english text, or follow the actions of a videotutorial!
    Thus my question is the same:
    -What software can do that?
    -Sony Vegas 10 do the Bluray3D authoring?
    -For MVC editing, should I wait for Adobe CS6? Or is it planned an update for CS5.5?

  • How to view and edit local contacts

    Hi there,
    I recently got my Z10 and I cannot find how to view and edit a local contacts on my phone. I've imported all my contacts from a SIM card, but only SIM card's contacts are displayed when I choose All Contacts.
    I would like to have view of the local contacts, becasue local contacts don't have limitations regarding amount of characters in the contact name which I want to edit.
    Can anyone help with this ?
    Michael

    qualxarnu wrote:
    Hi there,
    I recently got my Z10 and I cannot find how to view and edit a local contacts on my phone. I've imported all my contacts from a SIM card, but only SIM card's contacts are displayed when I choose All Contacts.
    I would like to have view of the local contacts, becasue local contacts don't have limitations regarding amount of characters in the contact name which I want to edit.
    Can anyone help with this ?
    Michael
    in your contacts settings, turn OFF all contact accounts (SIM, BBM ETC) then afterwards you should be able to just see your local contacts.
    Want to contract me? You can follow me on Twitter @RobGambino
    Be sure to click Like! for those who have helped you.
    Click Accept as Solution for posts that have solved your issue(s)!

  • How to copy and paste the graphics from illustrator to MS word. What I tried is exporting in png with highest resolution and then inserting in to word. This loses a bit of resolution in comparison to direct copy and paste as EMF.  But if I do a copy and p

    How to copy and paste the graphics from illustrator to MS word. What I tried is exporting in png with highest resolution and then inserting in to word. This loses a bit of resolution in comparison to direct copy and paste as EMF.  But if I do a copy and paste, and then take a print of the document, all the graphs and text is printed upside down, flipped back.

    Use the Pencil Tool
    alex
    adrian stock wrote:
    > How to copy and paste a single pixel
    >
    > I want to copy a single pixel and then paste it in the
    position of
    > another pixel in the same image.
    >
    > (This is in effect changing the colour of the target
    pixel, isn't it.
    > But in my case copying an existing pixel seems simpler
    than selecting a
    > colour from the swatch or using the colour picker.)
    >
    > What is the most efficient way of doing this?
    >
    > I tried to select one pixel with the marquee tool. Then
    copied it with
    > control-C, but then how do I select the target pixel and
    paste with
    > control-V?
    >
    > Thanks for your help.
    >
    > Adrian
    >

  • How to copy and paste text from one photo book page to another.

    hello,i downloaded this software 2days ago,and i've been having so much fun with it. pls i need help on how to copy and paste text from one photo book page to another. Secondly how to copy my completed photo book pages project to another laptop for printing. thanks
    This question was solved.
    View Solution.

    Hi DG.
    The easiest way to copy an HP Photo Creations project to another computer is to click the Share button. That will upload the project to the Web and give you a link you can paste into an email. Clicking the link on the other computer allows you to download the project and personalize it. This quick video shows the process. (The screen looks slightly different now, but the concept is the same.)
    Another way to share a project is copy the project folder to a thumb drive. Look in Documents/HP Photo Creations/My Things to find your saved projects.
    Our customer support team would be happy to walk you through the process. Contact them at [email protected]
    Hope this helps,
    RocketLife 
    RocketLife, developer of HP Photo Creations
    » Visit the HP Photo Creations Facebook page — news, tips, and inspiration
    » See the HP Photo Creations video tours — cool tips in under 2 minutes
    » Contact Customer Support — get answers from the experts

  • How to copy and paste a single pixel

    How to copy and paste a single pixel
    I want to copy a single pixel and then paste it in the
    position of
    another pixel in the same image.
    (This is in effect changing the colour of the target pixel,
    isn't it.
    But in my case copying an existing pixel seems simpler than
    selecting a
    colour from the swatch or using the colour picker.)
    What is the most efficient way of doing this?
    I tried to select one pixel with the marquee tool. Then
    copied it with
    control-C, but then how do I select the target pixel and
    paste with
    control-V?
    Thanks for your help.
    Adrian

    Use the Pencil Tool
    alex
    adrian stock wrote:
    > How to copy and paste a single pixel
    >
    > I want to copy a single pixel and then paste it in the
    position of
    > another pixel in the same image.
    >
    > (This is in effect changing the colour of the target
    pixel, isn't it.
    > But in my case copying an existing pixel seems simpler
    than selecting a
    > colour from the swatch or using the colour picker.)
    >
    > What is the most efficient way of doing this?
    >
    > I tried to select one pixel with the marquee tool. Then
    copied it with
    > control-C, but then how do I select the target pixel and
    paste with
    > control-V?
    >
    > Thanks for your help.
    >
    > Adrian
    >

  • I am a new iPad user and cannot figure out how to copy and paste from a website to pages. Any insight?

    I am a new iPad user. I cannot figure out how to copy and paste from a website to a pages document, and vice versa. Any ideas?

    Long press on the text you would like to select (tapping and holding) and then release after the magnifying glass shows up. This will select a single word. Then use the blue dots and drag them to select a region of test. Then press "copy". Open pages, and long press and release where you would like to paste. Then select "paste". That should paste the text.
    If the text doesn't select within the browser, it might be an uncopyable format. Like if the text was within an image, naturally you would be unable to select it. The only thing to do there is long press the image and selecting "save image", adding it to your camera roll. Then you could insert the image within pages.

  • How to copy and paste photos to word doc?

    how to copy and paste photos from finder to word doc? It just shows the url...

    Hi John,
    You can do as the followings:
    Create a blank form with InfoPath Designer 2010,
    Add a Rich Text Box control and Submit button in the blank form
    Publish the form to your SharePoint site
    Open the form library and create a document
    Copy the table with text from word file
    Paste the table in the Rich Text Box area, the paste option is Keep Source Formatting
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • How to copy and paste

    Having trouble learning how to copy and paste...

    Write something.  Long tap on it, choose select, adjust the amount you want copy, tap the page, continue typing. To paste tap the page and select paste.watch,Write something.  I cut and pasted write something. The iPad User Guide for IOs7" free at iBooks explains it better.

  • How to copy and paste the text in Russian - 'command+c' erases it

    How to copy and paste the text in Russian - 'command+c' erases it

    I want to publish a book with Blurb. They don't have Russian fonts, so I have to type the text in Russian in Notes in my iPad, send it to my e-mail box, and then open the e-mail box in Mac, and copy and paste the text into the book template of Blurbs. I don't know how to make a Russian keyboard in Mac to be able to type quickly. I asked about it  in the Apple store, and they showed me how to find a Russian keyboard in the net, but it takes much time to type using a screen keyboard, and the texts also cannot be copied and pasted, when they are in Russian. They are erased when I press 'command+C", and all I have is a single letter 'c' instead. No problems with texts in English. Maybe Russian is not supported for copying and pasting?:(

Maybe you are looking for