Skip to Content
avatar image
Former Member

data not displaying in Report

hi all, i have created a report in which i have created internal table.When i debug the code,in my internal table giving my required data but when i execute it doesn't display my data.Following are the code for Report:<br />

<p />

<pre class="jive-pre"><code class="jive-code jive-java">PARAMETERS:

p_ekorg type ekko-ekorg.

&nbsp;

SELECT-OPTIONS:

s_ebeln FOR ekko-ebeln,

s_submi FOR ekko-submi,

s_lifnr FOR ekko-lifnr,

s_anfnr FOR ekpo-anfnr,

s_matnr FOR ekpo-matnr.

&nbsp;

DATA: BEGIN OF gi_rfq OCCURS 0,

matnr LIKE ekpo-matnr,

ematn like ekpo-ematn, <font color="red">&quot;Material Number</font>

txz01 like ekpo-txz01, <font color="red">&quot;Mareial Description</font>

menge like ekpo-menge, <font color="red">&quot;Quantity</font>

netpr like ekpo-netpr, <font color="red">&quot;Rate</font>

ebeln like ekpo-ebeln, <font color="red">&quot;PO Number</font>

anfnr LIKE ekpo-anfnr, <font color="red">&quot;RFQ No.</font>

banfn like ekpo-banfn, <font color="red">&quot;PR Number</font>

ebelp LIKE ekpo-ebelp,

&nbsp;

END OF gi_rfq,

&nbsp;

BEGIN OF gi_ekko OCCURS 0,

ebeln LIKE ekko-ebeln,

ekorg LIKE ekko-ekorg,

BSTYP LIKE ekko-BSTYP, <font color="red">&quot;Purchasing Document Category</font>

submi LIKE ekko-submi, <font color="red">&quot;Collective Number</font>

lifnr LIKE ekko-lifnr, <font color="red">&quot;Vendor Number</font>

bedat LIKE ekko-bedat,

END OF gi_ekko,

&nbsp;

BEGIN OF gi_reqdate OCCURS 0,

banfn LIKE eban-banfn, <font color="red">&quot;Purchase Requisition Number</font>

bedat LIKE eban-bedat, <font color="red">&quot;PO Date</font>

badat LIKE eban-badat, <font color="red">&quot;PR Date</font>

END OF gi_reqdate,

&nbsp;

BEGIN OF gv_lfa1 OCCURS 0,

name1 like lfa1-name1, <font color="red">&quot;Vendor Name</font>

lifnr LIKE lfa1-lifnr,

END OF gv_lfa1,

&nbsp;

BEGIN OF gv_final OCCURS 0,

ebeln LIKE ekko-EBELN,

bedat LIKE ekko-bedat,

anfnr LIKE ekpo-anfnr,

matnr LIKE ekpo-matnr,

submi LIKE ekko-submi,

lifnr LIKE ekko-lifnr,

END OF gv_final,

&nbsp;

BEGIN OF gi_final OCCURS 1,

matnr LIKE ekpo-matnr,

ematn like ekpo-ematn, <font color="red">&quot;Material Number</font>

txz01 like ekpo-txz01, <font color="red">&quot;Mareial Description</font>

menge like ekpo-menge, <font color="red">&quot;Quantity</font>

netpr like ekpo-netpr, <font color="red">&quot;Rate</font>

ebeln like ekpo-ebeln, <font color="red">&quot;PO Number</font>

anfnr LIKE ekpo-anfnr, <font color="red">&quot;RFQ No.</font>

banfn like ekpo-banfn, <font color="red">&quot;PR Number</font>

ebelp LIKE ekpo-ebelp,

ekorg LIKE ekko-ekorg,

BSTYP LIKE ekko-BSTYP, <font color="red">&quot;Purchasing Document Category</font>

submi LIKE ekko-submi, <font color="red">&quot;Collective Number</font>

lifnr LIKE ekko-lifnr, <font color="red">&quot;Vendor Number</font>

bedat LIKE ekko-bedat,

badat LIKE eban-badat, <font color="red">&quot;PR Date</font>

name1 like lfa1-name1, <font color="red">&quot;Vendor Name</font>

END OF gi_final.

&nbsp;

data: lv_bedat type ekko-bedat,

lv_netpr TYPE ekpo-netpr,

&nbsp;

gi_main LIKE ekko,

gi_eban LIKE eban,

gi_lfa1 LIKE lfa1,

gi_detail LIKE STANDARD TABLE OF ekpo WITH HEADER LINE.

&nbsp;

START-OF-SELECTION.

&nbsp;

PERFORM f_get_data.

PERFORM f_orgdata.

PERFORM f_display_report.

&nbsp;

FORM f_get_data .

&nbsp;

&nbsp;

IF sy-subrc EQ 0.

