Skip to Content
avatar image
Former Member

Batch Input Issue

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    Nov 01, 2006 at 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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Tuncay Karaca

      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

  • Nov 01, 2006 at 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>

    Add comment
    10|10000 characters needed characters exceeded