‎2007 Jun 25 10:01 AM
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.
‎2007 Jun 25 10:03 AM
‎2007 Jun 25 10:26 AM
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.
‎2007 Jun 25 10:42 AM
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
‎2007 Jun 25 10:45 AM
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
‎2007 Jun 25 10:03 AM
‎2007 Jun 25 10:04 AM
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
‎2007 Jun 25 10:05 AM
hi,
if is <itab> [] initial.
message e001(zmcl)."no data is avbl for the given input.
exit.
endif.
regards,
seshu.
‎2007 Jun 25 10:05 AM
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.
‎2007 Jun 25 10:07 AM
hi, can you post your code over hear you might used skip or top of page along with some write statement
‎2007 Jun 25 10:31 AM
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.
‎2007 Jun 25 10:48 AM
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