12-08-2008 4:50 PM
Dear Experts,
In the below code i'm getting all the pernr values from pb4000 table based on the selection criteria and using submit program rpapl005 i'm passing values to the pernr manually but i need to pass the values from internal tables automatically how to solve my issue is there any other way to solve this problem.
Thanks in Advance.
Thanks and Regards,
Thiru. R
&----
*& Report ZREPORT_N
*&
&----
*&
*&
&----
REPORT ZREPORT_N.
&----
*& Report ZREPORT
*&
&----
*&
*&
&----
tables : pb4000.
select-options s_date for pb4000-begda.
data : begin of wa,
pernr type pb4000-pernr,
begda type pb4000-begda,
apsta type pb4000-apsta,
end of wa,
it like table of wa.
select pernr
from pb4000 into table it where
begda in s_date AND APSTA eq '7'.
LOOP AT IT INTO WA.
WRITE : / WA-PERNR.
ENDLOOP.
SUBMIT RPAPL005
WITH PAPAPLNO-LOW EQ 40
WITH PAPAPLNO-LOW EQ 109
WITH PAPAPLNO-LOW EQ 408
WITH PAPAPLNO-LOW EQ 413
WITH PAPAPLNO-LOW EQ 1
WITH PAPAPSTA-LOW EQ 7
AND RETURN.
instead of passing values for PAPAPLNO-LOW manully i want to pass the values from internal table it.
Can any try to solve my issue.
12-08-2008 9:53 PM
create a range table. Copy all values to the range table and submit report with the range table.
Ranges: s_pernr for pb4000-pernr.
LOOP AT IT INTO WA.
s_pernr-sign = 'I'.
s_pernr-option = 'EQ'.
s_pernr-low = WA-PERNR.
append s_pernr.
ENDLOOP.
SUBMIT RPAPL005
WITH PAPAPLNO IN s_pernr
AND RETURN.
12-08-2008 4:54 PM
12-08-2008 5:45 PM
12-08-2008 6:26 PM
hi did you atleast try to do this ?
LOOP AT IT INTO WA.
WRITE : / WA-PERNR.
value1 = wa_pernr-value1.
value2 = wa_pernr-value2.
.....
....
ENDLOOP.
SUBMIT RPAPL005
WITH PAPAPLNO-LOW EQ value1
WITH PAPAPLNO-LOW EQ value2
WITH PAPAPLNO-LOW EQ value3
WITH PAPAPLNO-LOW EQ value4
WITH PAPAPLNO-LOW EQ value5
WITH PAPAPSTA-LOW EQ value6
AND RETURN.
12-08-2008 6:33 PM
Hi,
Use this:
data: rsparams_tab type table of rsparams.
rsparams_wa type rsparams.
Loop at it.
rsparams_wa-selname = 'PAPAPLNO'.
rsparams_wa-kind = 'S'.
rsparams_wa-sign = 'I'.
rsparams_wa-option = 'EQ'.
rsparams_wa-low = "I don't know which field from table IT you want to pass, so pick one you want
append rsparams_wa to rsparams_tab.
endloop.
SUBMIT RPAPL005 WITH SELECTION-TABLE rsparams_tab AND RETURN.
Hope it will help you
Marcin
12-08-2008 9:53 PM
create a range table. Copy all values to the range table and submit report with the range table.
Ranges: s_pernr for pb4000-pernr.
LOOP AT IT INTO WA.
s_pernr-sign = 'I'.
s_pernr-option = 'EQ'.
s_pernr-low = WA-PERNR.
append s_pernr.
ENDLOOP.
SUBMIT RPAPL005
WITH PAPAPLNO IN s_pernr
AND RETURN.