&nbsp;

SELECT MAX( bedat ) into lv_bedat

from ekko

WHERE ebeln IN s_ebeln

AND submi in s_submi

group by lifnr.

&nbsp;

SELECT submi BSTYP ebeln lifnr

FROM ekko

INTO CORRESPONDING FIELDS OF gi_ekko

WHERE ebeln IN s_ebeln

AND submi in s_submi

and bedat eq lv_bedat

AND spras = <font color="navy">'E'</font>.

&nbsp;

Append gi_ekko.

EndSelect.

&nbsp;

Endselect.

&nbsp;

SELECT MIN( netpr ) into lv_netpr

from ekpo

WHERE ebeln IN s_ebeln

group by anfnr.

&nbsp;

&nbsp;

SELECT ematn txz01 menge anfnr banfn

INTO CORRESPONDING FIELDS OF TABLE gi_rfq

FROM ekpo

WHERE ebeln IN s_ebeln.

&nbsp;

APPEND gi_rfq.

ENDSELECT.

&nbsp;

SELECT name1

FROM lfa1

INTO CORRESPONDING FIELDS OF TABLE gv_lfa1

WHERE lifnr eq gi_lfa1-lifnr.

&nbsp;

endif.

endform.

&nbsp;

&nbsp;

FORM f_orgdata.

&nbsp;

&nbsp;

LOOP AT gi_rfq.

&nbsp;

&nbsp;

MOVE-CORRESPONDING gi_ekko to gi_final.

CLEAR gi_ekko.

READ TABLE gi_ekko WITH KEY ebeln = gi_ekko-ebeln.

MOVE gi_ekko-bedat to gi_main-bedat.

MOVE gi_ekko-bstyp to gi_main-bstyp.

MOVE gi_ekko-submi to gi_main-submi.

MOVE gi_ekko-lifnr to gi_main-lifnr.

&nbsp;

MOVE-CORRESPONDING gv_lfa1 to gi_final.

CLEAR gv_lfa1.

READ TABLE gv_lfa1 with key lifnr = gi_lfa1-lifnr.

MOVE gi_lfa1-name1 to gi_lfa1-name1.

MOVE-CORRESPONDING gi_rfq to gi_final.

CLEAR gi_rfq.

READ TABLE gi_rfq WITH KEY ebeln = gi_rfq-ebeln.

MOVE gi_rfq-ematn to gi_detail-ematn.

MOVE gi_rfq-txz01 to gi_detail-txz01.

MOVE gi_rfq-menge to gi_detail-menge.

MOVE gi_rfq-netpr to gi_detail-netpr.

MOVE gi_rfq-banfn to gi_detail-banfn.

MOVE gi_rfq-anfnr to gi_detail-anfnr.

&nbsp;

&nbsp;

APPEND gi_detail.

CLEAR gi_final.

endloop.

&nbsp;

&nbsp;

ENDFORM.

&nbsp;

FORM f_display_report .

&nbsp;

DATA: fname(30) TYPE c.

&nbsp;

CALL FUNCTION <font color="navy">'SSF_FUNCTION_MODULE_NAME'</font>

EXPORTING

formname = <font color="navy">'ZCCL_RATE_COMPARISION2'</font>

IMPORTING

fm_name = fname

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

&nbsp;

IF sy-subrc = 0.

&nbsp;

CALL FUNCTION fname

EXPORTING

gs_main = gi_main

gs_eban = gi_eban

gs_lfa1 = gi_lfa1

&nbsp;

TABLES

it_detail = gi_detail.

&nbsp;

ENDIF.

&nbsp;

ENDFORM.

</code></pre><br />

<br />

Thanks,<br />

sapabappk

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 21, 2010 at 09:00 AM

    Hi!

    You called a smartform, not a report for displaying.

    Check the smartform's interface (using SMARTFORMS transaction), it has to refer the same structures, you are using in your report.

    gi_main LIKE ekko,

    gi_eban LIKE eban,

    gi_lfa1 LIKE lfa1,

    gi_detail LIKE STANDARD TABLE OF ekpo WITH HEADER LINE.

    Regards

    Tamá

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      hi Tamás Nyisztor,

      well when i execute my coding,these field i-e PR DATE , PR.NO, * PR.DATE* and RATE is given me 0 values and last field is

      RFQ No. which im displaying 9 times which is different from each other.

      Thanks & Regards,

      sapabappk

  • Sep 21, 2010 at 09:45 AM
        CALL FUNCTION fname
          EXPORTING
            gs_main    =  gi_main
            gs_eban    =  gi_eban
            gs_lfa1    =  gi_lfa1
     
          TABLES
            it_detail  =  gi_detail[].  "<---
    

    Tyr this.

    Add comment
    10|10000 characters needed characters exceeded