Problem with the garbage record getting printed at the beginning

Hello Friends,
I know that this problem is very difficult to solve without looking at my script and its program. But I will try asking anyways.
I have written the following code (Driver program) which uses to tables ZRAMCUSTMAST AND ZRAMCALLMAST.
ZRAMCUSTMAST has customer details like address etc.,
ZRAMCALLMAST has the call details that each
             customer has done.
But when I print the details, it prints everything correctly but for each customer it prints some garbage
values as the first row.
Any feedback will be greatly appreciated. You can mail me the response also (singer_ram AT yahoo DOT com)
CODE in my driver program (SE38) -
*& Report  ZRAMPROJSCRIPT                                              *
REPORT  zramprojscript                          .
TABLES : zramcustmast, zramjuncmast, zramcallmast.
DATA : itabcustmast LIKE zramcustmast OCCURS 1 WITH HEADER LINE,
       itabjuncmast LIKE zramjuncmast OCCURS 1 WITH HEADER LINE,
       itabcallmast LIKE zramcallmast OCCURS 1 WITH HEADER LINE.
DATA: type_of_call(1),
      CALL_CHARGE type i, CALL_CHARGE_STRING(5), TOTAL_CHARGE type i,
      hour(2), min(2), sec(2).
SELECT * FROM zramcustmast INTO TABLE itabcustmast.
*SELECT * FROM zramjuncmast INTO TABLE itabjuncmast.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
  APPLICATION                       = 'TX'
  ARCHIVE_INDEX                     =
  ARCHIVE_PARAMS                    =
  DEVICE                            = 'PRINTER'
  dialog                            = 'X'
   form                              = 'ZRAMPROJSCRIPT'
   language                          = sy-langu
  OPTIONS                           =
  MAIL_SENDER                       =
  MAIL_RECIPIENT                    =
  MAIL_APPL_OBJECT                  =
  RAW_DATA_INTERFACE                = '*'
IMPORTING
  LANGUAGE                          =
  NEW_ARCHIVE_PARAMS                =
  RESULT                            =
EXCEPTIONS
  CANCELED                          = 1
  DEVICE                            = 2
  FORM                              = 3
  OPTIONS                           = 4
  UNCLOSED                          = 5
  MAIL_OPTIONS                      = 6
  ARCHIVE_ERROR                     = 7
  INVALID_FAX_NUMBER                = 8
  MORE_PARAMS_NEEDED_IN_BATCH       = 9
  SPOOL_ERROR                       = 10
  CODEPAGE                          = 11
  OTHERS                            = 12
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT itabcustmast.
  CALL FUNCTION 'START_FORM'
   EXPORTING
  ARCHIVE_INDEX          =
     form                   = 'ZRAMPROJSCRIPT'
     language               = sy-langu
  STARTPAGE              = ' '
  PROGRAM                = ' '
  MAIL_APPL_OBJECT       =
IMPORTING
  LANGUAGE               =
EXCEPTIONS
  FORM                   = 1
  FORMAT                 = 2
  UNENDED                = 3
  UNOPENED               = 4
  UNUSED                 = 5
  SPOOL_ERROR            = 6
  CODEPAGE               = 7
  OTHERS                 = 8
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  CALL FUNCTION 'WRITE_FORM'
   EXPORTING
     element                        = 'MAINPAGE'
     function                       = 'SET'
     type                           = 'BODY'
     window                         = 'MAIN'
IMPORTING
  PENDING_LINES                  =
EXCEPTIONS
  ELEMENT                        = 1
  FUNCTION                       = 2
  TYPE                           = 3
  UNOPENED                       = 4
  UNSTARTED                      = 5
  WINDOW                         = 6
  BAD_PAGEFORMAT_FOR_PRINT       = 7
  SPOOL_ERROR                    = 8
  CODEPAGE                       = 9
  OTHERS                         = 10
  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 itabcallmast.
  refresh itabcallmast.
  SELECT * FROM zramcallmast INTO TABLE itabcallmast WHERE customerid = itabcustmast-customerid.
  SORT itabcallmast by calltype.
  TOTAL_CHARGE = 0.
  LOOP AT itabcallmast.
Local Call : 1 Rupee per Minute.
STD : 1.5 Rupees Per Minute
International calls : 5 Rupees Per minute
hour = itabcallmast-CALLDURATION+0(2).
min = itabcallmast-CALLDURATION+2(2).
sec = itabcallmast-CALLDURATION+4(2).
CASE itabcallmast-calltype.
WHEN 'L'.
    CALL_CHARGE = ( ( hour * 60 * 60 ) + ( min * 60 ) + ( sec ) ) / 60.
WHEN 'S'.
    CALL_CHARGE = ( ( ( hour * 60 * 60 ) + ( min * 60 ) + ( sec ) ) * 2 ) / 60  .
