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

Error With RSDBCSUB

former_member210118
Participant
0 Likes
1,694

I there guys, i have a big of a problem here in my sap system. My system is SAP R3 Enterprise.

Here's what i have:

I have a program that collects information for creating financial documents, the method i used is creating Batch Input and then process them. I use the SAP standard report RFBIBL00 for creating the BI, and then use the RSBDCSUB for processing the Batch Input.

The program works at some point well, It creates the Batch Input, and then it processes it. The problem is in the RSBDCSUB report that if i put the option EXPORTING LIST TO MEMORY, the program generates a DUMP. I must say that this option must be enabled because the purpose of my program is to send the information to another non sap system via RFC function. If i take this EXPORTING LIST TO MEMORY option, it works really well. I have noticed that the problem is in a function that i think the RSBDCSUB report calls, this function is BDC_PROTOCOL_SELECT that at some point has a SELECT to the APQL table, and it tests if that select returns data, and if it doesn't return it raises an exception INVALID_DATA.

One more thing, if i run the program in Debug Mode and with the EXPORTING TO LIST MEMORY option, it works fine and no DUMP is generated, which makes me think that the problem might be in the update of APQL table, maybe the function BDC_PROTOCOL_SELECT makes an insert in this table and right after makes the select to the table trying to find that record that hadn't had the time to be saved in the table.

Does Anyone know any way to solve this problem?

Here is the code i have and the calls to the report's:

Somewhere in my program i have this:

  • Batch input Creation

SUBMIT rfbibl00 AND RETURN

WITH callmode = 'B'

WITH ds_name = file_as_completo

WITH fl_check = space

WITH max_comm = 1000

WITH os_xon = space

WITH pa_xprot = 'X'

WITH xinf = space

WITH xlog = space

WITH xinf = 'X'

WITH xpop = space.

  • Batch Input Execution

SUBMIT rsbdcsub AND RETURN

EXPORTING LIST TO MEMORY

WITH batchsys = space

WITH bis = sy-datum

WITH fehler = space

WITH logall = space

WITH mappe = pasta

WITH von = sy-datum

WITH z_verarb = 'X'.

The Function that generates the DUMP is BDC_PROTOCOL_SELECT, and is in this SELECT to APQL (right at the end of the function)

SELECT * FROM APQL INTO TABLE APQLTAB

WHERE GROUPID IN R_GROUPID

AND CREATOR IN R_CREATOR

AND STATUS IN R_STATUS

AND MANDANT = CLIENT

AND ( ( CREDATE EQ DATE_FROM

AND CREDATE EQ DATE_TO

AND CRETIME in R_TIME )

OR ( CREDATE EQ DATE_FROM

AND CREDATE NE DATE_TO

AND CRETIME GE TIME_FROM )

OR ( CREDATE NE DATE_FROM

AND CREDATE EQ DATE_TO

AND CRETIME LE TIME_TO )

OR ( CREDATE GT DATE_FROM

AND CREDATE LT DATE_TO ) )

ORDER BY CREDATE DESCENDING CRETIME DESCENDING.

IF SY-SUBRC <> 0.

RAISE INVALID_DATA.

ENDIF.

Below is a link to a file with the DUMP generated.

<a href="http://rapidshare.com/files/17401650/Dump.htm">Dump File</a>

Hopping to hear from you guys,

Ricardo Monteiro

13 REPLIES 13
Read only

Former Member
0 Likes
1,555

Why do you need the report from RSBDCSUB?

Rob

Read only

0 Likes
1,555

Rob i need RSBDCSUB to execute the Batch Input. The RFBIBL00 creates a batch input case and the i use the other one to execute it.

Satya,

right here i don't have how to access the system, because it's in a client, can you tell me what does that RPB015FI program does ?

Best regards,

Ricardo Monteiro

Read only

0 Likes
1,555

I know RSBDCSUB starts the batch input session, but I've never seen a useful report come from it. Do you need things like the document number?

Rob

Read only

0 Likes
1,555

Rob, actually i don't need any of the log's / information on the screen that it returns, because after in my program i go to the Batch Input log and retrieve what i want, i just want to use this report to LAUNCH the Batch input session

Read only

0 Likes
1,555

Then there's no need to export the list to memory.

Rob

Read only

0 Likes
1,555

but there's a problem if i don't export to memory. If i don't do this, the program writes information to the screen and as this is to be called by RFC function, the other system gets an error saying that needs to have user intervention on the SAP side (that is pressing F3 to go back to the main function)

Read only

0 Likes
1,555

OK - instead of trying to export the list to memory, why don't you SUBMIT TO SAP-SPOOL?

Rob

Read only

0 Likes
1,555

but submitting to SAP SPOOL won't it always print the results? or can i submit to spool without printing?

Read only

0 Likes
1,555

There are various parameters you can pass. Check the help on SUBMIT.

Rob

Read only

0 Likes
1,555

Thanks Rob, i'll try it, but only next week that is when i can access the system..Hope this can solve the problem with the dump

Read only

0 Likes
1,555

I think if you set the 'immediately' flag to space, it should stay in the spool until the retention period expires.

Rob

Read only

0 Likes
1,555

hia there Rob,

I've changed the call of the program like this

SUBMIT rsbdcsub AND RETURN

TO SAP-SPOOL

KEEP IN SPOOL ''

WITHOUT SPOOL DYNPRO

  • EXPORTING LIST TO MEMORY

WITH batchsys = space

WITH bis = sy-datum

WITH fehler = space

WITH logall = space

WITH mappe = pasta

WITH von = sy-datum

WITH z_verarb = 'X'.

but the dump continues to appear

eDITED: Thanks Rob, the problem is solved

Message was edited by:

Ricardo Monteiro

Read only

Former Member
0 Likes
1,555

Hi Ricardo,

check the Standard program : RPB015FI, In that also the program RSBDCSUB is used as per ur requirement.

SUBMIT RSBDCSUB WITH MAPPE EQ P_MAP

WITH VON EQ SY-DATUM

WITH BIS EQ SY-DATUM

WITH FEHLER EQ SPACE

EXPORTING LIST TO MEMORY

AND RETURN.

Regards,

Satya.