2006 Nov 01 11:21 PM
Hi guys,
It is possible to execute a Batch Input with ctumode = N, but in a disere part change it to ctumode = A?.
I'm asking this because i've got a Batch Input that have problems with one window if it is executed in mode N. The transaction that i'm using is CO01.
Regards,
Eric
PD. I'm anexing part of the code in case someone have another solution to resolve the problem. The dynpro marked in bold is the one that has issues... in A mode it works find, but in N mode it doesn't press the button.
Orden de Fabricación Crear: Acceso
bi: 'X' 'SAPLCOKO1' '0100',
' ' 'BDC_CURSOR' 'CAUFVD-MATNR',
' ' 'BDC_OKCODE' '/00',
' ' 'CAUFVD-MATNR' wa_alv-matnr,
' ' 'CAUFVD-WERKS' 'I15B',
' ' 'AUFPAR-PP_AUFART' wa_alv-auart,
Orden de Fabricación Crear: Cabecera
'X' 'SAPLCOKO1' '0115',
' ' 'BDC_CURSOR' 'CAUFVD-GSTRS',
' ' 'BDC_OKCODE' '/00',
' ' 'CAUFVD-GAMNG' cant,
' ' 'CAUFVD-GMEIN' wa_alv-gmein,
' ' 'CAUFVD-GSTRS' wa_alv-gstrs,
' ' 'CAUFVD-GSUZS' hora.
IF n GT 1.
Seleccion de Versiones fabricación p.material centro
bi: 'X' 'SAPLCOSD' '5132',
' ' 'BDC_CURSOR' 'MDFQ-VERID(02)',
' ' 'BDC_OKCODE' '=AUSW',
' ' campo 'X'.
ENDIF.
Entradas Posibles: Grupo Hojas Ruta
WHILE wa_alv-plnal GT 6.
bi: 'X' 'SAPLCPSL' '2120',
' ' 'BDC_CURSOR' 'RC27M-MATNR',
' ' 'BDC_OKCODE' '=P+'.
wa_alv-plnal = wa_alv-plnal - 6.
CONCATENATE 'PLKO-PLNAL(' wa_alv-plnal ')' INTO campo2.
ENDWHILE.
Entradas Posibles: Grupo Hojas Ruta
bi: 'X' 'SAPLCPSL' '2120',
' ' 'BDC_CURSOR' campo2,
' ' 'BDC_OKCODE' '=PICK',
Orden de Fabricación Crear: Cabecera
'X' 'SAPLCOKO1' '0115',
' ' 'BDC_CURSOR' 'CAUFVD-GAMNG',
' ' 'BDC_OKCODE' '=KOWE',
Orden de Fabricación Crear: Cabecera
'X' 'SAPLCOKO1' '0115',
' ' 'BDC_CURSOR' 'AFPOD-CHARG',
' ' 'BDC_OKCODE' '/00',
Orden de Fabricación Crear: Cabecera
'X' 'SAPLCOKO1' '0115',
' ' 'BDC_CURSOR' 'AFPOD-INSMK',
' ' 'BDC_OKCODE' '=FREI'.
IF wa_alv-flag EQ 'X'.
Orden de Fabricación Crear: Cabecera (Sin Disp. Mat.)
bi: 'X' 'SAPLSPO2' '0300',
' ' 'BDC_OKCODE' '=OPT1'.
ENDIF.
Orden de Fabricación Crear: Cabecera
bi: 'X' 'SAPLCOKO1' '0115',
' ' 'BDC_CURSOR' 'AFPOD-INSMK',
' ' 'BDC_OKCODE' '=BU'.
PERFORM bdc_transaction.
Message was edited by: Eric Hernandez Pardo
2006 Nov 01 11:45 PM
Eric,
Have you got your BDC code by using SHDB (Batch Input Recorder) or coded yourself.
It is better to use SHDB to get BDC ABAP code, because it gets all screens even in background.
The other point is SAP system sometimes recommends alternative different screens for BDC. So there might be alternative screen for SAPLSPO2 0300.
2006 Nov 01 11:42 PM
Eric,
There is a SAP Note: <b>Note 135706</b> - Production order: Batch input only runs in foreground
It says:
<i>A frequent error is that the cursor is not set correctly in the batch input session. Note that in the foreground the system automatically places the cursor on the 1st entry of a table (Table-Control, step loop) while in the background, the cursor must be placed explicitly on the field in question. Now, if a function to be executed depends on the position of the cursor, an error occurs during the batch input run in the background while the batch input runs without errors in the foreground.
First, check whether the cursor (BDC_CURSOR) is set correctly in your batch input for the function in question.</i>
2006 Nov 03 3:26 PM
Hi Tuncay,
I looked after the note 135706, but it is already implemented in my system... any other suggestion?.
Regards,
Eric
2006 Nov 03 4:52 PM
Eric,
Could you please be some more clear on the requirement.
2006 Nov 01 11:45 PM
Eric,
Have you got your BDC code by using SHDB (Batch Input Recorder) or coded yourself.
It is better to use SHDB to get BDC ABAP code, because it gets all screens even in background.
The other point is SAP system sometimes recommends alternative different screens for BDC. So there might be alternative screen for SAPLSPO2 0300.
2006 Nov 03 2:55 PM
Hi Tuncay,
I used the SHDB to get the BDC ABAP Code, but it didn´t show any BDC_CURSOR for the dynpro in question. Where can I see if SAP recommends an alternative screen for this one?.
Regards,
Eric
2006 Nov 03 5:21 PM
Eric,
Even SHDB didn't show BDC_CURSOR for the dynpro, I think you can try to use BDC_CURSOR for the dynpro. Just focus on one of the proper input fields on the dynpro by using BDC_CURSOR. As far as I understand it might work.
2006 Nov 03 6:15 PM
Are you sure that this popup is displayed at all in mode 'N' ? Usually popup screens are not displayed in batch input mode 'N'.
I would suggest you just debug the code when you run it online (mode A) to see when this popup is displayed.
As an option - run it in 'A' but set in debug sy-batch to 'X' it may help to investigate the issue.
2006 Nov 03 8:31 PM
Hi Tuncay,
I already debug the transaction and set the name of the buton to the BDC_CURSOR and it didn't work either.
Regards,
Eric
2006 Nov 03 8:54 PM
Hi Siarhei,
I debug the code with sy-batch = 'X', but it is working fine in A mode...
Regards,
Eric
2006 Nov 03 11:16 PM
Eric,
On OSS search for 'SAPLSPO2 0300', it shows several messages related to batch input. Look at those notes: Note 759741, Note 603401.
One of the notes says:
<i>During the reading of the master data in the production order or process order the system displays a dialog box which informs you about occurred messages and from where you can branch into the log.In the batch input, however, this dialog box should not be sent.</i>
So I guess you don't need to use SAPLSPO2 0300 when you run the batch input on background. Just try not to use it.
2006 Nov 03 11:21 PM
Hi Tuncay,
I talk to the PP Functional in order to remove that validation, and the problem was resolved.
Thanks a lot.
Points were rewarded.
Regards,
Eric