WHEN 'I'.
    CALL_CHARGE = ( ( ( hour * 60 * 60 ) + ( min * 60 ) + ( sec ) ) * 5 ) / 60   .
ENDCASE.
CALL_CHARGE_STRING = CALL_CHARGE.
TOTAL_CHARGE = TOTAL_CHARGE + CALL_CHARGE.
    CALL FUNCTION 'WRITE_FORM'
     EXPORTING
       element                        = 'MAINPAGE'
       function                       = 'SET'
       type                           = 'BODY'
       window                         = 'MAIN'
IMPORTING
  PENDING_LINES                  =
EXCEPTIONS
  ELEMENT                        = 1
  FUNCTION                       = 2
  TYPE                           = 3
  UNOPENED                       = 4
  UNSTARTED                      = 5
  WINDOW                         = 6
  BAD_PAGEFORMAT_FOR_PRINT       = 7
  SPOOL_ERROR                    = 8
  CODEPAGE                       = 9
  OTHERS                         = 10
    IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
  ENDLOOP.   " ************ itabCALLmast
  CALL FUNCTION 'END_FORM'
IMPORTING
  RESULT                         =
EXCEPTIONS
  UNOPENED                       = 1
  BAD_PAGEFORMAT_FOR_PRINT       = 2
  SPOOL_ERROR                    = 3
  CODEPAGE                       = 4
  OTHERS                         = 5
  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 itabcallmast.
ENDLOOP.   " ************** itabCUSTmast
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
  RESULT                         =
  RDI_RESULT                     =
TABLES
  OTFDATA                        =
EXCEPTIONS
  UNOPENED                       = 1
  BAD_PAGEFORMAT_FOR_PRINT       = 2
  SEND_ERROR                     = 3
  SPOOL_ERROR                    = 4
  CODEPAGE                       = 5
  OTHERS                         = 6
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

hi
good
check the following things-
1- Check the value for the field in the particular table,
2- Check the data you r passing from the driver program and the field that is printing the value in the sapscript screen.
3-check in the debug mode when the value is printing in the first row.
thanks
mrutyu

