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: 

Problem for Function RSPO_RGET_PAGE_NUMBER

Former Member
0 Kudos

Hi,

I've to call the function RSPO_RGET_PAGE_NUMBER to get the no. of pages.

I know I have to export the parameter X of type TSP01SYS to this function, i.e.

CALL FUNCTION 'RSPO_RGET_PAGE_NUMBER'

EXPORTING RQ = IRQ

IMPORTING PAGES = ITLOG-NOFPAGE.

I defined IRQ as

DATA IRQ LIKE TSP01SYS.

I have an internal table itab storing the info from TSP01 and TSP02,

I just want to copy all the data from itab to IRQ,

MOVE-CORRESPONDING itab TO IRQ.

this just move a line to IRQ,

but i want to append all the data from itab to IRQ,

how to do so?

Thanks.

3 REPLIES 3

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

append lines of itab to IRQ.

or

IRQ[] = itab[].

If the tables fields are different,

then

loop at itab into wa.

move-corresponding wa to wa_ipq.

append wa_ipq to ipq.

endloop.

Message was edited by: Jayanthi Jayaraman

Message was edited by: Jayanthi Jayaraman

0 Kudos

IRQ has not been declared as a table....it will serve as a work area (structure) only....what u can do is to call your function module in a loop (on the internal table) and pass the corresponding values to the fields of IRQ and pass this inturn to the function module

hope this helps....

regards,

PJ

andreas_mann3
Active Contributor
0 Kudos

Hi Macy,

-fm is function to return page number for <b>1</b> spool request

-fm expects a structure not an internal table

-> so you've to call fm in a loop of your itab

regards Andreas