‎2010 Oct 25 3:05 PM
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!
‎2010 Oct 25 3:32 PM
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 .
‎2010 Oct 25 3:35 PM
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?
‎2010 Oct 25 3:47 PM
>
> . 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.
‎2010 Oct 25 3:51 PM
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.
‎2010 Oct 26 3:38 PM
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'.
‎2010 Oct 26 5:51 PM
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?
‎2010 Nov 03 2:28 PM
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.
‎2010 Nov 03 4:28 PM
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