O Conhecimento

O conhecimento é inútil a menos que você o compartilhe.

Mostrando postagens com marcador UPDATE TASK. Mostrar todas as postagens
Mostrando postagens com marcador UPDATE TASK. Mostrar todas as postagens

quarta-feira, 6 de março de 2013

COMMIT WORK STOP (interrompe) BATCH INPUT


Em um programa executado usando o BATCH INPUT,  se você chamar o programa via CALL TRANSACTION , depois do COMMIT WORK termina o processamento do batch input.


DESCRIÇÂO do HELP do COMMIT (F1):

"In a program executed using batch input, or if you have called the program using the USING addition of the statement CALL TRANSACTION, COMMIT WORK terminates the batch input processing when using the corresponding settings. "

Ou se usar BAPI_TRANSACTION_COMMIT também interrompe o processamento.

Várias são as soluções, mas a mais apropriada para o CALL TRANSACTION foi a alteração dos parametros de opções de chamada.

 wa_opcoes-racommit 'X'. " preencher com X
 wa_opcoes-updmode  'L'. " mudar a opção do update mode conforme help


vamos ao que diz o help......do CALL TRANSACTION:


Addition 2

... UPDATE upd

Effect

The UPDATE addition determines the processing mode for batch input processing. You can specify a character-type object for upd. Its possible content and its effect are displayed in the following table. Without use of one of the additions UPDATE or OPTIONS FROM, the effect is the same as if upd had the content "A".
upd Effect
"A" Asynchronous update. Updates of called programs are executed in the same way as if in the COMMIT WORK statement the AND WAIT addition was not specified.
"S" Synchronous processing. Updates of the called programs are executed in the same way as if in the COMMIT WORK statement the AND WAIT addition had been specified.
"L" Local update. Updates of the called program are executed in such a way as if the SET UPDATE TASK LOCAL statement had been executed in it.
Other As for "A".

Note

This option is not available for execution of actual batch input sessions. There the update is always synchronous.



Addition 3

... OPTIONS FROM opt

Effect

The OPTIONS addition covers the functions of the MODE and UPDATE additions. It provides further options for controlling batch input processing. The control parameters are specified in an opt structure of the type CTU_PARAMS from the ABAP Dictionary. The CTU_PARAMS structure has the components displayed in the following table:
Component Meaning
DISMODE Processing mode for batch input processing. Values as for the MODE addition.
UPMODE Processing mode for batch input processing. Values as for the UPDATE addition.
CATTMODE CATT mode for batch input processing. CATT means Computer Aided Testtool. While batch input is mostly used for data transfer, CATT processes are to be viewed as more complex transactions, since they are reusable tests. Values: " " (no CATT mode), "N" (CATT without single screen control), "A" (CATT with single screen control).
DEFSIZE Selection as to whether the screens of the called transaction are displayed in the standard screen size. Values "X" (standard size), " " (current size).
RACOMMIT Selection as to whether the COMMIT WORK statement terminates batch input processing or not. Values: " " (COMMIT WORK terminates processing), "X" ( COMMIT WORK does not terminate processing).
NOBINPT Selection for the symbol field sy-binpt. Values: " " (sy-binpt contains in the called transaction "X"), "X" (sy-binpt contains in the called transaction " ").
NOBIEND Selection for the system field sy-binpt. Values: " " (sy-binpt contains "X" after the end of the batch input data in the called transsaction ) "X" (sy-binpt contains " " after the end of the batch input data in the called transaction).

Without use of the OPTIONS FROM addition,the values set by the additions MODE or UPDATE or the standard values specified there apply to DISMODE and UPMODE"A". The other components are set to the value " ".


Alterando os parametros o BATCH INPUT não mais é interrompido quando encontra um commit ou a função:   BAPI_TRANSACTION_COMMIT.


mais uma pra coleção,.........abs.




segunda-feira, 28 de janeiro de 2013

KP06 / KP26 / CJR2 / KPF6

Se um dia sua area funcional não derivar em CO então implemente um ENHANCEMENT para lhe salvar.....

CO recebe informação de tudo em quanto é lugar....então as vezes a coisa "engastilha" e NÃO flui como deveria, por N motivos.....então o abap entra em ação E ajuda a turma com alguns ENHANCEMENT (salvação da lavoura, diga-se de passagem).

vamos ao que interessa......

Para atender as quatro transações usadas KP06 / KP26 / CJR2 / KPF6, achar um ponto que atenda as 4 deu um pouco de trabalho no debug mas acho que o resultado valeu a pena....

No grupo de funções KAIN, função K_COEJA_INSERT....


Lembrete importante, função dentro de UPDATE TASK....dai a dificuldade do debug........

segue codigo........
 
Blogger Templates