‎2006 Oct 30 1:59 AM
I use bdc_insert to create a session.
When i process the session in foreground, few of them have error and few gets processed.
But when i execute this in background all gets errored out.
Any reason? how can i avoid it.
FYI: i see some i;nformation poppin up when using foreground.
‎2006 Oct 30 6:57 AM
can you say me what message you are getting while going to log analyzer in sm35? also one more point i would like to add over here. if the pop_up you are saying is something to decide, then you will have to record the respective code for it as well. i mean to say if the pop_up is appearing to make some choice or select some record from the display, then you have to record the code into your appl prgm, coz while scheduling in background it does not take care of all these things.
shane
‎2006 Oct 30 2:04 AM
Hi,
Check if the transaction is having custom controls..As the custom controls will not work in the background..
Thanks,
Naren
‎2006 Oct 30 3:33 AM
There could be a number of causes, depending on the transaction. Can you tell us what the transaction is please?
Rob
‎2006 Oct 30 3:40 AM
transaction is PA30.
I tried using call transaction method mode n. Here none of the records are processed. Wht could be the reason?
‎2006 Oct 30 3:48 AM
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = p_group
user = p_user
keep = p_keep
holddate = p_holdte.
WRITE: /(30) 'BDC_OPEN_GROUP'(i02),
(12) 'returncode:'(i05),
sy-subrc.
LOOP AT record.
PERFORM bdc_dynpro USING 'SAPMP50A' '1000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=INS'.
PERFORM bdc_field USING 'RP50G-PERNR'
record-pernr.
PERFORM bdc_field USING 'RP50G-TIMR6'
'X'.
PERFORM bdc_field USING 'RP50G-BEGDA'
record-begda.
PERFORM bdc_field USING 'RP50G-ENDDA'
record-endda.
PERFORM bdc_field USING 'RP50G-CHOIC' "Infotype
'2006'.
PERFORM bdc_field USING 'RP50G-SUBTY' "Quota Type
record-subty.
PERFORM bdc_dynpro USING 'MP200000' '2250'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=UPD'.
PERFORM bdc_field USING 'P2006-ANZHL' "Entitlement (day)
record-anzhl.
PERFORM bdc_field USING 'P2006-DESTA' "Deduction From
record-desta.
PERFORM bdc_field USING 'P2006-DEEND' "Deduction to
record-deend.
PERFORM bdc_transaction USING 'PA30'.
IF sy-subrc = 0.
WRITE: / 'Line :',sy-tabix, 'BDC Record Created'.
ELSE.
WRITE: / 'Line :',sy-tabix, 'Error during BDC Record Creation'.
ENDIF.
ENDLOOP.
FORM bdc_transaction USING tcode.
DATA: l_mstring(480).
DATA: l_subrc LIKE sy-subrc.
batch input session
CALL FUNCTION 'BDC_INSERT'
EXPORTING
tcode = tcode
TABLES
dynprotab = bdcdata.
call transaction 'PA30' using bdcdata mode 'N'.
WRITE: / 'BDC_INSERT'(i03),
tcode,
'returncode:'(i05),
sy-subrc,
'RECORD:',
sy-index.
REFRESH bdcdata.
ENDFORM. "bdc_transaction
‎2006 Oct 30 6:57 AM
can you say me what message you are getting while going to log analyzer in sm35? also one more point i would like to add over here. if the pop_up you are saying is something to decide, then you will have to record the respective code for it as well. i mean to say if the pop_up is appearing to make some choice or select some record from the display, then you have to record the code into your appl prgm, coz while scheduling in background it does not take care of all these things.
shane