<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Regarding printing problem in script in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-printing-problem-in-script/m-p/2882949#M677192</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ABAPers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a problem while printing the invoice. the problem was it was printing all the address details in All languages, expect in English.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Know i want to debug the script, i know the error will be in address window. but while debugging it was showing dump. but if i run directly it was showing the output. I dont know why it was showing the dump. i am sending the dump analysis, so can any one tell me where the problem is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error analysis&lt;/P&gt;&lt;P&gt;    An exception occurred that is explained in detail below.&lt;/P&gt;&lt;P&gt;    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught&lt;/P&gt;&lt;P&gt;     in    procedure "ITEM_PRINT" "(FORM)", nor was it propagated by a RAISING clause.&lt;/P&gt;&lt;P&gt;    Since the caller of the procedure could not have anticipated that the&lt;/P&gt;&lt;P&gt;    exception would occur, the current program is terminated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    The reason for the exception is:&lt;/P&gt;&lt;P&gt;    One of the database selections included a database Commit.&lt;/P&gt;&lt;P&gt;    The selection was then supposed to continue. Before a&lt;/P&gt;&lt;P&gt;    database commit, however, all outstanding database selections&lt;/P&gt;&lt;P&gt;    must be concluded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Possible causes in the application program:&lt;/P&gt;&lt;P&gt;    While a read process from a database cursor is taking place&lt;/P&gt;&lt;P&gt;    (within a loop SELECT/LOOP/EXEC SQL or before a FETCH command),&lt;/P&gt;&lt;P&gt;    one of the following statements is used:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-	MESSAGE (apart from MESSAGE S...)&lt;/P&gt;&lt;P&gt;-	- COMMIT WORK&lt;/P&gt;&lt;P&gt;-	 - ROLLBACK WORK&lt;/P&gt;&lt;P&gt;-	 - BREAK-POINT&lt;/P&gt;&lt;P&gt;-	 - WAIT&lt;/P&gt;&lt;P&gt;-	 - CALL FUNCTION ... DESTINATION (synchronous RFC)&lt;/P&gt;&lt;P&gt;-	 - CALL FUNCTION ... STARTING NEW TASK&lt;/P&gt;&lt;P&gt;-	 - RECEIVE RESULTS&lt;/P&gt;&lt;P&gt;-	 - CALL DIALOG&lt;/P&gt;&lt;P&gt;-	 - CALL SELECTION-SCREEN&lt;/P&gt;&lt;P&gt;-	 - CALL TRANSACTION&lt;/P&gt;&lt;P&gt;-	 - CALL SCREEN, or any other statement that results in the display of a&lt;/P&gt;&lt;P&gt;-	   new screen&lt;/P&gt;&lt;P&gt;-	&lt;/P&gt;&lt;P&gt;-	 Whenever a program runs in debugging mode, a "COMMIT WORK" can&lt;/P&gt;&lt;P&gt;-	 possibly be triggered during database selection. This abnormal&lt;/P&gt;&lt;P&gt;-	 termination can also occur in debugging mode even with a correct&lt;/P&gt;&lt;P&gt;-	 program.&lt;/P&gt;&lt;P&gt;-	 A "COMMIT WORK" during debugging may be due to the following reasons:&lt;/P&gt;&lt;P&gt;-	 1. A program or screen was regenerated during debugging&lt;/P&gt;&lt;P&gt;-	    and updated in the database.&lt;/P&gt;&lt;P&gt;-	 2. Each user needs a separate process in debugging mode, but&lt;/P&gt;&lt;P&gt;-	    the number of available processes is restricted. If this&lt;/P&gt;&lt;P&gt;-	    limit is exceeded, each debugging step then requires a&lt;/P&gt;&lt;P&gt;-	    "COMMIT WORK".&lt;/P&gt;&lt;P&gt;-	&lt;/P&gt;&lt;P&gt;-	 The error occurs in a statement in which the table "LIPS " is accessed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          if zXCHPF ne ''. "batch managed&lt;/P&gt;&lt;P&gt;            if first_batch = 'X'.&lt;/P&gt;&lt;P&gt;              CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;                EXPORTING&lt;/P&gt;&lt;P&gt;                  ELEMENT = 'BATCH_START2'.&lt;/P&gt;&lt;P&gt;              clear first_batch.&lt;/P&gt;&lt;P&gt;            endif.&lt;/P&gt;&lt;P&gt;            if dkmein is initial or nast-kschl ne 'ZNIN'.&lt;/P&gt;&lt;P&gt;              CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;                EXPORTING&lt;/P&gt;&lt;P&gt;                  ELEMENT = 'BATCH_DATA2'.&lt;/P&gt;&lt;P&gt;            else.&lt;/P&gt;&lt;P&gt;              CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;                EXPORTING&lt;/P&gt;&lt;P&gt;                  ELEMENT = 'BATCH_DATA3'.&lt;/P&gt;&lt;P&gt;            endif.&lt;/P&gt;&lt;P&gt;          endif.&lt;/P&gt;&lt;P&gt;        endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;          select * from lips where vbeln = vbfa-vbelv and (this is the point where it was showing error)&lt;/P&gt;&lt;P&gt;            posnr = vbfa-posnv.&lt;/P&gt;&lt;P&gt;            clear vbdpl.&lt;/P&gt;&lt;P&gt;            move-corresponding lips to vbdpl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            if not dkmein is initial.&lt;/P&gt;&lt;P&gt;              CALL FUNCTION 'Z_GROSS_WEIGHT2'&lt;/P&gt;&lt;P&gt;                EXPORTING&lt;/P&gt;&lt;P&gt;                  VBELN = lips-vbeln&lt;/P&gt;&lt;P&gt;                  posnr = lips-posnr&lt;/P&gt;&lt;P&gt;                  GEWEI = dkmein&lt;/P&gt;&lt;P&gt;                IMPORTING&lt;/P&gt;&lt;P&gt;                  BRGEW = dbrgew&lt;/P&gt;&lt;P&gt;                TABLES&lt;/P&gt;&lt;P&gt;                  XLIPS = zlps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Ramana Prasad.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Oct 2007 09:44:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-05T09:44:17Z</dc:date>
    <item>
      <title>Regarding printing problem in script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-printing-problem-in-script/m-p/2882949#M677192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ABAPers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a problem while printing the invoice. the problem was it was printing all the address details in All languages, expect in English.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Know i want to debug the script, i know the error will be in address window. but while debugging it was showing dump. but if i run directly it was showing the output. I dont know why it was showing the dump. i am sending the dump analysis, so can any one tell me where the problem is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error analysis&lt;/P&gt;&lt;P&gt;    An exception occurred that is explained in detail below.&lt;/P&gt;&lt;P&gt;    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught&lt;/P&gt;&lt;P&gt;     in    procedure "ITEM_PRINT" "(FORM)", nor was it propagated by a RAISING clause.&lt;/P&gt;&lt;P&gt;    Since the caller of the procedure could not have anticipated that the&lt;/P&gt;&lt;P&gt;    exception would occur, the current program is terminated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    The reason for the exception is:&lt;/P&gt;&lt;P&gt;    One of the database selections included a database Commit.&lt;/P&gt;&lt;P&gt;    The selection was then supposed to continue. Before a&lt;/P&gt;&lt;P&gt;    database commit, however, all outstanding database selections&lt;/P&gt;&lt;P&gt;    must be concluded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Possible causes in the application program:&lt;/P&gt;&lt;P&gt;    While a read process from a database cursor is taking place&lt;/P&gt;&lt;P&gt;    (within a loop SELECT/LOOP/EXEC SQL or before a FETCH command),&lt;/P&gt;&lt;P&gt;    one of the following statements is used:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-	MESSAGE (apart from MESSAGE S...)&lt;/P&gt;&lt;P&gt;-	- COMMIT WORK&lt;/P&gt;&lt;P&gt;-	 - ROLLBACK WORK&lt;/P&gt;&lt;P&gt;-	 - BREAK-POINT&lt;/P&gt;&lt;P&gt;-	 - WAIT&lt;/P&gt;&lt;P&gt;-	 - CALL FUNCTION ... DESTINATION (synchronous RFC)&lt;/P&gt;&lt;P&gt;-	 - CALL FUNCTION ... STARTING NEW TASK&lt;/P&gt;&lt;P&gt;-	 - RECEIVE RESULTS&lt;/P&gt;&lt;P&gt;-	 - CALL DIALOG&lt;/P&gt;&lt;P&gt;-	 - CALL SELECTION-SCREEN&lt;/P&gt;&lt;P&gt;-	 - CALL TRANSACTION&lt;/P&gt;&lt;P&gt;-	 - CALL SCREEN, or any other statement that results in the display of a&lt;/P&gt;&lt;P&gt;-	   new screen&lt;/P&gt;&lt;P&gt;-	&lt;/P&gt;&lt;P&gt;-	 Whenever a program runs in debugging mode, a "COMMIT WORK" can&lt;/P&gt;&lt;P&gt;-	 possibly be triggered during database selection. This abnormal&lt;/P&gt;&lt;P&gt;-	 termination can also occur in debugging mode even with a correct&lt;/P&gt;&lt;P&gt;-	 program.&lt;/P&gt;&lt;P&gt;-	 A "COMMIT WORK" during debugging may be due to the following reasons:&lt;/P&gt;&lt;P&gt;-	 1. A program or screen was regenerated during debugging&lt;/P&gt;&lt;P&gt;-	    and updated in the database.&lt;/P&gt;&lt;P&gt;-	 2. Each user needs a separate process in debugging mode, but&lt;/P&gt;&lt;P&gt;-	    the number of available processes is restricted. If this&lt;/P&gt;&lt;P&gt;-	    limit is exceeded, each debugging step then requires a&lt;/P&gt;&lt;P&gt;-	    "COMMIT WORK".&lt;/P&gt;&lt;P&gt;-	&lt;/P&gt;&lt;P&gt;-	 The error occurs in a statement in which the table "LIPS " is accessed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          if zXCHPF ne ''. "batch managed&lt;/P&gt;&lt;P&gt;            if first_batch = 'X'.&lt;/P&gt;&lt;P&gt;              CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;                EXPORTING&lt;/P&gt;&lt;P&gt;                  ELEMENT = 'BATCH_START2'.&lt;/P&gt;&lt;P&gt;              clear first_batch.&lt;/P&gt;&lt;P&gt;            endif.&lt;/P&gt;&lt;P&gt;            if dkmein is initial or nast-kschl ne 'ZNIN'.&lt;/P&gt;&lt;P&gt;              CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;                EXPORTING&lt;/P&gt;&lt;P&gt;                  ELEMENT = 'BATCH_DATA2'.&lt;/P&gt;&lt;P&gt;            else.&lt;/P&gt;&lt;P&gt;              CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;                EXPORTING&lt;/P&gt;&lt;P&gt;                  ELEMENT = 'BATCH_DATA3'.&lt;/P&gt;&lt;P&gt;            endif.&lt;/P&gt;&lt;P&gt;          endif.&lt;/P&gt;&lt;P&gt;        endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;          select * from lips where vbeln = vbfa-vbelv and (this is the point where it was showing error)&lt;/P&gt;&lt;P&gt;            posnr = vbfa-posnv.&lt;/P&gt;&lt;P&gt;            clear vbdpl.&lt;/P&gt;&lt;P&gt;            move-corresponding lips to vbdpl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            if not dkmein is initial.&lt;/P&gt;&lt;P&gt;              CALL FUNCTION 'Z_GROSS_WEIGHT2'&lt;/P&gt;&lt;P&gt;                EXPORTING&lt;/P&gt;&lt;P&gt;                  VBELN = lips-vbeln&lt;/P&gt;&lt;P&gt;                  posnr = lips-posnr&lt;/P&gt;&lt;P&gt;                  GEWEI = dkmein&lt;/P&gt;&lt;P&gt;                IMPORTING&lt;/P&gt;&lt;P&gt;                  BRGEW = dbrgew&lt;/P&gt;&lt;P&gt;                TABLES&lt;/P&gt;&lt;P&gt;                  XLIPS = zlps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Ramana Prasad.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 09:44:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-printing-problem-in-script/m-p/2882949#M677192</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T09:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding printing problem in script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-printing-problem-in-script/m-p/2882950#M677193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm assuming there is ENDSELECT statement somewhere further in the program, otherwise you would have gotten a syntax error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that function 'Z_GROSS_WEIGHT2' contains COMMIT WORK. Therefore, it cannot be called inside SELECT FROM LIPS ... ENDSELECT loop. You need to change SELECT ... ENDSELECT to SELECT INTO TABLE and then call the FM inside LOOP AT &amp;lt;table&amp;gt; ... ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually in the future try to stay away from SELECT ... ENDSELECT altogether. Most of the time they are bad for performance. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 19:38:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-printing-problem-in-script/m-p/2882950#M677193</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2007-10-05T19:38:55Z</dc:date>
    </item>
  </channel>
</rss>

