Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

data not displaying in Report

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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á

7 REPLIES 7

Former Member
0 Kudos

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á

0 Kudos

hi Tamás Nyisztor,

i have changed the structure used in my coding with samrtforms but still i can't get the desired result.Do you any other suggestion..?

Thanks & Regards,

sapabapk

0 Kudos

Hi!

Well, there should be many problems, but there are not problems in your program, but in your SMARTFORM.

You have to modify your smartform to your needs, but because you didn't tell, what's the problem exactly with your smartform, and what do you want to see on the output, unfortunately I can't help you more.

Regards

Tamá

0 Kudos

you are getting the smartform as an output or getting some error.

0 Kudos

hi Mayank Modi,

Yes im getting SMART FROM as an output and i don't got any error only the issue is that when i execute it with debug i check my internal table i-e GI_RFQ,GI_EKKO and GI_DETAIL giveing me data.

Thanks & Regards,

sapabappk

0 Kudos

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

kesavadas_thekkillath
Active Contributor
0 Kudos

    CALL FUNCTION fname
      EXPORTING
        gs_main    =  gi_main
        gs_eban    =  gi_eban
        gs_lfa1    =  gi_lfa1
 
      TABLES
        it_detail  =  gi_detail[].  "<---

Tyr this.