<?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 Re: No output comming in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/no-output-comming/m-p/1306421#M160214</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you see values in your internal table &amp;lt;b&amp;gt;ITAB_OUTPUT&amp;lt;/b&amp;gt; while debugging ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Saquib Khan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 May 2006 21:45:40 GMT</pubDate>
    <dc:creator>former_member181966</dc:creator>
    <dc:date>2006-05-08T21:45:40Z</dc:date>
    <item>
      <title>No output comming</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/no-output-comming/m-p/1306420#M160213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following report, when I debug values are comming to NAME1,NO_ORDER1,NO_ORDER2 the fields. But when I execute nothing is comming. Please help me slove the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Veni&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ZSDORDCNT LINE-SIZE 250
                       NO STANDARD PAGE HEADING MESSAGE-ID ZV.


*----------------------------------------------------------------------*
*-------------------------- TABLES ------------------------------------*
*----------------------------------------------------------------------*
TABLES: VBAK,      "Sales Document: Header Data
        VBAP,      "Sales Document: Item Data
        KNA1.      "General Data in Customer Master
*----------------------------------------------------------------------*
*----------------------- INTERN TABLES --------------------------------*
*----------------------------------------------------------------------*

DATA: BEGIN OF ITAB_VBAK OCCURS 0,
      VBELN LIKE VBAK-VBELN,          "Sales Document
      KUNNR LIKE VBAK-KUNNR,          "Customer Number
      ERDAT LIKE VBAK-ERDAT,          "Order Date
      ERNAM LIKE VBAK-ERNAM,          "Name
      AUART LIKE VBAK-AUART,          "Order Type
      END OF ITAB_VBAK.

DATA: BEGIN OF ITAB_KNA1 OCCURS 0,
      KUNNR LIKE KNA1-KUNNR,          "Customer Number
      NAME1 LIKE KNA1-NAME1,          "Name
      END OF ITAB_KNA1.

DATA: BEGIN OF ITAB_OUTPUT OCCURS 0,
      NAME1 LIKE KNA1-NAME1,          "Name
      NO_ORDER1 TYPE I,               "Number of EDI orders
      NO_ORDER2 TYPE I,               "Number of Manual orders
*      MONTH
      END OF ITAB_OUTPUT.
*----------------------------------------------------------------------*
* ---------------------- DATA DECLARATIONS ----------------------------*
*----------------------------------------------------------------------*
DATA: NO_ORDER1 TYPE I VALUE 0,               "Number of EDI orders
      NO_ORDER2 TYPE I VALUE 0.               "Number of EDI orders
*----------------------------------------------------------------------*
*------------------------- SELECTION SCREEN ---------------------------*
*----------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
SELECT-OPTIONS: SERDAT FOR VBAK-ERDAT.
SELECTION-SCREEN END OF BLOCK B1.
*----------------------------------------------------------------------*
**********************
INITIALIZATION.
**********************

**********************
AT SELECTION-SCREEN.
**********************
  IF SERDAT IS INITIAL.
    MESSAGE E013 WITH TEXT-ER1.
  ENDIF.

**********************
START-OF-SELECTION.
**********************
  PERFORM GET_DATA.
  PERFORM OUTPUT.
**********************
TOP-OF-PAGE.
**********************
  ULINE.
  FORMAT INTENSIFIED OFF.
  FORMAT COLOR COL_HEADING.
  WRITE : / 'Report ID :' , SY-REPID, 60 '',
           120 'Page :', SY-PAGNO.
  WRITE : / 'User......:', SY-UNAME,
           120 'Date :', SY-DATUM.
  ULINE.
  PERFORM HEADINGS.
  ULINE.
********************
FORM HEADINGS.
********************
*  FORMAT COLOR 4.
*  WRITE: /45(10) 'MONTH' RIGHT-JUSTIFIED.
*  FORMAT COLOR OFF.

  FORMAT COLOR 4.
  WRITE: /01(40) 'Account Name ',
          40(10) 'Edi' RIGHT-JUSTIFIED,
          50(10) 'Manual' RIGHT-JUSTIFIED.
  FORMAT COLOR OFF.
ENDFORM.                               " HEADINGS
********************
FORM OUTPUT.
********************
  SORT ITAB_OUTPUT BY NAME1.
  LOOP AT ITAB_OUTPUT.
    AT NEW NAME1.
      WRITE: /01(40) ITAB_OUTPUT-NAME1,
              40(50) ITAB_OUTPUT-NO_ORDER1,
              50(10) ITAB_OUTPUT-NO_ORDER2.
    ENDAT.
  ENDLOOP.
  ULINE.

ENDFORM.                                "OUTPUT
*********************
FORM GET_DATA.
*********************
  SELECT VBELN KUNNR ERDAT ERNAM AUART FROM VBAK
         INTO TABLE ITAB_VBAK
         WHERE ERDAT IN SERDAT
               AND ( AUART = 'OR'
                OR  AUART = 'ZLAT'
                OR  AUART = 'ZCLO'
                OR  AUART = 'ZREN' )
         ORDER BY VBELN.
  IF SYST-DBCNT &amp;gt; 0.
    SELECT KUNNR NAME1 FROM KNA1
           INTO TABLE ITAB_KNA1
           FOR ALL ENTRIES IN ITAB_VBAK
           WHERE KUNNR = ITAB_VBAK-KUNNR.
  ENDIF.

