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: 

Submit program option

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

monalisa_biswal
Contributor
0 Kudos

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.

5 REPLIES 5

Former Member
0 Kudos

HI,,

Try this Fm SUBMIT_REPORT

Refer to this link...

http://www.sapdevelopment.co.uk/reporting/rep_submit.htm

0 Kudos

This message was moderated.

former_member156446
Active Contributor
0 Kudos

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.

MarcinPciak
Active Contributor
0 Kudos

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

monalisa_biswal
Contributor
0 Kudos

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.