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

SUBMIT statement

Former Member
0 Likes
553

Hi experts,

If i have to SUBMIT a report 5 times within a subroutine of my main report, how is that going to be achieved? Is DO ENDDO a solution to it?

The situation is that i have the following code in my main report main_delete:

IF p_as = 'X'.

OPEN CURSOR WITH HOLD lv_cursor FOR

SELECT * FROM dd02l

WHERE as4local = 'A' AND

( tabclass = 'TRANSP' OR

tabclass = 'POOL' OR

tabclass = 'CLUSTER' ) .

DO.

FETCH NEXT CURSOR lv_cursor

INTO CORRESPONDING FIELDS OF TABLE lt_result

PACKAGE SIZE lv_package_size.

IF sy-subrc <> 0.

EXIT.

ELSE.

****Schdule jobs in parallel for packet of entries as defined by ****

****lv_package_size

PERFORM state_entries TABLES et_result.

Now in the subroutine state_entries, i have to call the other report get_delete 5 times using a SUBMIT statement and pass it to a FUNCTION MODULE . How should i achieve this?

Also, in get_delete, there are about 10 lakh records that are being processed. So how will the report know when is the next lot of 2 lakh records going to be processed (as defined by lv_package_size)? Will the FETCH NEXT CURSOR take care of this?

I will reward all the helpful answers.

Thanks,

Ajay.

3 REPLIES 3
Read only

Sm1tje
Active Contributor
0 Likes
434

First: Indeed you can use DO 5 TIMES. .SUBMIT xxxx .... ENDDO.

But this will only make sense when you are using different values for the data on the selection screen from the report your are calling in SUBMIT. Else, the report will do the same thing 5 TIMES, while the first time is already enough??!!

Second: What do you mean by: 'Pass this to a function module'. Pass what to a function module and why?

Third: There is a question about get_delete. Like I already wrote above, call the GET_DELETE report with different selection parameters. By the way: What is LAKH (1000?).

The fetch cursor can take care of this, but than you will have to use the PERFORM state_entries TABLES et_result before the EXIT i believe. Your code is not complete, so I'm taking a guess here.

BUT: Do not use the FETCH and DO 5 TIMES. SUBMIT. ENDDO together. The one or the other.

Edited by: Micky Oestreich on Apr 13, 2008 10:31 PM

Read only

0 Likes
434

LAKH is hindi word for 100,000.

Read only

Former Member
0 Likes
434

Hi Micky,

I have to pass the report get_delete in the FM 5 times (for 200000 entries each)

Lakh means 100000.

Thanks,

Ajay.