*  CLEAR: ITAB_VBAK, KNA1-NAME1.
*  REFRESH ITAB_OUTPUT.

    LOOP AT ITAB_VBAK.
     IF SY-SUBRC EQ 0.
      READ TABLE ITAB_KNA1
           WITH KEY KUNNR = ITAB_VBAK-KUNNR BINARY SEARCH.

      IF VBAK-ERNAM = 'BATCHUSER'
         OR   VBAK-ERNAM = 'REDDYV'.
        NO_ORDER1 = NO_ORDER1 + 1.
      ELSE.
        NO_ORDER2 = NO_ORDER2 + 1.
      ENDIF.

      MOVE:   KNA1-NAME1      TO ITAB_OUTPUT-NAME1,
              NO_ORDER1       TO ITAB_OUTPUT-NO_ORDER1,
              NO_ORDER2       TO ITAB_OUTPUT-NO_ORDER2.
      APPEND ITAB_OUTPUT.
      CLEAR ITAB_OUTPUT.
       ENDIF.
    ENDLOOP.

ENDFORM.                                        "GET_DATA
************************************************************&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 May 2006 21:43:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/no-output-comming/m-p/1306420#M160213</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-08T21:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: No output comming</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/no-output-comming/m-p/1306421#M160214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you see values in your internal table &amp;lt;b&amp;gt;ITAB_OUTPUT&amp;lt;/b&amp;gt; while debugging ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Saquib Khan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 May 2006 21:45:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/no-output-comming/m-p/1306421#M160214</guid>
      <dc:creator>former_member181966</dc:creator>
      <dc:date>2006-05-08T21:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: No output comming</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/no-output-comming/m-p/1306422#M160215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Veni,&lt;/P&gt;&lt;P&gt;No need to check sy-subrc inside loop...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB_VBAK.     &lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;..... Code inside loop will execute only when there is record present in itab_vbak....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please remove check on sy-subrc inside loop...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Nilesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 May 2006 21:52:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/no-output-comming/m-p/1306422#M160215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-08T21:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: No output comming</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/no-output-comming/m-p/1306423#M160216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You cn re-write it like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB_VBAK.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    IF SY-SUBRC EQ 0.   "Delete from here &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      READ TABLE ITAB_KNA1&lt;/P&gt;&lt;P&gt;           WITH KEY KUNNR = ITAB_VBAK-KUNNR BINARY SEARCH.&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;&amp;lt;b&amp;gt; IF SY-SUBRC EQ 0 " After read table&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF VBAK-ERNAM = 'BATCHUSER'&lt;/P&gt;&lt;P&gt;         OR   VBAK-ERNAM = 'REDDYV'.&lt;/P&gt;&lt;P&gt;        NO_ORDER1 = NO_ORDER1 + 1.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        NO_ORDER2 = NO_ORDER2 + 1.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;      MOVE:   KNA1-NAME1      TO ITAB_OUTPUT-NAME1,&lt;/P&gt;&lt;P&gt;              NO_ORDER1       TO ITAB_OUTPUT-NO_ORDER1,&lt;/P&gt;&lt;P&gt;              NO_ORDER2       TO ITAB_OUTPUT-NO_ORDER2.&lt;/P&gt;&lt;P&gt;      APPEND ITAB_OUTPUT.&lt;/P&gt;&lt;P&gt;      CLEAR ITAB_OUTPUT.&lt;/P&gt;&lt;P&gt;       ENDIF.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 May 2006 21:56:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/no-output-comming/m-p/1306423#M160216</guid>
      <dc:creator>former_member181966</dc:creator>
      <dc:date>2006-05-08T21:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: No output comming</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/no-output-comming/m-p/1306424#M160217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is because you read table itab_kna1, but assign kna1-name1 to itab_output-name1, not itab_kna1-name1. So, try:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  LOOP AT itab_vbak.
    IF sy-subrc EQ 0.
      READ TABLE itab_kna1
           WITH KEY kunnr = itab_vbak-kunnr BINARY SEARCH.

      IF vbak-ernam = 'BATCHUSER'
         OR   vbak-ernam = 'REDDYV'.
        no_order1 = no_order1 + 1.
      ELSE.
        no_order2 = no_order2 + 1.
      ENDIF.

      MOVE:   itab_kna1-name1 TO itab_output-name1,
              no_order1       TO itab_output-no_order1,
              no_order2       TO itab_output-no_order2.
      APPEND itab_output.
      CLEAR itab_output.
    ENDIF.
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;itab_output-no_order1 and itab_output-no_order2 should both be OK though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 May 2006 22:20:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/no-output-comming/m-p/1306424#M160217</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-08T22:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: No output comming</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/no-output-comming/m-p/1306425#M160218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for the help. Rob you are correct, it solved my problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 May 2006 23:46:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/no-output-comming/m-p/1306425#M160218</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-08T23:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: No output comming</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/no-output-comming/m-p/1306426#M160219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad to help, Veni - I've made almost the same mistake more times than I can count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you find you're not getting a field populated when you think it should be, it's something to look at first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might also want to check sy-subrc after doing a binary search. Even if you think it should always be 0, it's good programming practice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2006 02:51:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/no-output-comming/m-p/1306426#M160219</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-09T02:51:45Z</dc:date>
    </item>
  </channel>
</rss>

