Fixing a stupid problem

Ok so this is my code.
REPORT  ZISTANZS_TRNG_EX9A_CUST.
TABLES: KNA1.
DATA: BEGIN OF FS,
               CusNum       LIKE KNA1-KUNNR,
               Name         LIKE KNA1-NAME1,
               SrchTerm     LIKE KNA1-SORTL,
               City         LIKE KNA1-ORT01,
               Postal       LIKE KNA1-PSTLZ,
               Country      LIKE KNA1-LAND1,
               Language     LIKE KNA1-SPRAS,
     END OF FS.
PARAMETERS:    Filename(30) TYPE C OBLIGATORY LOWER CASE,
               CusNum       LIKE KNA1-KUNNR OBLIGATORY,
               Name         LIKE KNA1-NAME1 OBLIGATORY,
               SrchTerm     LIKE KNA1-SORTL OBLIGATORY,
               City         LIKE KNA1-ORT01 OBLIGATORY,
               Postal       LIKE KNA1-PSTLZ OBLIGATORY,
               Country      LIKE KNA1-LAND1 OBLIGATORY,
               Language     LIKE KNA1-SPRAS OBLIGATORY.
PARAMETERS:    Create       RADIOBUTTON GROUP G1,
               Append       RADIOBUTTON GROUP G1.
IF Create = 'X'.
OPEN DATASET Filename FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    FS-CusNum   = CusNum.
    FS-Name     = Name.
    FS-SrchTerm = SrchTerm.
    FS-City     = City.
    FS-Postal   = Postal.
    FS-Country  = Country.
    FS-Language = Language.
    TRANSFER FS to Filename.
CLOSE DATASET Filename.
ELSEIF Append = 'X'.
OPEN DATASET Filename FOR APPENDING IN TEXT MODE ENCODING DEFAULT.
    FS-CusNum   = CusNum.
    FS-Name     = Name.
    FS-SrchTerm = SrchTerm.
    FS-City     = City.
    FS-Postal   = Postal.
    FS-Country  = Country.
    FS-Language = Language.
    TRANSFER FS to Filename.
CLOSE DATASET Filename.
ENDIF.
My problem is whenever I open the file in which it was 'created' or 'appended' to. It's in telnet btw. the fields are so messy, I got 0000 first then my custoemr number, then after a few spaces I see the name and after about 10 spaces the search term and all that. Everything's one big pile of mess. Is there something wrong witht he way I transfer data to the file? And what's with that 0000 at the start of the file?

