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

Batch/Background processing issue

Former Member
0 Likes
1,181

I'm having a weird issue I can't seem to figure out. When I run my program in foreground in anyway it works but in background it says it works but it doesn't really work. It's making sales orders via "Call transaction" to VA01. In foreground it works fine. I've tried different ID's to eliminate that as an issue. I've tried to send it to background from the program itself and from SM37. It just doesn't make the sales orders that way. If I go into SM37 and use the flag 'JDBG' on the job to debug it then it works and creates the orders. Is there any other way to debug a batch job I could try? Anyone else run into this issue or have any suggestions?

Thanks!

8 REPLIES 8
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
1,128

Are you performing any updates , one of the issue scan be that the updates are not happening in background as expected ( may be due to asynchronous updates being used).You can give it a try : use commit work once a particualr sales order is processed and then use wait .

Read only

Former Member
0 Likes
1,128

One of my co-works took a look and was at a loss as well but had an interesting idea. He said maybe the new doc type they created doesn't allow batch processing. Any idea where I could look at that or is that even a config thing?

Read only

0 Likes
1,128

>

> . He said maybe the new doc type they created doesn't allow batch processing. ?

Well that should not be the case ideally but its better to cross check the config.

Read only

Former Member
0 Likes
1,128

Not sure what else it could be. The program was cloned from a live production program which processes another vendor's file and creates VA01 sales orders in batch. It's been working since 1999. Not sure why a cloned program handling a different file would work in foreground but not background.

Read only

Former Member
0 Likes
1,128

We were able to narrow it down to the BDC yesterday. The below code is what is causing the sales orders not to be made in background but it works in foreground. Any ideas on how to get around that issue?

PERFORM bdc_load_screen USING 'SAPMV45A' '4001'.

PERFORM append_bdcdata USING 'BDC_OKCODE' 'KTEX_SUB'.

PERFORM bdc_load_screen USING 'SAPMV45A' '4002'.

PERFORM append_bdcdata USING 'BDC_OKCODE' 'TP_DETAIL'.

PERFORM bdc_load_screen USING 'SAPLSTXX' '1100'.

PERFORM append_bdcdata USING 'BDC_CURSOR' 'RSTXT-TXLINE(02)'.

PERFORM append_bdcdata USING 'BDC_OKCODE' 'TXBA'.

PERFORM append_bdcdata USING 'RSTXT-TXLINE(02)' tab_input-text1.

PERFORM bdc_load_screen USING 'SAPLSPO1' '0100'.

PERFORM append_bdcdata USING 'BDC_OKCODE' 'YES'.

Read only

Former Member
0 Likes
1,128

I've tried SHDB but I can't seem to find any way to input sales order header text that works in background. I'm sure there's a way isn't there?

Read only

Former Member
0 Likes
1,128

I ended up re-writing it so that it created the sales order then added the text in a second step via a function module.

Read only

0 Likes
1,128

Hi David,

the screen sequence in background may be different from online processing. In SHDB create recording you have some options, i.e. simulate background mode. Check if something looks different then.

Regards,

Clemens