Similar Messages

  • HT1296 Have a problem with syncing. I get this message: The ipod Bill's Ipod" cannot be synced because there is not enough space to hold all of the items in the iTunes library (additional 2.4GB required) I don't understand as I have much more space than 2

    I recently ran into a problem with syncing my ipod touch to itunes on my Windows 7 pc. It had previously been synced to my older laptop
    and I wanted to change to my newer Windows 7 laptop's itunes library that I had already been syncing with.
    Anyway, I started seeing this message that prevents my from syncing:
    The iPod "Bill's iPod" cannot be synced because there is not enough free space to hold all of the items in the iTunes library
    (additional 2.48 GB required)  
    Not sure if it is talking about my iPod free space or my PC itunes library free space. Either way I have 11.0 GB free space available
    on my iPod and 412 GB free space available on my Windows 7 PC.
    How do I handle this problem?   Please help!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    Thanks

    It is saying that the iPod does not have enough free storage to sync all the items yu have selected to sync to the iPod. You need 2.48 GB more free on the iPod. You need either to select less to sync or delete some content form the iPod.

  • I am trying to back up my new iPhone after downloading/updating iTunes with iCloud. I get this message: The required file was not found or has a permissions error. Correct this permissions problem and try again, or deauthorize this computer if the permiss

    I am trying to back up my new iPhone after downloading/updating iTunes with iCloud. I get this message: The required file was not found or has a permissions error. Correct this permissions problem and try again, or deauthorize this computer if the permiss
    how do I find the file and replace it or install it?

    I'll reload it tonight when I get home...basically, I bought a new iPhone and downloaded some new medical apps. also had to download an update for iTunes into my mac laptop so I could access iCloud (which was NOT on my prior iTunes software)
    When I synched my new iPhone with the newly downloaded iTunes, I registered my iphone and tried to "back it up" to iCloud and the message indicating that "the required file was not found or has a permissions error...." popped up.
    How do I correct the permissions error, or...am I able to do this somewhere? Or...how do I find the file that is missing?
    Dr. Bob001

  • I'm having problem with text boxes.  Whenever i hit the enter button to start a new line or paragraph, the cursor doesn't drop down to the next line.  Instead i get this little red + sign in the box.

    I'm having problem with text boxes.  Whenever i hit the enter button to start a new line or paragraph, the cursor doesn't drop down to the next line.  Instead i get this little red + sign in the box.

    You are absolutely right.  Thought Enter meant Enter.  I was wrong.  Thank you for the help.
    Rod Rogers, Broker
    Accredited Land Consultant (ALC)
    Metcalf Land Company, Inc.
    Office: 864-585-0444
    Mobile: 864-316-0297
    Fax: 864-583-6000
    <http://www.metcalfland.com> www.metcalfland.com

  • I just bought an AirPort Extreme system over this weekend and I am having problem with setting it up. I plugged the cable as explained in the manual but there is no way I can get a steady green light. I all see is flashing amber light. Can anyone help me,

    I just bought an AirPort Extreme system over this weekend and I am having problem with setting it up. I plugged the cable as explained in the manual but there is no way I can get a steady green light. I all see is flashing amber light. Can anyone help me,

    Think you need to provide some more details about what you are connecting

  • Having the same problem with Adobe Story. Getting a warning that says "Failed to get user preference

    Having the same problem with Adobe Story. Getting a warning that says "Failed to get user preferences, lost the internet connection." Any help would be greatly appreciated. Phone support was useless

    Yes, me, just now! I was thinking it was because I am on a brand new computer and I did something wrong when I put itunes on it. But now I am thinking it is an itunes issue, not mine.

  • How to get the record count printed for the report in the Dashboards

    Hi,
    I would like to get the record count printed at the bottom of every dashboard report like:
    < 1 - 25 of 6300 > instead of < 1 - 25 >
    Any help is appreciated
    Regards
    B

    I have tried the following formula which identifies the lowest grain but it does not seem to give me correct result.. I am not getting the correct count. I am getting as 3.A work order can be updated only once at one point of time.hence the formula
    MAX(RCOUNT(CAST("SR Wo Fact"."Crm Wo Number" AS CHAR) ||CAST("SR Wo Fact"."PSC Timestamp" as char)))
    I tried only MAX(RCOUNT(1)), but I was able to get the record count as corect for Administrator but not for other users.
    Has anyone come across this scenario.
    Thanks Shravan
    Edited by: 786443 on Aug 19, 2010 10:22 AM

  • HT4848 Hi my name is Hajk and i got a friend that has a problem with her macbook, she gets a blue screen and cant log on. So i told her if she had an reinstall disk so that i could reinstall for her but she didn't get one with the macbook. what can she do

    Hi my name is Hajk and i got a friend that has a problem with her macbook, she gets a blue screen and cant log on. So i told her if she had an reinstall disk so that i could reinstall for her but she didn't get one with the macbook. what can she do ?

    If this is a fairly new Mac running either v10.7 Lion or v10.8 Mountain Lion she can use Lion or Mountain Recovery to repair the startup disk or reinstall OS X.

  • Problem with  Creating Info Record

    Hello Gurus,
    I've problem with Creating Info Record
    i tried to create info record for Plant Specific/Purchase Org
    The first Screen General Data is OK
    i entered all the data in the next screen ie
    Purchase Organization Data screen but i'm getting error
    <b>Make an entry in all required fields</b>
    but there is Mandatory Textbox ie "VALID TO" which im unable to select Bcos its Disabled
    pls help me regarding this
    thanks in advance

    Hi
    Have u given the net price. <b>VALID TO</b> is the date until which the price shown in the info record is valid.
    If there is no price that is valid on the current date, the last-valid price is displayed and the date field contains the day before the start of the next validity period (this may be 12.31.9999 if there is no further validity date). If all validit periods lie beyond the current date, the price of the next period is displayed. The date field then contains the end date of this period.
    These validity periods we will maintain Purchse data CONDITIONS while creating info record. Check the validity period for the conditions.
    Hope this will helps u
    Ravi
    Ravikumar Bolla

  • Has anyone in this Forum had problems with installing and running Adobe apps on the new MacPro?

    Has anyone in this Forum had problems with installing and running Adobe apps on the new MacPro?
    I have been trying to install Photoshop CS6 & CC and Acrobat Pro XI on my Mac Pro (late 2013). I keep getting a 'configuration' error message and wondered if the problem was wide spread.
    TIA,
    Jerry

    Thanks, Martin.
    Good to hear someone has had success. The lack of it here is frustrating and depressing.
    Thanks again,
    Jerry

  • I have a problem with running an EXE file on win2000, the Lab View is 5.1 and I do not know if it is 16 bit...

    I have a problem with running an EXE file on win2000, the Lab View is 5.1 and I do not know if it is 16 bit...what should I do?

    Hi Arika,
    The drivers that you need to install to make your executable work depends on what your executable is doing. To get started, you need to have the LabVIEW Run-Time Engine installed on your target machine (the Win2000 machine you are planning to use) in order to run your executable. Next, you need to determine what drivers your executable uses, if any. For example, if you are using GPIB instrument control, you will need to install the NI-488 drivers on your target machine. If you are performing data acquisition, you will need to install NI-DAQ drivers. If you are doing image acquistion, you will need to install NI-IMAQ drivers.
    All these drivers are available for downloading on ni.com. To get the drivers, go to ht
    tp://www.ni.com/support , click on the link that takes you to Drivers and Updates (under Option 3), and click on the links to get to the driver(s) you need. For example, if you need the LabVIEW 5.1.1 Run-Time engine, click on the All Drivers and Updates by Application link on the main page (http://www.ni.com/softlib.nsf/). Then click on the LabVIEW link, Windows 2000, Run Time Engine, and then you will see the link to get to the page to download the LabVIEW 5.1.1 Run-Time Engine.
    I hope this information helps.
    Best Regards,
    Wilbur Shen
    National Instruments

  • Hi, i have a user that is working with the Adobe acrobat 9 standard. when he adds a stamp to a PDF that he opens from an Email in Outlook, this is the error he gets. (snapshot in the attached files)

    hi good morning,
    I have a user that is working with the Adobe acrobat 9 standard. when he adds a stamp to a PDF that he opens from an Email in Outlook, this is the error he gets. (snapshot in the attached files)
    can you help us with this problem?

    Hi, thanks for the fast response.
    This is the Extended Font Pack i have installed on the Terminal server.
    what do you mean by properly embedded? how can i check that?
    BR
    Eric Mizrachi

  • A serious problem with AAR 5.0 in printing out a book

    I have written a book in MS Word 2000 and I converted it in a PDF file with AR 5.0
    Then I tried to print it out as a book.
    I rotated the pages and included two A4 pages in one so that an A4 sheet to have 4 pages on both sides.
    In order to do this trick, I rotated the horizontal text page
    to vertical position on the left side for printing out the page 1 and on the right side for printing out the page 2. This must be done in order to have the 4 pages printed out in a sequence and in an A4 sheet.
    The procedure is as follows:
    First, I print out the page one (1) while having my PDF text page rotated vertically on the left side and the printing out is successful.
    Then I rotate again the page vertically to face on the right side to print out the page two (2) in the same sheet.
    Here is where the problem begins.
    The page 1 is printed out well BUT its top/bottom margin is different than the page 2, which is printed in a lower position on the A4 sheet.
    The margins all around the page look perfect but the two of them are printed out with one line lower that makes one page higher or lower than the other and not in a straight line as it is supposed to be.
    I have tried to find out what causes this problem with no success so I am into contact with you requesting an immediate help. I know that it is a small but serious problem particularly for my case as an author and I believe that the solution can be given only by an expert of Adobe Acrobat 5.O
    Please, inform me about any adjustment that must be done to solve this margin situation (problem) as I know that AAR 5.0 is an excellent software and can do this work for me.
    Regards,
    Emmanouel

    This has nothing to do with Adobe's OpenType development tools, which is the purpose of this forum. I think you need to post this in the Acrobat Windows forum!
    Regards,
    T

  • I want to print the story on a story site but all that gets printed is the home page.

    If I go to a site where readers have posted stories I want to print out those stories so I can read them in a comfortable chair and not have to stare at a computer screen. When using Internet Explorer when I click on the story and then hit ctr+p it will print out the story no matter how many pages it is.
    When I try that on Firefox all that gets printed is the home page of the site.
    By the way, my computer shop installed Firefox the other day so I don't know what version it is.

    Try here...
    If you are attempting to update using a Mac or PC with which you do not normally sync
    From here...
    http://support.apple.com/kb/HT4972

  • I have a problem with session manager session files because of the invalid json storage data submited by firefox

    Hi, i have problem with session manager's session files. The problem is: the submitted storage data from firefox which is put between "storage":{ and its matching closing brace } But in some of my session files there is non equal { and } under storage's braces. I need to get storage data but in my case it is very hard to do. My question is there any char put before or after { and } like /{ or \{ to avoid confusion? If there is not such thing, i think there could be different solution but i am not sure: i look couple of my session files; after "storage":{...} there is ,_"formDataSaved" so i can get storage data in this example ... by looking between "storage":{ and ,"_formDataSaved" easily. Is there every time ,"_formDataSaved" after "storage":{ ?  Thank you.

    Well, it seems waiting is not my strong suit..! I renamed a javascript file called recovery to sessionstore. This file was in the folder sessionstore-backups I had copied from mozilla 3 days ago, when my tabs were still in place. I replaced the sessionstore in mozilla's default folder with the renamed file and then started mozilla. And the tabs reappeared as they were 3 days ago!
    So there goes the tab problem. But again when I started mozilla the window saying "a script has stopped responding" appeared, this time the script being: chrome//browser/contenttabbrowser.xml2542
    If someone knows how to fix this and make firefox launch normally, please reply! Thank you

Maybe you are looking for