Hi zsa tan,
except from unnecessary code redundancy and confusing field names everything looks fine.
Maybe you do not know that the KUNNR's internal representation is with leading zeros. In debugger you can see it. Here's you code just a little bit abbreviated (don't forget to enclose code sequences in \
I do not know what you mean by 'big pile of mess'. Count the characters and see what deviations you get. I suppose it works as desired.
REPORT ZISTANZS_TRNG_EX9A_CUST.
TABLES: KNA1.
DATA: BEGIN OF FS,
CusNum                                    LIKE KNA1-KUNNR,
Name                                      LIKE KNA1-NAME1,
SrchTerm                                  LIKE KNA1-SORTL,
City                                      LIKE KNA1-ORT01,
Postal                                    LIKE KNA1-PSTLZ,
Country                                   LIKE KNA1-LAND1,
Language                                  LIKE KNA1-SPRAS,
END OF FS.
PARAMETERS: Filename(30)                  TYPE C OBLIGATORY LOWER CASE,
CusNum                                    LIKE KNA1-KUNNR OBLIGATORY,
Name                                      LIKE KNA1-NAME1 OBLIGATORY,
SrchTerm                                  LIKE KNA1-SORTL OBLIGATORY,
City                                      LIKE KNA1-ORT01 OBLIGATORY,
Postal                                    LIKE KNA1-PSTLZ OBLIGATORY,
Country                                   LIKE KNA1-LAND1 OBLIGATORY,
Language                                  LIKE KNA1-SPRAS OBLIGATORY.
PARAMETERS: Create RADIOBUTTON GROUP G1,
Append RADIOBUTTON GROUP G1.
IF Create                                 = 'X'.
  OPEN DATASET Filename FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
ELSE.
  OPEN DATASET Filename FOR APPENDING IN TEXT MODE ENCODING DEFAULT.
endif.
FS-CusNum                                 = CusNum.
FS-Name                                   = Name.
FS-SrchTerm                               = SrchTerm.
FS-City                                   = City.
FS-Postal                                 = Postal.
FS-Country                                = Country.
FS-Language                               = Language.
TRANSFER FS to Filename.
CLOSE DATASET Filename.
Regards,
Clemens

Similar Messages

  • Why can't Apple's software engineers fix this stupid problem?

    This is beyond annoying...

    Actually, you miss the point, the point of these forums. We're all just fellow users here and can only offer suggestions for fixing the problem. If you want to complain to Apple, use their feedback pages:
    http://www.apple.com/feedback
    Regards.

  • The ipad safari on facebook will echo characters on the search feature.  Please fix this STUPID error!  At the least, investigate it and come to a suitable response.  Stupid things like this are making me lose faith and interest in Apple products.

    The ipad safari on facebook will echo characters on the search feature.  Please fix this STUPID error!  At the least, investigate it and come to a suitable response.  Stupid things like this are making me lose faith and interest in Apple products.

    This is a user Forum, No one here works for Apple.
    If you can be a bit more clear with what your problem is, maybe someone here can help you find a solution.

  • I've only had my iphone 5s for a week. I keep getting an error message of "Server has stopped responding."  I need the server to work. Does anyone know if there is a "fix" for the problem? Other wise, I probably best return for a refund and get a Samsung.

    I've only had my iphone 5s for a week. I keep getting an error message of "Server has stopped responding."  I need the server to work. Does anyone know if there is a "fix" for the problem? Other wise, I probably best return for a refund and get a Samsung.  Thanks

    sandyzotz wrote:
    Other wise, I probably best return for a refund and get a Samsung.
    Unlikely.  Based on the complete lack of detail of the issue provided it is entirely possible the same issue would occur.
    Unless and until the user provides some actual details of the problem, there is nothing the indicate that the issue is with the iPhone.

  • I have a 2005 Jaguar xj8.  When I tried to upgrade my 3gs to a 4g I got a ticking noise in the speaker and no one on the other end could hear me.  I had to go back to a 3gs.  My phone is shot and I need to upgrade.  Has there been a fix to the problem?

    I have a 2005 Jaguar xj8.  When I tried to upgrade my 3gs to a 4g  two years ago, I got a ticking noise in the speaker and no one on the other end could hear me.  I had to go back to a 3gs.  My phone is shot and I need to upgrade.  Has there been a fix to the problem?  Apple told me there was some sort of interference with the airbag system.  Jaguar was totally unhelpful.

    Hi Labjock,
    Welcome to the Support Communities!
    The article below may be able to help you with this. 
    iPhone: Microphone issues
    http://support.apple.com/kb/ts5183
    Cheers,
    - Judy

  • How do I fix a initializing problem with my macbook pro? I only get to the blank screen with the apple logo and the "processing something"sign... it just doesn't start the system....

    How do I fix a initializing problem with my macbook pro? I only get to the blank screen with the apple logo and the "processing something" sign... it just doesn't start the system....
    Please help
    Marcelo

    If there is no loading bar, it's usually a problem with a third party kext file in OS X itself.
    You can press the power button down to force a hardware shutdown, then reboot holding the shift key down on a wired or built in keyboard, this will disable them and you go around and update your third party software.
    Gray, Blue or White screen at boot, w/spinner/progress bar
    Also take this time to backup your users files off the machine if possible.
    Most commonly used backup methods
    Sometime that won't work and you need to do more
    ..Step by Step to fix your Mac

  • I am having a issue installing Adobe Acrobat XI.  I am running Windows 8.1. When  go to install it gets an error.  The error is with transform in registry and will not install product. I am looking at how I can fix this registry problem.

    I am having a issue installing Adobe Acrobat XI.  I am running Windows 8.1. When  go to install it gets an error.  The error is with transform in registry and will not install product. I am looking at how I can fix this registry problem.
    I have tried to uninstall all Abode Acrobat installations but one file remains and refuses to be uninstalled. It gives me this error : Error applying Transforms . Verify that specified paths are valid. It was installed on Sept 18 2014.  I have downloaded a Transform update but it tells I do not have a Adobe Acrobat product installed. 

    Hi all,
    Sylonious, did you manage to sort this problem out? I have been experiencing similar problems. I think my problem was because I had many different versions of JDKs. I have done a complete re-install. I would be really grateful to you (and anyone else) for help with this problem.
    I have re-installed JSDK1.4.2_03, set the "path" variable to "C:\JSDK1.4.2_03".
    When I compile using "javac" I get an error saying "javac" is not recognised.
    When I compile using "C:\j2sdk1.4.2_03\bin\javac Freq.java" no error is thrown.
    Every time I try to run a java file, I always get the NoClassDefFound error. When run with the -verbose option, files are loaded from C:\Program Files\Java\j2re1.4.2_03\bin - is this correct?
    I have removed all previous references to java in the registry editor.
    Please help !
    Regards,
    Vipul

  • Anyone know when Apple will bring out a patch to fix the volume problem you get on mac mini after downloading OS 10.8.5

    Anyone know when Apple will bring out a patch to fix the volume problem you get on mac mini after downloading OS 10.8.5?

    Only Apple knows the answer to whether or not there is a verified problem and if so when will a fix be released.  As is their custom, Apple does not talk about these things and the rules of these communities prohibit speculation about future udates or upgrades. It is probably safe to say if a fix is deemed necessary it will be called OS X 10.8.6.

  • My "fix" to print problems in LR (using MS XP)

    Having had the same problems printing from LR as many others are complaining about, I thought that I might give my 2 cents to what I did to solve (?) the problem. I have to run with current setting in a while to be convinced that it is not just an intermittent fix though ;-)
    My problem when printing from LR was that the print came out much too Cyan-Green and somewhat dark when color management where handled by LR. When the same photo was exported to PS Elements (PSE) in Tiff with the Pro-photo color profile embedded, adjustments from LR, and printed using the same driver setting and color management, the print came out fine.
    I must mention that I have had fine printout in previous LR versions but I'm not sure when the problem started. But at least from LR version 1.3, 1.3.1 I have had problems printing a proper print.
    As I'm not 100% sure what caused the fix, I don't want to leave much info un-documented, so I start by describing my system etc.:
    - Athlon 64 3500+ with 2 GB RAM
    - Lacie 119 LCD monitor (calibrated with a ColorVision Spyder 2)
    - Epson Stylus Photo 890 printer; an old (6-7 years) 6 color dye-sub printer, but it can still produce very good prints. (It is BTW, the A4 printer version of Epson 1290).
    - Microsoft XP service pack 2
    - Adobe Photoshop Lightroom 1.3.1.
    - Adobe Photoshop Elements 5
    - Latest Epson 890 printer drivers ver. 5.21/P (from 2004)
    - ICC profiles for various Epson printer paper
    - Paper used: Ilford Printasia Photo Glossy Paper (but I have tried Epson Premium Glossy Photo Paper as well with same results)
    I used following setting:
    - In printer driver: "No color management" was selected
    - LR and PSE color management; printer profile: Epson Stylus Photo 890 Premium Glossy Photo Paper, Rendering Intent: Perceptual
    . LR Print sharpening: High
    - LR Print resolution: 360ppi
    When the photo was opened in PSE and I had printed a small print with above mentioned printer driver/color management settings. The print looked good, but with a little magenta color cast, so I thought that if I used a different printer profile this might help (I have no ICC profile for the Ilford paper). So I chose the "Epson Stylus Photo 890 Photo Paper" instead and printed again, and this time the photo looked as it did on my calibrated monitor. I have to admit I was a bit delighted even though it was from printed from PSE and not from LR, but seeing that color management worked in other applications was a relief.
    In PSE, I also I tried changing to a different Rendering Intent before changing printer profile, but with no success.
    Another thing that helped further was to change Media Type in printer driver from "Premium Glossy Photo Paper" to "Photo Paper".
    After the print success in PSE I went back to LR and changed the Printer Profile to "Epson Stylus Photo 890 Photo Paper" (still with "No color management" and "Photo Paper" selected in printer driver) and printed the photo again. Now the photo looked as good as it did in PSE (!!!???).
    Now I have made a few printer preset in LR for various print sizes, and the prints look fantastic. Every time! Do I have to mention that I am a happy guy ? :-)
    BTW, remember that a printer preset also saves the printer driver settings. Forgetting this can easily cause some unexpected results.
    The only thing is that, I still do not know what fixed the problem, and I am a bit worried that the problem might come back again. Maybe the print related changes made in PSE and the following selection of the same settings in LR did - somehow - "synchronize" LR to a proper color management. Sounds weird, but if it works...
    I hope this long explanation was useful to - at least - some of you, who experience printer problems in LR. LR is a fantastic application, and I enjoy using it, but the printer problems has really been frustrating.
    Good luck!
    /Per

    Little unclear about the border thing- you say it prints with a too wide border, but also say:
    When I print the image with this set up, it still is printed without a border.
    It's a factor of your printer, though; some can never print without a margin around all sides; this can be a border, or cut off. Good news, though; you can have a 5 x 7 borderless, or with any size border you wish if you print on larger paper, and trim to taste.

  • Is there an update forthcoming to 4.0 to fix all the problems? Since it's installation, my PC operation has slowed to a crawl and I'm experiencing numerous "unresponsive script" and "low virtual memory" messages.

    My PC was running fine before 4.0, and since then it is as described above. Almost thought this was a virus masquerading as a legit update (has happened to me before). Will there be an update to fix all the problems that have been reported, or do I have to bring in the Geek Squad to replace Firefox with Explorer?

    My PC was running fine before 4.0, and since then it is as described above. Almost thought this was a virus masquerading as a legit update (has happened to me before). Will there be an update to fix all the problems that have been reported, or do I have to bring in the Geek Squad to replace Firefox with Explorer?

  • Since updating to 10.4 getting error message on startup 'AppleSyncNotifier.exe – Entry Point Not Found, The procedure entry point xmlTextReaderConstName could not be located in the dynamic link library libxml2.dll.'. How do I fix this annoying problem?

    Since updating to 10.4 I've been getting this error message on computer startup
    'AppleSyncNotifier.exe – Entry Point Not Found
    The procedure entry point xmlTextReaderConstName could not be located in the dynamic link library libxml2.dll.'.
    Please help me fix this annoying problem?
    belle

    This is the fix I got from discussions and it worked for me.  It is copied below.  I just did the manual fix which I have underlined. Good luck! Regards, Belle.
    This can occur because libmxl2.dll is not in your C:\Program Files\Common Files\Apple\Mobile Device Support folder.
    There have been some issues with this and other dlls not being in the right place (or not being everywhere they should be) since the 10.3.1.55 iTunes update.
    However, I note that the 10.4 iTunes update is now out - surprisingly quickly - so try installing that, rebooting, and see if your issue is solved.
    If it isn't, though, here's the manual fix:-
    With Windows Explorer, navigate to your C:\Program Files\Common Files\Apple\Apple Application Support folder.
    Copy the libmxl2.dll that you should find there, navigate to the nearby Mobile Device Support folder, and Paste it in there also.
    Reboot and see if all is well.
    I actually had the issue with SQLite3.dll, and the above fix worked for me (I found it in an April 2010 posting!).
    I passed on the fix as above for the similar issue with libmxl2.dll to someone who had exactly your problem, and he reported that it fixed it for him.

  • 10.5.1 Doesn't fix two key problems

    I realise that no update to an operating system will fix everyone's problems. However, here are two most annoying things about Leopard that I would sure like to have fixed.
    1) Repairing permissions. In 10.5 I would try to repair permissions. The barber pole would spin around indefinitely, and finally permissions would be repaired. In 10.5.1 the barber pole does not appear, but I get the progress bar chugging along indefinitely, and finally permissions are repaired. Considering permissions repair is supposed to be routine maintenance in OSX, I would have hoped that Apple would make it just as speedy as in 10.4.
    2) Administrator password. The only way I can shut down or restart my computer is by logging off all users, including myself. Otherwise I get a message that my password is incorrect. However, my password is recognised at other times, such as doing Software Update. This is particularly vexatious.
    Has anyone got a suggestion?
    Thanks!

    Interesting. My main screen has the higher resolution and is my main monitor. I tried the experiment someone mentioned of moving the menu bar over to the second, lower resolution screen, and then QuickLooked a file on the Desktop from there--the preview opened on my big monitor even though it was no longer the main monitor. So you are correct, and it is a bug. Be sure to send Apple feedback:
    http://www.apple.com/feedback/macosx.html
    Or you can join Apple Developer Connection and file a bug a report--although obviously some people have already filed bug reports on the issue. It would still be worthwhile to at least send feedback, sticky wheel gets the grease sort of thing.
    Francine
    Francine
    Schwieder

  • When I open iTunes, I get a message that "iTunes has stopped working".  I've tried reinstalling itunes, creating a new user file, changing the startup programs, and am having no success in getting iTunes to stay open. Any "fixes" for this problem?

    When I open ITunes, I get a message that "iTunes has stopped working".  I have tried reinstalling iTunes, creating a new user file, changing the startup programs in accordance with articles in iTunes troubleshooting, but am having no success in getting iTunes to stay open.  Any fixes for this problem?

     

  • TS3899 I have upgrade my to iOS7 and my company recently upgrade to Exchange 2010. My emails are not synching to my inbox. I can see all of my sent items. I have already deleted the account 3 times but this did not fix the inbox problem.

    I have upgrade my phone to iOS7 and my company recently upgraded to Exchange 2010. My emails are not synching to my inbox. I can only see my Sent items. I have already deleted the account 3 times but this did not fix the inbox problem.

    You need to have a different Apple ID for each of the other devices.

  • Second day after updating to iOS 6 on my iPhone 4, my contacts have duplicated.  Probably not all but many, and my contacts already numbered in the thousands.  Please tell me there is an easy fix to this problem!! I already had to go through contact-by-co

    Second day after updating to iOS 6 on my iPhone 4, my contacts have duplicated.  Probably not all but many, and my contacts already numbered in the thousands.
    Please tell me there is an easy fix to this problem!! I already had to go through contact-by-contact when I bought this phone and added contacts from my Blackberry and MS Outlook on the phone.  Many duplicated at that time and Apple said the only fix was to go through each one and decide to keep or delete.  I really don't want to do that again!

    I had this problem while I had iOS 5.1.1 installed for many months. Fortunately I only have about 150 contacts and only about half of them duplicated. I found that my problem was the way thing were set up in Outlook. I removed all of the duplicates and corrected everything in Outlook contacts (ignoring the address book) and have not had the problem since, Hope this helps.

Maybe you are looking for