Application Development and Automation 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: 
Read only

reports...

Former Member
0 Likes
1,190

hi...

I have created a report.When i enter the values on selection screen and when i press execute button then the report should not display the related data.

i have written write statment but i commented it then also blank screen is coming.I dont want blank screen.Please tell me how to do it.

Thanks n advance.

11 REPLIES 11
Read only

Former Member
0 Likes
1,165

Hi Manu,

Can you paste your code here.

Regards,

Atish

Read only

0 Likes
1,165

TABLES:LIKP,LIPS,KNA1.

DATA:ITAB LIKE LIKP OCCURS 0 WITH HEADER LINE.

DATA:JTAB LIKE LIPS OCCURS 0 WITH HEADER LINE.

DATA:MTAB LIKE KNA1 OCCURS 0 WITH HEADER LINE.

SELECTION-SCREEN: BEGIN OF BLOCK a WITH FRAME .

parameter: vbeln like likp-vbeln .

parameter: kunnr like kna1-kunnr .

PARAMETERS:ERDAT LIKE LIKP-ERDAT

SELECTION-SCREEN: END OF BLOCK a .

SELECTION-SCREEN: END OF BLOCK a .

AT SELECTION-SCREEN OUTPUT.

GET PARAMETER ID 'VL' FIELD vbeln..

LOOP AT SCREEN.

if vbeln is not initial.

select single kunnr

from likp

into kunnr where vbeln eq vbeln.

endif.

MODIFY SCREEN.

ENDLOOP.

LOOP AT SCREEN.

if kunnr is not initial.

select single telf1

from kna1

into m_no where kunnr eq kunnr.

endif.

MODIFY SCREEN.

ENDLOOP.

LOOP AT SCREEN.

if vbeln is not initial.

select single erdat

from likp

into erdat where vbeln eq vbeln.

endif.

MODIFY SCREEN.

ENDLOOP.

START-OF-SELECTION.

SELECT * FROM LIKP INTO TABLE ITAB WHERE ERDAT = ERDAT AND KUNNR = KUNNR and vbeln = vbeln.

likp-vbeln = itab-vbeln.

move itab-vbeln to vbeln.

write: / vbeln.

LOOP AT ITAB.

SELECT * FROM LIPS INTO TABLE JTAB WHERE VBELN = ITAB-VBELN.

LOOP AT JTAB.

likp-vbeln = Itab-vbeln.

SELECT * FROM KNA1 INTO TABLE MTAB WHERE KUNNR = ITAB-KUNNR.

likp-kunnr = Mtab-kunnr.

LOOP AT MTAB.

*WRITE: / ITAB-BOLNR, / ITAB-TRAID, / JTAB-ARKTX, / JTAB-LFIMG,JTAB-MEINS,/ MTAB-NAME1,ITAB-VBELN.

ENDLOOP.

ENDLOOP.

endloop.

After entering the values in parameters i dont want the contents of report to be displayed.

I have commented the write statment.

Read only

0 Likes
1,165

Hi Manu,

Comment the follwing WRITE Statement written in Start-of-selection also, that thime your problem will be resolved:

START-OF-SELECTION.

SELECT * FROM LIKP INTO TABLE ITAB WHERE ERDAT = ERDAT AND KUNNR = KUNNR

and vbeln = vbeln.

likp-vbeln = itab-vbeln.

move itab-vbeln to vbeln.

*write: / vbeln.

Reward points if helpful answer.

Ashvender

Read only

0 Likes
1,165

hi,

make modification as given below

TABLES:LIKP,LIPS,KNA1.

DATA:ITAB LIKE LIKP OCCURS 0 WITH HEADER LINE.

DATA:JTAB LIKE LIPS OCCURS 0 WITH HEADER LINE.

DATA:MTAB LIKE KNA1 OCCURS 0 WITH HEADER LINE.

<b>data:

v_flag type c.</b>

SELECTION-SCREEN: BEGIN OF BLOCK a WITH FRAME .

parameter: vbeln like likp-vbeln .

parameter: kunnr like kna1-kunnr .

PARAMETERS:ERDAT LIKE LIKP-ERDAT

SELECTION-SCREEN: END OF BLOCK a .

SELECTION-SCREEN: END OF BLOCK a .

AT SELECTION-SCREEN OUTPUT.

<b>

v_flag = 'X'.</b>

GET PARAMETER ID 'VL' FIELD vbeln..

LOOP AT SCREEN.

if vbeln is not initial.

select single kunnr

from likp

into kunnr where vbeln eq vbeln.

endif.

MODIFY SCREEN.

ENDLOOP.

LOOP AT SCREEN.

if kunnr is not initial.

select single telf1

from kna1

into m_no where kunnr eq kunnr.

endif.

MODIFY SCREEN.

ENDLOOP.

LOOP AT SCREEN.

if vbeln is not initial.

select single erdat

from likp

into erdat where vbeln eq vbeln.

endif.

MODIFY SCREEN.

ENDLOOP.

START-OF-SELECTION.

<b>check v_flag eq space.</b>

SELECT * FROM LIKP INTO TABLE ITAB WHERE ERDAT = ERDAT AND KUNNR = KUNNR and vbeln = vbeln.

likp-vbeln = itab-vbeln.

move itab-vbeln to vbeln.

write: / vbeln.<b> "u have not commented this line</b>

LOOP AT ITAB.

SELECT * FROM LIPS INTO TABLE JTAB WHERE VBELN = ITAB-VBELN.

LOOP AT JTAB.

likp-vbeln = Itab-vbeln.

SELECT * FROM KNA1 INTO TABLE MTAB WHERE KUNNR = ITAB-KUNNR.

likp-kunnr = Mtab-kunnr.

LOOP AT MTAB.

*WRITE: / ITAB-BOLNR, / ITAB-TRAID, / JTAB-ARKTX, / JTAB-LFIMG,JTAB-MEINS,/ MTAB-NAME1,ITAB-VBELN.

ENDLOOP.

ENDLOOP.

endloop.

Message was edited by:

Navneeth Bothra

Read only

Former Member
0 Likes
1,165

HEllo,

Check any SKIP statement is used in ur report.

Vasanth

Read only

Former Member
0 Likes
1,165

hi,

Probably at the top-of-page event you might be using write statement because of which that might be getting triggered ... so comment out all the write statements in your report

Regards,

Santosh

Read only

Former Member
0 Likes
1,165

hi,

if is <itab> [] initial.

message e001(zmcl)."no data is avbl for the given input.

exit.

endif.

regards,

seshu.

Read only

Former Member
0 Likes
1,165

hi,

for that you have to set a flag at

At selection-screen. event.

and then check whether that flag is initial in the start of selection. if it is not initial then dont proceed further.

for example:

at selection-screen.

v_flag = 'x'.

start-of-selection.

check v_flag eq space.

//write commands

regards,

Navneeth K.

Read only

Former Member
0 Likes
1,165

hi, can you post your code over hear you might used skip or top of page along with some write statement

Read only

Former Member
0 Likes
1,165

based on the selection screen u ill get some data in itab.

so check as

if itab[] is initial.

message e000 with text-010.

exit.

endif.

if not [] is initial.

then proceed for the display of the report.

endif.

Read only

Former Member
0 Likes
1,165

Hi,

you have commented the last write statement, but there is one more write statement in program which you need to comment.

SELECT * FROM LIKP INTO TABLE ITAB WHERE ERDAT = ERDAT AND KUNNR = KUNNR and vbeln = vbeln.

likp-vbeln = itab-vbeln.

move itab-vbeln to vbeln.

write: / vbeln.

regards,

Ruchika